commit
stringlengths 40
40
| old_file
stringlengths 4
237
| new_file
stringlengths 4
237
| old_contents
stringlengths 1
4.24k
| new_contents
stringlengths 5
4.84k
| subject
stringlengths 15
778
| message
stringlengths 16
6.86k
| lang
stringlengths 1
30
| license
stringclasses 13
values | repos
stringlengths 5
116k
| config
stringlengths 1
30
| content
stringlengths 105
8.72k
|
---|---|---|---|---|---|---|---|---|---|---|---|
712b44f8c2eb3d8636e3f7fd2dadc8ef263d8731
|
content/docs/for-developers/sending-email/v3-python-code-example.md
|
content/docs/for-developers/sending-email/v3-python-code-example.md
|
---
layout: page
weight: 0
title: v3 API Python Code Example
group: api-v3
navigation:
show: true
---
<call-out>
We recommend using SendGrid Python, our client library, [available on GitHub](https://github.com/sendgrid/sendgrid-python), with full documentation.
</call-out>
<call-out>
Do you have an [API Key](https://app.sendgrid.com/settings/api_keys) yet? If not, go get one. You're going to need it to integrate!
</call-out>
## Using SendGrid's Python Library
```python
# using SendGrid's Python Library
# https://github.com/sendgrid/sendgrid-python
import sendgrid
import os
from sendgrid.helpers.mail import *
sg = sendgrid.SendGridAPIClient(api_key=os.environ.get('SENDGRID_API_KEY'))
from_email = Email("[email protected]")
to_email = Email("[email protected]")
subject = "Sending with SendGrid is Fun"
content = Content("text/plain", "and easy to do anywhere, even with Python")
mail = Mail(from_email, subject, to_email, content)
response = sg.client.mail.send.post(request_body=mail.get())
print(response.status_code)
print(response.body)
print(response.headers)
```
|
---
layout: page
weight: 0
title: v3 API Python Code Example
group: api-v3
navigation:
show: true
---
<call-out>
We recommend using SendGrid Python, our client library, [available on GitHub](https://github.com/sendgrid/sendgrid-python), with full documentation.
</call-out>
<call-out>
Do you have an [API Key](https://app.sendgrid.com/settings/api_keys) yet? If not, go get one. You're going to need it to integrate!
</call-out>
## Using SendGrid's Python Library
```python
# using SendGrid's Python Library
# https://github.com/sendgrid/sendgrid-python
import os
from sendgrid import SendGridAPIClient
from sendgrid.helpers.mail import Mail
message = Mail(
from_email='[email protected]',
to_emails='[email protected]',
subject='Sending with Twilio SendGrid is Fun',
html_content='<strong>and easy to do anywhere, even with Python</strong>')
try:
sg = SendGridAPIClient(os.environ.get('SENDGRID_API_KEY'))
response = sg.send(message)
print(response.status_code)
print(response.body)
print(response.headers)
except Exception as e:
print(e.message)
```
|
Update code sample to reflect latest version of our Python SDK
|
Update code sample to reflect latest version of our Python SDK
|
Markdown
|
mit
|
sendgrid/docs,Whatthefoxsays/docs,sendgrid/docs,Whatthefoxsays/docs,Whatthefoxsays/docs,sendgrid/docs
|
markdown
|
## Code Before:
---
layout: page
weight: 0
title: v3 API Python Code Example
group: api-v3
navigation:
show: true
---
<call-out>
We recommend using SendGrid Python, our client library, [available on GitHub](https://github.com/sendgrid/sendgrid-python), with full documentation.
</call-out>
<call-out>
Do you have an [API Key](https://app.sendgrid.com/settings/api_keys) yet? If not, go get one. You're going to need it to integrate!
</call-out>
## Using SendGrid's Python Library
```python
# using SendGrid's Python Library
# https://github.com/sendgrid/sendgrid-python
import sendgrid
import os
from sendgrid.helpers.mail import *
sg = sendgrid.SendGridAPIClient(api_key=os.environ.get('SENDGRID_API_KEY'))
from_email = Email("[email protected]")
to_email = Email("[email protected]")
subject = "Sending with SendGrid is Fun"
content = Content("text/plain", "and easy to do anywhere, even with Python")
mail = Mail(from_email, subject, to_email, content)
response = sg.client.mail.send.post(request_body=mail.get())
print(response.status_code)
print(response.body)
print(response.headers)
```
## Instruction:
Update code sample to reflect latest version of our Python SDK
## Code After:
---
layout: page
weight: 0
title: v3 API Python Code Example
group: api-v3
navigation:
show: true
---
<call-out>
We recommend using SendGrid Python, our client library, [available on GitHub](https://github.com/sendgrid/sendgrid-python), with full documentation.
</call-out>
<call-out>
Do you have an [API Key](https://app.sendgrid.com/settings/api_keys) yet? If not, go get one. You're going to need it to integrate!
</call-out>
## Using SendGrid's Python Library
```python
# using SendGrid's Python Library
# https://github.com/sendgrid/sendgrid-python
import os
from sendgrid import SendGridAPIClient
from sendgrid.helpers.mail import Mail
message = Mail(
from_email='[email protected]',
to_emails='[email protected]',
subject='Sending with Twilio SendGrid is Fun',
html_content='<strong>and easy to do anywhere, even with Python</strong>')
try:
sg = SendGridAPIClient(os.environ.get('SENDGRID_API_KEY'))
response = sg.send(message)
print(response.status_code)
print(response.body)
print(response.headers)
except Exception as e:
print(e.message)
```
|
bebb9f7886aa6db043b1d0ce5ba9c0a84aa7e17c
|
utils/ua.js
|
utils/ua.js
|
const UA = window.navigator.userAgent;
export const isiOS = /iPhone/i.test(UA);
export const isAndroid = /android/i.test(UA);
export const isMobile = isiOS || isAndroid;
|
const UA = window.navigator.userAgent;
export const isiOS = /iPhone/i.test(UA);
export const isAndroid = /android/i.test(UA);
export const isMobile = window.innerWidth < window.innerHeight;
|
Modify the mobile judgment standard
|
feat: Modify the mobile judgment standard
|
JavaScript
|
mit
|
yinxin630/fiora,yinxin630/fiora,yinxin630/fiora
|
javascript
|
## Code Before:
const UA = window.navigator.userAgent;
export const isiOS = /iPhone/i.test(UA);
export const isAndroid = /android/i.test(UA);
export const isMobile = isiOS || isAndroid;
## Instruction:
feat: Modify the mobile judgment standard
## Code After:
const UA = window.navigator.userAgent;
export const isiOS = /iPhone/i.test(UA);
export const isAndroid = /android/i.test(UA);
export const isMobile = window.innerWidth < window.innerHeight;
|
a294ea80e95e8469031997ad40fbb3fa5e5eb658
|
security-utils/src/main/java/com/yahoo/security/tls/MixedMode.java
|
security-utils/src/main/java/com/yahoo/security/tls/MixedMode.java
|
// Copyright 2018 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.security.tls;
import java.util.Arrays;
/**
* @author bjorncs
*/
public enum MixedMode {
PLAINTEXT_CLIENT_MIXED_SERVER("plaintext_client_mixed_server"),
TLS_CLIENT_MIXED_SERVER("tls_client_mixed_server");
final String configValue;
MixedMode(String configValue) {
this.configValue = configValue;
}
public String configValue() {
return configValue;
}
static MixedMode fromConfigValue(String configValue) {
return Arrays.stream(values())
.filter(v -> v.configValue.equals(configValue))
.findFirst()
.orElseThrow(() -> new IllegalArgumentException("Unknown value: " + configValue));
}
}
|
// Copyright 2018 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.security.tls;
import java.util.Arrays;
/**
* @author bjorncs
*/
public enum MixedMode {
PLAINTEXT_CLIENT_MIXED_SERVER("plaintext_client_mixed_server"),
TLS_CLIENT_MIXED_SERVER("tls_client_mixed_server"),
DISABLED("tls_client_tls_server");
final String configValue;
MixedMode(String configValue) {
this.configValue = configValue;
}
public String configValue() {
return configValue;
}
/**
* @return Default value when mixed mode is not explicitly specified
*/
public static MixedMode defaultValue() {
return DISABLED;
}
static MixedMode fromConfigValue(String configValue) {
return Arrays.stream(values())
.filter(v -> v.configValue.equals(configValue))
.findFirst()
.orElseThrow(() -> new IllegalArgumentException("Unknown value: " + configValue));
}
}
|
Add 'tls_client_tls_server' as tls mixed mode option
|
Add 'tls_client_tls_server' as tls mixed mode option
Also introduce default value for mixed mode.
|
Java
|
apache-2.0
|
vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa
|
java
|
## Code Before:
// Copyright 2018 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.security.tls;
import java.util.Arrays;
/**
* @author bjorncs
*/
public enum MixedMode {
PLAINTEXT_CLIENT_MIXED_SERVER("plaintext_client_mixed_server"),
TLS_CLIENT_MIXED_SERVER("tls_client_mixed_server");
final String configValue;
MixedMode(String configValue) {
this.configValue = configValue;
}
public String configValue() {
return configValue;
}
static MixedMode fromConfigValue(String configValue) {
return Arrays.stream(values())
.filter(v -> v.configValue.equals(configValue))
.findFirst()
.orElseThrow(() -> new IllegalArgumentException("Unknown value: " + configValue));
}
}
## Instruction:
Add 'tls_client_tls_server' as tls mixed mode option
Also introduce default value for mixed mode.
## Code After:
// Copyright 2018 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.security.tls;
import java.util.Arrays;
/**
* @author bjorncs
*/
public enum MixedMode {
PLAINTEXT_CLIENT_MIXED_SERVER("plaintext_client_mixed_server"),
TLS_CLIENT_MIXED_SERVER("tls_client_mixed_server"),
DISABLED("tls_client_tls_server");
final String configValue;
MixedMode(String configValue) {
this.configValue = configValue;
}
public String configValue() {
return configValue;
}
/**
* @return Default value when mixed mode is not explicitly specified
*/
public static MixedMode defaultValue() {
return DISABLED;
}
static MixedMode fromConfigValue(String configValue) {
return Arrays.stream(values())
.filter(v -> v.configValue.equals(configValue))
.findFirst()
.orElseThrow(() -> new IllegalArgumentException("Unknown value: " + configValue));
}
}
|
4401efd199967494776e4f62a9d78a1c3cb70585
|
envkey-react/src/lib/env/transform.js
|
envkey-react/src/lib/env/transform.js
|
import R from 'ramda'
import {inheritedVal} from './inheritance'
const
getMetaToValFn = (envsWithMeta)=> (meta, entryKey)=>{
return meta.inherits ?
inheritedVal({entryKey, envsWithMeta, inherits: meta.inherits}) :
(meta.val || undefined)
}
export const
rawEnv = ({envsWithMeta, environment})=> {
return R.mapObjIndexed(
getMetaToValFn(envsWithMeta),
envsWithMeta[environment]
)
},
createEntry = ({envsWithMeta, entryKey, vals})=>{
return R.mapObjIndexed(
(env, name) => R.assoc(entryKey, vals[name], env),
envsWithMeta
)
},
updateEntry = ({envsWithMeta, entryKey, newKey})=>{
return R.mapObjIndexed(
(env)=> ({...R.dissoc(entryKey, env), [newKey]: env[entryKey]}),
envsWithMeta
)
},
removeEntry = ({envsWithMeta, entryKey})=>{
return R.mapObjIndexed(R.dissoc(entryKey), envsWithMeta)
},
updateEntryVal = ({envsWithMeta, entryKey, environment, update})=>{
return R.assocPath([environment, entryKey], update, envsWithMeta)
}
|
import R from 'ramda'
import {inheritedVal} from './inheritance'
const
getMetaToValFn = (envsWithMeta)=> (meta, entryKey)=>{
if (meta.inherits){
return inheritedVal({entryKey, envsWithMeta, inherits: meta.inherits})
} else if (meta.val || meta.val === ""){
return meta.val
} else if (meta.val === ""){
return undefined
}
}
export const
rawEnv = ({envsWithMeta, environment})=> {
return R.mapObjIndexed(
getMetaToValFn(envsWithMeta),
envsWithMeta[environment]
)
},
createEntry = ({envsWithMeta, entryKey, vals})=>{
return R.mapObjIndexed(
(env, name) => R.assoc(entryKey, vals[name], env),
envsWithMeta
)
},
updateEntry = ({envsWithMeta, entryKey, newKey})=>{
return R.mapObjIndexed(
(env)=> ({...R.dissoc(entryKey, env), [newKey]: env[entryKey]}),
envsWithMeta
)
},
removeEntry = ({envsWithMeta, entryKey})=>{
return R.mapObjIndexed(R.dissoc(entryKey), envsWithMeta)
},
updateEntryVal = ({envsWithMeta, entryKey, environment, update})=>{
return R.assocPath([environment, entryKey], update, envsWithMeta)
}
|
Fix for empty strings getting parsed as undefined for rawEnv
|
Fix for empty strings getting parsed as undefined for rawEnv
|
JavaScript
|
mit
|
envkey/envkey-app,envkey/envkey-app,envkey/envkey-app,envkey/envkey-app
|
javascript
|
## Code Before:
import R from 'ramda'
import {inheritedVal} from './inheritance'
const
getMetaToValFn = (envsWithMeta)=> (meta, entryKey)=>{
return meta.inherits ?
inheritedVal({entryKey, envsWithMeta, inherits: meta.inherits}) :
(meta.val || undefined)
}
export const
rawEnv = ({envsWithMeta, environment})=> {
return R.mapObjIndexed(
getMetaToValFn(envsWithMeta),
envsWithMeta[environment]
)
},
createEntry = ({envsWithMeta, entryKey, vals})=>{
return R.mapObjIndexed(
(env, name) => R.assoc(entryKey, vals[name], env),
envsWithMeta
)
},
updateEntry = ({envsWithMeta, entryKey, newKey})=>{
return R.mapObjIndexed(
(env)=> ({...R.dissoc(entryKey, env), [newKey]: env[entryKey]}),
envsWithMeta
)
},
removeEntry = ({envsWithMeta, entryKey})=>{
return R.mapObjIndexed(R.dissoc(entryKey), envsWithMeta)
},
updateEntryVal = ({envsWithMeta, entryKey, environment, update})=>{
return R.assocPath([environment, entryKey], update, envsWithMeta)
}
## Instruction:
Fix for empty strings getting parsed as undefined for rawEnv
## Code After:
import R from 'ramda'
import {inheritedVal} from './inheritance'
const
getMetaToValFn = (envsWithMeta)=> (meta, entryKey)=>{
if (meta.inherits){
return inheritedVal({entryKey, envsWithMeta, inherits: meta.inherits})
} else if (meta.val || meta.val === ""){
return meta.val
} else if (meta.val === ""){
return undefined
}
}
export const
rawEnv = ({envsWithMeta, environment})=> {
return R.mapObjIndexed(
getMetaToValFn(envsWithMeta),
envsWithMeta[environment]
)
},
createEntry = ({envsWithMeta, entryKey, vals})=>{
return R.mapObjIndexed(
(env, name) => R.assoc(entryKey, vals[name], env),
envsWithMeta
)
},
updateEntry = ({envsWithMeta, entryKey, newKey})=>{
return R.mapObjIndexed(
(env)=> ({...R.dissoc(entryKey, env), [newKey]: env[entryKey]}),
envsWithMeta
)
},
removeEntry = ({envsWithMeta, entryKey})=>{
return R.mapObjIndexed(R.dissoc(entryKey), envsWithMeta)
},
updateEntryVal = ({envsWithMeta, entryKey, environment, update})=>{
return R.assocPath([environment, entryKey], update, envsWithMeta)
}
|
1b2e07a787d122673242a57d1c2743336df0dc75
|
app/views/recipes/_ingredients.html.haml
|
app/views/recipes/_ingredients.html.haml
|
.col-md-12
.col-md-3
%strong
%label Ingredients:
.col-md-4= f.link_to_add "Add ingredient", :ingredients, class: "btn btn-danger btn-xs", data: {target: "#new_ingredient"}
%br
%br
%br
.col-md-9
#new_ingredient
= f.simple_fields_for :ingredients do |ingredient|
.col-md-4
= ingredient.association :content, collection: Content.all.collect{|c| ["#{c.name} - #{c.taste}", c.id]}, label: false, prompt: "Select Ingredient"
.col-md-3
= ingredient.input :quantity, label: false, placeholder: 'Quantity'
.col-md-4
= ingredient.input :description, input_html: { rows: 1, cols: 6 }, label: false, placeholder: 'Description (if any)'
.col-md-1
%br
= ingredient.link_to_remove "Remove", class: "btn btn-danger btn-xs"
|
.col-md-12
.col-md-3
%strong
%label Ingredients:
.col-md-4= f.link_to_add "Add ingredient", :ingredients, class: "btn btn-danger btn-xs", data: {target: "#new_ingredient"}
%br
%br
%br
.col-md-9
#new_ingredient
= f.simple_fields_for :ingredients do |ingredient|
.col-md-4
= ingredient.association :content, collection: Content.all.collect{|c| ["#{c.name} - #{c.taste}", c.id]}, label: false, prompt: "Select Ingredient"
.col-md-3
= ingredient.input :quantity, label: false, placeholder: 'Quantity'
.col-md-4
= ingredient.input :description, input_html: { rows: 1, cols: 6 }, label: false, placeholder: 'Description (if any)'
.col-md-1
%br
= ingredient.link_to_remove "Remove", class: "btn btn-danger btn-xs" unless ingredient.object.persisted?
|
Remove 'remove' button from ingredient on edit page
|
Remove 'remove' button from ingredient on edit page
|
Haml
|
mit
|
Shwetakale/recipe_guru,Shwetakale/recipe_guru,Shwetakale/recipe_guru
|
haml
|
## Code Before:
.col-md-12
.col-md-3
%strong
%label Ingredients:
.col-md-4= f.link_to_add "Add ingredient", :ingredients, class: "btn btn-danger btn-xs", data: {target: "#new_ingredient"}
%br
%br
%br
.col-md-9
#new_ingredient
= f.simple_fields_for :ingredients do |ingredient|
.col-md-4
= ingredient.association :content, collection: Content.all.collect{|c| ["#{c.name} - #{c.taste}", c.id]}, label: false, prompt: "Select Ingredient"
.col-md-3
= ingredient.input :quantity, label: false, placeholder: 'Quantity'
.col-md-4
= ingredient.input :description, input_html: { rows: 1, cols: 6 }, label: false, placeholder: 'Description (if any)'
.col-md-1
%br
= ingredient.link_to_remove "Remove", class: "btn btn-danger btn-xs"
## Instruction:
Remove 'remove' button from ingredient on edit page
## Code After:
.col-md-12
.col-md-3
%strong
%label Ingredients:
.col-md-4= f.link_to_add "Add ingredient", :ingredients, class: "btn btn-danger btn-xs", data: {target: "#new_ingredient"}
%br
%br
%br
.col-md-9
#new_ingredient
= f.simple_fields_for :ingredients do |ingredient|
.col-md-4
= ingredient.association :content, collection: Content.all.collect{|c| ["#{c.name} - #{c.taste}", c.id]}, label: false, prompt: "Select Ingredient"
.col-md-3
= ingredient.input :quantity, label: false, placeholder: 'Quantity'
.col-md-4
= ingredient.input :description, input_html: { rows: 1, cols: 6 }, label: false, placeholder: 'Description (if any)'
.col-md-1
%br
= ingredient.link_to_remove "Remove", class: "btn btn-danger btn-xs" unless ingredient.object.persisted?
|
a5870d784ba8642cf1db647c18152562c72ca0b4
|
package.json
|
package.json
|
{
"name": "react-translate",
"version": "3.0.4",
"description": "react utilities for simple i18n",
"main": "./lib/index.js",
"files": [
"README.md",
"LICENSE",
"lib"
],
"devDependencies": {
"babel": "^5.8.29",
"babel-core": "^5.8.30",
"babel-loader": "^5.3.2",
"react": "^0.14.1",
"react-addons-test-utils": "^0.14.1",
"tape": "^4.1.0",
"tape-catch": "^1.0.4",
"webpack": "^1.12.2",
"webpack-dev-server": "^1.12.1",
"webpack-jsdom-tape-plugin": "^1.2.0"
},
"peerDependencies": {
"react": "^0.14.0"
},
"scripts": {
"start": "babel --stage 0 src --out-dir lib --ignore='__tests__'",
"test": "babel-node --stage 0 ./scripts/webpack/test"
},
"author": "bloodyowl",
"license": "MIT",
"dependencies": {
"invariant": "^2.1.2"
}
}
|
{
"name": "react-translate",
"version": "3.0.4",
"description": "react utilities for simple i18n",
"main": "./lib/index.js",
"files": [
"README.md",
"LICENSE",
"lib"
],
"devDependencies": {
"babel": "^5.8.29",
"babel-core": "^5.8.30",
"babel-loader": "^5.3.2",
"react": "^0.14.1",
"react-addons-test-utils": "^0.14.1",
"tape": "^4.1.0",
"tape-catch": "^1.0.4",
"webpack": "^1.12.2",
"webpack-dev-server": "^1.12.1",
"webpack-jsdom-tape-plugin": "^1.2.0"
},
"peerDependencies": {
"react": "^0.14.0 || ^15.0.0"
},
"scripts": {
"start": "babel --stage 0 src --out-dir lib --ignore='__tests__'",
"test": "babel-node --stage 0 ./scripts/webpack/test"
},
"author": "bloodyowl",
"license": "MIT",
"dependencies": {
"invariant": "^2.1.2"
}
}
|
Allow latest version of react as a peer dependency
|
Allow latest version of react as a peer dependency
|
JSON
|
mit
|
bloodyowl/react-translate
|
json
|
## Code Before:
{
"name": "react-translate",
"version": "3.0.4",
"description": "react utilities for simple i18n",
"main": "./lib/index.js",
"files": [
"README.md",
"LICENSE",
"lib"
],
"devDependencies": {
"babel": "^5.8.29",
"babel-core": "^5.8.30",
"babel-loader": "^5.3.2",
"react": "^0.14.1",
"react-addons-test-utils": "^0.14.1",
"tape": "^4.1.0",
"tape-catch": "^1.0.4",
"webpack": "^1.12.2",
"webpack-dev-server": "^1.12.1",
"webpack-jsdom-tape-plugin": "^1.2.0"
},
"peerDependencies": {
"react": "^0.14.0"
},
"scripts": {
"start": "babel --stage 0 src --out-dir lib --ignore='__tests__'",
"test": "babel-node --stage 0 ./scripts/webpack/test"
},
"author": "bloodyowl",
"license": "MIT",
"dependencies": {
"invariant": "^2.1.2"
}
}
## Instruction:
Allow latest version of react as a peer dependency
## Code After:
{
"name": "react-translate",
"version": "3.0.4",
"description": "react utilities for simple i18n",
"main": "./lib/index.js",
"files": [
"README.md",
"LICENSE",
"lib"
],
"devDependencies": {
"babel": "^5.8.29",
"babel-core": "^5.8.30",
"babel-loader": "^5.3.2",
"react": "^0.14.1",
"react-addons-test-utils": "^0.14.1",
"tape": "^4.1.0",
"tape-catch": "^1.0.4",
"webpack": "^1.12.2",
"webpack-dev-server": "^1.12.1",
"webpack-jsdom-tape-plugin": "^1.2.0"
},
"peerDependencies": {
"react": "^0.14.0 || ^15.0.0"
},
"scripts": {
"start": "babel --stage 0 src --out-dir lib --ignore='__tests__'",
"test": "babel-node --stage 0 ./scripts/webpack/test"
},
"author": "bloodyowl",
"license": "MIT",
"dependencies": {
"invariant": "^2.1.2"
}
}
|
9541a3c4fc7566156b271f607ff3bf40bbd19ea6
|
_pages/events.md
|
_pages/events.md
|
---
title: "Community Events"
permalink: /events/
---
<iframe src="https://calendar.google.com/calendar/embed?src=pdxchinesehub%40gmail.com&ctz=America/Los_Angeles" style="border: 0" width="800" height="600" frameborder="0" scrolling="no"></iframe>
了解波村活动,推荐:https://www.events12.com/portland/。
|
---
title: "Community Events"
permalink: /events/
---
<iframe src="https://calendar.google.com/calendar/embed?src=pdxchinesehub%40gmail.com&ctz=America/Los_Angeles" style="border: 0" width="800" height="600" frameborder="0" scrolling="no"></iframe>
了解波村活动,推荐:[www.events12.com/portland/](https://www.events12.com/portland/)。
|
Change event link to hyperlink
|
Change event link to hyperlink
|
Markdown
|
mit
|
PDXChinese/pdxchinese.github.io,PDXChinese/pdxchinese.github.io,PDXChinese/pdxchinese.github.io
|
markdown
|
## Code Before:
---
title: "Community Events"
permalink: /events/
---
<iframe src="https://calendar.google.com/calendar/embed?src=pdxchinesehub%40gmail.com&ctz=America/Los_Angeles" style="border: 0" width="800" height="600" frameborder="0" scrolling="no"></iframe>
了解波村活动,推荐:https://www.events12.com/portland/。
## Instruction:
Change event link to hyperlink
## Code After:
---
title: "Community Events"
permalink: /events/
---
<iframe src="https://calendar.google.com/calendar/embed?src=pdxchinesehub%40gmail.com&ctz=America/Los_Angeles" style="border: 0" width="800" height="600" frameborder="0" scrolling="no"></iframe>
了解波村活动,推荐:[www.events12.com/portland/](https://www.events12.com/portland/)。
|
e65a1bc071a31f83e563e4a6853d19a33c110faa
|
go/1/main.go
|
go/1/main.go
|
package main
import "fmt"
func main() {
fmt.Println("Hello!")
}
|
package main
import "fmt"
func main() {
multiples := make(map[int]bool)
sum := 0
for n, by3, by5 := 1, 3, 5; n < 1000; n++ {
by3 = n * 3
if (by3 >= 1000) {
break;
}
_, ok := multiples[by3]
if ! ok {
sum += by3
multiples[by3] = true
}
by5 = n * 5
if (by5 >= 1000) {
continue;
}
_, ok = multiples[by5]
if ! ok {
sum += by5
multiples[by5] = true
}
}
fmt.Printf("Sum of all the multiples of 3 or 5 below 1000 is %d.\n", sum)
}
|
Solve first problem with Go
|
Solve first problem with Go
|
Go
|
mit
|
krasun/ProjectEulerSolutions
|
go
|
## Code Before:
package main
import "fmt"
func main() {
fmt.Println("Hello!")
}
## Instruction:
Solve first problem with Go
## Code After:
package main
import "fmt"
func main() {
multiples := make(map[int]bool)
sum := 0
for n, by3, by5 := 1, 3, 5; n < 1000; n++ {
by3 = n * 3
if (by3 >= 1000) {
break;
}
_, ok := multiples[by3]
if ! ok {
sum += by3
multiples[by3] = true
}
by5 = n * 5
if (by5 >= 1000) {
continue;
}
_, ok = multiples[by5]
if ! ok {
sum += by5
multiples[by5] = true
}
}
fmt.Printf("Sum of all the multiples of 3 or 5 below 1000 is %d.\n", sum)
}
|
d4a15f72592230aa1a400425e6156f1329c823a8
|
config/fish/config.fish
|
config/fish/config.fish
|
set PATH ~/bin $PATH
# http://www.martinklepsch.org/posts/git-prompt-for-fish-shell.html
set __fish_git_prompt_showdirtystate 'yes'
set __fish_git_prompt_char_dirtystate '⚡'
### Prompt
function fish_prompt
set_color red
echo -n "❯"
set_color yellow
echo -n "❯"
set_color green
echo -n "❯ "
end
function fish_right_prompt
set_color blue
echo -n (prompt_pwd)
set_color green
echo -n (__fish_git_prompt)
set_color normal
end
### fasd support
function -e fish_preexec _run_fasd
fasd --proc (fasd --sanitize "$argv") > "/dev/null" 2>&1
end
function j
cd (fasd -d -e 'printf %s' "$argv")
end
|
set PATH (brew --prefix coreutils)/libexec/gnubin $PATH
set PATH ~/bin $PATH
set PATH $PATH ~/.cask/bin
# http://www.martinklepsch.org/posts/git-prompt-for-fish-shell.html
set __fish_git_prompt_showdirtystate 'yes'
set __fish_git_prompt_char_dirtystate '⚡'
### Prompt
function fish_prompt
set_color red
echo -n "❯"
set_color yellow
echo -n "❯"
set_color green
echo -n "❯ "
end
function fish_right_prompt
set_color blue
echo -n (prompt_pwd)
set_color green
echo -n (__fish_git_prompt)
set_color normal
end
### fasd support
function -e fish_preexec _run_fasd
fasd --proc (fasd --sanitize "$argv") > "/dev/null" 2>&1
end
function j
cd (fasd -d -e 'printf %s' "$argv")
end
|
Bring over PATH changes to fish
|
Bring over PATH changes to fish
|
fish
|
mit
|
drmohundro/dotfiles
|
fish
|
## Code Before:
set PATH ~/bin $PATH
# http://www.martinklepsch.org/posts/git-prompt-for-fish-shell.html
set __fish_git_prompt_showdirtystate 'yes'
set __fish_git_prompt_char_dirtystate '⚡'
### Prompt
function fish_prompt
set_color red
echo -n "❯"
set_color yellow
echo -n "❯"
set_color green
echo -n "❯ "
end
function fish_right_prompt
set_color blue
echo -n (prompt_pwd)
set_color green
echo -n (__fish_git_prompt)
set_color normal
end
### fasd support
function -e fish_preexec _run_fasd
fasd --proc (fasd --sanitize "$argv") > "/dev/null" 2>&1
end
function j
cd (fasd -d -e 'printf %s' "$argv")
end
## Instruction:
Bring over PATH changes to fish
## Code After:
set PATH (brew --prefix coreutils)/libexec/gnubin $PATH
set PATH ~/bin $PATH
set PATH $PATH ~/.cask/bin
# http://www.martinklepsch.org/posts/git-prompt-for-fish-shell.html
set __fish_git_prompt_showdirtystate 'yes'
set __fish_git_prompt_char_dirtystate '⚡'
### Prompt
function fish_prompt
set_color red
echo -n "❯"
set_color yellow
echo -n "❯"
set_color green
echo -n "❯ "
end
function fish_right_prompt
set_color blue
echo -n (prompt_pwd)
set_color green
echo -n (__fish_git_prompt)
set_color normal
end
### fasd support
function -e fish_preexec _run_fasd
fasd --proc (fasd --sanitize "$argv") > "/dev/null" 2>&1
end
function j
cd (fasd -d -e 'printf %s' "$argv")
end
|
67bfddda80433feb20a83876fca7eeb2c58067a7
|
.travis.yml
|
.travis.yml
|
rvm:
- 1.8.7 # (current default)
- 1.9.2
gemfile:
- Gemfile
env:
- ISOLATED=true
- ISOLATED=false
script: "bundle exec rake spec"
|
rvm:
- 1.8.7 # (current default)
- 1.9.2
gemfile:
- Gemfile
script: "bundle exec rake spec"
|
Remove example stuff from the configuration
|
Remove example stuff from the configuration
|
YAML
|
mit
|
lutechspa/devise_cas_authenticatable,identification-io/devise_cas_authenticatable,nbudin/devise_cas_authenticatable,nbudin/devise_cas_authenticatable,tomascharad/devise_cas_authenticatable,identification-io/devise_cas_authenticatable,tomascharad/devise_cas_authenticatable
|
yaml
|
## Code Before:
rvm:
- 1.8.7 # (current default)
- 1.9.2
gemfile:
- Gemfile
env:
- ISOLATED=true
- ISOLATED=false
script: "bundle exec rake spec"
## Instruction:
Remove example stuff from the configuration
## Code After:
rvm:
- 1.8.7 # (current default)
- 1.9.2
gemfile:
- Gemfile
script: "bundle exec rake spec"
|
54652aba6a353e250792ebf79f7fccdf48ad9418
|
CHANGELOG.md
|
CHANGELOG.md
|
Release date: 2019-05-03
* Support for ActiveRecord 6
* `discard_all` and `undiscard_all` now return affected records
* Add `discard!` and `undiscard!`
### Version 1.0.0
Release date: 2018-03-16
* Add undiscard callbacks and `.undiscard_all`
### Version 0.2.0
Release date: 2017-11-22
* Add `.discard_all`
* Add `undiscarded` scope
* Add callbacks
### Version 0.1.0
Release date: 2017-04-28
* Initial version!
|
* Add `discard_all!` and `undiscard_all!`
### Version 1.1.0
Release date: 2019-05-03
* Support for ActiveRecord 6
* `discard_all` and `undiscard_all` now return affected records
* Add `discard!` and `undiscard!`
### Version 1.0.0
Release date: 2018-03-16
* Add undiscard callbacks and `.undiscard_all`
### Version 0.2.0
Release date: 2017-11-22
* Add `.discard_all`
* Add `undiscarded` scope
* Add callbacks
### Version 0.1.0
Release date: 2017-04-28
* Initial version!
|
Update changelog with features of last merged PR
|
Update changelog with features of last merged PR
|
Markdown
|
mit
|
jhawthorn/discard,jhawthorn/discard
|
markdown
|
## Code Before:
Release date: 2019-05-03
* Support for ActiveRecord 6
* `discard_all` and `undiscard_all` now return affected records
* Add `discard!` and `undiscard!`
### Version 1.0.0
Release date: 2018-03-16
* Add undiscard callbacks and `.undiscard_all`
### Version 0.2.0
Release date: 2017-11-22
* Add `.discard_all`
* Add `undiscarded` scope
* Add callbacks
### Version 0.1.0
Release date: 2017-04-28
* Initial version!
## Instruction:
Update changelog with features of last merged PR
## Code After:
* Add `discard_all!` and `undiscard_all!`
### Version 1.1.0
Release date: 2019-05-03
* Support for ActiveRecord 6
* `discard_all` and `undiscard_all` now return affected records
* Add `discard!` and `undiscard!`
### Version 1.0.0
Release date: 2018-03-16
* Add undiscard callbacks and `.undiscard_all`
### Version 0.2.0
Release date: 2017-11-22
* Add `.discard_all`
* Add `undiscarded` scope
* Add callbacks
### Version 0.1.0
Release date: 2017-04-28
* Initial version!
|
78ad3613e02ed2ab7c848d33d6ff9ad40a0789ff
|
client/scripts/sw.js
|
client/scripts/sw.js
|
const toolbox = require('sw-toolbox');
// Try network but fallback to cache
toolbox.router.default = toolbox.networkFirst;
// Data should query the network first
toolbox.router.any('/api/*', toolbox.networkOnly);
// Data should query the network first
toolbox.router.any('/auth/*', toolbox.networkOnly);
|
import {router} from 'sw-toolbox';
// Try network but fallback to cache
router.default = toolbox.networkFirst;
// Data should query the network first
router.any('/api/*', toolbox.networkOnly);
// Data should query the network first
router.any('/auth/*', toolbox.networkOnly);
|
Use import rather than require
|
Use import rather than require
|
JavaScript
|
mit
|
AdaRoseEdwards/81,AdaRoseEdwards/81,AdaRoseEdwards/81
|
javascript
|
## Code Before:
const toolbox = require('sw-toolbox');
// Try network but fallback to cache
toolbox.router.default = toolbox.networkFirst;
// Data should query the network first
toolbox.router.any('/api/*', toolbox.networkOnly);
// Data should query the network first
toolbox.router.any('/auth/*', toolbox.networkOnly);
## Instruction:
Use import rather than require
## Code After:
import {router} from 'sw-toolbox';
// Try network but fallback to cache
router.default = toolbox.networkFirst;
// Data should query the network first
router.any('/api/*', toolbox.networkOnly);
// Data should query the network first
router.any('/auth/*', toolbox.networkOnly);
|
1c748d1198c7353da1610a8c3d63b7869f84617d
|
src/create-store.js
|
src/create-store.js
|
import forEach from 'lodash/collection/forEach';
import isEmpty from 'lodash/lang/isEmpty';
import isFunction from 'lodash/lang/isFunction';
import snakeCase from 'lodash/string/snakeCase';
import { Store, toImmutable } from 'nuclear-js';
export default function createStore(initialState, handlers) {
const immutableState = toImmutable(initialState);
const spec = {
getInitialState() {
return immutableState;
},
initialize() {
if (!isEmpty(handlers)) {
forEach(handlers, (handler, handlerName) => {
const ACTION_NAME = snakeCase(handlerName || '').toUpperCase();
if (!ACTION_NAME) {
throw new Error('Frux#createStore: handler must be a named function.');
}
if (isFunction(handler)) {
this.on(ACTION_NAME, (currentState, payload) => {
return handler.call(null, currentState, payload, immutableState);
});
}
});
}
}
};
return new Store(spec);
}
|
import forEach from 'lodash/collection/forEach';
import isEmpty from 'lodash/lang/isEmpty';
import isFunction from 'lodash/lang/isFunction';
import snakeCase from 'lodash/string/snakeCase';
import { Store, toImmutable } from 'nuclear-js';
export default function createStore(initialState, handlers) {
const immutableState = toImmutable(initialState);
const spec = {
getInitialState() {
return immutableState;
},
initialize() {
if (!isEmpty(handlers)) {
forEach(handlers, (handler, handlerName = '') => {
const ACTION_NAME = snakeCase(handlerName).toUpperCase();
if (!ACTION_NAME) {
throw new Error('Frux#createStore: handler must be a named function.');
}
if (isFunction(handler)) {
this.on(ACTION_NAME, (currentState, payload) => {
return handler.call(null, currentState, payload, immutableState);
});
}
});
}
}
};
return new Store(spec);
}
|
Replace line endings to lf and add default param as empty string for `handlerName`
|
Replace line endings to lf and add default param as empty string for `handlerName`
|
JavaScript
|
apache-2.0
|
raulmatei/frux
|
javascript
|
## Code Before:
import forEach from 'lodash/collection/forEach';
import isEmpty from 'lodash/lang/isEmpty';
import isFunction from 'lodash/lang/isFunction';
import snakeCase from 'lodash/string/snakeCase';
import { Store, toImmutable } from 'nuclear-js';
export default function createStore(initialState, handlers) {
const immutableState = toImmutable(initialState);
const spec = {
getInitialState() {
return immutableState;
},
initialize() {
if (!isEmpty(handlers)) {
forEach(handlers, (handler, handlerName) => {
const ACTION_NAME = snakeCase(handlerName || '').toUpperCase();
if (!ACTION_NAME) {
throw new Error('Frux#createStore: handler must be a named function.');
}
if (isFunction(handler)) {
this.on(ACTION_NAME, (currentState, payload) => {
return handler.call(null, currentState, payload, immutableState);
});
}
});
}
}
};
return new Store(spec);
}
## Instruction:
Replace line endings to lf and add default param as empty string for `handlerName`
## Code After:
import forEach from 'lodash/collection/forEach';
import isEmpty from 'lodash/lang/isEmpty';
import isFunction from 'lodash/lang/isFunction';
import snakeCase from 'lodash/string/snakeCase';
import { Store, toImmutable } from 'nuclear-js';
export default function createStore(initialState, handlers) {
const immutableState = toImmutable(initialState);
const spec = {
getInitialState() {
return immutableState;
},
initialize() {
if (!isEmpty(handlers)) {
forEach(handlers, (handler, handlerName = '') => {
const ACTION_NAME = snakeCase(handlerName).toUpperCase();
if (!ACTION_NAME) {
throw new Error('Frux#createStore: handler must be a named function.');
}
if (isFunction(handler)) {
this.on(ACTION_NAME, (currentState, payload) => {
return handler.call(null, currentState, payload, immutableState);
});
}
});
}
}
};
return new Store(spec);
}
|
dac06715f5c00883d7359b4098d332d74614f01f
|
snapcraft.yaml
|
snapcraft.yaml
|
name: syncplay
summary: Syncplay
version: build
version-script: cat syncplay/__init__.py | awk '/version/ {gsub("\047", "", $3); print $NF}'
summary: Client/server to synchronize media playback on many computers
description: |
Syncplay synchronises the position and play state of multiple media players
so that the viewers can watch the same thing at the same time. This means that
when one person pauses/unpauses playback or seeks (jumps position) within their
media player then this will be replicated across all media players connected to
the same server and in the same 'room' (viewing session). When a new person
joins they will also be synchronised. Syncplay also includes text-based chat so
you can discuss a video as you watch it (or you could use third-party Voice over
IP software to talk over a video).
confinement: classic
icon: syncplay/resources/syncplay.png
grade: stable
parts:
syncplay:
plugin: python
source: .
stage-packages:
- python3-pyside
after: [desktop-qt4]
apps:
syncplay:
command: bin/desktop-launch $SNAP/usr/bin/python3 $SNAP/bin/syncplay
desktop: lib/python3.5/site-packages/syncplay/resources/syncplay.desktop
syncplay-server:
command: bin/syncplay-server
desktop: lib/python3.5/site-packages/syncplay/resources/syncplay-server.desktop
|
name: syncplay
summary: Syncplay
version: build
version-script: cat syncplay/__init__.py | awk '/version/ {gsub("\047", "", $3); print $NF}'
summary: Client/server to synchronize media playback on many computers
description: |
Syncplay synchronises the position and play state of multiple media players
so that the viewers can watch the same thing at the same time. This means that
when one person pauses/unpauses playback or seeks (jumps position) within their
media player then this will be replicated across all media players connected to
the same server and in the same 'room' (viewing session). When a new person
joins they will also be synchronised. Syncplay also includes text-based chat so
you can discuss a video as you watch it (or you could use third-party Voice over
IP software to talk over a video).
confinement: classic
icon: syncplay/resources/syncplay.png
grade: stable
parts:
syncplay:
plugin: python
source: .
stage-packages:
- python3-pyside
after: [desktop-qt4]
apps:
syncplay:
command: bin/desktop-launch $SNAP/usr/bin/python3 $SNAP/bin/syncplay
desktop: lib/python3.5/site-packages/syncplay/resources/syncplay.desktop
environment:
DISABLE_WAYLAND: 1
syncplay-server:
command: bin/syncplay-server
desktop: lib/python3.5/site-packages/syncplay/resources/syncplay-server.desktop
|
Disable native wayland for snap
|
Disable native wayland for snap
Snap is using QT4 (due to lack of pyside2 in core18) which is not compatible with Wayland.
Hopefully this should prevent #331 from occurring.
|
YAML
|
apache-2.0
|
alby128/syncplay,alby128/syncplay,Syncplay/syncplay,Syncplay/syncplay
|
yaml
|
## Code Before:
name: syncplay
summary: Syncplay
version: build
version-script: cat syncplay/__init__.py | awk '/version/ {gsub("\047", "", $3); print $NF}'
summary: Client/server to synchronize media playback on many computers
description: |
Syncplay synchronises the position and play state of multiple media players
so that the viewers can watch the same thing at the same time. This means that
when one person pauses/unpauses playback or seeks (jumps position) within their
media player then this will be replicated across all media players connected to
the same server and in the same 'room' (viewing session). When a new person
joins they will also be synchronised. Syncplay also includes text-based chat so
you can discuss a video as you watch it (or you could use third-party Voice over
IP software to talk over a video).
confinement: classic
icon: syncplay/resources/syncplay.png
grade: stable
parts:
syncplay:
plugin: python
source: .
stage-packages:
- python3-pyside
after: [desktop-qt4]
apps:
syncplay:
command: bin/desktop-launch $SNAP/usr/bin/python3 $SNAP/bin/syncplay
desktop: lib/python3.5/site-packages/syncplay/resources/syncplay.desktop
syncplay-server:
command: bin/syncplay-server
desktop: lib/python3.5/site-packages/syncplay/resources/syncplay-server.desktop
## Instruction:
Disable native wayland for snap
Snap is using QT4 (due to lack of pyside2 in core18) which is not compatible with Wayland.
Hopefully this should prevent #331 from occurring.
## Code After:
name: syncplay
summary: Syncplay
version: build
version-script: cat syncplay/__init__.py | awk '/version/ {gsub("\047", "", $3); print $NF}'
summary: Client/server to synchronize media playback on many computers
description: |
Syncplay synchronises the position and play state of multiple media players
so that the viewers can watch the same thing at the same time. This means that
when one person pauses/unpauses playback or seeks (jumps position) within their
media player then this will be replicated across all media players connected to
the same server and in the same 'room' (viewing session). When a new person
joins they will also be synchronised. Syncplay also includes text-based chat so
you can discuss a video as you watch it (or you could use third-party Voice over
IP software to talk over a video).
confinement: classic
icon: syncplay/resources/syncplay.png
grade: stable
parts:
syncplay:
plugin: python
source: .
stage-packages:
- python3-pyside
after: [desktop-qt4]
apps:
syncplay:
command: bin/desktop-launch $SNAP/usr/bin/python3 $SNAP/bin/syncplay
desktop: lib/python3.5/site-packages/syncplay/resources/syncplay.desktop
environment:
DISABLE_WAYLAND: 1
syncplay-server:
command: bin/syncplay-server
desktop: lib/python3.5/site-packages/syncplay/resources/syncplay-server.desktop
|
58d6e315fce52df67e598d4026269654ef4ab09e
|
jgrep.gemspec
|
jgrep.gemspec
|
require 'date'
Gem::Specification.new do |s|
s.name = "jgrep"
s.version = "1.4.1"
s.date = Date.today.to_s
s.summary = "Filter JSON documents with a simple logical language"
s.description = "Compare a list of json documents to a simple logical language and returns matches as output"
s.homepage = "https://github.com/ploubser/JSON-Grep"
s.license = "Apache-2.0"
s.authors = ["P Loubser", "Dominic Cleal"]
s.email = ["[email protected]", "[email protected]"]
s.files = `git ls-files`.split("\n") - Dir[".*", "Gem*", "*.gemspec"]
s.extra_rdoc_files = [
"CHANGELOG.markdown",
"README.markdown",
]
s.require_paths = ["lib"]
s.executables = ["jgrep"]
s.default_executable = "jgrep"
s.has_rdoc = true
s.add_dependency('json')
end
|
require 'date'
Gem::Specification.new do |s|
s.name = "jgrep"
s.version = "1.4.1"
s.date = Date.today.to_s
s.summary = "Filter JSON documents with a simple logical language"
s.description = "Compare a list of json documents to a simple logical language and returns matches as output"
s.homepage = "https://github.com/ploubser/JSON-Grep"
s.license = "Apache-2.0"
s.authors = ["P Loubser", "Dominic Cleal"]
s.email = ["[email protected]", "[email protected]"]
s.files = `git ls-files`.split("\n") - Dir[".*", "Gem*", "*.gemspec"]
s.extra_rdoc_files = [
"CHANGELOG.markdown",
"README.markdown",
]
s.require_paths = ["lib"]
s.executables = ["jgrep"]
s.default_executable = "jgrep"
s.has_rdoc = true
end
|
Remove json dependency as modern ruby satisfies this magically
|
Remove json dependency as modern ruby satisfies this magically
|
Ruby
|
apache-2.0
|
ploubser/JSON-Grep
|
ruby
|
## Code Before:
require 'date'
Gem::Specification.new do |s|
s.name = "jgrep"
s.version = "1.4.1"
s.date = Date.today.to_s
s.summary = "Filter JSON documents with a simple logical language"
s.description = "Compare a list of json documents to a simple logical language and returns matches as output"
s.homepage = "https://github.com/ploubser/JSON-Grep"
s.license = "Apache-2.0"
s.authors = ["P Loubser", "Dominic Cleal"]
s.email = ["[email protected]", "[email protected]"]
s.files = `git ls-files`.split("\n") - Dir[".*", "Gem*", "*.gemspec"]
s.extra_rdoc_files = [
"CHANGELOG.markdown",
"README.markdown",
]
s.require_paths = ["lib"]
s.executables = ["jgrep"]
s.default_executable = "jgrep"
s.has_rdoc = true
s.add_dependency('json')
end
## Instruction:
Remove json dependency as modern ruby satisfies this magically
## Code After:
require 'date'
Gem::Specification.new do |s|
s.name = "jgrep"
s.version = "1.4.1"
s.date = Date.today.to_s
s.summary = "Filter JSON documents with a simple logical language"
s.description = "Compare a list of json documents to a simple logical language and returns matches as output"
s.homepage = "https://github.com/ploubser/JSON-Grep"
s.license = "Apache-2.0"
s.authors = ["P Loubser", "Dominic Cleal"]
s.email = ["[email protected]", "[email protected]"]
s.files = `git ls-files`.split("\n") - Dir[".*", "Gem*", "*.gemspec"]
s.extra_rdoc_files = [
"CHANGELOG.markdown",
"README.markdown",
]
s.require_paths = ["lib"]
s.executables = ["jgrep"]
s.default_executable = "jgrep"
s.has_rdoc = true
end
|
c8e7481a743690f342f7401d42bdb354f3e5916d
|
app/views/partials/attendance/list/studentAttendanceButtons.jade
|
app/views/partials/attendance/list/studentAttendanceButtons.jade
|
.pull-left.margin-left-10
.btn-toolbar(ng-show='!showRemoveConfirm')
button.btn.btn-danger.btn-sm.viewBtn(ng-click='removeAttendanceEntry()')
span.glyphicon.glyphicon-remove.white
button.btn.btn-default.btn-sm.viewBtn(ng-click='editAchievements(row.entity)', ng-show='!row.entity.workshop') Edit Achievements
.btn-toolbar(ng-show='showRemoveConfirm')
span.text-muted Remove entry?
button.btn.btn-sm.btn-danger(type='button', ng-click='confirmRemove(row, true)') Yes
button.btn.btn-sm.btn-success(type='button', ng-click='confirmRemove(row, false)') No
|
.pull-left.margin-left-10
.btn-toolbar(ng-show='!showRemoveConfirm')
button.btn.btn-danger.btn-sm.viewBtn(ng-click='removeAttendanceEntry()')
span.glyphicon.glyphicon-remove.white
button.btn.btn-default.btn-sm.viewBtn(ng-click='editAchievements(row.entity)', ng-show='!row.entity.workshop && row.entity.sortedRanks.length>0') Edit Achievements
.btn-toolbar(ng-show='showRemoveConfirm')
span.text-muted Remove entry?
button.btn.btn-sm.btn-danger(type='button', ng-click='confirmRemove(row, true)') Yes
button.btn.btn-sm.btn-success(type='button', ng-click='confirmRemove(row, false)') No
|
Remove Edit Achievements button for attendance items for programs that have no achievements
|
Remove Edit Achievements button for attendance items for programs that have no achievements
|
Jade
|
mit
|
icompuiz/node-ttkd
|
jade
|
## Code Before:
.pull-left.margin-left-10
.btn-toolbar(ng-show='!showRemoveConfirm')
button.btn.btn-danger.btn-sm.viewBtn(ng-click='removeAttendanceEntry()')
span.glyphicon.glyphicon-remove.white
button.btn.btn-default.btn-sm.viewBtn(ng-click='editAchievements(row.entity)', ng-show='!row.entity.workshop') Edit Achievements
.btn-toolbar(ng-show='showRemoveConfirm')
span.text-muted Remove entry?
button.btn.btn-sm.btn-danger(type='button', ng-click='confirmRemove(row, true)') Yes
button.btn.btn-sm.btn-success(type='button', ng-click='confirmRemove(row, false)') No
## Instruction:
Remove Edit Achievements button for attendance items for programs that have no achievements
## Code After:
.pull-left.margin-left-10
.btn-toolbar(ng-show='!showRemoveConfirm')
button.btn.btn-danger.btn-sm.viewBtn(ng-click='removeAttendanceEntry()')
span.glyphicon.glyphicon-remove.white
button.btn.btn-default.btn-sm.viewBtn(ng-click='editAchievements(row.entity)', ng-show='!row.entity.workshop && row.entity.sortedRanks.length>0') Edit Achievements
.btn-toolbar(ng-show='showRemoveConfirm')
span.text-muted Remove entry?
button.btn.btn-sm.btn-danger(type='button', ng-click='confirmRemove(row, true)') Yes
button.btn.btn-sm.btn-success(type='button', ng-click='confirmRemove(row, false)') No
|
2d31f6b842f26b5c33d2650f0f7672ba09230bfd
|
ratechecker/migrations/0002_remove_fee_loader.py
|
ratechecker/migrations/0002_remove_fee_loader.py
|
from __future__ import unicode_literals
from django.db import migrations, OperationalError, ProgrammingError
class Migration(migrations.Migration):
dependencies = [
('ratechecker', '0001_initial'),
]
operations = [
migrations.AlterUniqueTogether(
name='fee',
unique_together=set([]),
),
migrations.RemoveField(
model_name='fee',
name='plan',
),
migrations.DeleteModel(
name='Fee',
),
]
|
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('ratechecker', '0001_initial'),
]
operations = [
migrations.AlterUniqueTogether(
name='fee',
unique_together=set([]),
),
migrations.RemoveField(
model_name='fee',
name='plan',
),
migrations.DeleteModel(
name='Fee',
),
]
|
Remove OperationalError and ProgrammingError imports
|
Remove OperationalError and ProgrammingError imports
|
Python
|
cc0-1.0
|
cfpb/owning-a-home-api
|
python
|
## Code Before:
from __future__ import unicode_literals
from django.db import migrations, OperationalError, ProgrammingError
class Migration(migrations.Migration):
dependencies = [
('ratechecker', '0001_initial'),
]
operations = [
migrations.AlterUniqueTogether(
name='fee',
unique_together=set([]),
),
migrations.RemoveField(
model_name='fee',
name='plan',
),
migrations.DeleteModel(
name='Fee',
),
]
## Instruction:
Remove OperationalError and ProgrammingError imports
## Code After:
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('ratechecker', '0001_initial'),
]
operations = [
migrations.AlterUniqueTogether(
name='fee',
unique_together=set([]),
),
migrations.RemoveField(
model_name='fee',
name='plan',
),
migrations.DeleteModel(
name='Fee',
),
]
|
85611ba33b64475570128b90f369d8e97103dba0
|
requirements.txt
|
requirements.txt
|
scipy
cython
matplotlib
numpy
biopython
scikit-learn
enum34 >=1.1.6; python_version < '3.4'
|
scipy
cython
matplotlib
numpy
biopython
scikit-learn
|
Revert "Added python version to dependency - requested by Charles"
|
Revert "Added python version to dependency - requested by Charles"
This reverts commit c9904cd37d0ae1d8aeb9158118f7d5b730ebaa7b.
|
Text
|
bsd-3-clause
|
rigdenlab/conkit
|
text
|
## Code Before:
scipy
cython
matplotlib
numpy
biopython
scikit-learn
enum34 >=1.1.6; python_version < '3.4'
## Instruction:
Revert "Added python version to dependency - requested by Charles"
This reverts commit c9904cd37d0ae1d8aeb9158118f7d5b730ebaa7b.
## Code After:
scipy
cython
matplotlib
numpy
biopython
scikit-learn
|
e4d6faddda08d32a925d8a853af185fc6de212ff
|
lib/ossert/workers/refresh_fetch.rb
|
lib/ossert/workers/refresh_fetch.rb
|
module Ossert
module Workers
class RefreshFetch
include Sidekiq::Worker
include ForkProcessing
sidekiq_options unique: :until_executed,
unique_expiration: 1.hour,
retry: 3
def perform
process_in_fork do
Ossert.init
::Project.select(:name, :reference).where('updated_at < ?', 1.week.ago).paged_each do |project|
Ossert::Workers::Fetch.perform_async(project.name, project.reference)
end
end
end
end
end
end
|
module Ossert
module Workers
class RefreshFetch
include Sidekiq::Worker
include ForkProcessing
sidekiq_options unique: :until_executed,
unique_expiration: 1.hour,
retry: 3
def perform
process_in_fork do
Ossert.init
::Project.select(:name, :reference).where('updated_at < ?', 1.month.ago)
.order(:updated_at)
.paged_each do |project|
Ossert::Workers::Fetch.perform_async(project.name, project.reference)
end
end
end
end
end
end
|
Fix data update, use ordering by updated_at
|
Fix data update, use ordering by updated_at
|
Ruby
|
mit
|
ossert/ossert,ossert/ossert
|
ruby
|
## Code Before:
module Ossert
module Workers
class RefreshFetch
include Sidekiq::Worker
include ForkProcessing
sidekiq_options unique: :until_executed,
unique_expiration: 1.hour,
retry: 3
def perform
process_in_fork do
Ossert.init
::Project.select(:name, :reference).where('updated_at < ?', 1.week.ago).paged_each do |project|
Ossert::Workers::Fetch.perform_async(project.name, project.reference)
end
end
end
end
end
end
## Instruction:
Fix data update, use ordering by updated_at
## Code After:
module Ossert
module Workers
class RefreshFetch
include Sidekiq::Worker
include ForkProcessing
sidekiq_options unique: :until_executed,
unique_expiration: 1.hour,
retry: 3
def perform
process_in_fork do
Ossert.init
::Project.select(:name, :reference).where('updated_at < ?', 1.month.ago)
.order(:updated_at)
.paged_each do |project|
Ossert::Workers::Fetch.perform_async(project.name, project.reference)
end
end
end
end
end
end
|
5b0045b1d6796820e54cf3583e50c68fbc344dae
|
app/controllers/middleware_datasource_controller.rb
|
app/controllers/middleware_datasource_controller.rb
|
class MiddlewareDatasourceController < ApplicationController
include Mixins::GenericListMixin
include Mixins::GenericShowMixin
include EmsCommon
include MiddlewareCommonMixin
before_action :check_privileges
before_action :get_session_data
after_action :cleanup_action
after_action :set_session_data
OPERATIONS = {
:middleware_datasource_remove => {
:op => :remove_middleware_datasource,
:skip => true,
:hawk => N_('removed datasources'),
:skip_msg => N_('Not %{operation_name} for %{record_name} on the provider itself'),
:msg => N_('The selected datasources were removed')
}
}.freeze
def self.operations
OPERATIONS
end
private
def textual_group_list
[%i(properties), %i(relationships smart_management)]
end
helper_method :textual_group_list
menu_section :mdl
end
|
class MiddlewareDatasourceController < ApplicationController
include Mixins::GenericListMixin
include Mixins::GenericShowMixin
include EmsCommon
include MiddlewareCommonMixin
before_action :check_privileges
before_action :get_session_data
after_action :cleanup_action
after_action :set_session_data
OPERATIONS = {
:middleware_datasource_remove => {
:op => :remove_middleware_datasource,
:skip => true,
:hawk => N_('removed datasources'),
:skip_msg => N_('Not %{operation_name} for %{record_name} on the provider itself'),
:msg => N_('The selected datasources removal was initiated')
}
}.freeze
def self.operations
OPERATIONS
end
private
def textual_group_list
[%i(properties), %i(relationships smart_management)]
end
helper_method :textual_group_list
menu_section :mdl
end
|
Fix MW Datasource removal toast text
|
Fix MW Datasource removal toast text
|
Ruby
|
apache-2.0
|
ManageIQ/manageiq-ui-classic,ManageIQ/manageiq-ui-classic,ManageIQ/manageiq-ui-classic,ManageIQ/manageiq-ui-classic
|
ruby
|
## Code Before:
class MiddlewareDatasourceController < ApplicationController
include Mixins::GenericListMixin
include Mixins::GenericShowMixin
include EmsCommon
include MiddlewareCommonMixin
before_action :check_privileges
before_action :get_session_data
after_action :cleanup_action
after_action :set_session_data
OPERATIONS = {
:middleware_datasource_remove => {
:op => :remove_middleware_datasource,
:skip => true,
:hawk => N_('removed datasources'),
:skip_msg => N_('Not %{operation_name} for %{record_name} on the provider itself'),
:msg => N_('The selected datasources were removed')
}
}.freeze
def self.operations
OPERATIONS
end
private
def textual_group_list
[%i(properties), %i(relationships smart_management)]
end
helper_method :textual_group_list
menu_section :mdl
end
## Instruction:
Fix MW Datasource removal toast text
## Code After:
class MiddlewareDatasourceController < ApplicationController
include Mixins::GenericListMixin
include Mixins::GenericShowMixin
include EmsCommon
include MiddlewareCommonMixin
before_action :check_privileges
before_action :get_session_data
after_action :cleanup_action
after_action :set_session_data
OPERATIONS = {
:middleware_datasource_remove => {
:op => :remove_middleware_datasource,
:skip => true,
:hawk => N_('removed datasources'),
:skip_msg => N_('Not %{operation_name} for %{record_name} on the provider itself'),
:msg => N_('The selected datasources removal was initiated')
}
}.freeze
def self.operations
OPERATIONS
end
private
def textual_group_list
[%i(properties), %i(relationships smart_management)]
end
helper_method :textual_group_list
menu_section :mdl
end
|
d5f782fc7a8c7835af0d4d2810a923d218dea938
|
mplwidget.py
|
mplwidget.py
|
from PyQt4 import QtGui
import matplotlib as mpl
from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as FigureCanvas
from matplotlib.backends.backend_qt4agg import NavigationToolbar2QT as NavigationToolbar
from matplotlib.figure import Figure
import matplotlib.mlab as mlab
import matplotlib.gridspec as gridspec
class MplCanvas(FigureCanvas):
def __init__(self):
self.fig = Figure()
FigureCanvas.__init__(self, self.fig)
FigureCanvas.setSizePolicy(self,
QtGui.QSizePolicy.Expanding,
QtGui.QSizePolicy.Expanding)
FigureCanvas.updateGeometry(self)
def resizeEvent(self, event):
FigureCanvas.resizeEvent(self, event)
class MplWidget(QtGui.QWidget):
def __init__(self, parent = None):
QtGui.QWidget.__init__(self, parent)
self.canvas = MplCanvas()
self.canvas.setParent(self)
self.mpl_toolbar = NavigationToolbar(self.canvas, self)
|
from PyQt4 import QtGui,QtCore
import matplotlib as mpl
from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as FigureCanvas
from matplotlib.backends.backend_qt4agg import NavigationToolbar2QT as NavigationToolbar
from matplotlib.figure import Figure
import matplotlib.mlab as mlab
import matplotlib.gridspec as gridspec
class MplCanvas(FigureCanvas):
def __init__(self):
self.fig = Figure()
FigureCanvas.__init__(self, self.fig)
FigureCanvas.setSizePolicy(self,
QtGui.QSizePolicy.Expanding,
QtGui.QSizePolicy.Expanding)
FigureCanvas.updateGeometry(self)
def sizeHint(self):
w, h = self.get_width_height()
return QtCore.QSize(w,h)
class MplWidget(QtGui.QWidget):
def __init__(self, parent = None):
QtGui.QWidget.__init__(self, parent)
self.canvas = MplCanvas()
self.mpl_toolbar = NavigationToolbar(self.canvas, self)
layout = QtGui.QVBoxLayout()
self.setLayout(layout)
layout.addWidget(self.canvas)
|
Expand figure when window is resized
|
Expand figure when window is resized
|
Python
|
apache-2.0
|
scholi/pyOmicron
|
python
|
## Code Before:
from PyQt4 import QtGui
import matplotlib as mpl
from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as FigureCanvas
from matplotlib.backends.backend_qt4agg import NavigationToolbar2QT as NavigationToolbar
from matplotlib.figure import Figure
import matplotlib.mlab as mlab
import matplotlib.gridspec as gridspec
class MplCanvas(FigureCanvas):
def __init__(self):
self.fig = Figure()
FigureCanvas.__init__(self, self.fig)
FigureCanvas.setSizePolicy(self,
QtGui.QSizePolicy.Expanding,
QtGui.QSizePolicy.Expanding)
FigureCanvas.updateGeometry(self)
def resizeEvent(self, event):
FigureCanvas.resizeEvent(self, event)
class MplWidget(QtGui.QWidget):
def __init__(self, parent = None):
QtGui.QWidget.__init__(self, parent)
self.canvas = MplCanvas()
self.canvas.setParent(self)
self.mpl_toolbar = NavigationToolbar(self.canvas, self)
## Instruction:
Expand figure when window is resized
## Code After:
from PyQt4 import QtGui,QtCore
import matplotlib as mpl
from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as FigureCanvas
from matplotlib.backends.backend_qt4agg import NavigationToolbar2QT as NavigationToolbar
from matplotlib.figure import Figure
import matplotlib.mlab as mlab
import matplotlib.gridspec as gridspec
class MplCanvas(FigureCanvas):
def __init__(self):
self.fig = Figure()
FigureCanvas.__init__(self, self.fig)
FigureCanvas.setSizePolicy(self,
QtGui.QSizePolicy.Expanding,
QtGui.QSizePolicy.Expanding)
FigureCanvas.updateGeometry(self)
def sizeHint(self):
w, h = self.get_width_height()
return QtCore.QSize(w,h)
class MplWidget(QtGui.QWidget):
def __init__(self, parent = None):
QtGui.QWidget.__init__(self, parent)
self.canvas = MplCanvas()
self.mpl_toolbar = NavigationToolbar(self.canvas, self)
layout = QtGui.QVBoxLayout()
self.setLayout(layout)
layout.addWidget(self.canvas)
|
6e4ff87282eb51d29d26ea6a36037ed6b2cdf886
|
assets/sass/vendor/_mdc-checkbox.scss
|
assets/sass/vendor/_mdc-checkbox.scss
|
// Overrides for .mdc-checkbox
.googlesitekit-plugin .mdc-checkbox {
@include mdc-checkbox-container-colors($c-border-medium, $c-base, $c-border-brand, $c-background-brand, true);
@include mdc-checkbox-ink-color($c-base);
@include mdc-checkbox-focus-indicator-color($c-input);
box-sizing: content-box;
// Overriding WordPress load-styles.php
.mdc-checkbox__native-control {
-webkit-appearance: none;
background: transparent;
border: none;
border-radius: 0;
box-shadow: none;
clear: none;
color: $c-primary;
cursor: inherit;
display: block;
height: 100%;
line-height: normal;
margin: 0;
min-width: auto;
opacity: 0;
outline: 0;
padding: 0;
text-align: center;
transition: none;
vertical-align: middle;
width: 100%;
z-index: 1;
}
}
|
// Overrides for .mdc-checkbox
.googlesitekit-plugin .mdc-checkbox {
@include mdc-checkbox-container-colors($c-border-medium, $c-base, $c-border-brand, $c-background-brand, true);
@include mdc-checkbox-ink-color($c-base);
@include mdc-checkbox-focus-indicator-color($c-input);
box-sizing: content-box;
// Overriding WordPress load-styles.php
.mdc-checkbox__native-control {
-webkit-appearance: none;
background: transparent;
border: none;
border-radius: 0;
box-shadow: none;
clear: none;
color: $c-primary;
cursor: inherit;
display: block;
height: 100%;
line-height: normal;
margin: 0;
min-width: auto;
opacity: 0;
outline: 0;
padding: 0;
text-align: center;
transition: none;
vertical-align: middle;
width: 100%;
z-index: 1;
}
.spinner {
margin: 0;
}
}
|
Adjust styling on Spinner when it is child of Checkbox.
|
Adjust styling on Spinner when it is child of Checkbox.
|
SCSS
|
apache-2.0
|
google/site-kit-wp,google/site-kit-wp,google/site-kit-wp,google/site-kit-wp
|
scss
|
## Code Before:
// Overrides for .mdc-checkbox
.googlesitekit-plugin .mdc-checkbox {
@include mdc-checkbox-container-colors($c-border-medium, $c-base, $c-border-brand, $c-background-brand, true);
@include mdc-checkbox-ink-color($c-base);
@include mdc-checkbox-focus-indicator-color($c-input);
box-sizing: content-box;
// Overriding WordPress load-styles.php
.mdc-checkbox__native-control {
-webkit-appearance: none;
background: transparent;
border: none;
border-radius: 0;
box-shadow: none;
clear: none;
color: $c-primary;
cursor: inherit;
display: block;
height: 100%;
line-height: normal;
margin: 0;
min-width: auto;
opacity: 0;
outline: 0;
padding: 0;
text-align: center;
transition: none;
vertical-align: middle;
width: 100%;
z-index: 1;
}
}
## Instruction:
Adjust styling on Spinner when it is child of Checkbox.
## Code After:
// Overrides for .mdc-checkbox
.googlesitekit-plugin .mdc-checkbox {
@include mdc-checkbox-container-colors($c-border-medium, $c-base, $c-border-brand, $c-background-brand, true);
@include mdc-checkbox-ink-color($c-base);
@include mdc-checkbox-focus-indicator-color($c-input);
box-sizing: content-box;
// Overriding WordPress load-styles.php
.mdc-checkbox__native-control {
-webkit-appearance: none;
background: transparent;
border: none;
border-radius: 0;
box-shadow: none;
clear: none;
color: $c-primary;
cursor: inherit;
display: block;
height: 100%;
line-height: normal;
margin: 0;
min-width: auto;
opacity: 0;
outline: 0;
padding: 0;
text-align: center;
transition: none;
vertical-align: middle;
width: 100%;
z-index: 1;
}
.spinner {
margin: 0;
}
}
|
a291e17ad157d0c322c22f1244eafc918d5d9b8b
|
gulp/tasks/lint.js
|
gulp/tasks/lint.js
|
var gulp = require('gulp');
var config = require('../config');
var plumber = require('gulp-plumber');
var jscs = require('gulp-jscs');
var jshint = require('gulp-jshint');
var stylish = require('jshint-stylish');
var handleError = require('../util/handle-errors');
gulp.task('jshint', function() {
var allJavascript = Array.prototype.concat(config.source, config.gulp, config.tests);
return gulp.src(allJavascript)
.pipe(plumber())
.pipe(jshint())
.pipe(jshint.reporter(stylish))
.on('error', handleError);
});
gulp.task('jscs', function () {
var allJavascript = Array.prototype.concat(config.source, config.gulp, config.tests);
return gulp.src(allJavascript)
.pipe(plumber())
.pipe(jscs())
.on('error', handleError);
});
gulp.task('lint', ['jshint', 'jscs']);
|
var gulp = require('gulp'),
config = require('../config'),
plumber = require('gulp-plumber'),
jscs = require('gulp-jscs'),
jshint = require('gulp-jshint'),
stylish = require('jshint-stylish'),
handleError = require('../util/handle-errors');
gulp.task('jshint', function() {
var allJavascript = Array.prototype.concat(config.source, config.gulp, config.tests);
return gulp.src(allJavascript)
.pipe(plumber())
.pipe(jshint())
.pipe(jshint.reporter(stylish))
.on('error', handleError);
});
gulp.task('jscs', function () {
var allJavascript = Array.prototype.concat(config.source, config.gulp, config.tests);
return gulp.src(allJavascript)
.pipe(plumber())
.pipe(jscs())
.on('error', handleError);
});
gulp.task('lint', ['jshint', 'jscs']);
|
Use single var for requires
|
Use single var for requires
|
JavaScript
|
mit
|
walmartlabs/circus,walmartlabs/circus
|
javascript
|
## Code Before:
var gulp = require('gulp');
var config = require('../config');
var plumber = require('gulp-plumber');
var jscs = require('gulp-jscs');
var jshint = require('gulp-jshint');
var stylish = require('jshint-stylish');
var handleError = require('../util/handle-errors');
gulp.task('jshint', function() {
var allJavascript = Array.prototype.concat(config.source, config.gulp, config.tests);
return gulp.src(allJavascript)
.pipe(plumber())
.pipe(jshint())
.pipe(jshint.reporter(stylish))
.on('error', handleError);
});
gulp.task('jscs', function () {
var allJavascript = Array.prototype.concat(config.source, config.gulp, config.tests);
return gulp.src(allJavascript)
.pipe(plumber())
.pipe(jscs())
.on('error', handleError);
});
gulp.task('lint', ['jshint', 'jscs']);
## Instruction:
Use single var for requires
## Code After:
var gulp = require('gulp'),
config = require('../config'),
plumber = require('gulp-plumber'),
jscs = require('gulp-jscs'),
jshint = require('gulp-jshint'),
stylish = require('jshint-stylish'),
handleError = require('../util/handle-errors');
gulp.task('jshint', function() {
var allJavascript = Array.prototype.concat(config.source, config.gulp, config.tests);
return gulp.src(allJavascript)
.pipe(plumber())
.pipe(jshint())
.pipe(jshint.reporter(stylish))
.on('error', handleError);
});
gulp.task('jscs', function () {
var allJavascript = Array.prototype.concat(config.source, config.gulp, config.tests);
return gulp.src(allJavascript)
.pipe(plumber())
.pipe(jscs())
.on('error', handleError);
});
gulp.task('lint', ['jshint', 'jscs']);
|
d214211f0b43222f3f91f789d323c8de16facc50
|
src/commonPasswords.ts
|
src/commonPasswords.ts
|
export let commonPasswords = [
"123456", "password", "pikachu", "pokemon", "12345678", "qwerty", "123456789",
"12345", "123456789", "letmein", "1234567", "iloveyou", "admin", "welcome",
"monkey", "login", "abc123", "123123", "dragon", "passw0rd", "master",
"hello", "freedom", "whatever", "qazwsx"
];
|
export let commonPasswords = [
"123456", "password", "pikachu", "pokemon"
];
|
Remove passwords to quell the login god
|
Remove passwords to quell the login god
|
TypeScript
|
agpl-3.0
|
shoedrip-unbound/dogars,shoedrip-unbound/dogars,shoedrip-unbound/dogars
|
typescript
|
## Code Before:
export let commonPasswords = [
"123456", "password", "pikachu", "pokemon", "12345678", "qwerty", "123456789",
"12345", "123456789", "letmein", "1234567", "iloveyou", "admin", "welcome",
"monkey", "login", "abc123", "123123", "dragon", "passw0rd", "master",
"hello", "freedom", "whatever", "qazwsx"
];
## Instruction:
Remove passwords to quell the login god
## Code After:
export let commonPasswords = [
"123456", "password", "pikachu", "pokemon"
];
|
c24ba3fdc14831eed1bc54932383858b40d0e10f
|
assets/scripts/app.js
|
assets/scripts/app.js
|
import modular from 'modujs';
import * as modules from './modules';
import globals from './globals';
import { html } from './utils/environment';
const app = new modular({
modules: modules
});
window.onload = (event) => {
const $style = document.getElementById("stylesheet");
if ($style.isLoaded) {
init();
} else {
$style.addEventListener('load', (event) => {
init();
});
}
};
function init() {
app.init(app);
globals();
html.classList.add('is-loaded', 'is-ready');
html.classList.remove('is-loading');
}
|
import modular from 'modujs';
import * as modules from './modules';
import globals from './globals';
import { html } from './utils/environment';
const app = new modular({
modules: modules
});
window.onload = (event) => {
const $style = document.getElementById("stylesheet");
if ($style.isLoaded) {
init();
} else {
$style.addEventListener('load', (event) => {
init();
});
}
};
function init() {
globals();
app.init(app);
html.classList.add('is-loaded');
html.classList.add('is-ready');
html.classList.remove('is-loading');
}
|
Remove multiple Element.classList.add values (not compatible with IE11)
|
Remove multiple Element.classList.add values (not compatible with IE11)
|
JavaScript
|
mit
|
stephenbe/locomotive-boilerplate,stephenbe/locomotive-boilerplate,locomotivemtl/locomotive-boilerplate,locomotivemtl/locomotive-boilerplate,stephenbe/locomotive-boilerplate
|
javascript
|
## Code Before:
import modular from 'modujs';
import * as modules from './modules';
import globals from './globals';
import { html } from './utils/environment';
const app = new modular({
modules: modules
});
window.onload = (event) => {
const $style = document.getElementById("stylesheet");
if ($style.isLoaded) {
init();
} else {
$style.addEventListener('load', (event) => {
init();
});
}
};
function init() {
app.init(app);
globals();
html.classList.add('is-loaded', 'is-ready');
html.classList.remove('is-loading');
}
## Instruction:
Remove multiple Element.classList.add values (not compatible with IE11)
## Code After:
import modular from 'modujs';
import * as modules from './modules';
import globals from './globals';
import { html } from './utils/environment';
const app = new modular({
modules: modules
});
window.onload = (event) => {
const $style = document.getElementById("stylesheet");
if ($style.isLoaded) {
init();
} else {
$style.addEventListener('load', (event) => {
init();
});
}
};
function init() {
globals();
app.init(app);
html.classList.add('is-loaded');
html.classList.add('is-ready');
html.classList.remove('is-loading');
}
|
4627795379bf0cebf12656d947837101cdefc4b7
|
circle.yml
|
circle.yml
|
dependencies:
override:
- pip install tox tox-pyenv mkdocs
- pyenv local 2.7.10 3.5.1
notify:
webhooks:
- url: https://webhooks.gitter.im/e/3e39fb29521e82ee001d
test:
override:
- tox
deployment:
master:
branch: master
commands:
- mkdocs gh-deploy
|
dependencies:
pre:
- sudo apt-get update; sudo apt-get install python-matplotlib python3-matplotlib python-tk python3-tk
override:
- pip install tox tox-pyenv mkdocs
- pyenv local 2.7.10 3.5.1
notify:
webhooks:
- url: https://webhooks.gitter.im/e/3e39fb29521e82ee001d
test:
override:
- tox
deployment:
master:
branch: master
commands:
- mkdocs gh-deploy
|
Install matplotlib packages on CircleCI
|
Install matplotlib packages on CircleCI
|
YAML
|
apache-2.0
|
liyi193328/seq2seq,shashankrajput/seq2seq,google/seq2seq,kontact-chan/seq2seq,google/seq2seq,kontact-chan/seq2seq,chunfengh/seq2seq,kontact-chan/seq2seq,liyi193328/seq2seq,shashankrajput/seq2seq,chunfengh/seq2seq,liyi193328/seq2seq,kontact-chan/seq2seq,chunfengh/seq2seq,shashankrajput/seq2seq,google/seq2seq,chunfengh/seq2seq,liyi193328/seq2seq,google/seq2seq,liyi193328/seq2seq,shashankrajput/seq2seq
|
yaml
|
## Code Before:
dependencies:
override:
- pip install tox tox-pyenv mkdocs
- pyenv local 2.7.10 3.5.1
notify:
webhooks:
- url: https://webhooks.gitter.im/e/3e39fb29521e82ee001d
test:
override:
- tox
deployment:
master:
branch: master
commands:
- mkdocs gh-deploy
## Instruction:
Install matplotlib packages on CircleCI
## Code After:
dependencies:
pre:
- sudo apt-get update; sudo apt-get install python-matplotlib python3-matplotlib python-tk python3-tk
override:
- pip install tox tox-pyenv mkdocs
- pyenv local 2.7.10 3.5.1
notify:
webhooks:
- url: https://webhooks.gitter.im/e/3e39fb29521e82ee001d
test:
override:
- tox
deployment:
master:
branch: master
commands:
- mkdocs gh-deploy
|
176ff528638636e255037a92fbb37eb3523fd333
|
.travis.yml
|
.travis.yml
|
rvm:
- 1.9.3
before_script:
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
- bundle exec rackup &
script:
- phantomjs tests/qunit/run-qunit.js "http://localhost:9292/tests/index.html?package=all&extendprototypes=true"
- phantomjs tests/qunit/run-qunit.js "http://localhost:9292/tests/index.html?package=all&extendprototypes=true&jquery=1.6.4"
|
rvm:
- 1.9.3
before_script:
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
- bundle exec rackup &
- sleep 5
script: phantomjs tests/qunit/run-qunit.js "http://localhost:9292/tests/index.html?package=all" && phantomjs tests/qunit/run-qunit.js "http://localhost:9292/tests/index.html?package=all&jquery=1.6.4" && phantomjs tests/qunit/run-qunit.js "http://localhost:9292/tests/index.html?package=all&extendprototypes=true" && phantomjs tests/qunit/run-qunit.js "http://localhost:9292/tests/index.html?package=all&extendprototypes=true&jquery=1.6.4"
|
Make sure server has started and fix script:
|
Make sure server has started and fix script:
Add tests for w/o extended prototypes
|
YAML
|
mit
|
okuryu/ember.js,quaertym/ember.js,mfeckie/ember.js,thoov/ember.js,adamesque/ember.js,johanneswuerbach/ember.js,eliotsykes/ember.js,cdl/ember.js,cyjia/ember.js,mtaylor769/ember.js,balinterdi/ember.js,cesarizu/ember.js,miguelcobain/ember.js,jish/ember.js,jasonmit/ember.js,tomdale/ember.js,ef4/ember.js,tiegz/ember.js,omurbilgili/ember.js,yonjah/ember.js,sharma1nitish/ember.js,anilmaurya/ember.js,trek/ember.js,stefanpenner/ember.js,fpauser/ember.js,ridixcr/ember.js,xiujunma/ember.js,nipunas/ember.js,GavinJoyce/ember.js,chadhietala/ember.js,nvoron23/ember.js,8thcolor/ember.js,claimsmall/ember.js,brzpegasus/ember.js,yuhualingfeng/ember.js,mike-north/ember.js,runspired/ember.js,bmac/ember.js,delftswa2016/ember.js,rfsv/ember.js,anilmaurya/ember.js,workmanw/ember.js,tiegz/ember.js,nipunas/ember.js,rodrigo-morais/ember.js,cjc343/ember.js,jplwood/ember.js,femi-saliu/ember.js,artfuldodger/ember.js,wecc/ember.js,cbou/ember.js,femi-saliu/ember.js,ThiagoGarciaAlves/ember.js,howmuchcomputer/ember.js,danielgynn/ember.js,emberjs/ember.js,NLincoln/ember.js,benstoltz/ember.js,howtolearntocode/ember.js,mitchlloyd/ember.js,nightire/ember.js,ridixcr/ember.js,EricSchank/ember.js,twokul/ember.js,marcioj/ember.js,kmiyashiro/ember.js,rfsv/ember.js,thejameskyle/ember.js,nruth/ember.js,patricksrobertson/ember.js,boztek/ember.js,max-konin/ember.js,soulcutter/ember.js,Kuzirashi/ember.js,soulcutter/ember.js,TriumphantAkash/ember.js,jplwood/ember.js,mdehoog/ember.js,abulrim/ember.js,yaymukund/ember.js,paddyobrien/ember.js,dgeb/ember.js,kidaa/ember.js,tsing80/ember.js,cgvarela/ember.js,swarmbox/ember.js,rot26/ember.js,mallikarjunayaddala/ember.js,skeate/ember.js,develoser/ember.js,jaswilli/ember.js,HeroicEric/ember.js,mrjavascript/ember.js,twokul/ember.js,knownasilya/ember.js,cibernox/ember.js,EricSchank/ember.js,chadhietala/mixonic-ember,JesseQin/ember.js,mixonic/ember.js,sivakumar-kailasam/ember.js,ThiagoGarciaAlves/ember.js,eriktrom/ember.js,rodrigo-morais/ember.js,olivierchatry/ember.js,fpauser/ember.js,latlontude/ember.js,fivetanley/ember.js,kaeufl/ember.js,knownasilya/ember.js,yuhualingfeng/ember.js,brzpegasus/ember.js,Turbo87/ember.js,jasonmit/ember.js,williamsbdev/ember.js,sharma1nitish/ember.js,joeruello/ember.js,jamesarosen/ember.js,tofanelli/ember.js,visualjeff/ember.js,VictorChaun/ember.js,dschmidt/ember.js,ssured/ember.js,jcope2013/ember.js,seanjohnson08/ember.js,jish/ember.js,furkanayhan/ember.js,jasonmit/ember.js,skeate/ember.js,xcambar/ember.js,qaiken/ember.js,faizaanshamsi/ember.js,twokul/ember.js,cdl/ember.js,ryrych/ember.js,HipsterBrown/ember.js,lsthornt/ember.js,Vassi/ember.js,njagadeesh/ember.js,getoutreach/ember.js,GavinJoyce/ember.js,wycats/ember.js,xcambar/ember.js,skeate/ember.js,BrianSipple/ember.js,jasonmit/ember.js,tofanelli/ember.js,koriroys/ember.js,rwjblue/ember.js,koriroys/ember.js,artfuldodger/ember.js,seanpdoyle/ember.js,cgvarela/ember.js,simudream/ember.js,ebryn/ember.js,workmanw/ember.js,develoser/ember.js,adamesque/ember.js,jasonmit/ember.js,fxkr/ember.js,slindberg/ember.js,rlugojr/ember.js,howmuchcomputer/ember.js,blimmer/ember.js,boztek/ember.js,cdl/ember.js,Vassi/ember.js,kennethdavidbuck/ember.js,mmun/ember.js,sly7-7/ember.js,tianxiangbing/ember.js,seanpdoyle/ember.js,seanjohnson08/ember.js,wagenet/ember.js,sivakumar-kailasam/ember.js,kigsmtua/ember.js,lsthornt/ember.js,michaelBenin/ember.js,xtian/ember.js,yaymukund/ember.js,rlugojr/ember.js,nathanhammond/ember.js,rubenrp81/ember.js,trek/ember.js,kmiyashiro/ember.js,loadimpact/ember.js,udhayam/ember.js,johnnyshields/ember.js,raytiley/ember.js,zendesk/ember.js,lazybensch/ember.js,fouzelddin/ember.js,ryanlabouve/ember.js,davidpett/ember.js,seanpdoyle/ember.js,nathanhammond/ember.js,JacobNinja/es6,marcioj/ember.js,antigremlin/ember.js,acburdine/ember.js,adatapost/ember.js,XrXr/ember.js,kellyselden/ember.js,loadimpact/ember.js,eventualbuddha/ember.js,udhayam/ember.js,szines/ember.js,quaertym/ember.js,kwight/ember.js,mixonic/ember.js,omurbilgili/ember.js,kublaj/ember.js,nruth/ember.js,schreiaj/ember.js,joeruello/ember.js,opichals/ember.js,bantic/ember.js,jherdman/ember.js,anilmaurya/ember.js,toddjordan/ember.js,HeroicEric/ember.js,wycats/ember.js,cesarizu/ember.js,jonathanKingston/ember.js,martndemus/ember.js,delftswa2016/ember.js,mallikarjunayaddala/ember.js,nightire/ember.js,boztek/ember.js,TriumphantAkash/ember.js,mrjavascript/ember.js,eliotsykes/ember.js,bantic/ember.js,ubuntuvim/ember.js,cesarizu/ember.js,zenefits/ember.js,Patsy-issa/ember.js,ridixcr/ember.js,swarmbox/ember.js,runspired/ember.js,develoser/ember.js,rodrigo-morais/ember.js,kwight/ember.js,Gaurav0/ember.js,pixelhandler/ember.js,thejameskyle/ember.js,mrjavascript/ember.js,kwight/ember.js,vikram7/ember.js,johanneswuerbach/ember.js,cyberkoi/ember.js,EricSchank/ember.js,VictorChaun/ember.js,cyberkoi/ember.js,givanse/ember.js,Leooo/ember.js,femi-saliu/ember.js,rwjblue/ember.js,marijaselakovic/ember.js,tiegz/ember.js,mmpestorich/ember.js,green-arrow/ember.js,nickiaconis/ember.js,zenefits/ember.js,g13013/ember.js,jerel/ember.js,howtolearntocode/ember.js,blimmer/ember.js,johnnyshields/ember.js,KevinTCoughlin/ember.js,ubuntuvim/ember.js,omurbilgili/ember.js,practicefusion/ember.js,jaswilli/ember.js,udhayam/ember.js,XrXr/ember.js,rubenrp81/ember.js,blimmer/ember.js,jerel/ember.js,jayphelps/ember.js,soulcutter/ember.js,eriktrom/ember.js,HeroicEric/ember.js,tianxiangbing/ember.js,jamesarosen/ember.js,alexspeller/ember.js,gdi2290/ember.js,fouzelddin/ember.js,thoov/ember.js,kiwiupover/ember.js,stefanpenner/ember.js,claimsmall/ember.js,KevinTCoughlin/ember.js,okuryu/ember.js,Zagorakiss/ember.js,xtian/ember.js,trentmwillis/ember.js,elwayman02/ember.js,HipsterBrown/ember.js,opichals/ember.js,simudream/ember.js,balinterdi/ember.js,antigremlin/ember.js,raytiley/ember.js,kublaj/ember.js,olivierchatry/ember.js,abulrim/ember.js,dgeb/ember.js,MatrixZ/ember.js,benstoltz/ember.js,Eric-Guo/ember.js,cdl/ember.js,ebryn/ember.js,amk221/ember.js,sandstrom/ember.js,bmac/ember.js,boztek/ember.js,Eric-Guo/ember.js,jmurphyau/ember.js,patricksrobertson/ember.js,zenefits/ember.js,femi-saliu/ember.js,fouzelddin/ember.js,visualjeff/ember.js,teddyzeenny/ember.js,Krasnyanskiy/ember.js,intercom/ember.js,kublaj/ember.js,yaymukund/ember.js,dschmidt/ember.js,benstoltz/ember.js,Robdel12/ember.js,yuhualingfeng/ember.js,nickiaconis/ember.js,JacobNinja/es6,johanneswuerbach/ember.js,patricksrobertson/ember.js,tsing80/ember.js,aihua/ember.js,code0100fun/ember.js,code0100fun/ember.js,tofanelli/ember.js,soulcutter/ember.js,nipunas/ember.js,tomdale/ember.js,jayphelps/ember.js,JesseQin/ember.js,furkanayhan/ember.js,alexdiliberto/ember.js,Leooo/ember.js,Kuzirashi/ember.js,mike-north/ember.js,selvagsz/ember.js,gfvcastro/ember.js,schreiaj/ember.js,toddjordan/ember.js,dschmidt/ember.js,howtolearntocode/ember.js,greyhwndz/ember.js,antigremlin/ember.js,tianxiangbing/ember.js,kublaj/ember.js,SaladFork/ember.js,schreiaj/ember.js,jherdman/ember.js,mdehoog/ember.js,abulrim/ember.js,koriroys/ember.js,amk221/ember.js,pangratz/ember.js,tomdale/ember.js,ryrych/ember.js,jbrown/ember.js,karthiick/ember.js,udhayam/ember.js,qaiken/ember.js,tiegz/ember.js,kanongil/ember.js,williamsbdev/ember.js,VictorChaun/ember.js,machty/ember.js,faizaanshamsi/ember.js,rlugojr/ember.js,Serabe/ember.js,szines/ember.js,intercom/ember.js,Krasnyanskiy/ember.js,krisselden/ember.js,jerel/ember.js,nvoron23/ember.js,tricknotes/ember.js,tsing80/ember.js,karthiick/ember.js,thoov/ember.js,g13013/ember.js,sly7-7/ember.js,JKGisMe/ember.js,adatapost/ember.js,Robdel12/ember.js,skeate/ember.js,eliotsykes/ember.js,vikram7/ember.js,rwjblue/ember.js,JKGisMe/ember.js,green-arrow/ember.js,tildeio/ember.js,duggiefresh/ember.js,wecc/ember.js,kennethdavidbuck/ember.js,ming-codes/ember.js,dgeb/ember.js,fivetanley/ember-tests-izzle,mike-north/ember.js,yonjah/ember.js,cbou/ember.js,Kuzirashi/ember.js,bekzod/ember.js,toddjordan/ember.js,raycohen/ember.js,kmiyashiro/ember.js,jish/ember.js,jbrown/ember.js,williamsbdev/ember.js,practicefusion/ember.js,brzpegasus/ember.js,pixelhandler/ember.js,marijaselakovic/ember.js,xiujunma/ember.js,howmuchcomputer/ember.js,slindberg/ember.js,paddyobrien/ember.js,gdi2290/ember.js,mike-north/ember.js,okuryu/ember.js,cowboyd/ember.js,marcioj/ember.js,trentmwillis/ember.js,faizaanshamsi/ember.js,slindberg/ember.js,cyjia/ember.js,xcambar/ember.js,martndemus/ember.js,kanongil/ember.js,jamesarosen/ember.js,givanse/ember.js,nightire/ember.js,rondale-sc/ember.js,delftswa2016/ember.js,cibernox/ember.js,anilmaurya/ember.js,GavinJoyce/ember.js,lazybensch/ember.js,nicklv/ember.js,olivierchatry/ember.js,simudream/ember.js,adamesque/ember.js,acburdine/ember.js,JKGisMe/ember.js,Gaurav0/ember.js,kiwiupover/ember.js,max-konin/ember.js,jackiewung/ember.js,claimsmall/ember.js,lan0/ember.js,mmpestorich/ember.js,Vassi/ember.js,johanneswuerbach/ember.js,givanse/ember.js,sivakumar-kailasam/ember.js,fxkr/ember.js,faizaanshamsi/ember.js,martndemus/ember.js,KevinTCoughlin/ember.js,mallikarjunayaddala/ember.js,musically-ut/ember.js,visualjeff/ember.js,twokul/ember.js,alexdiliberto/ember.js,ianstarz/ember.js,BrianSipple/ember.js,chadhietala/mixonic-ember,8thcolor/ember.js,kidaa/ember.js,bcardarella/ember.js,Turbo87/ember.js,balinterdi/ember.js,aihua/ember.js,kmiyashiro/ember.js,johnnyshields/ember.js,cesarizu/ember.js,gdi2290/ember.js,furkanayhan/ember.js,jherdman/ember.js,seanjohnson08/ember.js,topaxi/ember.js,xtian/ember.js,duggiefresh/ember.js,davidpett/ember.js,Patsy-issa/ember.js,rwjblue/ember.js,davidpett/ember.js,pixelhandler/ember.js,elwayman02/ember.js,ef4/ember.js,acburdine/ember.js,kellyselden/ember.js,marijaselakovic/ember.js,wecc/ember.js,Serabe/ember.js,jackiewung/ember.js,jayphelps/ember.js,ef4/ember.js,acburdine/ember.js,mdehoog/ember.js,loadimpact/ember.js,bmac/ember.js,Trendy/ember.js,JesseQin/ember.js,amk221/ember.js,g13013/ember.js,latlontude/ember.js,kennethdavidbuck/ember.js,wagenet/ember.js,sivakumar-kailasam/ember.js,vitch/ember.js,xcskier56/ember.js,mmpestorich/ember.js,mitchlloyd/ember.js,emberjs/ember.js,MatrixZ/ember.js,xiujunma/ember.js,csantero/ember.js,Leooo/ember.js,ubuntuvim/ember.js,loadimpact/ember.js,tricknotes/ember.js,jamesarosen/ember.js,chadhietala/ember.js,aihua/ember.js,ming-codes/ember.js,qaiken/ember.js,adatapost/ember.js,patricksrobertson/ember.js,mfeckie/ember.js,brzpegasus/ember.js,pixelhandler/ember.js,TriumphantAkash/ember.js,develoser/ember.js,xcskier56/ember.js,ianstarz/ember.js,bantic/ember.js,nickiaconis/ember.js,cbou/ember.js,EricSchank/ember.js,csantero/ember.js,garth/ember.js,asakusuma/ember.js,selvagsz/ember.js,yonjah/ember.js,getoutreach/ember.js,kwight/ember.js,seanjohnson08/ember.js,thoov/ember.js,kigsmtua/ember.js,elwayman02/ember.js,nruth/ember.js,rot26/ember.js,trentmwillis/ember.js,miguelcobain/ember.js,pangratz/ember.js,topaxi/ember.js,raycohen/ember.js,rfsv/ember.js,kaeufl/ember.js,tildeio/ember.js,schreiaj/ember.js,asakusuma/ember.js,delftswa2016/ember.js,Krasnyanskiy/ember.js,cowboyd/ember.js,pangratz/ember.js,aihua/ember.js,opichals/ember.js,intercom/ember.js,jonathanKingston/ember.js,workmanw/ember.js,Gaurav0/ember.js,johnnyshields/ember.js,rondale-sc/ember.js,bmac/ember.js,cyberkoi/ember.js,karthiick/ember.js,kiwiupover/ember.js,musically-ut/ember.js,nicklv/ember.js,nipunas/ember.js,Trendy/ember.js,BrianSipple/ember.js,jbrown/ember.js,kellyselden/ember.js,ThiagoGarciaAlves/ember.js,benstoltz/ember.js,cbou/ember.js,marijaselakovic/ember.js,fivetanley/ember.js,swarmbox/ember.js,joeruello/ember.js,njagadeesh/ember.js,dgeb/ember.js,sivakumar-kailasam/ember.js,simudream/ember.js,tricknotes/ember.js,kidaa/ember.js,VictorChaun/ember.js,xiujunma/ember.js,adatapost/ember.js,thejameskyle/ember.js,selvagsz/ember.js,chancancode/ember.js,alexspeller/ember.js,xcskier56/ember.js,antigremlin/ember.js,cyberkoi/ember.js,gfvcastro/ember.js,chadhietala/ember.js,bantic/ember.js,rondale-sc/ember.js,jackiewung/ember.js,Patsy-issa/ember.js,vikram7/ember.js,cgvarela/ember.js,ianstarz/ember.js,fouzelddin/ember.js,csantero/ember.js,NLincoln/ember.js,ebryn/ember.js,runspired/ember.js,vitch/ember.js,wycats/ember.js,marcioj/ember.js,lan0/ember.js,givanse/ember.js,8thcolor/ember.js,NLincoln/ember.js,mfeckie/ember.js,kigsmtua/ember.js,greyhwndz/ember.js,chancancode/ember.js,asakusuma/ember.js,MatrixZ/ember.js,Eric-Guo/ember.js,cgvarela/ember.js,yaymukund/ember.js,workmanw/ember.js,Patsy-issa/ember.js,Turbo87/ember.js,ryanlabouve/ember.js,trek/ember.js,bekzod/ember.js,thejameskyle/ember.js,kanongil/ember.js,jherdman/ember.js,mtaylor769/ember.js,Krasnyanskiy/ember.js,nruth/ember.js,trek/ember.js,sharma1nitish/ember.js,lazybensch/ember.js,zenefits/ember.js,Zagorakiss/ember.js,kidaa/ember.js,lsthornt/ember.js,kennethdavidbuck/ember.js,mitchlloyd/ember.js,SaladFork/ember.js,raytiley/ember.js,lan0/ember.js,fpauser/ember.js,machty/ember.js,jplwood/ember.js,raycohen/ember.js,Leooo/ember.js,omurbilgili/ember.js,SaladFork/ember.js,fivetanley/ember.js,mmun/ember.js,ThiagoGarciaAlves/ember.js,Trendy/ember.js,howtolearntocode/ember.js,ef4/ember.js,kigsmtua/ember.js,TriumphantAkash/ember.js,quaertym/ember.js,yuhualingfeng/ember.js,Zagorakiss/ember.js,njagadeesh/ember.js,cibernox/ember.js,xtian/ember.js,fpauser/ember.js,lazybensch/ember.js,kaeufl/ember.js,csantero/ember.js,8thcolor/ember.js,sharma1nitish/ember.js,asakusuma/ember.js,elwayman02/ember.js,cowboyd/ember.js,gnarf/ember.js,duggiefresh/ember.js,ming-codes/ember.js,practicefusion/ember.js,rubenrp81/ember.js,jish/ember.js,koriroys/ember.js,ssured/ember.js,ubuntuvim/ember.js,Eric-Guo/ember.js,tofanelli/ember.js,gnarf/ember.js,eventualbuddha/ember.js,abulrim/ember.js,tricknotes/ember.js,runspired/ember.js,tsing80/ember.js,SaladFork/ember.js,jcope2013/ember.js,pangratz/ember.js,cjc343/ember.js,nvoron23/ember.js,sly7-7/ember.js,bcardarella/ember.js,max-konin/ember.js,lsthornt/ember.js,gnarf/ember.js,rot26/ember.js,mrjavascript/ember.js,njagadeesh/ember.js,greyhwndz/ember.js,ridixcr/ember.js,Turbo87/ember.js,miguelcobain/ember.js,furkanayhan/ember.js,jcope2013/ember.js,kanongil/ember.js,bekzod/ember.js,duggiefresh/ember.js,cowboyd/ember.js,Robdel12/ember.js,topaxi/ember.js,rlugojr/ember.js,green-arrow/ember.js,szines/ember.js,jmurphyau/ember.js,jayphelps/ember.js,latlontude/ember.js,Zagorakiss/ember.js,jcope2013/ember.js,jackiewung/ember.js,NLincoln/ember.js,rubenrp81/ember.js,practicefusion/ember.js,XrXr/ember.js,rodrigo-morais/ember.js,code0100fun/ember.js,Kuzirashi/ember.js,jmurphyau/ember.js,alexdiliberto/ember.js,fivetanley/ember-tests-izzle,qaiken/ember.js,krisselden/ember.js,knownasilya/ember.js,szines/ember.js,tianxiangbing/ember.js,garth/ember.js,JKGisMe/ember.js,lan0/ember.js,jonathanKingston/ember.js,green-arrow/ember.js,fxkr/ember.js,artfuldodger/ember.js,cibernox/ember.js,GavinJoyce/ember.js,nathanhammond/ember.js,artfuldodger/ember.js,martndemus/ember.js,Serabe/ember.js,williamsbdev/ember.js,chadhietala/mixonic-ember,karthiick/ember.js,Gaurav0/ember.js,miguelcobain/ember.js,intercom/ember.js,Vassi/ember.js,mitchlloyd/ember.js,nvoron23/ember.js,blimmer/ember.js,Robdel12/ember.js,vikram7/ember.js,BrianSipple/ember.js,tildeio/ember.js,max-konin/ember.js,cjc343/ember.js,claimsmall/ember.js,bekzod/ember.js,jaswilli/ember.js,gfvcastro/ember.js,nightire/ember.js,toddjordan/ember.js,rot26/ember.js,JacobNinja/es6,MatrixZ/ember.js,quaertym/ember.js,rfsv/ember.js,wagenet/ember.js,sandstrom/ember.js,olivierchatry/ember.js,bcardarella/ember.js,howmuchcomputer/ember.js,yonjah/ember.js,XrXr/ember.js,visualjeff/ember.js,ryanlabouve/ember.js,wecc/ember.js,xcskier56/ember.js,JesseQin/ember.js,teddyzeenny/ember.js,paddyobrien/ember.js,michaelBenin/ember.js,kaeufl/ember.js,jonathanKingston/ember.js,mixonic/ember.js,nicklv/ember.js,cjc343/ember.js,topaxi/ember.js,cyjia/ember.js,zendesk/ember.js,raytiley/ember.js,gfvcastro/ember.js,jmurphyau/ember.js,HeroicEric/ember.js,nickiaconis/ember.js,kellyselden/ember.js,selvagsz/ember.js,vitch/ember.js,jplwood/ember.js,HipsterBrown/ember.js,cyjia/ember.js,joeruello/ember.js,mdehoog/ember.js,swarmbox/ember.js,amk221/ember.js,emberjs/ember.js,nicklv/ember.js,stefanpenner/ember.js,mfeckie/ember.js,fxkr/ember.js,chadhietala/ember.js,danielgynn/ember.js,eliotsykes/ember.js,Trendy/ember.js,alexdiliberto/ember.js,danielgynn/ember.js,HipsterBrown/ember.js,ryanlabouve/ember.js,jaswilli/ember.js,sandstrom/ember.js,KevinTCoughlin/ember.js,davidpett/ember.js,greyhwndz/ember.js,mallikarjunayaddala/ember.js,code0100fun/ember.js,seanpdoyle/ember.js,danielgynn/ember.js,nathanhammond/ember.js,Serabe/ember.js,trentmwillis/ember.js,opichals/ember.js,ianstarz/ember.js,wycats/ember.js,jerel/ember.js,xcambar/ember.js
|
yaml
|
## Code Before:
rvm:
- 1.9.3
before_script:
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
- bundle exec rackup &
script:
- phantomjs tests/qunit/run-qunit.js "http://localhost:9292/tests/index.html?package=all&extendprototypes=true"
- phantomjs tests/qunit/run-qunit.js "http://localhost:9292/tests/index.html?package=all&extendprototypes=true&jquery=1.6.4"
## Instruction:
Make sure server has started and fix script:
Add tests for w/o extended prototypes
## Code After:
rvm:
- 1.9.3
before_script:
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
- bundle exec rackup &
- sleep 5
script: phantomjs tests/qunit/run-qunit.js "http://localhost:9292/tests/index.html?package=all" && phantomjs tests/qunit/run-qunit.js "http://localhost:9292/tests/index.html?package=all&jquery=1.6.4" && phantomjs tests/qunit/run-qunit.js "http://localhost:9292/tests/index.html?package=all&extendprototypes=true" && phantomjs tests/qunit/run-qunit.js "http://localhost:9292/tests/index.html?package=all&extendprototypes=true&jquery=1.6.4"
|
62f1034cf77b025b2e34c69eea8446549eee768c
|
composer.json
|
composer.json
|
{
"name": "togos/tpfetcher",
"description": "Fetch blobs by hash-based URN.",
"license": "MIT",
"require": {
"togos/base32": "~1.0.0"
}
}
|
{
"name": "togos/tpfetcher",
"description": "Fetch blobs by hash-based URN.",
"license": "MIT",
"require": {
"togos/base32": "~1.0.0"
},
"bin": [
"bin/fetch"
]
}
|
Add bin/fetch to 'bin' list.
|
Add bin/fetch to 'bin' list.
|
JSON
|
mit
|
TOGoS/TPFetcher
|
json
|
## Code Before:
{
"name": "togos/tpfetcher",
"description": "Fetch blobs by hash-based URN.",
"license": "MIT",
"require": {
"togos/base32": "~1.0.0"
}
}
## Instruction:
Add bin/fetch to 'bin' list.
## Code After:
{
"name": "togos/tpfetcher",
"description": "Fetch blobs by hash-based URN.",
"license": "MIT",
"require": {
"togos/base32": "~1.0.0"
},
"bin": [
"bin/fetch"
]
}
|
a7212b772e55e1f04493a33adb69c61db1dab8b7
|
common/library_main.cc
|
common/library_main.cc
|
int BrightrayExampleMain(int argc, const char* argv[]) {
brightray_example::MainDelegate delegate;
return content::ContentMain(argc, argv, &delegate);
}
|
int BrightrayExampleMain(int argc, const char* argv[]) {
brightray_example::MainDelegate delegate;
content::ContentMainParams params(&delegate);
params.argc = argc;
params.argv = argv;
return content::ContentMain(params);
}
|
Update for changes to content::ContentMain
|
Update for changes to content::ContentMain
|
C++
|
mit
|
atom/brightray_example,atom/brightray_example,atom/brightray_example
|
c++
|
## Code Before:
int BrightrayExampleMain(int argc, const char* argv[]) {
brightray_example::MainDelegate delegate;
return content::ContentMain(argc, argv, &delegate);
}
## Instruction:
Update for changes to content::ContentMain
## Code After:
int BrightrayExampleMain(int argc, const char* argv[]) {
brightray_example::MainDelegate delegate;
content::ContentMainParams params(&delegate);
params.argc = argc;
params.argv = argv;
return content::ContentMain(params);
}
|
e4e030244b043182ca9b9dabaff47036153a3099
|
src/app/core/services/socket.service.ts
|
src/app/core/services/socket.service.ts
|
import { Injectable } from '@angular/core';
import { environment } from './../../../environments/environment';
import { Observable } from 'rxjs';
import * as io from 'socket.io-client';
@Injectable()
export class SocketService {
url: string;
socket: SocketIOClient.Socket;
constructor() {
if(environment.production) {
this.socket = io.connect({ transports: ['websocket'], upgrade: false });
} else {
this.url = `${window.location.protocol}//${window.location.hostname}:3000`;
this.socket = io.connect(this.url, { transports: ['websocket'], upgrade: false });
this.sendMessage('message', {message: 'hello'});
}
}
getSocketId(): string {
return (this.socket) ? this.socket.id : '';
}
connectToStreaming(socketEventName) {
return Observable.fromEvent(this.socket, socketEventName).share();
}
sendMessage(type: string, payload: object) {
this.socket.emit(type, payload);
}
}
|
import { Injectable } from '@angular/core';
import { environment } from './../../../environments/environment';
import { Observable } from 'rxjs';
import * as io from 'socket.io-client';
@Injectable()
export class SocketService {
url: string;
socket: SocketIOClient.Socket;
constructor() {
if(this.socket) {
console.log('SS >>>> ', this.socket.connected);
this.socket.removeAllListeners();
this.socket.disconnect();
}
if(environment.production) {
this.socket = io.connect({ transports: ['websocket'], upgrade: false });
} else {
this.url = `${window.location.protocol}//${window.location.hostname}:3000`;
this.socket = io.connect(this.url, { transports: ['websocket'], upgrade: false });
}
}
getSocketId(): string {
return (this.socket) ? this.socket.id : '';
}
connectToStreaming(socketEventName) {
return Observable.fromEvent(this.socket, socketEventName).share();
}
sendMessage(type: string, payload: object) {
this.socket.emit(type, payload);
}
}
|
Add experimental/temporal control to avoid create new connections
|
Add experimental/temporal control to avoid create new connections
|
TypeScript
|
mit
|
semagarcia/javascript-kata-player,semagarcia/javascript-kata-player,semagarcia/javascript-kata-player
|
typescript
|
## Code Before:
import { Injectable } from '@angular/core';
import { environment } from './../../../environments/environment';
import { Observable } from 'rxjs';
import * as io from 'socket.io-client';
@Injectable()
export class SocketService {
url: string;
socket: SocketIOClient.Socket;
constructor() {
if(environment.production) {
this.socket = io.connect({ transports: ['websocket'], upgrade: false });
} else {
this.url = `${window.location.protocol}//${window.location.hostname}:3000`;
this.socket = io.connect(this.url, { transports: ['websocket'], upgrade: false });
this.sendMessage('message', {message: 'hello'});
}
}
getSocketId(): string {
return (this.socket) ? this.socket.id : '';
}
connectToStreaming(socketEventName) {
return Observable.fromEvent(this.socket, socketEventName).share();
}
sendMessage(type: string, payload: object) {
this.socket.emit(type, payload);
}
}
## Instruction:
Add experimental/temporal control to avoid create new connections
## Code After:
import { Injectable } from '@angular/core';
import { environment } from './../../../environments/environment';
import { Observable } from 'rxjs';
import * as io from 'socket.io-client';
@Injectable()
export class SocketService {
url: string;
socket: SocketIOClient.Socket;
constructor() {
if(this.socket) {
console.log('SS >>>> ', this.socket.connected);
this.socket.removeAllListeners();
this.socket.disconnect();
}
if(environment.production) {
this.socket = io.connect({ transports: ['websocket'], upgrade: false });
} else {
this.url = `${window.location.protocol}//${window.location.hostname}:3000`;
this.socket = io.connect(this.url, { transports: ['websocket'], upgrade: false });
}
}
getSocketId(): string {
return (this.socket) ? this.socket.id : '';
}
connectToStreaming(socketEventName) {
return Observable.fromEvent(this.socket, socketEventName).share();
}
sendMessage(type: string, payload: object) {
this.socket.emit(type, payload);
}
}
|
e830c98ae4982f1e886bf324e22d11273674edc8
|
cheat.gemspec
|
cheat.gemspec
|
lib = File.expand_path('../lib', __FILE__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require 'cheat/version'
Gem::Specification.new do |spec|
spec.add_dependency 'pager', '~> 1.0'
spec.name = 'cheat'
spec.description = "cheat prints cheat sheets from cheat.errtheblog.com, a wiki-like repository of programming knowledge."
spec.summary = "cheat prints cheat sheets from cheat.errtheblog.com"
spec.authors = ["Chris Wanstrath", "Erik Michaels-Ober"]
spec.email = ["[email protected]", "[email protected]"]
spec.bindir = 'bin'
spec.executables = %w(cheat)
spec.files = %w(README LICENSE)
spec.files += Dir.glob("bin/**/*")
spec.files += Dir.glob("lib/**/*")
spec.files += Dir.glob("man/**/*")
spec.files += Dir.glob("test/**/*")
spec.homepage = 'http://cheat.errtheblog.com'
spec.licenses = ['MIT']
spec.require_paths = ['lib']
spec.required_rubygems_version = '>= 1.3.6'
spec.version = Cheat::Version
end
|
lib = File.expand_path('../lib', __FILE__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require 'cheat/version'
Gem::Specification.new do |spec|
spec.add_dependency 'pager', '~> 1.0'
spec.add_development_dependency 'bundler', '~> 1.0'
spec.name = 'cheat'
spec.description = "cheat prints cheat sheets from cheat.errtheblog.com, a wiki-like repository of programming knowledge."
spec.summary = "cheat prints cheat sheets from cheat.errtheblog.com"
spec.authors = ["Chris Wanstrath", "Erik Michaels-Ober"]
spec.email = ["[email protected]", "[email protected]"]
spec.bindir = 'bin'
spec.executables = %w(cheat)
spec.files = %w(README LICENSE)
spec.files += Dir.glob("bin/**/*")
spec.files += Dir.glob("lib/**/*")
spec.files += Dir.glob("man/**/*")
spec.files += Dir.glob("test/**/*")
spec.homepage = 'http://cheat.errtheblog.com'
spec.licenses = ['MIT']
spec.require_paths = ['lib']
spec.required_rubygems_version = '>= 1.3.6'
spec.version = Cheat::Version
end
|
Add bundler as a development dependency
|
Add bundler as a development dependency
|
Ruby
|
mit
|
defunkt/cheat
|
ruby
|
## Code Before:
lib = File.expand_path('../lib', __FILE__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require 'cheat/version'
Gem::Specification.new do |spec|
spec.add_dependency 'pager', '~> 1.0'
spec.name = 'cheat'
spec.description = "cheat prints cheat sheets from cheat.errtheblog.com, a wiki-like repository of programming knowledge."
spec.summary = "cheat prints cheat sheets from cheat.errtheblog.com"
spec.authors = ["Chris Wanstrath", "Erik Michaels-Ober"]
spec.email = ["[email protected]", "[email protected]"]
spec.bindir = 'bin'
spec.executables = %w(cheat)
spec.files = %w(README LICENSE)
spec.files += Dir.glob("bin/**/*")
spec.files += Dir.glob("lib/**/*")
spec.files += Dir.glob("man/**/*")
spec.files += Dir.glob("test/**/*")
spec.homepage = 'http://cheat.errtheblog.com'
spec.licenses = ['MIT']
spec.require_paths = ['lib']
spec.required_rubygems_version = '>= 1.3.6'
spec.version = Cheat::Version
end
## Instruction:
Add bundler as a development dependency
## Code After:
lib = File.expand_path('../lib', __FILE__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require 'cheat/version'
Gem::Specification.new do |spec|
spec.add_dependency 'pager', '~> 1.0'
spec.add_development_dependency 'bundler', '~> 1.0'
spec.name = 'cheat'
spec.description = "cheat prints cheat sheets from cheat.errtheblog.com, a wiki-like repository of programming knowledge."
spec.summary = "cheat prints cheat sheets from cheat.errtheblog.com"
spec.authors = ["Chris Wanstrath", "Erik Michaels-Ober"]
spec.email = ["[email protected]", "[email protected]"]
spec.bindir = 'bin'
spec.executables = %w(cheat)
spec.files = %w(README LICENSE)
spec.files += Dir.glob("bin/**/*")
spec.files += Dir.glob("lib/**/*")
spec.files += Dir.glob("man/**/*")
spec.files += Dir.glob("test/**/*")
spec.homepage = 'http://cheat.errtheblog.com'
spec.licenses = ['MIT']
spec.require_paths = ['lib']
spec.required_rubygems_version = '>= 1.3.6'
spec.version = Cheat::Version
end
|
2ba213b3451acb336d1ac9959e947803447352b7
|
_config.yml
|
_config.yml
|
permalink: pretty
relative_permalinks: true
# Setup
title: Sleep
tagline: Mixtapes
url: http://pedrolucasp.github.com/sleep
paginate: 1
baseurl: ""
# Assets
#
# We specify the directory for Jekyll so we can use @imports.
sass:
sass_dir: _sass
style: :compressed
# About/contact
author:
name: Pedro Lucas Porcellis
url: https://twitter.com/pedrolucasp
email: [email protected]
# Custom vars
version: 0.0.1
github:
repo: https://github.com/pedrolucasp/sleep
|
permalink: pretty
relative_permalinks: true
# Setup
title: Sleep
tagline: Mixtapes
url: http://pedrolucasp.github.com/sleep
paginate: 1
baseurl: "http://pedrolucasp.github.io/sleep/"
# Assets
#
# We specify the directory for Jekyll so we can use @imports.
sass:
sass_dir: _sass
style: :compressed
# About/contact
author:
name: Pedro Lucas Porcellis
url: https://twitter.com/pedrolucasp
email: [email protected]
# Custom vars
version: 0.0.1
github:
repo: https://github.com/pedrolucasp/sleep
|
Fix url for Github Pages
|
Fix url for Github Pages
|
YAML
|
mit
|
pedrolucasp/sleep
|
yaml
|
## Code Before:
permalink: pretty
relative_permalinks: true
# Setup
title: Sleep
tagline: Mixtapes
url: http://pedrolucasp.github.com/sleep
paginate: 1
baseurl: ""
# Assets
#
# We specify the directory for Jekyll so we can use @imports.
sass:
sass_dir: _sass
style: :compressed
# About/contact
author:
name: Pedro Lucas Porcellis
url: https://twitter.com/pedrolucasp
email: [email protected]
# Custom vars
version: 0.0.1
github:
repo: https://github.com/pedrolucasp/sleep
## Instruction:
Fix url for Github Pages
## Code After:
permalink: pretty
relative_permalinks: true
# Setup
title: Sleep
tagline: Mixtapes
url: http://pedrolucasp.github.com/sleep
paginate: 1
baseurl: "http://pedrolucasp.github.io/sleep/"
# Assets
#
# We specify the directory for Jekyll so we can use @imports.
sass:
sass_dir: _sass
style: :compressed
# About/contact
author:
name: Pedro Lucas Porcellis
url: https://twitter.com/pedrolucasp
email: [email protected]
# Custom vars
version: 0.0.1
github:
repo: https://github.com/pedrolucasp/sleep
|
6bf5b70bac76062aebe35c1951a23590710f902c
|
app/scripts/ripple.js
|
app/scripts/ripple.js
|
(function () {
document.addEventListener('mousedown', function (event) {
if (event.target && event.target.className.indexOf('ripple') !== -1) {
let $div = document.createElement('div'),
btnRect = event.target.getBoundingClientRect(),
height = event.target.clientHeight,
xPos = event.pageX - (btnRect.left + window.pageXOffset),
yPos = event.pageY - (btnRect.top + window.pageYOffset);
$div.className = 'ripple-effect';
$div.style.height = `${height}px`;
//noinspection JSSuspiciousNameCombination
$div.style.width = `${height}px`;
$div.style.top = `${yPos - (height / 2)}px`;
$div.style.left = `${xPos - (height / 2)}px`;
event.target.appendChild($div);
window.setTimeout(() => event.target.removeChild($div), 2000);
}
});
})();
|
(function () {
document.addEventListener('mousedown', function (event) {
if (event.target &&
event.target.className &&
event.target.className.indexOf &&
event.target.className.indexOf('ripple') !== -1) {
let $div = document.createElement('div'),
btnRect = event.target.getBoundingClientRect(),
height = event.target.clientHeight,
xPos = event.pageX - (btnRect.left + window.pageXOffset),
yPos = event.pageY - (btnRect.top + window.pageYOffset);
$div.className = 'ripple-effect';
$div.style.height = `${height}px`;
//noinspection JSSuspiciousNameCombination
$div.style.width = `${height}px`;
$div.style.top = `${yPos - (height / 2)}px`;
$div.style.left = `${xPos - (height / 2)}px`;
event.target.appendChild($div);
window.setTimeout(() => event.target.removeChild($div), 2000);
}
});
})();
|
Fix for error when clicking on browser market share pie charts
|
Fix for error when clicking on browser market share pie charts
|
JavaScript
|
mit
|
NOtherDev/whatwebcando,NOtherDev/whatwebcando,NOtherDev/whatwebcando
|
javascript
|
## Code Before:
(function () {
document.addEventListener('mousedown', function (event) {
if (event.target && event.target.className.indexOf('ripple') !== -1) {
let $div = document.createElement('div'),
btnRect = event.target.getBoundingClientRect(),
height = event.target.clientHeight,
xPos = event.pageX - (btnRect.left + window.pageXOffset),
yPos = event.pageY - (btnRect.top + window.pageYOffset);
$div.className = 'ripple-effect';
$div.style.height = `${height}px`;
//noinspection JSSuspiciousNameCombination
$div.style.width = `${height}px`;
$div.style.top = `${yPos - (height / 2)}px`;
$div.style.left = `${xPos - (height / 2)}px`;
event.target.appendChild($div);
window.setTimeout(() => event.target.removeChild($div), 2000);
}
});
})();
## Instruction:
Fix for error when clicking on browser market share pie charts
## Code After:
(function () {
document.addEventListener('mousedown', function (event) {
if (event.target &&
event.target.className &&
event.target.className.indexOf &&
event.target.className.indexOf('ripple') !== -1) {
let $div = document.createElement('div'),
btnRect = event.target.getBoundingClientRect(),
height = event.target.clientHeight,
xPos = event.pageX - (btnRect.left + window.pageXOffset),
yPos = event.pageY - (btnRect.top + window.pageYOffset);
$div.className = 'ripple-effect';
$div.style.height = `${height}px`;
//noinspection JSSuspiciousNameCombination
$div.style.width = `${height}px`;
$div.style.top = `${yPos - (height / 2)}px`;
$div.style.left = `${xPos - (height / 2)}px`;
event.target.appendChild($div);
window.setTimeout(() => event.target.removeChild($div), 2000);
}
});
})();
|
b1e80208d11b2f65682a5f4902e830f3ed49a9c9
|
rest-api/src/main/resources/definitions/paged_resources/activity_event.yml
|
rest-api/src/main/resources/definitions/paged_resources/activity_event.yml
|
type: object
readOnly: true
properties:
items:
type: array
items:
$ref: ../activity_event.yml
total:
type: integer
description: The total number of records in the items list
type:
type: string
readOnly: true
description: "ResourceList"
|
type: object
readOnly: true
properties:
items:
type: array
items:
$ref: ../activity_event.yml
type:
type: string
readOnly: true
description: "ResourceList"
|
Remove total from activity event list
|
Remove total from activity event list
|
YAML
|
apache-2.0
|
alxdarksage/BridgeJavaSDK,DwayneJengSage/BridgeJavaSDK,Sage-Bionetworks/BridgeJavaSDK,Sage-Bionetworks/BridgeJavaSDK,alxdarksage/BridgeJavaSDK,DwayneJengSage/BridgeJavaSDK
|
yaml
|
## Code Before:
type: object
readOnly: true
properties:
items:
type: array
items:
$ref: ../activity_event.yml
total:
type: integer
description: The total number of records in the items list
type:
type: string
readOnly: true
description: "ResourceList"
## Instruction:
Remove total from activity event list
## Code After:
type: object
readOnly: true
properties:
items:
type: array
items:
$ref: ../activity_event.yml
type:
type: string
readOnly: true
description: "ResourceList"
|
03643b00e60ac4489f7a1b1d87bc12cd8051b391
|
.travis.yml
|
.travis.yml
|
language: android
env:
global:
- ADB_INSTALL_TIMEOUT=30
# Using the new Container-Based Infrastructure
- sudo: false
# Turning off caching to avoid caching Issues
- cache: false
# Initiating clean Gradle output
- TERM=dumb
# Giving even more memory to Gradle JVM
- GRADLE_OPTS="-Xmx2048m -XX:MaxPermSize=1024m"
android:
components:
- tools
- build-tools-23.0.3
- extra-android-m2repository
- android-23
# Emulator Management: Create, Start and Wait
before_script:
- echo no | android create avd --force -n test -t android-19 --abi armeabi-v7a
- emulator -avd test -no-audio -no-window &
- android-wait-for-emulator
- adb shell input keyevent 82 &
script: ./gradlew connectedAndroidTest
|
language: android
jdk: oraclejdk8
Use JDK8 for Android builds on TravisUse JDK8 for Android builds on TraviUse JDK8 for Android builds on Travis
env:
global:
- ADB_INSTALL_TIMEOUT=30
# Using the new Container-Based Infrastructure
- sudo: false
# Turning off caching to avoid caching Issues
- cache: false
# Initiating clean Gradle output
- TERM=dumb
# Giving even more memory to Gradle JVM
- GRADLE_OPTS="-Xmx2048m -XX:MaxPermSize=1024m"
android:
components:
- tools
- build-tools-23.0.3
- extra-android-m2repository
- android-23
# Emulator Management: Create, Start and Wait
before_script:
- echo no | android create avd --force -n test -t android-19 --abi armeabi-v7a
- emulator -avd test -no-audio -no-window &
- android-wait-for-emulator
- adb shell input keyevent 82 &
script: ./gradlew connectedAndroidTest
|
Use JDK8 for Android builds on Travis
|
Use JDK8 for Android builds on Travis
|
YAML
|
apache-2.0
|
dg76/Fast-Android-Networking,amitshekhariitbhu/Fast-Android-Networking
|
yaml
|
## Code Before:
language: android
env:
global:
- ADB_INSTALL_TIMEOUT=30
# Using the new Container-Based Infrastructure
- sudo: false
# Turning off caching to avoid caching Issues
- cache: false
# Initiating clean Gradle output
- TERM=dumb
# Giving even more memory to Gradle JVM
- GRADLE_OPTS="-Xmx2048m -XX:MaxPermSize=1024m"
android:
components:
- tools
- build-tools-23.0.3
- extra-android-m2repository
- android-23
# Emulator Management: Create, Start and Wait
before_script:
- echo no | android create avd --force -n test -t android-19 --abi armeabi-v7a
- emulator -avd test -no-audio -no-window &
- android-wait-for-emulator
- adb shell input keyevent 82 &
script: ./gradlew connectedAndroidTest
## Instruction:
Use JDK8 for Android builds on Travis
## Code After:
language: android
jdk: oraclejdk8
Use JDK8 for Android builds on TravisUse JDK8 for Android builds on TraviUse JDK8 for Android builds on Travis
env:
global:
- ADB_INSTALL_TIMEOUT=30
# Using the new Container-Based Infrastructure
- sudo: false
# Turning off caching to avoid caching Issues
- cache: false
# Initiating clean Gradle output
- TERM=dumb
# Giving even more memory to Gradle JVM
- GRADLE_OPTS="-Xmx2048m -XX:MaxPermSize=1024m"
android:
components:
- tools
- build-tools-23.0.3
- extra-android-m2repository
- android-23
# Emulator Management: Create, Start and Wait
before_script:
- echo no | android create avd --force -n test -t android-19 --abi armeabi-v7a
- emulator -avd test -no-audio -no-window &
- android-wait-for-emulator
- adb shell input keyevent 82 &
script: ./gradlew connectedAndroidTest
|
a8791965a4053192927e4db0274aae50635f0105
|
README.md
|
README.md
|
This is the code to run a survey across mySociety sites in conjuction
with the University of Manchester
|
This is the code to run a survey across mySociety sites in conjuction
with the University of Manchester
## Install instructions for Debian
Install necessary packages
sudo apt-get update -y
sudo apt-get upgrade -y
sudo apt-get install -y $(cut -d " " -f 1 conf/packages | egrep -v "^#")
Install the project's requirements into a virtualenv
virtualenv ~/virtualenv-manchester-survey
source ~/virtualenv-manchester-survey/bin/activate
pip install -r requirements.txt
Create a user and a database in postgres
sudo -u postgres psql --command="CREATE USER questions WITH PASSWORD 'questions' CREATEDB;"
sudo -u postgres psql --command='CREATE DATABASE questions OWNER questions;'
Add required configuration
cp conf/general.yml-example conf/general.yml
- Edit MANSURV_DB_USER to be 'questions' in conf/general.yml
- Edit MANSURV_DB_NAME to be 'questions' in conf/general.yml
- Edit MANSURV_DB_PASS to be 'questions' in conf/general.yml
- Edit DJANGO_SECRET_KEY in conf/general.yml
Install gems and compile CSS
sudo gem install --conservative --no-ri --no-rdoc compass zurb-foundation
compass compile web
|
Add some basic install instructions for debian
|
Add some basic install instructions for debian
These are tested in a fresh precise64 vagrant box using the
hashicorp/precise64 image.
|
Markdown
|
agpl-3.0
|
mysociety/manchester-survey,mysociety/manchester-survey,mysociety/manchester-survey,mysociety/manchester-survey,mysociety/manchester-survey
|
markdown
|
## Code Before:
This is the code to run a survey across mySociety sites in conjuction
with the University of Manchester
## Instruction:
Add some basic install instructions for debian
These are tested in a fresh precise64 vagrant box using the
hashicorp/precise64 image.
## Code After:
This is the code to run a survey across mySociety sites in conjuction
with the University of Manchester
## Install instructions for Debian
Install necessary packages
sudo apt-get update -y
sudo apt-get upgrade -y
sudo apt-get install -y $(cut -d " " -f 1 conf/packages | egrep -v "^#")
Install the project's requirements into a virtualenv
virtualenv ~/virtualenv-manchester-survey
source ~/virtualenv-manchester-survey/bin/activate
pip install -r requirements.txt
Create a user and a database in postgres
sudo -u postgres psql --command="CREATE USER questions WITH PASSWORD 'questions' CREATEDB;"
sudo -u postgres psql --command='CREATE DATABASE questions OWNER questions;'
Add required configuration
cp conf/general.yml-example conf/general.yml
- Edit MANSURV_DB_USER to be 'questions' in conf/general.yml
- Edit MANSURV_DB_NAME to be 'questions' in conf/general.yml
- Edit MANSURV_DB_PASS to be 'questions' in conf/general.yml
- Edit DJANGO_SECRET_KEY in conf/general.yml
Install gems and compile CSS
sudo gem install --conservative --no-ri --no-rdoc compass zurb-foundation
compass compile web
|
d90c82cea8abeace95e5b97cc0e51debe0b63225
|
packages/lesswrong/lib/collections/tagRels/views.js
|
packages/lesswrong/lib/collections/tagRels/views.js
|
import { TagRels } from './collection.js';
import { ensureIndex } from '../../collectionUtils';
TagRels.addView('postsWithTag', terms => {
return {
selector: {
tagId: terms.tagId,
baseScore: {$gt: 0},
},
}
});
TagRels.addView('tagsOnPost', terms => {
return {
selector: {
postId: terms.postId,
baseScore: {$gt: 0},
},
}
});
ensureIndex(TagRels, {postId:1});
ensureIndex(TagRels, {tagId:1});
|
import { TagRels } from './collection.js';
import { ensureIndex } from '../../collectionUtils';
TagRels.addView('postsWithTag', terms => {
return {
selector: {
tagId: terms.tagId,
baseScore: {$gt: 0},
},
sort: {baseScore: -1},
}
});
TagRels.addView('tagsOnPost', terms => {
return {
selector: {
postId: terms.postId,
baseScore: {$gt: 0},
},
sort: {baseScore: -1},
}
});
ensureIndex(TagRels, {postId:1});
ensureIndex(TagRels, {tagId:1});
|
Sort tags by descending relevance
|
Sort tags by descending relevance
|
JavaScript
|
mit
|
Discordius/Telescope,Discordius/Lesswrong2,Discordius/Lesswrong2,Discordius/Telescope,Discordius/Telescope,Discordius/Lesswrong2,Discordius/Telescope,Discordius/Lesswrong2
|
javascript
|
## Code Before:
import { TagRels } from './collection.js';
import { ensureIndex } from '../../collectionUtils';
TagRels.addView('postsWithTag', terms => {
return {
selector: {
tagId: terms.tagId,
baseScore: {$gt: 0},
},
}
});
TagRels.addView('tagsOnPost', terms => {
return {
selector: {
postId: terms.postId,
baseScore: {$gt: 0},
},
}
});
ensureIndex(TagRels, {postId:1});
ensureIndex(TagRels, {tagId:1});
## Instruction:
Sort tags by descending relevance
## Code After:
import { TagRels } from './collection.js';
import { ensureIndex } from '../../collectionUtils';
TagRels.addView('postsWithTag', terms => {
return {
selector: {
tagId: terms.tagId,
baseScore: {$gt: 0},
},
sort: {baseScore: -1},
}
});
TagRels.addView('tagsOnPost', terms => {
return {
selector: {
postId: terms.postId,
baseScore: {$gt: 0},
},
sort: {baseScore: -1},
}
});
ensureIndex(TagRels, {postId:1});
ensureIndex(TagRels, {tagId:1});
|
f6de960fb76ab36550a119b1465e8a24e59af219
|
plat/rpi3/rpi3_stack_protector.c
|
plat/rpi3/rpi3_stack_protector.c
|
/*
* Copyright (c) 2017-2018, ARM Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <stdint.h>
#include <lib/utils.h>
#include "rpi3_private.h"
/* Get 128 bits of entropy and fuse the values together to form the canary. */
#define TRNG_NBYTES 16U
u_register_t plat_get_stack_protector_canary(void)
{
size_t i;
u_register_t buf[TRNG_NBYTES / sizeof(u_register_t)];
u_register_t ret = 0U;
rpi3_rng_read(buf, sizeof(buf));
for (i = 0U; i < ARRAY_SIZE(buf); i++)
ret ^= buf[i];
return ret;
}
|
/*
* Copyright (c) 2017-2019, ARM Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <stdint.h>
#include <lib/utils.h>
#include <lib/utils_def.h>
#include "rpi3_private.h"
/* Get 128 bits of entropy and fuse the values together to form the canary. */
#define TRNG_NBYTES 16U
u_register_t plat_get_stack_protector_canary(void)
{
size_t i;
u_register_t buf[TRNG_NBYTES / sizeof(u_register_t)];
u_register_t ret = 0U;
rpi3_rng_read(buf, sizeof(buf));
for (i = 0U; i < ARRAY_SIZE(buf); i++)
ret ^= buf[i];
return ret;
}
|
Fix compilation error when stack protector is enabled
|
rpi3: Fix compilation error when stack protector is enabled
Include necessary header file to use ARRAY_SIZE() macro
Change-Id: I5b7caccd02c14c598b7944cf4f347606c1e7a8e7
Signed-off-by: Madhukar Pappireddy <[email protected]>
|
C
|
bsd-3-clause
|
achingupta/arm-trusted-firmware,achingupta/arm-trusted-firmware
|
c
|
## Code Before:
/*
* Copyright (c) 2017-2018, ARM Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <stdint.h>
#include <lib/utils.h>
#include "rpi3_private.h"
/* Get 128 bits of entropy and fuse the values together to form the canary. */
#define TRNG_NBYTES 16U
u_register_t plat_get_stack_protector_canary(void)
{
size_t i;
u_register_t buf[TRNG_NBYTES / sizeof(u_register_t)];
u_register_t ret = 0U;
rpi3_rng_read(buf, sizeof(buf));
for (i = 0U; i < ARRAY_SIZE(buf); i++)
ret ^= buf[i];
return ret;
}
## Instruction:
rpi3: Fix compilation error when stack protector is enabled
Include necessary header file to use ARRAY_SIZE() macro
Change-Id: I5b7caccd02c14c598b7944cf4f347606c1e7a8e7
Signed-off-by: Madhukar Pappireddy <[email protected]>
## Code After:
/*
* Copyright (c) 2017-2019, ARM Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <stdint.h>
#include <lib/utils.h>
#include <lib/utils_def.h>
#include "rpi3_private.h"
/* Get 128 bits of entropy and fuse the values together to form the canary. */
#define TRNG_NBYTES 16U
u_register_t plat_get_stack_protector_canary(void)
{
size_t i;
u_register_t buf[TRNG_NBYTES / sizeof(u_register_t)];
u_register_t ret = 0U;
rpi3_rng_read(buf, sizeof(buf));
for (i = 0U; i < ARRAY_SIZE(buf); i++)
ret ^= buf[i];
return ret;
}
|
7cf284616708aa10c416cb8913cc83b177d740a3
|
mfa-mwim/packages.el
|
mfa-mwim/packages.el
|
(defconst mfa-mwim-packages '(mwim))
(defun mfa-mwim/init-mwim ()
(use-package mwim
:defer t
:init
(progn
(global-set-key (kbd "C-a") #'mwim-beginning-of-code-or-line)
(global-set-key (kbd "C-e") #'mwim-end-of-code-or-line)
(global-set-key (kbd "<home>") #'mwim-beginning-of-line-or-code)
(global-set-key (kbd "<end>") #'mwim-end-of-line-or-code)
(with-eval-after-load 'evil
(define-key evil-normal-state-map (kbd "C-e") #'mwim-end-of-line-or-code)
(define-key evil-motion-state-map (kbd "C-e") #'mwim-end-of-line-or-code)
(define-key evil-insert-state-map (kbd "C-e") #'mwim-end-of-line-or-code)
(define-key evil-visual-state-map (kbd "C-e") #'mwim-end-of-line-or-code)))))
|
(defconst mfa-mwim-packages '(mwim))
(defun mfa-mwim/init-mwim ()
(use-package mwim
:defer t
:init
(progn
(global-set-key (kbd "C-a") #'mwim-beginning)
(global-set-key (kbd "C-e") #'mwim-end)
(global-set-key (kbd "<home>") #'mwim-beginning)
(global-set-key (kbd "<end>") #'mwim-end)
(with-eval-after-load 'evil
(define-key evil-normal-state-map (kbd "C-e") #'mwim-end)
(define-key evil-motion-state-map (kbd "C-e") #'mwim-end)
(define-key evil-insert-state-map (kbd "C-e") #'mwim-end)
(define-key evil-visual-state-map (kbd "C-e") #'mwim-end)
(evil-declare-motion 'mwim-beginning)
(evil-declare-motion 'mwim-end)))))
|
Make mwim motions play nice with evil repeat
|
Make mwim motions play nice with evil repeat
Also leave it up to mwim to choose where exactly to move to.
|
Emacs Lisp
|
mit
|
amfranz/spacemacs.d
|
emacs-lisp
|
## Code Before:
(defconst mfa-mwim-packages '(mwim))
(defun mfa-mwim/init-mwim ()
(use-package mwim
:defer t
:init
(progn
(global-set-key (kbd "C-a") #'mwim-beginning-of-code-or-line)
(global-set-key (kbd "C-e") #'mwim-end-of-code-or-line)
(global-set-key (kbd "<home>") #'mwim-beginning-of-line-or-code)
(global-set-key (kbd "<end>") #'mwim-end-of-line-or-code)
(with-eval-after-load 'evil
(define-key evil-normal-state-map (kbd "C-e") #'mwim-end-of-line-or-code)
(define-key evil-motion-state-map (kbd "C-e") #'mwim-end-of-line-or-code)
(define-key evil-insert-state-map (kbd "C-e") #'mwim-end-of-line-or-code)
(define-key evil-visual-state-map (kbd "C-e") #'mwim-end-of-line-or-code)))))
## Instruction:
Make mwim motions play nice with evil repeat
Also leave it up to mwim to choose where exactly to move to.
## Code After:
(defconst mfa-mwim-packages '(mwim))
(defun mfa-mwim/init-mwim ()
(use-package mwim
:defer t
:init
(progn
(global-set-key (kbd "C-a") #'mwim-beginning)
(global-set-key (kbd "C-e") #'mwim-end)
(global-set-key (kbd "<home>") #'mwim-beginning)
(global-set-key (kbd "<end>") #'mwim-end)
(with-eval-after-load 'evil
(define-key evil-normal-state-map (kbd "C-e") #'mwim-end)
(define-key evil-motion-state-map (kbd "C-e") #'mwim-end)
(define-key evil-insert-state-map (kbd "C-e") #'mwim-end)
(define-key evil-visual-state-map (kbd "C-e") #'mwim-end)
(evil-declare-motion 'mwim-beginning)
(evil-declare-motion 'mwim-end)))))
|
10c34ed2009cb6c3c0636ec3e1e797caf003feeb
|
app/views/coursewareable/collaborations/_sidebar.html.haml
|
app/views/coursewareable/collaborations/_sidebar.html.haml
|
.four.columns
.row.sidebar
%h5
= _('About collaborators')
%hr
%p
= _('Collaborators act as teachers in your classroom.')
= _('They can build and edit content pages just as you.')
%p
= _('This page also includes the full list of your current classroom collaborators.')
|
.four.columns
.row.sidebar
%h5
= _('About collaborators')
%hr
%p
= _('Collaborators act as teachers in your classroom.')
= _('They can build and edit content pages just as you.')
%p
= _('They can not add members, collaborators or change classroom settings or customize it.')
%p
= _('This page also includes the full list of your current classroom collaborators.')
|
Update collaborators sidebar help string.
|
Update collaborators sidebar help string.
|
Haml
|
mit
|
Courseware/coursewa.re,Courseware/coursewa.re
|
haml
|
## Code Before:
.four.columns
.row.sidebar
%h5
= _('About collaborators')
%hr
%p
= _('Collaborators act as teachers in your classroom.')
= _('They can build and edit content pages just as you.')
%p
= _('This page also includes the full list of your current classroom collaborators.')
## Instruction:
Update collaborators sidebar help string.
## Code After:
.four.columns
.row.sidebar
%h5
= _('About collaborators')
%hr
%p
= _('Collaborators act as teachers in your classroom.')
= _('They can build and edit content pages just as you.')
%p
= _('They can not add members, collaborators or change classroom settings or customize it.')
%p
= _('This page also includes the full list of your current classroom collaborators.')
|
8fecd4e9006fb0e877eb43b03332bcea69ea31ef
|
app/src/main/java/chat/rocket/android/util/Extensions.kt
|
app/src/main/java/chat/rocket/android/util/Extensions.kt
|
package chat.rocket.android.util
import android.support.annotation.LayoutRes
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.TextView
fun String.ifEmpty(value: String): String {
if (isEmpty()) {
return value
}
return this
}
fun View.setVisible(visible: Boolean) {
visibility = if (visible) {
View.VISIBLE
} else {
View.GONE
}
}
fun ViewGroup.inflate(@LayoutRes resource: Int): View {
return LayoutInflater.from(context).inflate(resource, this, false)
}
var TextView.textContent: String
get() = text.toString()
set(value) {
text = value
}
var TextView.hintContent: String
get() = hint.toString()
set(value) {
hint = value
}
|
package chat.rocket.android.util
import android.support.annotation.LayoutRes
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.TextView
import ru.noties.markwon.Markwon
fun String.ifEmpty(value: String): String {
if (isEmpty()) {
return value
}
return this
}
fun CharSequence.ifEmpty(value: String): CharSequence {
if (isEmpty()) {
return value
}
return this
}
fun View.setVisible(visible: Boolean) {
visibility = if (visible) {
View.VISIBLE
} else {
View.GONE
}
}
fun ViewGroup.inflate(@LayoutRes resource: Int): View {
return LayoutInflater.from(context).inflate(resource, this, false)
}
var TextView.textContent: String
get() = text.toString()
set(value) {
text = value
}
var TextView.content: CharSequence
get() = text
set(value) {
Markwon.unscheduleDrawables(this)
Markwon.unscheduleTableRows(this)
text = value
Markwon.scheduleDrawables(this)
Markwon.scheduleTableRows(this)
}
var TextView.hintContent: String
get() = hint.toString()
set(value) {
hint = value
}
|
Add extensions for CharSequence.isEmpty and TextView.content that accepts CharSequence
|
Add extensions for CharSequence.isEmpty and TextView.content that accepts CharSequence
|
Kotlin
|
mit
|
RocketChat/Rocket.Chat.Android,RocketChat/Rocket.Chat.Android.Lily,RocketChat/Rocket.Chat.Android.Lily,RocketChat/Rocket.Chat.Android
|
kotlin
|
## Code Before:
package chat.rocket.android.util
import android.support.annotation.LayoutRes
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.TextView
fun String.ifEmpty(value: String): String {
if (isEmpty()) {
return value
}
return this
}
fun View.setVisible(visible: Boolean) {
visibility = if (visible) {
View.VISIBLE
} else {
View.GONE
}
}
fun ViewGroup.inflate(@LayoutRes resource: Int): View {
return LayoutInflater.from(context).inflate(resource, this, false)
}
var TextView.textContent: String
get() = text.toString()
set(value) {
text = value
}
var TextView.hintContent: String
get() = hint.toString()
set(value) {
hint = value
}
## Instruction:
Add extensions for CharSequence.isEmpty and TextView.content that accepts CharSequence
## Code After:
package chat.rocket.android.util
import android.support.annotation.LayoutRes
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.TextView
import ru.noties.markwon.Markwon
fun String.ifEmpty(value: String): String {
if (isEmpty()) {
return value
}
return this
}
fun CharSequence.ifEmpty(value: String): CharSequence {
if (isEmpty()) {
return value
}
return this
}
fun View.setVisible(visible: Boolean) {
visibility = if (visible) {
View.VISIBLE
} else {
View.GONE
}
}
fun ViewGroup.inflate(@LayoutRes resource: Int): View {
return LayoutInflater.from(context).inflate(resource, this, false)
}
var TextView.textContent: String
get() = text.toString()
set(value) {
text = value
}
var TextView.content: CharSequence
get() = text
set(value) {
Markwon.unscheduleDrawables(this)
Markwon.unscheduleTableRows(this)
text = value
Markwon.scheduleDrawables(this)
Markwon.scheduleTableRows(this)
}
var TextView.hintContent: String
get() = hint.toString()
set(value) {
hint = value
}
|
8b59b0fbb838779ca2bd74181afafec5498b00c5
|
app/views/sessions/new.html.erb
|
app/views/sessions/new.html.erb
|
<% content_for :js do %>
<%= headjs_include_tag "plugins/jquery.min", "front/login" %>
<% end %>
<% content_for :head do %>
<%= stylesheet_link_tag('reset.css','front/sessions') %>
<% end %>
<div class="section">
<h1>Welcome to Carto<strong>DB</strong></h1>
<p>Enter your account information to start mapping</p>
<%= form_tag create_session_path do %>
<p class="title">Please login</p>
<%= label_tag :email, 'e-mail' %>
<%= text_field_tag :email, '', :class => (flash[:alert] ? 'error' : nil) %>
<span class="password">
<%= label_tag :password, 'password' %>
<%= password_field_tag :password, '', :class => (flash[:alert] ? 'error' : nil) %>
</span>
<%= link_to "Did you forget your password?", forget_password_url, :class => "forget" if forget_password_url.present? %>
<%= submit_tag 'Log in', :class => "login" %>
<% if flash[:alert] || @login_error %>
<div class="error_content">
<p><span><%= flash[:alert] || @login_error %></span></p>
</div>
<% end %>
<% end %>
</div>
<div class="footer">CartoDB is a product from <a href="http://www.vizzuality.com" target="_blank">Vizzuality</a></div>
|
<% content_for :js do %>
<%= headjs_include_tag "plugins/jquery.min", "front/login" %>
<% end %>
<% content_for :head do %>
<%= stylesheet_link_tag('reset.css','front/sessions') %>
<% end %>
<div class="section">
<h1>Welcome to Carto<strong>DB</strong></h1>
<p>Enter your account information to start mapping</p>
<%= form_tag create_session_path do %>
<p class="title">Please login</p>
<%= label_tag :email, 'e-mail' %>
<%= text_field_tag :email, '', :class => (flash[:alert] || @login_error ? 'error' : nil) %>
<span class="password">
<%= label_tag :password, 'password' %>
<%= password_field_tag :password, '', :class => (flash[:alert] || @login_error ? 'error' : nil) %>
</span>
<%= link_to "Did you forget your password?", forget_password_url, :class => "forget" if forget_password_url.present? %>
<%= submit_tag 'Log in', :class => "login" %>
<% if flash[:alert] || @login_error %>
<div class="error_content">
<p><span><%= flash[:alert] || @login_error %></span></p>
</div>
<% end %>
<% end %>
</div>
<div class="footer">CartoDB is a product from <a href="http://www.vizzuality.com" target="_blank">Vizzuality</a></div>
|
Check @login_error in login form
|
Check @login_error in login form
|
HTML+ERB
|
bsd-3-clause
|
codeandtheory/cartodb,nyimbi/cartodb,dbirchak/cartodb,nyimbi/cartodb,thorncp/cartodb,future-analytics/cartodb,splashblot/dronedb,nuxcode/cartodb,splashblot/dronedb,splashblot/dronedb,nyimbi/cartodb,codeandtheory/cartodb,CartoDB/cartodb,raquel-ucl/cartodb,dbirchak/cartodb,CartoDB/cartodb,nuxcode/cartodb,DigitalCoder/cartodb,nyimbi/cartodb,raquel-ucl/cartodb,DigitalCoder/cartodb,bloomberg/cartodb,thorncp/cartodb,thorncp/cartodb,codeandtheory/cartodb,bloomberg/cartodb,UCL-ShippingGroup/cartodb-1,DigitalCoder/cartodb,dbirchak/cartodb,nuxcode/cartodb,UCL-ShippingGroup/cartodb-1,bloomberg/cartodb,future-analytics/cartodb,future-analytics/cartodb,raquel-ucl/cartodb,bloomberg/cartodb,UCL-ShippingGroup/cartodb-1,splashblot/dronedb,future-analytics/cartodb,codeandtheory/cartodb,UCL-ShippingGroup/cartodb-1,bloomberg/cartodb,splashblot/dronedb,DigitalCoder/cartodb,thorncp/cartodb,future-analytics/cartodb,raquel-ucl/cartodb,UCL-ShippingGroup/cartodb-1,raquel-ucl/cartodb,DigitalCoder/cartodb,codeandtheory/cartodb,nuxcode/cartodb,nyimbi/cartodb,CartoDB/cartodb,dbirchak/cartodb,thorncp/cartodb,dbirchak/cartodb,nuxcode/cartodb,CartoDB/cartodb,CartoDB/cartodb
|
html+erb
|
## Code Before:
<% content_for :js do %>
<%= headjs_include_tag "plugins/jquery.min", "front/login" %>
<% end %>
<% content_for :head do %>
<%= stylesheet_link_tag('reset.css','front/sessions') %>
<% end %>
<div class="section">
<h1>Welcome to Carto<strong>DB</strong></h1>
<p>Enter your account information to start mapping</p>
<%= form_tag create_session_path do %>
<p class="title">Please login</p>
<%= label_tag :email, 'e-mail' %>
<%= text_field_tag :email, '', :class => (flash[:alert] ? 'error' : nil) %>
<span class="password">
<%= label_tag :password, 'password' %>
<%= password_field_tag :password, '', :class => (flash[:alert] ? 'error' : nil) %>
</span>
<%= link_to "Did you forget your password?", forget_password_url, :class => "forget" if forget_password_url.present? %>
<%= submit_tag 'Log in', :class => "login" %>
<% if flash[:alert] || @login_error %>
<div class="error_content">
<p><span><%= flash[:alert] || @login_error %></span></p>
</div>
<% end %>
<% end %>
</div>
<div class="footer">CartoDB is a product from <a href="http://www.vizzuality.com" target="_blank">Vizzuality</a></div>
## Instruction:
Check @login_error in login form
## Code After:
<% content_for :js do %>
<%= headjs_include_tag "plugins/jquery.min", "front/login" %>
<% end %>
<% content_for :head do %>
<%= stylesheet_link_tag('reset.css','front/sessions') %>
<% end %>
<div class="section">
<h1>Welcome to Carto<strong>DB</strong></h1>
<p>Enter your account information to start mapping</p>
<%= form_tag create_session_path do %>
<p class="title">Please login</p>
<%= label_tag :email, 'e-mail' %>
<%= text_field_tag :email, '', :class => (flash[:alert] || @login_error ? 'error' : nil) %>
<span class="password">
<%= label_tag :password, 'password' %>
<%= password_field_tag :password, '', :class => (flash[:alert] || @login_error ? 'error' : nil) %>
</span>
<%= link_to "Did you forget your password?", forget_password_url, :class => "forget" if forget_password_url.present? %>
<%= submit_tag 'Log in', :class => "login" %>
<% if flash[:alert] || @login_error %>
<div class="error_content">
<p><span><%= flash[:alert] || @login_error %></span></p>
</div>
<% end %>
<% end %>
</div>
<div class="footer">CartoDB is a product from <a href="http://www.vizzuality.com" target="_blank">Vizzuality</a></div>
|
e8d4753616dd1bdd6b93fef3e4046ca1c8d38d4a
|
.zuul.yaml
|
.zuul.yaml
|
- project:
templates:
- check-requirements
- openstack-lower-constraints-jobs
- openstack-python-jobs
- openstack-python35-jobs
- openstack-python36-jobs
check:
jobs:
# making n-v till story#2005227
- freezer-web-ui-ubuntu:
voting: false
- openstack-tox-pylint
gate:
jobs:
- openstack-tox-pylint
- job:
name: freezer-web-ui-ubuntu
parent: legacy-dsvm-base
run: playbooks/legacy/freezer-web-ui-ubuntu/run.yaml
post-run: playbooks/legacy/freezer-web-ui-ubuntu/post.yaml
timeout: 7800
required-projects:
- openstack-infra/devstack-gate
- openstack/freezer
- openstack/freezer-api
- openstack/freezer-web-ui
- openstack/python-freezerclient
|
- project:
templates:
- check-requirements
- openstack-lower-constraints-jobs
- openstack-python-jobs
- openstack-python35-jobs
- openstack-python36-jobs
check:
jobs:
- freezer-web-ui-ubuntu
- openstack-tox-pylint
gate:
jobs:
- openstack-tox-pylint
- job:
name: freezer-web-ui-ubuntu
parent: legacy-dsvm-base
run: playbooks/legacy/freezer-web-ui-ubuntu/run.yaml
post-run: playbooks/legacy/freezer-web-ui-ubuntu/post.yaml
timeout: 7800
required-projects:
- openstack-infra/devstack-gate
- openstack/freezer
- openstack/freezer-api
- openstack/freezer-web-ui
- openstack/python-freezerclient
|
Make freezer-web-ui-ubuntu as voting job again
|
Make freezer-web-ui-ubuntu as voting job again
freezer-web-ui-ubuntu job has been made n-v in legacy
job migration work.
- https://review.openstack.org/#/c/642610
Not issue has been fixed and it is working fine
- https://review.openstack.org/#/c/643213/3
Let's reenable it as voting.
Change-Id: I735e0dacb035770be814ca1b829c56ef9ba644ff
|
YAML
|
apache-2.0
|
openstack/freezer-web-ui,openstack/freezer-web-ui,openstack/freezer-web-ui,openstack/freezer-web-ui
|
yaml
|
## Code Before:
- project:
templates:
- check-requirements
- openstack-lower-constraints-jobs
- openstack-python-jobs
- openstack-python35-jobs
- openstack-python36-jobs
check:
jobs:
# making n-v till story#2005227
- freezer-web-ui-ubuntu:
voting: false
- openstack-tox-pylint
gate:
jobs:
- openstack-tox-pylint
- job:
name: freezer-web-ui-ubuntu
parent: legacy-dsvm-base
run: playbooks/legacy/freezer-web-ui-ubuntu/run.yaml
post-run: playbooks/legacy/freezer-web-ui-ubuntu/post.yaml
timeout: 7800
required-projects:
- openstack-infra/devstack-gate
- openstack/freezer
- openstack/freezer-api
- openstack/freezer-web-ui
- openstack/python-freezerclient
## Instruction:
Make freezer-web-ui-ubuntu as voting job again
freezer-web-ui-ubuntu job has been made n-v in legacy
job migration work.
- https://review.openstack.org/#/c/642610
Not issue has been fixed and it is working fine
- https://review.openstack.org/#/c/643213/3
Let's reenable it as voting.
Change-Id: I735e0dacb035770be814ca1b829c56ef9ba644ff
## Code After:
- project:
templates:
- check-requirements
- openstack-lower-constraints-jobs
- openstack-python-jobs
- openstack-python35-jobs
- openstack-python36-jobs
check:
jobs:
- freezer-web-ui-ubuntu
- openstack-tox-pylint
gate:
jobs:
- openstack-tox-pylint
- job:
name: freezer-web-ui-ubuntu
parent: legacy-dsvm-base
run: playbooks/legacy/freezer-web-ui-ubuntu/run.yaml
post-run: playbooks/legacy/freezer-web-ui-ubuntu/post.yaml
timeout: 7800
required-projects:
- openstack-infra/devstack-gate
- openstack/freezer
- openstack/freezer-api
- openstack/freezer-web-ui
- openstack/python-freezerclient
|
132aae8f71ce8bf9dae4acc3bfc57acc85c24ecc
|
src/migrations/2014_05_19_151759_create_forum_table_categories.php
|
src/migrations/2014_05_19_151759_create_forum_table_categories.php
|
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateForumTableCategories extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('forum_categories', function(Blueprint $table)
{
$table->increments('id');
$table->integer('parent_category')->unsigned()->nullable();
$table->string('title');
$table->string('subtitle');
$table->integer('weight');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('forum_categories');
}
}
|
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateForumTableCategories extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('forum_categories', function(Blueprint $table)
{
$table->increments('id');
$table->integer('parent_category')->unsigned()->nullable();
$table->string('title');
$table->string('subtitle');
$table->integer('weight');
});
DB::table('forum_categories')->insert(
array(
[1, NULL, 'Category', 'Contains categories and threads', 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00'],
[2, 1, 'Sub-category', 'Contains threads', 1, '0000-00-00 00:00:00', '0000-00-00 00:00:00'],
[3, 1, 'Second subcategory', 'Contains more threads', 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00']
)
);
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('forum_categories');
}
}
|
Update migrations to insert sample categories
|
Update migrations to insert sample categories
|
PHP
|
mit
|
Riari/laravel-forum,mandark/laravel-forum,matheusgomes17/laravel-forum,kaidesu/laravel-forum,casalero/laravel-forum,mikield/laravel-forum
|
php
|
## Code Before:
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateForumTableCategories extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('forum_categories', function(Blueprint $table)
{
$table->increments('id');
$table->integer('parent_category')->unsigned()->nullable();
$table->string('title');
$table->string('subtitle');
$table->integer('weight');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('forum_categories');
}
}
## Instruction:
Update migrations to insert sample categories
## Code After:
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateForumTableCategories extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('forum_categories', function(Blueprint $table)
{
$table->increments('id');
$table->integer('parent_category')->unsigned()->nullable();
$table->string('title');
$table->string('subtitle');
$table->integer('weight');
});
DB::table('forum_categories')->insert(
array(
[1, NULL, 'Category', 'Contains categories and threads', 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00'],
[2, 1, 'Sub-category', 'Contains threads', 1, '0000-00-00 00:00:00', '0000-00-00 00:00:00'],
[3, 1, 'Second subcategory', 'Contains more threads', 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00']
)
);
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('forum_categories');
}
}
|
f7fb39be298640a05189f01612ee4df09c023971
|
command.go
|
command.go
|
package main
import (
"bufio"
"github.com/kr/pty"
"io"
"os"
"os/exec"
)
type Cmd struct {
*exec.Cmd
Pty *os.File
output io.Reader
Output chan []byte
}
func Command(prog string, args ...string) *Cmd {
return &Cmd{exec.Command(prog, args...), nil, nil, nil}
}
func (c *Cmd) Start() error {
pterm, err := pty.Start(c.Cmd)
if err != nil {
return err
}
c.Pty = pterm
c.Output = make(chan []byte, 20)
c.output = bufio.NewReader(c.Pty)
go c.outputPipe()
return nil
}
func (c *Cmd) Close() error {
return c.Process.Kill()
}
func (c *Cmd) outputPipe() {
buf := make([]byte, 32*1024)
for {
nr, err := c.output.Read(buf)
if nr > 0 {
c.Output <- buf[0:nr]
}
if err != nil {
if err == io.EOF {
break
}
panic(err)
}
}
close(c.Output)
}
|
package main
import (
"io"
"os"
"bufio"
"github.com/chrisseto/pty"
"os/exec"
)
type Cmd struct {
*exec.Cmd
Pty *os.File
output io.Reader
Output chan []byte
}
func Command(prog string, args ...string) *Cmd {
return &Cmd{exec.Command(prog, args...), nil, nil, nil}
}
func (c *Cmd) Start(width, height int) error {
pterm, err := pty.Start(c.Cmd)
if err != nil {
return err
}
if err = pty.Setsize(pterm, uint16(width), uint16(height)); err != nil {
panic(err)
}
c.Pty = pterm
c.Output = make(chan []byte, 20)
c.output = bufio.NewReader(c.Pty)
go c.outputPipe()
return nil
}
func (c *Cmd) Close() error {
return c.Process.Kill()
}
func (c *Cmd) outputPipe() {
buf := make([]byte, 32*1024)
for {
nr, err := c.output.Read(buf)
if nr > 0 {
c.Output <- buf[0:nr]
}
if err != nil {
if err == io.EOF {
break
}
panic(err)
}
}
close(c.Output)
}
|
Switch to my fork of pty which supports SetSize
|
Switch to my fork of pty which supports SetSize
|
Go
|
mit
|
chrisseto/Sux
|
go
|
## Code Before:
package main
import (
"bufio"
"github.com/kr/pty"
"io"
"os"
"os/exec"
)
type Cmd struct {
*exec.Cmd
Pty *os.File
output io.Reader
Output chan []byte
}
func Command(prog string, args ...string) *Cmd {
return &Cmd{exec.Command(prog, args...), nil, nil, nil}
}
func (c *Cmd) Start() error {
pterm, err := pty.Start(c.Cmd)
if err != nil {
return err
}
c.Pty = pterm
c.Output = make(chan []byte, 20)
c.output = bufio.NewReader(c.Pty)
go c.outputPipe()
return nil
}
func (c *Cmd) Close() error {
return c.Process.Kill()
}
func (c *Cmd) outputPipe() {
buf := make([]byte, 32*1024)
for {
nr, err := c.output.Read(buf)
if nr > 0 {
c.Output <- buf[0:nr]
}
if err != nil {
if err == io.EOF {
break
}
panic(err)
}
}
close(c.Output)
}
## Instruction:
Switch to my fork of pty which supports SetSize
## Code After:
package main
import (
"io"
"os"
"bufio"
"github.com/chrisseto/pty"
"os/exec"
)
type Cmd struct {
*exec.Cmd
Pty *os.File
output io.Reader
Output chan []byte
}
func Command(prog string, args ...string) *Cmd {
return &Cmd{exec.Command(prog, args...), nil, nil, nil}
}
func (c *Cmd) Start(width, height int) error {
pterm, err := pty.Start(c.Cmd)
if err != nil {
return err
}
if err = pty.Setsize(pterm, uint16(width), uint16(height)); err != nil {
panic(err)
}
c.Pty = pterm
c.Output = make(chan []byte, 20)
c.output = bufio.NewReader(c.Pty)
go c.outputPipe()
return nil
}
func (c *Cmd) Close() error {
return c.Process.Kill()
}
func (c *Cmd) outputPipe() {
buf := make([]byte, 32*1024)
for {
nr, err := c.output.Read(buf)
if nr > 0 {
c.Output <- buf[0:nr]
}
if err != nil {
if err == io.EOF {
break
}
panic(err)
}
}
close(c.Output)
}
|
0cc2bad1fccc34708c12cc49d505202040960f7c
|
spec/support/elasticsearch.rb
|
spec/support/elasticsearch.rb
|
require 'elasticsearch/extensions/test/cluster'
RSpec.configure do |config|
unless ENV['CI']
config.before(:suite) { start_elastic_cluster }
config.after(:suite) { stop_elastic_cluster }
end
end
def start_elastic_cluster
ENV['TEST_CLUSTER_PORT'] = '9250'
ENV['TEST_CLUSTER_NODES'] = '1'
ENV['TEST_CLUSTER_NAME'] = 'spree_searchkick_test'
ENV['ELASTICSEARCH_URL'] = "http://localhost:#{ENV['TEST_CLUSTER_PORT']}"
return if Elasticsearch::Extensions::Test::Cluster.running?
Elasticsearch::Extensions::Test::Cluster.start(timeout: 10)
end
def stop_elastic_cluster
return unless Elasticsearch::Extensions::Test::Cluster.running?
Elasticsearch::Extensions::Test::Cluster.stop
end
|
require 'elasticsearch/extensions/test/cluster'
RSpec.configure do |config|
unless ENV['CI']
config.before(:suite) { start_elastic_cluster }
config.after(:suite) { stop_elastic_cluster }
end
SEARCHABLE_MODELS = [Spree::Product].freeze
# create indices for searchable models
config.before do
SEARCHABLE_MODELS.each do |model|
model.reindex
model.searchkick_index.refresh
end
end
# delete indices for searchable models to keep clean state between tests
config.after do
SEARCHABLE_MODELS.each do |model|
model.searchkick_index.delete
end
end
end
def start_elastic_cluster
ENV['TEST_CLUSTER_PORT'] = '9250'
ENV['TEST_CLUSTER_NODES'] = '1'
ENV['TEST_CLUSTER_NAME'] = 'spree_searchkick_test'
ENV['ELASTICSEARCH_URL'] = "http://localhost:#{ENV['TEST_CLUSTER_PORT']}"
return if Elasticsearch::Extensions::Test::Cluster.running?
Elasticsearch::Extensions::Test::Cluster.start(timeout: 10)
end
def stop_elastic_cluster
return unless Elasticsearch::Extensions::Test::Cluster.running?
Elasticsearch::Extensions::Test::Cluster.stop
end
|
Set up indices before tests and clean up after tests
|
Set up indices before tests and clean up after tests
|
Ruby
|
bsd-3-clause
|
ronzalo/spree_searchkick,ronzalo/spree_searchkick,ronzalo/spree_searchkick
|
ruby
|
## Code Before:
require 'elasticsearch/extensions/test/cluster'
RSpec.configure do |config|
unless ENV['CI']
config.before(:suite) { start_elastic_cluster }
config.after(:suite) { stop_elastic_cluster }
end
end
def start_elastic_cluster
ENV['TEST_CLUSTER_PORT'] = '9250'
ENV['TEST_CLUSTER_NODES'] = '1'
ENV['TEST_CLUSTER_NAME'] = 'spree_searchkick_test'
ENV['ELASTICSEARCH_URL'] = "http://localhost:#{ENV['TEST_CLUSTER_PORT']}"
return if Elasticsearch::Extensions::Test::Cluster.running?
Elasticsearch::Extensions::Test::Cluster.start(timeout: 10)
end
def stop_elastic_cluster
return unless Elasticsearch::Extensions::Test::Cluster.running?
Elasticsearch::Extensions::Test::Cluster.stop
end
## Instruction:
Set up indices before tests and clean up after tests
## Code After:
require 'elasticsearch/extensions/test/cluster'
RSpec.configure do |config|
unless ENV['CI']
config.before(:suite) { start_elastic_cluster }
config.after(:suite) { stop_elastic_cluster }
end
SEARCHABLE_MODELS = [Spree::Product].freeze
# create indices for searchable models
config.before do
SEARCHABLE_MODELS.each do |model|
model.reindex
model.searchkick_index.refresh
end
end
# delete indices for searchable models to keep clean state between tests
config.after do
SEARCHABLE_MODELS.each do |model|
model.searchkick_index.delete
end
end
end
def start_elastic_cluster
ENV['TEST_CLUSTER_PORT'] = '9250'
ENV['TEST_CLUSTER_NODES'] = '1'
ENV['TEST_CLUSTER_NAME'] = 'spree_searchkick_test'
ENV['ELASTICSEARCH_URL'] = "http://localhost:#{ENV['TEST_CLUSTER_PORT']}"
return if Elasticsearch::Extensions::Test::Cluster.running?
Elasticsearch::Extensions::Test::Cluster.start(timeout: 10)
end
def stop_elastic_cluster
return unless Elasticsearch::Extensions::Test::Cluster.running?
Elasticsearch::Extensions::Test::Cluster.stop
end
|
c598062f38883da1f0aea0150f79d28e1144c2d5
|
resources/views/layouts/partials/footer.blade.php
|
resources/views/layouts/partials/footer.blade.php
|
<p><a href="/politica-de-privacidade">Política de Privacidade</a></p>
|
<p>
<a href="https://blog.benspenhorados.pt">Blogue</a> -
<a href="/politica-de-privacidade">Política de Privacidade</a>
</p>
|
Add blog link to footer
|
Add blog link to footer
|
PHP
|
mit
|
ffsantos92/bens-penhorados,ffsantos92/bens-penhorados,ffsantos92/bens-penhorados
|
php
|
## Code Before:
<p><a href="/politica-de-privacidade">Política de Privacidade</a></p>
## Instruction:
Add blog link to footer
## Code After:
<p>
<a href="https://blog.benspenhorados.pt">Blogue</a> -
<a href="/politica-de-privacidade">Política de Privacidade</a>
</p>
|
c4f1586877424923134ff5e4e3c09309bb17cc49
|
requirements.txt
|
requirements.txt
|
aiopg
aiohttp
aiodocker
sqlalchemy
jinja2
pyyaml
|
aiopg
aiohttp
aiodocker
sqlalchemy
jinja2
pyyaml
# Needed to build the scripts.
# node-uglify
# node-less
# coffeescript
|
Make a note of the platform tools
|
Make a note of the platform tools
|
Text
|
mit
|
paultag/moxie,mileswwatkins/moxie,loandy/moxie,rshorey/moxie,mileswwatkins/moxie,rshorey/moxie,rshorey/moxie,loandy/moxie,mileswwatkins/moxie,tianon/moxie,paultag/moxie,loandy/moxie,tianon/moxie,paultag/moxie
|
text
|
## Code Before:
aiopg
aiohttp
aiodocker
sqlalchemy
jinja2
pyyaml
## Instruction:
Make a note of the platform tools
## Code After:
aiopg
aiohttp
aiodocker
sqlalchemy
jinja2
pyyaml
# Needed to build the scripts.
# node-uglify
# node-less
# coffeescript
|
7475af0bcfbd98a2c759fa1c2f18152222d7bb8d
|
app/forms/gobierto_admin/gobierto_common/term_form.rb
|
app/forms/gobierto_admin/gobierto_common/term_form.rb
|
module GobiertoAdmin
module GobiertoCommon
class TermForm < BaseForm
attr_accessor(
:id,
:site_id,
:vocabulary_id,
:name_translations,
:description_translations,
:slug,
:term_id
)
delegate :persisted?, to: :term
validates :name_translations, :site, :vocabulary, presence: true
def term
@term ||= term_relation.find_by(id: id) || build_term
end
def build_term
vocabulary.terms.new
end
def save
save_term if valid?
end
private
def vocabulary
@vocabulary ||= begin
if vocabulary_id
site.vocabularies.find_by_id(vocabulary_id)
else
term_relation.find_by_id(id)&.vocabulary
end
end
end
def save_term
@term = term.tap do |attributes|
attributes.vocabulary_id = vocabulary.id
attributes.name_translations = name_translations
attributes.description_translations = description_translations
attributes.slug = slug
attributes.term_id = term_id
end
return @term if @term.save
promote_errors(@term.errors)
false
end
def term_relation
site.terms
end
def site
Site.find(site_id)
end
end
end
end
|
module GobiertoAdmin
module GobiertoCommon
class TermForm < BaseForm
attr_accessor(
:id,
:site_id,
:vocabulary_id,
:name_translations,
:description_translations,
:slug,
:term_id
)
delegate :persisted?, to: :term
validates :name_translations, :site, :vocabulary, presence: true
def term
@term ||= term_relation.find_by(id: id) || build_term
end
def build_term
vocabulary.terms.new
end
def save
save_term if valid?
end
private
def vocabulary
@vocabulary ||= begin
return unless site
if vocabulary_id
site.vocabularies.find_by_id(vocabulary_id)
else
term_relation.find_by_id(id)&.vocabulary
end
end
end
def save_term
@term = term.tap do |attributes|
attributes.vocabulary_id = vocabulary.id
attributes.name_translations = name_translations
attributes.description_translations = description_translations
attributes.slug = slug
attributes.term_id = term_id
end
return @term if @term.save
promote_errors(@term.errors)
false
end
def term_relation
site ? site.terms : ::GobiertoCommon::Term.none
end
def site
@site ||= Site.find_by(id: site_id)
end
end
end
end
|
Make changes in terms_form to behave like issues_form
|
Make changes in terms_form to behave like issues_form
|
Ruby
|
agpl-3.0
|
PopulateTools/gobierto-dev,PopulateTools/gobierto-dev,PopulateTools/gobierto-dev,PopulateTools/gobierto,PopulateTools/gobierto-dev,PopulateTools/gobierto,PopulateTools/gobierto,PopulateTools/gobierto
|
ruby
|
## Code Before:
module GobiertoAdmin
module GobiertoCommon
class TermForm < BaseForm
attr_accessor(
:id,
:site_id,
:vocabulary_id,
:name_translations,
:description_translations,
:slug,
:term_id
)
delegate :persisted?, to: :term
validates :name_translations, :site, :vocabulary, presence: true
def term
@term ||= term_relation.find_by(id: id) || build_term
end
def build_term
vocabulary.terms.new
end
def save
save_term if valid?
end
private
def vocabulary
@vocabulary ||= begin
if vocabulary_id
site.vocabularies.find_by_id(vocabulary_id)
else
term_relation.find_by_id(id)&.vocabulary
end
end
end
def save_term
@term = term.tap do |attributes|
attributes.vocabulary_id = vocabulary.id
attributes.name_translations = name_translations
attributes.description_translations = description_translations
attributes.slug = slug
attributes.term_id = term_id
end
return @term if @term.save
promote_errors(@term.errors)
false
end
def term_relation
site.terms
end
def site
Site.find(site_id)
end
end
end
end
## Instruction:
Make changes in terms_form to behave like issues_form
## Code After:
module GobiertoAdmin
module GobiertoCommon
class TermForm < BaseForm
attr_accessor(
:id,
:site_id,
:vocabulary_id,
:name_translations,
:description_translations,
:slug,
:term_id
)
delegate :persisted?, to: :term
validates :name_translations, :site, :vocabulary, presence: true
def term
@term ||= term_relation.find_by(id: id) || build_term
end
def build_term
vocabulary.terms.new
end
def save
save_term if valid?
end
private
def vocabulary
@vocabulary ||= begin
return unless site
if vocabulary_id
site.vocabularies.find_by_id(vocabulary_id)
else
term_relation.find_by_id(id)&.vocabulary
end
end
end
def save_term
@term = term.tap do |attributes|
attributes.vocabulary_id = vocabulary.id
attributes.name_translations = name_translations
attributes.description_translations = description_translations
attributes.slug = slug
attributes.term_id = term_id
end
return @term if @term.save
promote_errors(@term.errors)
false
end
def term_relation
site ? site.terms : ::GobiertoCommon::Term.none
end
def site
@site ||= Site.find_by(id: site_id)
end
end
end
end
|
535e44928f48431635c882c68453cbd5ef416304
|
appveyor.yml
|
appveyor.yml
|
version: 1.0.{build}
install:
- cmd: >-
git clone -q https://github.com/rebar/rebar3.git %APPVEYOR_BUILD_FOLDER%\bin\rebar3
cd %APPVEYOR_BUILD_FOLDER%\bin\rebar3
.\bootstrap.bat
cd %APPVEYOR_BUILD_FOLDER%
curl -fsSL -o configlet.zip https://github.com/exercism/configlet/releases/download/v1.0.6/configlet-windows-32bit.zip
7z e configlet.zip
.\configlet.exe .
build: off
test_script:
- cmd: >-
cd %APPVEYOR_BUILD_FOLDER%
%APPVEYOR_BUILD_FOLDER%\bin\rebar3\rebar3.cmd eunit
|
version: 1.0.{build}
install:
- cmd: >-
git clone -q https://github.com/rebar/rebar3.git %APPVEYOR_BUILD_FOLDER%\bin\rebar3
cd %APPVEYOR_BUILD_FOLDER%\bin\rebar3
.\bootstrap.bat
cd %APPVEYOR_BUILD_FOLDER%
curl -fsSL -o configlet.zip https://github.com/exercism/configlet/releases/download/v1.0.6/configlet-windows-32bit.zip
7z e configlet.zip
.\configlet.exe .
build: off
test_script:
- cmd: >-
cd %APPVEYOR_BUILD_FOLDER%
%APPVEYOR_BUILD_FOLDER%\bin\rebar3\rebar3.cmd eunit -m accumulate-tests,allergies-tests,anagram-tests,atbash-cipher-tests,bank-account-tests,beer-song-tests,binary-string-tests,bob-tests,circular-buffer-tests,clock-tests,difference-of-squares-tests,etl-tests,gigasecond-tests,grade-school-tests,grains-tests,hamming-tests,largest-series-product-tests,leap-tests,luhn-tests,meetup-tests,dna-tests,parallel-letter-frequency-tests,phone-tests,rna-transcription-tests,robot-simulator-tests,series-tests,space-age-tests,strain-tests,sum-of-multiples-tests,trinary-tests,word-count-tests
|
Add hard-coded module list to Windows test command
|
Add hard-coded module list to Windows test command
This is obviously terrible, but it gets the job done for now.
I don't use Windows, nor plan to any time soon, so this will have to do
until a real Windows user comes along and fixes it.
Note that we'll need to manually update the module list as we add,
remove or rename test modules.
|
YAML
|
mit
|
exercism/xlfe
|
yaml
|
## Code Before:
version: 1.0.{build}
install:
- cmd: >-
git clone -q https://github.com/rebar/rebar3.git %APPVEYOR_BUILD_FOLDER%\bin\rebar3
cd %APPVEYOR_BUILD_FOLDER%\bin\rebar3
.\bootstrap.bat
cd %APPVEYOR_BUILD_FOLDER%
curl -fsSL -o configlet.zip https://github.com/exercism/configlet/releases/download/v1.0.6/configlet-windows-32bit.zip
7z e configlet.zip
.\configlet.exe .
build: off
test_script:
- cmd: >-
cd %APPVEYOR_BUILD_FOLDER%
%APPVEYOR_BUILD_FOLDER%\bin\rebar3\rebar3.cmd eunit
## Instruction:
Add hard-coded module list to Windows test command
This is obviously terrible, but it gets the job done for now.
I don't use Windows, nor plan to any time soon, so this will have to do
until a real Windows user comes along and fixes it.
Note that we'll need to manually update the module list as we add,
remove or rename test modules.
## Code After:
version: 1.0.{build}
install:
- cmd: >-
git clone -q https://github.com/rebar/rebar3.git %APPVEYOR_BUILD_FOLDER%\bin\rebar3
cd %APPVEYOR_BUILD_FOLDER%\bin\rebar3
.\bootstrap.bat
cd %APPVEYOR_BUILD_FOLDER%
curl -fsSL -o configlet.zip https://github.com/exercism/configlet/releases/download/v1.0.6/configlet-windows-32bit.zip
7z e configlet.zip
.\configlet.exe .
build: off
test_script:
- cmd: >-
cd %APPVEYOR_BUILD_FOLDER%
%APPVEYOR_BUILD_FOLDER%\bin\rebar3\rebar3.cmd eunit -m accumulate-tests,allergies-tests,anagram-tests,atbash-cipher-tests,bank-account-tests,beer-song-tests,binary-string-tests,bob-tests,circular-buffer-tests,clock-tests,difference-of-squares-tests,etl-tests,gigasecond-tests,grade-school-tests,grains-tests,hamming-tests,largest-series-product-tests,leap-tests,luhn-tests,meetup-tests,dna-tests,parallel-letter-frequency-tests,phone-tests,rna-transcription-tests,robot-simulator-tests,series-tests,space-age-tests,strain-tests,sum-of-multiples-tests,trinary-tests,word-count-tests
|
7d4efa5cafbf48cd068f3f68ff6331febb9ccdf1
|
app/models/user.rb
|
app/models/user.rb
|
require 'bcrypt'
class User < ActiveRecord::Base
has_many :folios
has_many :elements, through: :folios
validates :first_name, presence: true, unless: :provider
validates :first_name, presence: true, unless: :provider
validates :email, uniqueness: true,
presence: true,
format: { with: /\w+@\w+\.\w{2,3}/i, message: "please enter a valid email address"},
unless: :provider
# validates :password, presence: true, unless: :provider
has_secure_password(validations: false)
def self.from_omniauth(auth)
where(auth.slice(:provider, :uid)).first_or_initialize.tap do |user|
user.provider = auth.provider
user.uid = auth.uid
user.email = auth.info.email
user.oauth_token = auth.credentials.token
user.oauth_expires_at = Time.at(auth.credentials.expires_at)
user.save!
end
end
end
|
require 'bcrypt'
class User < ActiveRecord::Base
has_many :folios
has_many :elements, through: :folios
validates :first_name, presence: true, unless: :provider
validates :first_name, presence: true, unless: :provider
validates :email, uniqueness: true,
presence: true,
format: { with: /\w+@\w+\.\w{2,3}/i, message: "please enter a valid email address"},
unless: :provider
# validates :password, presence: true, unless: :provider
has_secure_password(validations: false)
def self.from_omniauth(auth)
where(auth.slice(:provider, :uid)).first_or_initialize.tap do |user|
user.provider = auth.provider
user.uid = auth.uid
user.email = auth.info.email
user.oauth_token = auth.credentials.token
user.oauth_expires_at = Time.at(auth.credentials.expires_at) if auth.credentials.expires_at
#twitter never expires, that's why nil
user.save!
end
end
end
|
Add conditional for time expires
|
Add conditional for time expires
|
Ruby
|
mit
|
beccanelson/brightfolio,beccanelson/brightfolio,beccanelson/brightfolio
|
ruby
|
## Code Before:
require 'bcrypt'
class User < ActiveRecord::Base
has_many :folios
has_many :elements, through: :folios
validates :first_name, presence: true, unless: :provider
validates :first_name, presence: true, unless: :provider
validates :email, uniqueness: true,
presence: true,
format: { with: /\w+@\w+\.\w{2,3}/i, message: "please enter a valid email address"},
unless: :provider
# validates :password, presence: true, unless: :provider
has_secure_password(validations: false)
def self.from_omniauth(auth)
where(auth.slice(:provider, :uid)).first_or_initialize.tap do |user|
user.provider = auth.provider
user.uid = auth.uid
user.email = auth.info.email
user.oauth_token = auth.credentials.token
user.oauth_expires_at = Time.at(auth.credentials.expires_at)
user.save!
end
end
end
## Instruction:
Add conditional for time expires
## Code After:
require 'bcrypt'
class User < ActiveRecord::Base
has_many :folios
has_many :elements, through: :folios
validates :first_name, presence: true, unless: :provider
validates :first_name, presence: true, unless: :provider
validates :email, uniqueness: true,
presence: true,
format: { with: /\w+@\w+\.\w{2,3}/i, message: "please enter a valid email address"},
unless: :provider
# validates :password, presence: true, unless: :provider
has_secure_password(validations: false)
def self.from_omniauth(auth)
where(auth.slice(:provider, :uid)).first_or_initialize.tap do |user|
user.provider = auth.provider
user.uid = auth.uid
user.email = auth.info.email
user.oauth_token = auth.credentials.token
user.oauth_expires_at = Time.at(auth.credentials.expires_at) if auth.credentials.expires_at
#twitter never expires, that's why nil
user.save!
end
end
end
|
c6396d2cefae249eded635afa1fce20c4ec1a330
|
app/models/mix_collection.rb
|
app/models/mix_collection.rb
|
class MixCollection
include Mongoid::Document
include Mongoid::Timestamps
include Mongoid::Slug
paginates_per 12
field :name, type: String
field :mixes_count, type: Integer, default: 0
field :mixes_published_count, type: Integer, default: 0
slug :name
has_many :mixes
validates_presence_of :name, message: "cannot be blank."
validates_uniqueness_of :name, message: "is already taken."
# Do this later.
attr_accessible :name, as: [ :default, :admin ]
class << self
def popular
order_by([:mixes_published_count, :desc])
end
def paginate(options = {})
page(options[:page]).per(options[:per_page])
end
end
def years
self.mixes.only(:debuted_at)
.order_by(:debuted_at, :desc)
.collect { |m| m.debuted_at.year }.uniq
end
def payload
{
id: id,
name: name,
slug: slug,
mix_count: mixes_published_count
}
end
def as_json(options={})
payload
end
end
|
class MixCollection
include Mongoid::Document
include Mongoid::Timestamps
include Mongoid::Slug
paginates_per 12
field :name, type: String
field :mixes_count, type: Integer, default: 0
slug :name
has_many :mixes
validates_presence_of :name, message: "cannot be blank."
validates_uniqueness_of :name, message: "is already taken."
# Do this later.
attr_accessible :name, as: [ :default, :admin ]
class << self
def popular
order_by([:mixes_count, :desc])
end
def paginate(options = {})
page(options[:page]).per(options[:per_page])
end
end
def years
self.mixes.only(:debuted_at)
.order_by(:debuted_at, :desc)
.collect { |m| m.debuted_at.year }.uniq
end
def payload
{
id: id,
name: name,
slug: slug,
mix_count: mixes_count
}
end
def as_json(options={})
payload
end
end
|
Update counter cache now works. Was spitting out old published mixes number
|
Update counter cache now works. Was spitting out old published mixes number
|
Ruby
|
bsd-2-clause
|
erickreutz/mixturefm,Medow/mixturefm,Medow/mixturefm,erickreutz/mixturefm,erickreutz/mixturefm,Medow/mixturefm
|
ruby
|
## Code Before:
class MixCollection
include Mongoid::Document
include Mongoid::Timestamps
include Mongoid::Slug
paginates_per 12
field :name, type: String
field :mixes_count, type: Integer, default: 0
field :mixes_published_count, type: Integer, default: 0
slug :name
has_many :mixes
validates_presence_of :name, message: "cannot be blank."
validates_uniqueness_of :name, message: "is already taken."
# Do this later.
attr_accessible :name, as: [ :default, :admin ]
class << self
def popular
order_by([:mixes_published_count, :desc])
end
def paginate(options = {})
page(options[:page]).per(options[:per_page])
end
end
def years
self.mixes.only(:debuted_at)
.order_by(:debuted_at, :desc)
.collect { |m| m.debuted_at.year }.uniq
end
def payload
{
id: id,
name: name,
slug: slug,
mix_count: mixes_published_count
}
end
def as_json(options={})
payload
end
end
## Instruction:
Update counter cache now works. Was spitting out old published mixes number
## Code After:
class MixCollection
include Mongoid::Document
include Mongoid::Timestamps
include Mongoid::Slug
paginates_per 12
field :name, type: String
field :mixes_count, type: Integer, default: 0
slug :name
has_many :mixes
validates_presence_of :name, message: "cannot be blank."
validates_uniqueness_of :name, message: "is already taken."
# Do this later.
attr_accessible :name, as: [ :default, :admin ]
class << self
def popular
order_by([:mixes_count, :desc])
end
def paginate(options = {})
page(options[:page]).per(options[:per_page])
end
end
def years
self.mixes.only(:debuted_at)
.order_by(:debuted_at, :desc)
.collect { |m| m.debuted_at.year }.uniq
end
def payload
{
id: id,
name: name,
slug: slug,
mix_count: mixes_count
}
end
def as_json(options={})
payload
end
end
|
22ff1fd4f7d2309f7c7b4dfb9e893cf9f0527aa5
|
lib/data_loader/debates_parser.rb
|
lib/data_loader/debates_parser.rb
|
require 'nokogiri'
module DataLoader
class DebatesParser
# +xml_directory+ scrapedxml directory, e.g. files from http://data.openaustralia.org/scrapedxml/
# The options hash takes:
# +:house+ specify representatives or senate, omit for both
# +:date+ A single date
def self.run!(xml_directory, options = {})
houses = case
when options[:house].nil?
House.australian
when House.australian.include?(options[:house])
[options[:house]]
else
raise "Invalid house: #{options[:house]}"
end
houses.each do |house|
begin
xml_document = Nokogiri.parse(File.read("#{xml_directory}/#{house}_debates/#{options[:date]}.xml"))
rescue Errno::ENOENT
puts "No XML file found for #{house} on #{options[:date]}"
next
end
debates = DebatesXML.new(xml_document, house)
debates.divisions.each do |division|
puts "Saving division: #{division.house} #{division.date} #{division.number}"
division.save!
end
end
end
end
end
|
require 'nokogiri'
module DataLoader
class DebatesParser
# +xml_directory+ scrapedxml directory, e.g. files from http://data.openaustralia.org/scrapedxml/
# The options hash takes:
# +:house+ specify representatives or senate, omit for both
# +:date+ A single date
def self.run!(xml_directory, options = {})
houses = case
when options[:house].nil?
House.australian
when House.australian.include?(options[:house])
[options[:house]]
else
raise "Invalid house: #{options[:house]}"
end
houses.each do |house|
begin
xml_document = Nokogiri.parse(File.read("#{xml_directory}/#{house}_debates/#{options[:date]}.xml"))
rescue Errno::ENOENT
Rails.logger.info "No XML file found for #{house} on #{options[:date]}"
next
end
debates = DebatesXML.new(xml_document, house)
debates.divisions.each do |division|
Rails.logger.info "Saving division: #{division.house} #{division.date} #{division.number}"
division.save!
end
end
end
end
end
|
Use logger instead of puts
|
Use logger instead of puts
|
Ruby
|
agpl-3.0
|
mysociety/publicwhip,mysociety/publicwhip,mysociety/publicwhip
|
ruby
|
## Code Before:
require 'nokogiri'
module DataLoader
class DebatesParser
# +xml_directory+ scrapedxml directory, e.g. files from http://data.openaustralia.org/scrapedxml/
# The options hash takes:
# +:house+ specify representatives or senate, omit for both
# +:date+ A single date
def self.run!(xml_directory, options = {})
houses = case
when options[:house].nil?
House.australian
when House.australian.include?(options[:house])
[options[:house]]
else
raise "Invalid house: #{options[:house]}"
end
houses.each do |house|
begin
xml_document = Nokogiri.parse(File.read("#{xml_directory}/#{house}_debates/#{options[:date]}.xml"))
rescue Errno::ENOENT
puts "No XML file found for #{house} on #{options[:date]}"
next
end
debates = DebatesXML.new(xml_document, house)
debates.divisions.each do |division|
puts "Saving division: #{division.house} #{division.date} #{division.number}"
division.save!
end
end
end
end
end
## Instruction:
Use logger instead of puts
## Code After:
require 'nokogiri'
module DataLoader
class DebatesParser
# +xml_directory+ scrapedxml directory, e.g. files from http://data.openaustralia.org/scrapedxml/
# The options hash takes:
# +:house+ specify representatives or senate, omit for both
# +:date+ A single date
def self.run!(xml_directory, options = {})
houses = case
when options[:house].nil?
House.australian
when House.australian.include?(options[:house])
[options[:house]]
else
raise "Invalid house: #{options[:house]}"
end
houses.each do |house|
begin
xml_document = Nokogiri.parse(File.read("#{xml_directory}/#{house}_debates/#{options[:date]}.xml"))
rescue Errno::ENOENT
Rails.logger.info "No XML file found for #{house} on #{options[:date]}"
next
end
debates = DebatesXML.new(xml_document, house)
debates.divisions.each do |division|
Rails.logger.info "Saving division: #{division.house} #{division.date} #{division.number}"
division.save!
end
end
end
end
end
|
b20e83a6b63dc92f5ea5590317583ffb9d0c68ca
|
Package.swift
|
Package.swift
|
// swift-tools-version:3.1
import PackageDescription
let package = Package(
name: "Regex"
)
|
// swift-tools-version:3.1
import PackageDescription
let package = Package(
name: "Regex",
swiftLanguageVersions: [3, 4]
)
|
Document support for Swift 3 and 4
|
Document support for Swift 3 and 4
|
Swift
|
mit
|
sharplet/Regex,sharplet/Regex,sharplet/Regex
|
swift
|
## Code Before:
// swift-tools-version:3.1
import PackageDescription
let package = Package(
name: "Regex"
)
## Instruction:
Document support for Swift 3 and 4
## Code After:
// swift-tools-version:3.1
import PackageDescription
let package = Package(
name: "Regex",
swiftLanguageVersions: [3, 4]
)
|
d8afb3509f893f10cf6570d17573cd991e07a1f1
|
spec/payload/message_parser_spec.rb
|
spec/payload/message_parser_spec.rb
|
require 'spec_helper'
describe Magnum::Payload::MessageParser do
let(:klass) { class Klass ; include Magnum::Payload::MessageParser ; end }
let(:subject) { klass.new }
describe '#skip_message?' do
it 'returns true when message contains "ci-skip"' do
subject.stub(:message).and_return('Commit message [ci-skip]')
subject.skip_message?.should eq true
end
it 'returns true when message contains "ci skip"' do
subject.stub(:message).and_return('Commit message [ci skip]')
subject.skip_message?.should eq true
end
it 'returns true when message contains "skip ci"' do
subject.stub(:message).and_return('Commit message [skip ci]')
subject.skip_message?.should eq true
end
it 'returns true when message contains "skip-ci"' do
subject.stub(:message).and_return('Commit message [skip-ci]')
subject.skip_message?.should eq true
end
it 'returns false if no skip points found' do
subject.stub(:message).and_return('Commit message')
subject.skip_message?.should eq false
end
context 'with multi-line message' do
it 'returns true' do
subject.stub(:message).and_return("Commit message [skip-ci]\nCommit comments")
subject.skip_message?.should eq true
end
it 'returns false' do
subject.stub(:message).and_return("Commit message\nLets skip [ci-skip]")
subject.skip_message?.should eq false
end
end
end
end
|
require "spec_helper"
describe Magnum::Payload::MessageParser do
let(:klass) { class Klass ; include Magnum::Payload::MessageParser ; end }
let(:subject) { klass.new }
describe "#skip_message?" do
it "returns true when message contains "ci-skip"" do
subject.stub(:message).and_return("Commit message [ci-skip]")
subject.skip_message?.should eq true
end
it "returns true when message contains "ci skip"" do
subject.stub(:message).and_return("Commit message [ci skip]")
subject.skip_message?.should eq true
end
it "returns true when message contains "skip ci"" do
subject.stub(:message).and_return("Commit message [skip ci]")
subject.skip_message?.should eq true
end
it "returns true when message contains "skip-ci"" do
subject.stub(:message).and_return("Commit message [skip-ci]")
subject.skip_message?.should eq true
end
it "returns false if no skip points found" do
subject.stub(:message).and_return("Commit message")
subject.skip_message?.should eq false
end
context "with multi-line message" do
it "returns true" do
subject.stub(:message).and_return("Commit message [skip-ci]\nCommit comments")
subject.skip_message?.should eq true
end
it "returns false" do
subject.stub(:message).and_return("Commit message\nLets skip [ci-skip]")
subject.skip_message?.should eq false
end
end
end
end
|
Use double quotes in message spec
|
Use double quotes in message spec
|
Ruby
|
mit
|
magnumci/magnum-payload
|
ruby
|
## Code Before:
require 'spec_helper'
describe Magnum::Payload::MessageParser do
let(:klass) { class Klass ; include Magnum::Payload::MessageParser ; end }
let(:subject) { klass.new }
describe '#skip_message?' do
it 'returns true when message contains "ci-skip"' do
subject.stub(:message).and_return('Commit message [ci-skip]')
subject.skip_message?.should eq true
end
it 'returns true when message contains "ci skip"' do
subject.stub(:message).and_return('Commit message [ci skip]')
subject.skip_message?.should eq true
end
it 'returns true when message contains "skip ci"' do
subject.stub(:message).and_return('Commit message [skip ci]')
subject.skip_message?.should eq true
end
it 'returns true when message contains "skip-ci"' do
subject.stub(:message).and_return('Commit message [skip-ci]')
subject.skip_message?.should eq true
end
it 'returns false if no skip points found' do
subject.stub(:message).and_return('Commit message')
subject.skip_message?.should eq false
end
context 'with multi-line message' do
it 'returns true' do
subject.stub(:message).and_return("Commit message [skip-ci]\nCommit comments")
subject.skip_message?.should eq true
end
it 'returns false' do
subject.stub(:message).and_return("Commit message\nLets skip [ci-skip]")
subject.skip_message?.should eq false
end
end
end
end
## Instruction:
Use double quotes in message spec
## Code After:
require "spec_helper"
describe Magnum::Payload::MessageParser do
let(:klass) { class Klass ; include Magnum::Payload::MessageParser ; end }
let(:subject) { klass.new }
describe "#skip_message?" do
it "returns true when message contains "ci-skip"" do
subject.stub(:message).and_return("Commit message [ci-skip]")
subject.skip_message?.should eq true
end
it "returns true when message contains "ci skip"" do
subject.stub(:message).and_return("Commit message [ci skip]")
subject.skip_message?.should eq true
end
it "returns true when message contains "skip ci"" do
subject.stub(:message).and_return("Commit message [skip ci]")
subject.skip_message?.should eq true
end
it "returns true when message contains "skip-ci"" do
subject.stub(:message).and_return("Commit message [skip-ci]")
subject.skip_message?.should eq true
end
it "returns false if no skip points found" do
subject.stub(:message).and_return("Commit message")
subject.skip_message?.should eq false
end
context "with multi-line message" do
it "returns true" do
subject.stub(:message).and_return("Commit message [skip-ci]\nCommit comments")
subject.skip_message?.should eq true
end
it "returns false" do
subject.stub(:message).and_return("Commit message\nLets skip [ci-skip]")
subject.skip_message?.should eq false
end
end
end
end
|
0fc10cf29f63278b4a64709156726d9ad6e75368
|
examples/mutex_map.rs
|
examples/mutex_map.rs
|
//! This example shows how to wrap a data structure in a mutex to achieve safe mutability.
#[macro_use(lazy_static)]
extern crate lazy_static;
use std::collections::HashMap;
use std::sync::Mutex;
lazy_static! {
static ref MUTEX_MAP: Mutex<HashMap<u32, &'static str>> = {
let mut m = HashMap::new();
m.insert(0, "foo");
m.insert(1, "bar");
m.insert(2, "baz");
Mutex::new(m)
};
}
fn main() {
MUTEX_MAP.lock().unwrap().insert(0, "boo");
println!(
"The entry for `0` is \"{}\".",
MUTEX_MAP.lock().unwrap().get(&0).unwrap()
);
}
|
//! This example shows how to wrap a data structure in a mutex to achieve safe mutability.
extern crate lazy_static;
use lazy_static::lazy_static;
use std::collections::HashMap;
use std::sync::Mutex;
lazy_static! {
static ref MUTEX_MAP: Mutex<HashMap<u32, &'static str>> = {
let mut m = HashMap::new();
m.insert(0, "foo");
m.insert(1, "bar");
m.insert(2, "baz");
Mutex::new(m)
};
}
fn main() {
MUTEX_MAP.lock().unwrap().insert(0, "boo");
println!(
"The entry for `0` is \"{}\".",
MUTEX_MAP.lock().unwrap().get(&0).unwrap()
);
}
|
Revert "macro_use instead of use"
|
Revert "macro_use instead of use"
This reverts commit 3ba90796169143e83efdd1a11bde779cbdeca29d.
|
Rust
|
apache-2.0
|
rust-lang-nursery/lazy-static.rs
|
rust
|
## Code Before:
//! This example shows how to wrap a data structure in a mutex to achieve safe mutability.
#[macro_use(lazy_static)]
extern crate lazy_static;
use std::collections::HashMap;
use std::sync::Mutex;
lazy_static! {
static ref MUTEX_MAP: Mutex<HashMap<u32, &'static str>> = {
let mut m = HashMap::new();
m.insert(0, "foo");
m.insert(1, "bar");
m.insert(2, "baz");
Mutex::new(m)
};
}
fn main() {
MUTEX_MAP.lock().unwrap().insert(0, "boo");
println!(
"The entry for `0` is \"{}\".",
MUTEX_MAP.lock().unwrap().get(&0).unwrap()
);
}
## Instruction:
Revert "macro_use instead of use"
This reverts commit 3ba90796169143e83efdd1a11bde779cbdeca29d.
## Code After:
//! This example shows how to wrap a data structure in a mutex to achieve safe mutability.
extern crate lazy_static;
use lazy_static::lazy_static;
use std::collections::HashMap;
use std::sync::Mutex;
lazy_static! {
static ref MUTEX_MAP: Mutex<HashMap<u32, &'static str>> = {
let mut m = HashMap::new();
m.insert(0, "foo");
m.insert(1, "bar");
m.insert(2, "baz");
Mutex::new(m)
};
}
fn main() {
MUTEX_MAP.lock().unwrap().insert(0, "boo");
println!(
"The entry for `0` is \"{}\".",
MUTEX_MAP.lock().unwrap().get(&0).unwrap()
);
}
|
76812edd35f5cc40af94822b148cff192cffa382
|
main_test.go
|
main_test.go
|
package main
|
package main
import (
"os"
"testing"
)
const ManifestFilename = "test-manifest.yml"
const Manifest string = `---
name: The Project
meta:
team: Project Devs
email: [email protected]
slack: devs
vars:
- version
- assets_version
- owner
tasks:
- name: Deploy Postgres
manifests:
- postgres-rc
- postgres-service
- name: Deploy Redis
manifests:
- redis-rc
- redis-service
- name: Database Setup
pod_manifest:
- createdb-pod
wait_for:
- success
when: new_deployment
- name: Database Migration
pod_manifest:
- migration-pod
wait_for:
- success
- name: Deploy Project
manifests:
- web-rc
- web-service
- sidekiq-rc
`
func TestPass(t *testing.T) {
//t.Succeed()
}
func TestFail(t *testing.T) {
//t.Fail()
}
func TestMain(m *testing.M) {
f, _ := os.Create(ManifestFilename)
f.Write([]byte(Manifest))
f.Close()
tres := m.Run()
teardown()
os.Exit(tres)
}
func teardown() {
os.Remove(ManifestFilename)
}
func TestValidateManifestCorrect(t *testing.T) {
TestTask := Task{
Name: ManifestFilename,
}
err := TestTask.ValidateManifests()
if err != nil {
t.Error(err)
}
}
|
Add sample manifest, test ValidateManifests
|
Add sample manifest, test ValidateManifests
|
Go
|
bsd-3-clause
|
cored/broadway,macat/broadway,namely/broadway,poopoothegorilla/broadway,namely/broadway,poopoothegorilla/broadway,macat/broadway,cored/broadway,therealplato/broadway,therealplato/broadway
|
go
|
## Code Before:
package main
## Instruction:
Add sample manifest, test ValidateManifests
## Code After:
package main
import (
"os"
"testing"
)
const ManifestFilename = "test-manifest.yml"
const Manifest string = `---
name: The Project
meta:
team: Project Devs
email: [email protected]
slack: devs
vars:
- version
- assets_version
- owner
tasks:
- name: Deploy Postgres
manifests:
- postgres-rc
- postgres-service
- name: Deploy Redis
manifests:
- redis-rc
- redis-service
- name: Database Setup
pod_manifest:
- createdb-pod
wait_for:
- success
when: new_deployment
- name: Database Migration
pod_manifest:
- migration-pod
wait_for:
- success
- name: Deploy Project
manifests:
- web-rc
- web-service
- sidekiq-rc
`
func TestPass(t *testing.T) {
//t.Succeed()
}
func TestFail(t *testing.T) {
//t.Fail()
}
func TestMain(m *testing.M) {
f, _ := os.Create(ManifestFilename)
f.Write([]byte(Manifest))
f.Close()
tres := m.Run()
teardown()
os.Exit(tres)
}
func teardown() {
os.Remove(ManifestFilename)
}
func TestValidateManifestCorrect(t *testing.T) {
TestTask := Task{
Name: ManifestFilename,
}
err := TestTask.ValidateManifests()
if err != nil {
t.Error(err)
}
}
|
a6a102c211875ea92f04dbb2ff8a10505e9c8e6a
|
metadata/anupam.acrylic.txt
|
metadata/anupam.acrylic.txt
|
Categories:Multimedia
License:GPLv3+
Web Site:https://github.com/valerio-bozzolan/AcrylicPaint/blob/HEAD/README.md
Source Code:https://github.com/valerio-bozzolan/AcrylicPaint
Issue Tracker:https://github.com/valerio-bozzolan/AcrylicPaint/issues
Auto Name:Acrylic Paint
Summary:Simple finger painting
Description:
Acrylic Paint is a coloring tool based on the FingerPaint project
taken from API demos.
We use a patched fork authorized by the [https://github.com/anupam1525/AcrylicPaint/ original author]
until main development is active again.
.
Repo Type:git
Repo:https://github.com/valerio-bozzolan/AcrylicPaint.git
Build:1.2.0,3
commit=e534db825b557ac523297599139a0616a4ce2545
subdir=Acrylic_Paint
# Forked by Anupam-community
Build:1.2.4,4
commit=ec4b0e82deda585372e693bb10e1dc25a01508d6
Update Check Mode:RepoManifest
Current Version:1.2.4
Current Version Code:4
|
Categories:Multimedia
License:GPLv3+
Web Site:https://github.com/valerio-bozzolan/AcrylicPaint/blob/HEAD/README.md
Source Code:https://github.com/valerio-bozzolan/AcrylicPaint
Issue Tracker:https://github.com/valerio-bozzolan/AcrylicPaint/issues
Auto Name:Acrylic Paint
Summary:Simple finger painting
Description:
Acrylic Paint is a coloring tool based on the FingerPaint project
taken from API demos.
We use a patched fork authorized by the [https://github.com/anupam1525/AcrylicPaint/ original author]
until main development is active again.
.
Repo Type:git
Repo:https://github.com/valerio-bozzolan/AcrylicPaint.git
Build:1.2.0,3
commit=e534db825b557ac523297599139a0616a4ce2545
subdir=Acrylic_Paint
# Forked by Anupam-community
Build:1.2.4,4
commit=ec4b0e82deda585372e693bb10e1dc25a01508d6
Auto Update Mode:None
Update Check Mode:RepoManifest
Current Version:1.3.1
Current Version Code:7
|
Update CV of Acrylic Paint to 1.3.1 (7)
|
Update CV of Acrylic Paint to 1.3.1 (7)
|
Text
|
agpl-3.0
|
f-droid/fdroiddata,f-droid/fdroiddata,f-droid/fdroid-data
|
text
|
## Code Before:
Categories:Multimedia
License:GPLv3+
Web Site:https://github.com/valerio-bozzolan/AcrylicPaint/blob/HEAD/README.md
Source Code:https://github.com/valerio-bozzolan/AcrylicPaint
Issue Tracker:https://github.com/valerio-bozzolan/AcrylicPaint/issues
Auto Name:Acrylic Paint
Summary:Simple finger painting
Description:
Acrylic Paint is a coloring tool based on the FingerPaint project
taken from API demos.
We use a patched fork authorized by the [https://github.com/anupam1525/AcrylicPaint/ original author]
until main development is active again.
.
Repo Type:git
Repo:https://github.com/valerio-bozzolan/AcrylicPaint.git
Build:1.2.0,3
commit=e534db825b557ac523297599139a0616a4ce2545
subdir=Acrylic_Paint
# Forked by Anupam-community
Build:1.2.4,4
commit=ec4b0e82deda585372e693bb10e1dc25a01508d6
Update Check Mode:RepoManifest
Current Version:1.2.4
Current Version Code:4
## Instruction:
Update CV of Acrylic Paint to 1.3.1 (7)
## Code After:
Categories:Multimedia
License:GPLv3+
Web Site:https://github.com/valerio-bozzolan/AcrylicPaint/blob/HEAD/README.md
Source Code:https://github.com/valerio-bozzolan/AcrylicPaint
Issue Tracker:https://github.com/valerio-bozzolan/AcrylicPaint/issues
Auto Name:Acrylic Paint
Summary:Simple finger painting
Description:
Acrylic Paint is a coloring tool based on the FingerPaint project
taken from API demos.
We use a patched fork authorized by the [https://github.com/anupam1525/AcrylicPaint/ original author]
until main development is active again.
.
Repo Type:git
Repo:https://github.com/valerio-bozzolan/AcrylicPaint.git
Build:1.2.0,3
commit=e534db825b557ac523297599139a0616a4ce2545
subdir=Acrylic_Paint
# Forked by Anupam-community
Build:1.2.4,4
commit=ec4b0e82deda585372e693bb10e1dc25a01508d6
Auto Update Mode:None
Update Check Mode:RepoManifest
Current Version:1.3.1
Current Version Code:7
|
f9ba09adb0b25cbbe1fe2918029e3efab179d5de
|
package.json
|
package.json
|
{
"author": "Isaac Z. Schlueter <[email protected]> (http://blog.izs.me/)",
"name": "ini",
"description": "An ini encoder/decoder for node",
"version": "1.3.3",
"repository": {
"type": "git",
"url": "git://github.com/isaacs/ini.git"
},
"main": "ini.js",
"scripts": {
"test": "tap test/*.js"
},
"engines": {
"node": "*"
},
"dependencies": {},
"devDependencies": {
"tap": "^1.2.0"
},
"license": "ISC"
}
|
{
"author": "Isaac Z. Schlueter <[email protected]> (http://blog.izs.me/)",
"name": "ini",
"description": "An ini encoder/decoder for node",
"version": "1.3.3",
"repository": {
"type": "git",
"url": "git://github.com/isaacs/ini.git"
},
"main": "ini.js",
"scripts": {
"test": "tap test/*.js"
},
"engines": {
"node": "*"
},
"dependencies": {},
"devDependencies": {
"tap": "^1.2.0"
},
"license": "ISC",
"files": [
"ini.js"
]
}
|
Add pkg.files to ignore files when npm publish
|
Add pkg.files to ignore files when npm publish
|
JSON
|
isc
|
npm/ini,hmunn/ini,isaacs/ini,fridaysedge/ini,idefy/ini
|
json
|
## Code Before:
{
"author": "Isaac Z. Schlueter <[email protected]> (http://blog.izs.me/)",
"name": "ini",
"description": "An ini encoder/decoder for node",
"version": "1.3.3",
"repository": {
"type": "git",
"url": "git://github.com/isaacs/ini.git"
},
"main": "ini.js",
"scripts": {
"test": "tap test/*.js"
},
"engines": {
"node": "*"
},
"dependencies": {},
"devDependencies": {
"tap": "^1.2.0"
},
"license": "ISC"
}
## Instruction:
Add pkg.files to ignore files when npm publish
## Code After:
{
"author": "Isaac Z. Schlueter <[email protected]> (http://blog.izs.me/)",
"name": "ini",
"description": "An ini encoder/decoder for node",
"version": "1.3.3",
"repository": {
"type": "git",
"url": "git://github.com/isaacs/ini.git"
},
"main": "ini.js",
"scripts": {
"test": "tap test/*.js"
},
"engines": {
"node": "*"
},
"dependencies": {},
"devDependencies": {
"tap": "^1.2.0"
},
"license": "ISC",
"files": [
"ini.js"
]
}
|
c6ac0095d3b1139c559266f9ff266983fbffdbad
|
setup.cfg
|
setup.cfg
|
[bumpversion]
current_version = 2.1.0
commit = True
tag = True
tag_name = {new_version}
[metadata]
author = Seth M. Morton
author_email = [email protected]
url = https://github.com/SethMMorton/fastnumbers
description = Super-fast and clean conversions to numbers.
long_description = file: README.rst
license = MIT
classifiers =
Development Status :: 5 - Production/Stable
Intended Audience :: Science/Research
Intended Audience :: Developers
Intended Audience :: Information Technology
Intended Audience :: System Administrators
Intended Audience :: Financial and Insurance Industry
Operating System :: OS Independent
License :: OSI Approved :: MIT License
Natural Language :: English
Programming Language :: Python :: 2
Programming Language :: Python :: 2.7
Programming Language :: Python :: 3
Programming Language :: Python :: 3.4
Programming Language :: Python :: 3.5
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
Topic :: Scientific/Engineering :: Information Analysis
Topic :: Utilities
Topic :: Text Processing
Topic :: Text Processing :: Filters
[bumpversion:file:setup.py]
[bumpversion:file:include/version.h]
[bumpversion:file:docs/source/conf.py]
[bumpversion:file:docs/source/changelog.rst]
search = X.X.X
replace = {new_version}
|
[bumpversion]
current_version = 2.1.0
commit = True
tag = True
tag_name = {new_version}
[metadata]
author = Seth M. Morton
author_email = [email protected]
url = https://github.com/SethMMorton/fastnumbers
description = Super-fast and clean conversions to numbers.
long_description = file: README.rst
license = MIT
classifiers =
Development Status :: 5 - Production/Stable
Intended Audience :: Science/Research
Intended Audience :: Developers
Intended Audience :: Information Technology
Intended Audience :: System Administrators
Intended Audience :: Financial and Insurance Industry
Operating System :: OS Independent
License :: OSI Approved :: MIT License
Natural Language :: English
Programming Language :: Python :: 2
Programming Language :: Python :: 2.7
Programming Language :: Python :: 3
Programming Language :: Python :: 3.4
Programming Language :: Python :: 3.5
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
Topic :: Scientific/Engineering :: Information Analysis
Topic :: Utilities
Topic :: Text Processing
Topic :: Text Processing :: Filters
[bumpversion:file:setup.py]
[bumpversion:file:include/fastnumbers/version.h]
[bumpversion:file:docs/source/conf.py]
[bumpversion:file:docs/source/changelog.rst]
search = X.X.X
replace = {new_version}
|
Change version.h location in bumpversion config.
|
Change version.h location in bumpversion config.
|
INI
|
mit
|
SethMMorton/fastnumbers,SethMMorton/fastnumbers,SethMMorton/fastnumbers
|
ini
|
## Code Before:
[bumpversion]
current_version = 2.1.0
commit = True
tag = True
tag_name = {new_version}
[metadata]
author = Seth M. Morton
author_email = [email protected]
url = https://github.com/SethMMorton/fastnumbers
description = Super-fast and clean conversions to numbers.
long_description = file: README.rst
license = MIT
classifiers =
Development Status :: 5 - Production/Stable
Intended Audience :: Science/Research
Intended Audience :: Developers
Intended Audience :: Information Technology
Intended Audience :: System Administrators
Intended Audience :: Financial and Insurance Industry
Operating System :: OS Independent
License :: OSI Approved :: MIT License
Natural Language :: English
Programming Language :: Python :: 2
Programming Language :: Python :: 2.7
Programming Language :: Python :: 3
Programming Language :: Python :: 3.4
Programming Language :: Python :: 3.5
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
Topic :: Scientific/Engineering :: Information Analysis
Topic :: Utilities
Topic :: Text Processing
Topic :: Text Processing :: Filters
[bumpversion:file:setup.py]
[bumpversion:file:include/version.h]
[bumpversion:file:docs/source/conf.py]
[bumpversion:file:docs/source/changelog.rst]
search = X.X.X
replace = {new_version}
## Instruction:
Change version.h location in bumpversion config.
## Code After:
[bumpversion]
current_version = 2.1.0
commit = True
tag = True
tag_name = {new_version}
[metadata]
author = Seth M. Morton
author_email = [email protected]
url = https://github.com/SethMMorton/fastnumbers
description = Super-fast and clean conversions to numbers.
long_description = file: README.rst
license = MIT
classifiers =
Development Status :: 5 - Production/Stable
Intended Audience :: Science/Research
Intended Audience :: Developers
Intended Audience :: Information Technology
Intended Audience :: System Administrators
Intended Audience :: Financial and Insurance Industry
Operating System :: OS Independent
License :: OSI Approved :: MIT License
Natural Language :: English
Programming Language :: Python :: 2
Programming Language :: Python :: 2.7
Programming Language :: Python :: 3
Programming Language :: Python :: 3.4
Programming Language :: Python :: 3.5
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
Topic :: Scientific/Engineering :: Information Analysis
Topic :: Utilities
Topic :: Text Processing
Topic :: Text Processing :: Filters
[bumpversion:file:setup.py]
[bumpversion:file:include/fastnumbers/version.h]
[bumpversion:file:docs/source/conf.py]
[bumpversion:file:docs/source/changelog.rst]
search = X.X.X
replace = {new_version}
|
3871d376ffa0ba395c14d6b8bce07852fb9bfdfc
|
index.html
|
index.html
|
---
layout: page
---
<p class="teaser">
Some kind of JavaScript conference ostensibly coming to Denver, Colorado at some point in the late spring or early summer 2016.
</p>
|
---
layout: page
title: Home
---
<p class="teaser">
Some kind of JavaScript conference ostensibly coming to Denver, Colorado at some point in the late spring or early summer 2016.
</p>
|
Add title to home page
|
Add title to home page
|
HTML
|
mpl-2.0
|
dinosaurjs/dinosaurjs.github.io,dinosaurjs/dinosaurjs.github.io
|
html
|
## Code Before:
---
layout: page
---
<p class="teaser">
Some kind of JavaScript conference ostensibly coming to Denver, Colorado at some point in the late spring or early summer 2016.
</p>
## Instruction:
Add title to home page
## Code After:
---
layout: page
title: Home
---
<p class="teaser">
Some kind of JavaScript conference ostensibly coming to Denver, Colorado at some point in the late spring or early summer 2016.
</p>
|
63c79ed59728f698fda76ab264d58e1135ca187d
|
resources/sass/components/_site-footer.scss
|
resources/sass/components/_site-footer.scss
|
// Copyright (C) 2021 Damien Dart, <[email protected]>.
// This file is distributed under the MIT licence. For more information,
// please refer to the accompanying "LICENCE" file.
@use "sass:math";
@use "../variables";
.site-footer {
background: variables.$colour-white;
box-sizing: border-box;
flex-grow: 1;
margin: (variables.$base-line-height * 3) auto 0;
padding: variables.$base-line-height;
text-align: center;
width: 100%;
&__container {
align-items: center;
display: flex;
flex-wrap: wrap;
margin: 0 auto;
max-width: variables.$header-and-footer-width;
&::before {
content: "";
flex-grow: 666;
flex-basis: calc((#{variables.$header-and-footer-width * 0.75} - 100%) * 666);
height: math.div(variables.$base-line-height, 2);
}
& > * {
flex-grow: 1;
}
& > *:first-child {
order: -1;
}
}
&__copyright {
margin: 0;
text-align: center;
}
&__social-media {
}
&__rule {
display: none;
}
}
|
// Copyright (C) 2021 Damien Dart, <[email protected]>.
// This file is distributed under the MIT licence. For more information,
// please refer to the accompanying "LICENCE" file.
@use "sass:math";
@use "../variables";
.site-footer {
background: variables.$colour-white;
box-sizing: border-box;
flex-grow: 1;
margin: (variables.$base-line-height * 3) auto 0;
padding: variables.$base-line-height;
text-align: center;
width: 100%;
&__container {
align-items: center;
display: flex;
flex-wrap: wrap;
margin: 0 auto;
max-width: variables.$header-and-footer-width;
&::before {
content: "";
flex-grow: 666;
flex-basis: calc((#{variables.$header-and-footer-width * 0.75} - 100%) * 666);
height: math.div(variables.$base-line-height, 2);
}
& > * {
flex-grow: 1;
}
& > *:first-child {
order: -1;
}
}
&__copyright {
font-size: 87.5%;
margin: 0;
text-align: center;
}
&__social-media {
}
&__rule {
display: none;
}
}
|
Reduce site footer font size.
|
Reduce site footer font size.
|
SCSS
|
mit
|
damiendart/robotinaponcho,damiendart/robotinaponcho,damiendart/robotinaponcho
|
scss
|
## Code Before:
// Copyright (C) 2021 Damien Dart, <[email protected]>.
// This file is distributed under the MIT licence. For more information,
// please refer to the accompanying "LICENCE" file.
@use "sass:math";
@use "../variables";
.site-footer {
background: variables.$colour-white;
box-sizing: border-box;
flex-grow: 1;
margin: (variables.$base-line-height * 3) auto 0;
padding: variables.$base-line-height;
text-align: center;
width: 100%;
&__container {
align-items: center;
display: flex;
flex-wrap: wrap;
margin: 0 auto;
max-width: variables.$header-and-footer-width;
&::before {
content: "";
flex-grow: 666;
flex-basis: calc((#{variables.$header-and-footer-width * 0.75} - 100%) * 666);
height: math.div(variables.$base-line-height, 2);
}
& > * {
flex-grow: 1;
}
& > *:first-child {
order: -1;
}
}
&__copyright {
margin: 0;
text-align: center;
}
&__social-media {
}
&__rule {
display: none;
}
}
## Instruction:
Reduce site footer font size.
## Code After:
// Copyright (C) 2021 Damien Dart, <[email protected]>.
// This file is distributed under the MIT licence. For more information,
// please refer to the accompanying "LICENCE" file.
@use "sass:math";
@use "../variables";
.site-footer {
background: variables.$colour-white;
box-sizing: border-box;
flex-grow: 1;
margin: (variables.$base-line-height * 3) auto 0;
padding: variables.$base-line-height;
text-align: center;
width: 100%;
&__container {
align-items: center;
display: flex;
flex-wrap: wrap;
margin: 0 auto;
max-width: variables.$header-and-footer-width;
&::before {
content: "";
flex-grow: 666;
flex-basis: calc((#{variables.$header-and-footer-width * 0.75} - 100%) * 666);
height: math.div(variables.$base-line-height, 2);
}
& > * {
flex-grow: 1;
}
& > *:first-child {
order: -1;
}
}
&__copyright {
font-size: 87.5%;
margin: 0;
text-align: center;
}
&__social-media {
}
&__rule {
display: none;
}
}
|
470c616cf598fb14842d8326d6fe416952b79d8a
|
test/common.js
|
test/common.js
|
'use strict';
const hookModule = require("../src/");
class TallyHook extends hookModule.Hook {
preProcess(thing) {
thing.preTally = thing.preTally + 1;
return true;
}
postProcess(thing) {
thing.postTally = thing.postTally + 1;
}
}
module.exports = {
TallyHook
};
|
'use strict';
const hookModule = require("../src/");
class TallyHook extends hookModule.Hook {
preProcess(thing) {
thing.preTally = thing.preTally + 1;
return true;
}
postProcess(thing) {
thing.postTally = thing.postTally + 1;
}
}
class DelayableHook extends hookModule.Hook {
constructor(options) {
super(options)
}
preProcess() {
this.delay( this.settings.preprocess || 500, "preProcess");
return true
}
execute() {
this.delay(this.settings.execute || 200, "execute");
}
postProcess() {
this.delay(this.settings.postprocess || 100, "postProcess");
}
delay(ms, str){
var ctr, rej, p = new Promise((resolve, reject) => {
ctr = setTimeout(() => {
console.log( `delayed ${str} by ${ms}ms`)
resolve();
}, ms);
rej = reject;
});
p.cancel = function(){ clearTimeout(ctr); rej(Error("Cancelled"))};
return p;
}
}
module.exports = {
TallyHook,
DelayableHook
};
|
Add a DelayedHook test class.
|
Add a DelayedHook test class.
|
JavaScript
|
mit
|
StevenBlack/hooks-and-anchors
|
javascript
|
## Code Before:
'use strict';
const hookModule = require("../src/");
class TallyHook extends hookModule.Hook {
preProcess(thing) {
thing.preTally = thing.preTally + 1;
return true;
}
postProcess(thing) {
thing.postTally = thing.postTally + 1;
}
}
module.exports = {
TallyHook
};
## Instruction:
Add a DelayedHook test class.
## Code After:
'use strict';
const hookModule = require("../src/");
class TallyHook extends hookModule.Hook {
preProcess(thing) {
thing.preTally = thing.preTally + 1;
return true;
}
postProcess(thing) {
thing.postTally = thing.postTally + 1;
}
}
class DelayableHook extends hookModule.Hook {
constructor(options) {
super(options)
}
preProcess() {
this.delay( this.settings.preprocess || 500, "preProcess");
return true
}
execute() {
this.delay(this.settings.execute || 200, "execute");
}
postProcess() {
this.delay(this.settings.postprocess || 100, "postProcess");
}
delay(ms, str){
var ctr, rej, p = new Promise((resolve, reject) => {
ctr = setTimeout(() => {
console.log( `delayed ${str} by ${ms}ms`)
resolve();
}, ms);
rej = reject;
});
p.cancel = function(){ clearTimeout(ctr); rej(Error("Cancelled"))};
return p;
}
}
module.exports = {
TallyHook,
DelayableHook
};
|
ed84c6d8342b2d984e86f63f107bc8ef94e827e5
|
js/_components/common.js
|
js/_components/common.js
|
import ChromePromise from 'chrome-promise'
window.chromep = new ChromePromise()
// set or unset CSS
window.CSS = (() => {
const styleEl = document.createElement('style')
document.head.appendChild(styleEl)
const sheet = styleEl.sheet
const set = (param1, param2) => {
const _action = (styleSelector, styleList) => {
let styleValue = ''
propEach(styleList, (propName, propValue) => {
styleValue += `${propName}:${propValue};`
})
sheet.insertRule(
styleSelector + '{' + styleValue + '}',
sheet.cssRules.length
)
}
if (param2 === undefined) {
propEach(param1, _action)
} else {
_action(param1, param2)
}
}
const unsetAll = () => {
while (sheet.cssRules[0]) {
sheet.deleteRule(0)
}
}
return {set, unsetAll}
})()
window.JSONStorage = {
get: (key) => JSON.parse(localStorage.getItem(key)),
set: (key, value) => localStorage.setItem(key, JSON.stringify(value))
}
function propEach(obj, fn) {
for (const propName of Object.keys(obj)) {
fn(propName, obj[propName])
}
}
|
import ChromePromise from 'chrome-promise'
window.chromep = new ChromePromise()
// set or unset CSS
window.CSS = (() => {
const styleEl = document.createElement('style')
document.head.appendChild(styleEl)
const sheet = styleEl.sheet
const set = (param1, param2) => {
const _action = (styleSelector, styleList) => {
let styleValue = ''
propEach(styleList, (propName, propValue) => {
styleValue += `${propName}:${propValue};`
})
sheet.insertRule(
styleSelector + '{' + styleValue + '}',
sheet.cssRules.length
)
}
if (param2 === undefined) {
propEach(param1, _action)
} else {
_action(param1, param2)
}
}
const unsetAll = () => {
while (sheet.cssRules[0]) {
sheet.deleteRule(0)
}
}
return {set, unsetAll}
})()
window.JSONStorage = {
get: (key) => JSON.parse(window.localStorage.getItem(key)),
set: (key, value) => window.localStorage.setItem(key, JSON.stringify(value))
}
function propEach(obj, fn) {
for (const propName of Object.keys(obj)) {
fn(propName, obj[propName])
}
}
|
Add window prefix to localStorage
|
Add window prefix to localStorage
|
JavaScript
|
mit
|
foray1010/Popup-my-Bookmarks,foray1010/Popup-my-Bookmarks
|
javascript
|
## Code Before:
import ChromePromise from 'chrome-promise'
window.chromep = new ChromePromise()
// set or unset CSS
window.CSS = (() => {
const styleEl = document.createElement('style')
document.head.appendChild(styleEl)
const sheet = styleEl.sheet
const set = (param1, param2) => {
const _action = (styleSelector, styleList) => {
let styleValue = ''
propEach(styleList, (propName, propValue) => {
styleValue += `${propName}:${propValue};`
})
sheet.insertRule(
styleSelector + '{' + styleValue + '}',
sheet.cssRules.length
)
}
if (param2 === undefined) {
propEach(param1, _action)
} else {
_action(param1, param2)
}
}
const unsetAll = () => {
while (sheet.cssRules[0]) {
sheet.deleteRule(0)
}
}
return {set, unsetAll}
})()
window.JSONStorage = {
get: (key) => JSON.parse(localStorage.getItem(key)),
set: (key, value) => localStorage.setItem(key, JSON.stringify(value))
}
function propEach(obj, fn) {
for (const propName of Object.keys(obj)) {
fn(propName, obj[propName])
}
}
## Instruction:
Add window prefix to localStorage
## Code After:
import ChromePromise from 'chrome-promise'
window.chromep = new ChromePromise()
// set or unset CSS
window.CSS = (() => {
const styleEl = document.createElement('style')
document.head.appendChild(styleEl)
const sheet = styleEl.sheet
const set = (param1, param2) => {
const _action = (styleSelector, styleList) => {
let styleValue = ''
propEach(styleList, (propName, propValue) => {
styleValue += `${propName}:${propValue};`
})
sheet.insertRule(
styleSelector + '{' + styleValue + '}',
sheet.cssRules.length
)
}
if (param2 === undefined) {
propEach(param1, _action)
} else {
_action(param1, param2)
}
}
const unsetAll = () => {
while (sheet.cssRules[0]) {
sheet.deleteRule(0)
}
}
return {set, unsetAll}
})()
window.JSONStorage = {
get: (key) => JSON.parse(window.localStorage.getItem(key)),
set: (key, value) => window.localStorage.setItem(key, JSON.stringify(value))
}
function propEach(obj, fn) {
for (const propName of Object.keys(obj)) {
fn(propName, obj[propName])
}
}
|
403e1d317de736c25625a30583468b55d731bb8f
|
spec/jobs/job_logger_spec.rb
|
spec/jobs/job_logger_spec.rb
|
require 'spec_helper'
describe JobLogger do
describe '.logger' do
it 'passes the message to the Logger instance' do
job_logger = instance_double(::Logger)
allow(job_logger).to receive(:formatter=)
allow(job_logger).to receive(:info)
worker_logger = instance_double(::Logger, clone: job_logger)
allow(Delayed::Worker).to receive(:logger) { worker_logger }
JobLogger.logger.info('log message')
expect(job_logger).to have_received(:info).with('log message')
end
end
describe JobLogger::Formatter do
describe '#call' do
it 'outputs timestamps, progname and message' do
timestamp = DateTime.new(2020,5,6, 22, 36, 0)
log_line = JobLogger::Formatter.new.call(nil, timestamp, 'progname', 'message')
expect(log_line).to eq("2020-05-06T22:36:00+0000: message\n")
end
end
end
end
|
require 'spec_helper'
describe JobLogger do
describe '.logger' do
it "returns a Ruby's logger instance" do
expect(JobLogger.logger).to respond_to(:info)
end
it 'returns custom formatted logger instance' do
expect(JobLogger.logger.formatter).to be_instance_of(JobLogger::Formatter)
end
end
describe JobLogger::Formatter do
describe '#call' do
it 'outputs timestamps, progname and message' do
timestamp = DateTime.new(2020,5,6, 22, 36, 0)
log_line = JobLogger::Formatter.new.call(nil, timestamp, 'progname', 'message')
expect(log_line).to eq("2020-05-06T22:36:00+0000: message\n")
end
end
end
end
|
Make JobLogger spec more reliable
|
Make JobLogger spec more reliable
This will hopefully fix our bild. I believe that the underlying issue is
that the logger's test double gets leaked into other examples, as RSpec
tells when running `spec/jobs/` specs.
```
5) SubscriptionPlacementJob performing the job when unplaced proxy_orders exist processes placeable proxy_orders
Failure/Error: JobLogger.logger.info("Placing Order for Proxy Order #{proxy_order.id}")
#<InstanceDouble(Logger) (anonymous)> was originally created in one example but has leaked into another example and can no longer be used. rspec-mocks' doubles are designed to only last for one example, and you need to create a new one in each example you wish to use it for.
# ./app/jobs/subscription_placement_job.rb:31:in `place_order_for'
```
Read more: https://relishapp.com/rspec/rspec-mocks/v/3-4/docs/basics/scope#doubles-cannot-be-reused-in-another-example
For whatever reason the JobLogger keeps its `.logger` being stubbed
after this spec.
|
Ruby
|
agpl-3.0
|
mkllnk/openfoodnetwork,mkllnk/openfoodnetwork,openfoodfoundation/openfoodnetwork,lin-d-hop/openfoodnetwork,Matt-Yorkley/openfoodnetwork,Matt-Yorkley/openfoodnetwork,mkllnk/openfoodnetwork,Matt-Yorkley/openfoodnetwork,mkllnk/openfoodnetwork,Matt-Yorkley/openfoodnetwork,openfoodfoundation/openfoodnetwork,lin-d-hop/openfoodnetwork,openfoodfoundation/openfoodnetwork,openfoodfoundation/openfoodnetwork,lin-d-hop/openfoodnetwork,lin-d-hop/openfoodnetwork
|
ruby
|
## Code Before:
require 'spec_helper'
describe JobLogger do
describe '.logger' do
it 'passes the message to the Logger instance' do
job_logger = instance_double(::Logger)
allow(job_logger).to receive(:formatter=)
allow(job_logger).to receive(:info)
worker_logger = instance_double(::Logger, clone: job_logger)
allow(Delayed::Worker).to receive(:logger) { worker_logger }
JobLogger.logger.info('log message')
expect(job_logger).to have_received(:info).with('log message')
end
end
describe JobLogger::Formatter do
describe '#call' do
it 'outputs timestamps, progname and message' do
timestamp = DateTime.new(2020,5,6, 22, 36, 0)
log_line = JobLogger::Formatter.new.call(nil, timestamp, 'progname', 'message')
expect(log_line).to eq("2020-05-06T22:36:00+0000: message\n")
end
end
end
end
## Instruction:
Make JobLogger spec more reliable
This will hopefully fix our bild. I believe that the underlying issue is
that the logger's test double gets leaked into other examples, as RSpec
tells when running `spec/jobs/` specs.
```
5) SubscriptionPlacementJob performing the job when unplaced proxy_orders exist processes placeable proxy_orders
Failure/Error: JobLogger.logger.info("Placing Order for Proxy Order #{proxy_order.id}")
#<InstanceDouble(Logger) (anonymous)> was originally created in one example but has leaked into another example and can no longer be used. rspec-mocks' doubles are designed to only last for one example, and you need to create a new one in each example you wish to use it for.
# ./app/jobs/subscription_placement_job.rb:31:in `place_order_for'
```
Read more: https://relishapp.com/rspec/rspec-mocks/v/3-4/docs/basics/scope#doubles-cannot-be-reused-in-another-example
For whatever reason the JobLogger keeps its `.logger` being stubbed
after this spec.
## Code After:
require 'spec_helper'
describe JobLogger do
describe '.logger' do
it "returns a Ruby's logger instance" do
expect(JobLogger.logger).to respond_to(:info)
end
it 'returns custom formatted logger instance' do
expect(JobLogger.logger.formatter).to be_instance_of(JobLogger::Formatter)
end
end
describe JobLogger::Formatter do
describe '#call' do
it 'outputs timestamps, progname and message' do
timestamp = DateTime.new(2020,5,6, 22, 36, 0)
log_line = JobLogger::Formatter.new.call(nil, timestamp, 'progname', 'message')
expect(log_line).to eq("2020-05-06T22:36:00+0000: message\n")
end
end
end
end
|
0e46b47a3053e63f50d6fd90b1ba810e4694c9be
|
blo/__init__.py
|
blo/__init__.py
|
from blo.BloArticle import BloArticle
from blo.DBControl import DBControl
class Blo:
def __init__(self, db_file_path, template_dir=""):
self.template_dir = template_dir
# create tables
self.db_file_path = db_file_path
self.db_control = DBControl(self.db_file_path)
self.db_control.create_tables()
self.db_control.close_connect()
def insert_article(self, file_path):
self.db_control = DBControl(self.db_file_path)
article = BloArticle(self.template_dir)
article.load_from_file(file_path)
self.db_control.insert_article(article)
self.db_control.close_connect()
|
import configparser
from blo.BloArticle import BloArticle
from blo.DBControl import DBControl
class Blo:
def __init__(self, config_file_path):
config = configparser.ConfigParser()
config.read(config_file_path)
self.template_dir = config['TEMPLATE']['TEMPLATE_DIR']
self.db_file_path = config['DB']['DB_PATH']
# create tables
self.db_control = DBControl(self.db_file_path)
self.db_control.create_tables()
self.db_control.close_connect()
def insert_article(self, file_path):
self.db_control = DBControl(self.db_file_path)
article = BloArticle(self.template_dir)
article.load_from_file(file_path)
self.db_control.insert_article(article)
self.db_control.close_connect()
|
Implement system configurations load from file.
|
Implement system configurations load from file.
|
Python
|
mit
|
10nin/blo,10nin/blo
|
python
|
## Code Before:
from blo.BloArticle import BloArticle
from blo.DBControl import DBControl
class Blo:
def __init__(self, db_file_path, template_dir=""):
self.template_dir = template_dir
# create tables
self.db_file_path = db_file_path
self.db_control = DBControl(self.db_file_path)
self.db_control.create_tables()
self.db_control.close_connect()
def insert_article(self, file_path):
self.db_control = DBControl(self.db_file_path)
article = BloArticle(self.template_dir)
article.load_from_file(file_path)
self.db_control.insert_article(article)
self.db_control.close_connect()
## Instruction:
Implement system configurations load from file.
## Code After:
import configparser
from blo.BloArticle import BloArticle
from blo.DBControl import DBControl
class Blo:
def __init__(self, config_file_path):
config = configparser.ConfigParser()
config.read(config_file_path)
self.template_dir = config['TEMPLATE']['TEMPLATE_DIR']
self.db_file_path = config['DB']['DB_PATH']
# create tables
self.db_control = DBControl(self.db_file_path)
self.db_control.create_tables()
self.db_control.close_connect()
def insert_article(self, file_path):
self.db_control = DBControl(self.db_file_path)
article = BloArticle(self.template_dir)
article.load_from_file(file_path)
self.db_control.insert_article(article)
self.db_control.close_connect()
|
d5c2962e329c056dd4ccfd112b66b638c9750aeb
|
src/expressions/path/ContextItemExpression.js
|
src/expressions/path/ContextItemExpression.js
|
import Expression from '../Expression';
import Sequence from '../dataTypes/Sequence';
import Specificity from '../Specificity';
/**
* @extends {Expression}
*/
class ContextItemExpression extends Expression {
constructor () {
super(
new Specificity({}),
[]
);
}
evaluate (dynamicContext, _executionParameters) {
if (dynamicContext.contextItem === null) {
throw new Error('XPDY0002: context is absent, it needs to be present to use the "." operator');
}
return Sequence.singleton(dynamicContext.contextItem);
}
}
export default ContextItemExpression;
|
import Expression from '../Expression';
import Sequence from '../dataTypes/Sequence';
import Specificity from '../Specificity';
/**
* @extends {Expression}
*/
class ContextItemExpression extends Expression {
constructor () {
super(
new Specificity({}),
[],
{
resultOrder: Expression.RESULT_ORDERINGS.SORTED
}
);
}
evaluate (dynamicContext, _executionParameters) {
if (dynamicContext.contextItem === null) {
throw new Error('XPDY0002: context is absent, it needs to be present to use the "." operator');
}
return Sequence.singleton(dynamicContext.contextItem);
}
}
export default ContextItemExpression;
|
Make the context item expression correctly predict the result order
|
Make the context item expression correctly predict the result order
|
JavaScript
|
mit
|
FontoXML/fontoxpath,FontoXML/fontoxpath,FontoXML/fontoxpath
|
javascript
|
## Code Before:
import Expression from '../Expression';
import Sequence from '../dataTypes/Sequence';
import Specificity from '../Specificity';
/**
* @extends {Expression}
*/
class ContextItemExpression extends Expression {
constructor () {
super(
new Specificity({}),
[]
);
}
evaluate (dynamicContext, _executionParameters) {
if (dynamicContext.contextItem === null) {
throw new Error('XPDY0002: context is absent, it needs to be present to use the "." operator');
}
return Sequence.singleton(dynamicContext.contextItem);
}
}
export default ContextItemExpression;
## Instruction:
Make the context item expression correctly predict the result order
## Code After:
import Expression from '../Expression';
import Sequence from '../dataTypes/Sequence';
import Specificity from '../Specificity';
/**
* @extends {Expression}
*/
class ContextItemExpression extends Expression {
constructor () {
super(
new Specificity({}),
[],
{
resultOrder: Expression.RESULT_ORDERINGS.SORTED
}
);
}
evaluate (dynamicContext, _executionParameters) {
if (dynamicContext.contextItem === null) {
throw new Error('XPDY0002: context is absent, it needs to be present to use the "." operator');
}
return Sequence.singleton(dynamicContext.contextItem);
}
}
export default ContextItemExpression;
|
5d48d908595c0f9e57c7b4ef8558b0ad03a627c2
|
db/migrate/20151107105747_create_trends.rb
|
db/migrate/20151107105747_create_trends.rb
|
class CreateTrends < ActiveRecord::Migration
def change
create_table :trends do |t|
t.string :description
t.string :links # link of the feed itself
t.string :titles
t.string :authors
t.string :dates # edited date of the feeed
t.text :contents
t.string :tags
t.string :imgs
t.timestamps null: false
end
end
end
|
class CreateTrends < ActiveRecord::Migration
def change
create_table :trends do |t|
t.string :description
t.string :links # link of the feed itself
t.string :titles
t.string :categories
t.string :authors
t.string :dates # edited date of the feeed
t.text :contents
t.string :tags
t.string :imgs
t.timestamps null: false
end
end
end
|
Add new column "categories" in db
|
Add new column "categories" in db
|
Ruby
|
mit
|
SOA-Upstart4/bnext_service,SOA-Upstart4/bnext_service,SOA-Upstart4/BnextService_Dynamo
|
ruby
|
## Code Before:
class CreateTrends < ActiveRecord::Migration
def change
create_table :trends do |t|
t.string :description
t.string :links # link of the feed itself
t.string :titles
t.string :authors
t.string :dates # edited date of the feeed
t.text :contents
t.string :tags
t.string :imgs
t.timestamps null: false
end
end
end
## Instruction:
Add new column "categories" in db
## Code After:
class CreateTrends < ActiveRecord::Migration
def change
create_table :trends do |t|
t.string :description
t.string :links # link of the feed itself
t.string :titles
t.string :categories
t.string :authors
t.string :dates # edited date of the feeed
t.text :contents
t.string :tags
t.string :imgs
t.timestamps null: false
end
end
end
|
31e9a0e44193bac48eafc722f6d46636a64082b7
|
README.md
|
README.md
|
Like [zeit's list](https://github.com/zeit/micro-list), but for images.
Share you folder(s) of images with a single command.
## Usage
Install it (requires Node v6.0.0 and above)
```
$ npm install -g micro-gallery
```
Run it
```
$ gallery [options] <path>
```
### Options
| Usage | Description | Default value |
| ---------------------- | ----------- | ------------------ |
| -h, --help | Output all available options | - |
| -v, --version | The version tag of the micro-gallery instance on your device | - |
| -p, --port [port] | A custom port on which the app will be running | 3000 |
| -d, --dev | Use development mode. When active assets and template aren't cached | - |
## Contribute
1. [Fork](https://help.github.com/articles/fork-a-repo/) this repository to your own GitHub account and then [clone](https://help.github.com/articles/cloning-a-repository/) it to your local device
2. Uninstall now-serve if it's already installed: `npm uninstall -g micro-gallery`
3. Link it to the global module directory: `npm link`
4. Transpile the source code and watch for changes: `npm start`
|
Like [zeit's serve](https://github.com/zeit/serve), but for images.
Share you folder(s) of images with a single command.
## Usage
Install it (requires Node v6.0.0 and above)
```
$ npm install -g micro-gallery
```
Run it
```
$ gallery [options] <path>
```
### Options
| Usage | Description | Default value |
| ---------------------- | ----------- | ------------------ |
| -h, --help | Output all available options | - |
| -v, --version | The version tag of the micro-gallery instance on your device | - |
| -p, --port [port] | A custom port on which the app will be running | 3000 |
| -d, --dev | Use development mode. When active assets and template aren't cached | - |
## Contribute
1. [Fork](https://help.github.com/articles/fork-a-repo/) this repository to your own GitHub account and then [clone](https://help.github.com/articles/cloning-a-repository/) it to your local device
2. Uninstall now-serve if it's already installed: `npm uninstall -g micro-gallery`
3. Link it to the global module directory: `npm link`
4. Transpile the source code and watch for changes: `npm start`
|
Rename Zeit List -> Zeit Serve
|
Rename Zeit List -> Zeit Serve
|
Markdown
|
mit
|
andreasmcdermott/micro-gallery,andreasmcdermott/micro-gallery
|
markdown
|
## Code Before:
Like [zeit's list](https://github.com/zeit/micro-list), but for images.
Share you folder(s) of images with a single command.
## Usage
Install it (requires Node v6.0.0 and above)
```
$ npm install -g micro-gallery
```
Run it
```
$ gallery [options] <path>
```
### Options
| Usage | Description | Default value |
| ---------------------- | ----------- | ------------------ |
| -h, --help | Output all available options | - |
| -v, --version | The version tag of the micro-gallery instance on your device | - |
| -p, --port [port] | A custom port on which the app will be running | 3000 |
| -d, --dev | Use development mode. When active assets and template aren't cached | - |
## Contribute
1. [Fork](https://help.github.com/articles/fork-a-repo/) this repository to your own GitHub account and then [clone](https://help.github.com/articles/cloning-a-repository/) it to your local device
2. Uninstall now-serve if it's already installed: `npm uninstall -g micro-gallery`
3. Link it to the global module directory: `npm link`
4. Transpile the source code and watch for changes: `npm start`
## Instruction:
Rename Zeit List -> Zeit Serve
## Code After:
Like [zeit's serve](https://github.com/zeit/serve), but for images.
Share you folder(s) of images with a single command.
## Usage
Install it (requires Node v6.0.0 and above)
```
$ npm install -g micro-gallery
```
Run it
```
$ gallery [options] <path>
```
### Options
| Usage | Description | Default value |
| ---------------------- | ----------- | ------------------ |
| -h, --help | Output all available options | - |
| -v, --version | The version tag of the micro-gallery instance on your device | - |
| -p, --port [port] | A custom port on which the app will be running | 3000 |
| -d, --dev | Use development mode. When active assets and template aren't cached | - |
## Contribute
1. [Fork](https://help.github.com/articles/fork-a-repo/) this repository to your own GitHub account and then [clone](https://help.github.com/articles/cloning-a-repository/) it to your local device
2. Uninstall now-serve if it's already installed: `npm uninstall -g micro-gallery`
3. Link it to the global module directory: `npm link`
4. Transpile the source code and watch for changes: `npm start`
|
58fc39ae95522ce152b4ff137071f74c5490e14e
|
chatterbot/constants.py
|
chatterbot/constants.py
|
'''
The maximum length of characters that the text of a statement can contain.
This should be enforced on a per-model basis by the data model for each
storage adapter.
'''
STATEMENT_TEXT_MAX_LENGTH = 400
'''
The maximum length of characters that the text label of a conversation can contain.
The number 32 was chosen because that is the length of the string representation
of a UUID4 with no hyphens.
'''
CONVERSATION_LABEL_MAX_LENGTH = 32
'''
The maximum length of text that can be stored in the persona field of the statement model.
'''
PERSONA_MAX_LENGTH = 50
# The maximum length of characters that the name of a tag can contain
TAG_NAME_MAX_LENGTH = 50
DEFAULT_DJANGO_APP_NAME = 'django_chatterbot'
|
'''
The maximum length of characters that the text of a statement can contain.
The number 255 is used because that is the maximum length of a char field
in most databases. This value should be enforced on a per-model basis by
the data model for each storage adapter.
'''
STATEMENT_TEXT_MAX_LENGTH = 255
'''
The maximum length of characters that the text label of a conversation can contain.
The number 32 was chosen because that is the length of the string representation
of a UUID4 with no hyphens.
'''
CONVERSATION_LABEL_MAX_LENGTH = 32
'''
The maximum length of text that can be stored in the persona field of the statement model.
'''
PERSONA_MAX_LENGTH = 50
# The maximum length of characters that the name of a tag can contain
TAG_NAME_MAX_LENGTH = 50
DEFAULT_DJANGO_APP_NAME = 'django_chatterbot'
|
Change statement text max-length to 255
|
Change statement text max-length to 255
|
Python
|
bsd-3-clause
|
vkosuri/ChatterBot,gunthercox/ChatterBot
|
python
|
## Code Before:
'''
The maximum length of characters that the text of a statement can contain.
This should be enforced on a per-model basis by the data model for each
storage adapter.
'''
STATEMENT_TEXT_MAX_LENGTH = 400
'''
The maximum length of characters that the text label of a conversation can contain.
The number 32 was chosen because that is the length of the string representation
of a UUID4 with no hyphens.
'''
CONVERSATION_LABEL_MAX_LENGTH = 32
'''
The maximum length of text that can be stored in the persona field of the statement model.
'''
PERSONA_MAX_LENGTH = 50
# The maximum length of characters that the name of a tag can contain
TAG_NAME_MAX_LENGTH = 50
DEFAULT_DJANGO_APP_NAME = 'django_chatterbot'
## Instruction:
Change statement text max-length to 255
## Code After:
'''
The maximum length of characters that the text of a statement can contain.
The number 255 is used because that is the maximum length of a char field
in most databases. This value should be enforced on a per-model basis by
the data model for each storage adapter.
'''
STATEMENT_TEXT_MAX_LENGTH = 255
'''
The maximum length of characters that the text label of a conversation can contain.
The number 32 was chosen because that is the length of the string representation
of a UUID4 with no hyphens.
'''
CONVERSATION_LABEL_MAX_LENGTH = 32
'''
The maximum length of text that can be stored in the persona field of the statement model.
'''
PERSONA_MAX_LENGTH = 50
# The maximum length of characters that the name of a tag can contain
TAG_NAME_MAX_LENGTH = 50
DEFAULT_DJANGO_APP_NAME = 'django_chatterbot'
|
b9f5dccdbeb14a229fd14a3211490d83e53f70b8
|
tests/flake-searching.sh
|
tests/flake-searching.sh
|
source common.sh
clearStore
cp ./simple.nix ./simple.builder.sh ./config.nix $TEST_HOME
cd $TEST_HOME
mkdir -p foo/subdir
echo '{ outputs = _: {}; }' > foo/flake.nix
cat <<EOF > flake.nix
{
inputs.foo.url = "$PWD/foo";
outputs = a: {
defaultPackage.$system = import ./simple.nix;
packages.$system.test = import ./simple.nix;
};
}
EOF
mkdir subdir
pushd subdir
for i in "" . .# .#test ../subdir ../subdir#test "$PWD"; do
nix build $i || fail "flake should be found by searching up directories"
done
for i in "path:$PWD"; do
! nix build $i || fail "flake should not search up directories when using 'path:'"
done
popd
nix build --override-input foo . || fail "flake should search up directories when not an installable"
sed "s,$PWD/foo,$PWD/foo/subdir,g" -i flake.nix
! nix build || fail "flake should not search upwards when part of inputs"
|
source common.sh
clearStore
cp ./simple.nix ./simple.builder.sh ./config.nix $TEST_HOME
cd $TEST_HOME
mkdir -p foo/subdir
echo '{ outputs = _: {}; }' > foo/flake.nix
cat <<EOF > flake.nix
{
inputs.foo.url = "$PWD/foo";
outputs = a: {
defaultPackage.$system = import ./simple.nix;
packages.$system.test = import ./simple.nix;
};
}
EOF
mkdir subdir
pushd subdir
success=("" . .# .#test ../subdir ../subdir#test "$PWD")
failure=("path:$PWD")
for i in "${success[@]}"; do
nix build $i || fail "flake should be found by searching up directories"
done
for i in "${failure[@]}"; do
! nix build $i || fail "flake should not search up directories when using 'path:'"
done
popd
nix build --override-input foo . || fail "flake should search up directories when not an installable"
sed "s,$PWD/foo,$PWD/foo/subdir,g" -i flake.nix
! nix build || fail "flake should not search upwards when part of inputs"
pushd subdir
git init
for i in "${success[@]}" "${failure[@]}"; do
! nix build $i || fail "flake should not search past a git repository"
done
rm -rf .git
popd
|
Check that we don't search past a git repo
|
Check that we don't search past a git repo
|
Shell
|
lgpl-2.1
|
NixOS/nix,NixOS/nix,NixOS/nix,rycee/nix,rycee/nix,rycee/nix,rycee/nix,rycee/nix,NixOS/nix,NixOS/nix
|
shell
|
## Code Before:
source common.sh
clearStore
cp ./simple.nix ./simple.builder.sh ./config.nix $TEST_HOME
cd $TEST_HOME
mkdir -p foo/subdir
echo '{ outputs = _: {}; }' > foo/flake.nix
cat <<EOF > flake.nix
{
inputs.foo.url = "$PWD/foo";
outputs = a: {
defaultPackage.$system = import ./simple.nix;
packages.$system.test = import ./simple.nix;
};
}
EOF
mkdir subdir
pushd subdir
for i in "" . .# .#test ../subdir ../subdir#test "$PWD"; do
nix build $i || fail "flake should be found by searching up directories"
done
for i in "path:$PWD"; do
! nix build $i || fail "flake should not search up directories when using 'path:'"
done
popd
nix build --override-input foo . || fail "flake should search up directories when not an installable"
sed "s,$PWD/foo,$PWD/foo/subdir,g" -i flake.nix
! nix build || fail "flake should not search upwards when part of inputs"
## Instruction:
Check that we don't search past a git repo
## Code After:
source common.sh
clearStore
cp ./simple.nix ./simple.builder.sh ./config.nix $TEST_HOME
cd $TEST_HOME
mkdir -p foo/subdir
echo '{ outputs = _: {}; }' > foo/flake.nix
cat <<EOF > flake.nix
{
inputs.foo.url = "$PWD/foo";
outputs = a: {
defaultPackage.$system = import ./simple.nix;
packages.$system.test = import ./simple.nix;
};
}
EOF
mkdir subdir
pushd subdir
success=("" . .# .#test ../subdir ../subdir#test "$PWD")
failure=("path:$PWD")
for i in "${success[@]}"; do
nix build $i || fail "flake should be found by searching up directories"
done
for i in "${failure[@]}"; do
! nix build $i || fail "flake should not search up directories when using 'path:'"
done
popd
nix build --override-input foo . || fail "flake should search up directories when not an installable"
sed "s,$PWD/foo,$PWD/foo/subdir,g" -i flake.nix
! nix build || fail "flake should not search upwards when part of inputs"
pushd subdir
git init
for i in "${success[@]}" "${failure[@]}"; do
! nix build $i || fail "flake should not search past a git repository"
done
rm -rf .git
popd
|
391dc74a28e4935b8b407b2e880d71269fbdbce8
|
lib/utils.js
|
lib/utils.js
|
var spark = require('textspark');
var generateMetricParams = function(namespace, metric, unit, instance_id, dimension, period) {
var endDate = new Date();
var startDate = new Date(endDate);
var durationMinutes = 60;
return {
EndTime: endDate,
MetricName: metric,
Namespace: 'AWS/' + namespace,
Period: period,
StartTime: new Date(startDate.setMinutes(endDate.getMinutes() - durationMinutes)),
Statistics: [ 'Average' ],
Dimensions: [{Name: dimension, Value: instance_id}],
Unit: unit
};
};
module.exports = {
displayMetric: function(aws, bot, channel, namespace, metric, unit, instance_id, dimension, period){
var params = generateMetricParams(namespace, metric, unit, instance_id, dimension, period);
aws.getMetricStatistics(params, function(err, data) {
if (err){
console.log(err);
}
else{
var datapoints = data['Datapoints']
datapoints.sort(function(x, y){
return x.Timestamp - y.Timestamp;
})
var processed_data = [];
datapoints.forEach(function (val, index, array) {
processed_data.push(Number(val['Average']).toFixed(2));
});
bot.postMessage(channel, metric + ": " + spark(processed_data), {as_user: true});
}
});
}
};
|
var spark = require('textspark');
var generateMetricParams = function(namespace, metric, unit, instance_id, dimension, period) {
var endDate = new Date();
var startDate = new Date(endDate);
var durationMinutes = 120;
return {
EndTime: endDate,
MetricName: metric,
Namespace: 'AWS/' + namespace,
Period: period,
StartTime: new Date(startDate.setMinutes(endDate.getMinutes() - durationMinutes)),
Statistics: [ 'Average' ],
Dimensions: [{Name: dimension, Value: instance_id}],
Unit: unit
};
};
module.exports = {
displayMetric: function(aws, bot, channel, namespace, metric, unit, instance_id, dimension, period){
var params = generateMetricParams(namespace, metric, unit, instance_id, dimension, period);
aws.getMetricStatistics(params, function(err, data) {
if (err){
console.log(err);
}
else{
var datapoints = data['Datapoints']
if(datapoints && datapoints.length > 0){
datapoints.sort(function(x, y){
return x.Timestamp - y.Timestamp;
})
var processed_data = [];
datapoints.forEach(function (val, index, array) {
processed_data.push(Number(val['Average']).toFixed(2));
});
bot.postMessage(channel, metric + ": " + spark(processed_data), {as_user: true});
}
else{
bot.postMessage(channel, "Id '" + instance_id + "' not found", {as_user: true});
}
}
});
}
};
|
Increase time range and id filtering
|
Increase time range and id filtering
|
JavaScript
|
mit
|
msempere/hal9001
|
javascript
|
## Code Before:
var spark = require('textspark');
var generateMetricParams = function(namespace, metric, unit, instance_id, dimension, period) {
var endDate = new Date();
var startDate = new Date(endDate);
var durationMinutes = 60;
return {
EndTime: endDate,
MetricName: metric,
Namespace: 'AWS/' + namespace,
Period: period,
StartTime: new Date(startDate.setMinutes(endDate.getMinutes() - durationMinutes)),
Statistics: [ 'Average' ],
Dimensions: [{Name: dimension, Value: instance_id}],
Unit: unit
};
};
module.exports = {
displayMetric: function(aws, bot, channel, namespace, metric, unit, instance_id, dimension, period){
var params = generateMetricParams(namespace, metric, unit, instance_id, dimension, period);
aws.getMetricStatistics(params, function(err, data) {
if (err){
console.log(err);
}
else{
var datapoints = data['Datapoints']
datapoints.sort(function(x, y){
return x.Timestamp - y.Timestamp;
})
var processed_data = [];
datapoints.forEach(function (val, index, array) {
processed_data.push(Number(val['Average']).toFixed(2));
});
bot.postMessage(channel, metric + ": " + spark(processed_data), {as_user: true});
}
});
}
};
## Instruction:
Increase time range and id filtering
## Code After:
var spark = require('textspark');
var generateMetricParams = function(namespace, metric, unit, instance_id, dimension, period) {
var endDate = new Date();
var startDate = new Date(endDate);
var durationMinutes = 120;
return {
EndTime: endDate,
MetricName: metric,
Namespace: 'AWS/' + namespace,
Period: period,
StartTime: new Date(startDate.setMinutes(endDate.getMinutes() - durationMinutes)),
Statistics: [ 'Average' ],
Dimensions: [{Name: dimension, Value: instance_id}],
Unit: unit
};
};
module.exports = {
displayMetric: function(aws, bot, channel, namespace, metric, unit, instance_id, dimension, period){
var params = generateMetricParams(namespace, metric, unit, instance_id, dimension, period);
aws.getMetricStatistics(params, function(err, data) {
if (err){
console.log(err);
}
else{
var datapoints = data['Datapoints']
if(datapoints && datapoints.length > 0){
datapoints.sort(function(x, y){
return x.Timestamp - y.Timestamp;
})
var processed_data = [];
datapoints.forEach(function (val, index, array) {
processed_data.push(Number(val['Average']).toFixed(2));
});
bot.postMessage(channel, metric + ": " + spark(processed_data), {as_user: true});
}
else{
bot.postMessage(channel, "Id '" + instance_id + "' not found", {as_user: true});
}
}
});
}
};
|
3bfd0189e135d14a3da6af7ee26638660dd80b63
|
groker.go
|
groker.go
|
package main
import (
"fmt"
"flag"
"bufio"
"os"
"encoding/json"
"github.com/gemsi/grok"
)
func main() {
pattern := flag.String("pattern", "%{GREEDYDATA:msg}", "a grok expression")
namedcapture := flag.Bool("namedcapture", false, "parse only named captures (default is false)")
flag.Parse()
var g *grok.Grok
if *namedcapture {
g = grok.New(grok.NAMEDCAPTURE)
} else {
g = grok.New();
}
scanner := bufio.NewScanner(os.Stdin)
for scanner.Scan() {
line := scanner.Text()
values, _ := g.Parse(*pattern, line)
delete(values, "")
encoded, _ := json.Marshal(values)
fmt.Println(string(encoded))
}
}
|
package main
import (
"bufio"
"encoding/json"
"flag"
"fmt"
"os"
"github.com/gemsi/grok"
)
func main() {
pattern := flag.String("pattern", "%{GREEDYDATA:msg}", "a grok expression")
namedcapture := flag.Bool("namedcapture", false, "parse only named captures (default is false)")
flag.Parse()
var g *grok.Grok
if *namedcapture {
g = grok.NewWithConfig(&grok.Config{NamedCapturesOnly: true})
} else {
g = grok.New()
}
scanner := bufio.NewScanner(os.Stdin)
for scanner.Scan() {
line := scanner.Text()
values, _ := g.Parse(*pattern, line)
delete(values, "")
encoded, _ := json.Marshal(values)
fmt.Println(string(encoded))
}
}
|
Change to match the gemsi/grok New() usage update
|
Change to match the gemsi/grok New() usage update
|
Go
|
unknown
|
palmerabollo/groker,palmerabollo/grok
|
go
|
## Code Before:
package main
import (
"fmt"
"flag"
"bufio"
"os"
"encoding/json"
"github.com/gemsi/grok"
)
func main() {
pattern := flag.String("pattern", "%{GREEDYDATA:msg}", "a grok expression")
namedcapture := flag.Bool("namedcapture", false, "parse only named captures (default is false)")
flag.Parse()
var g *grok.Grok
if *namedcapture {
g = grok.New(grok.NAMEDCAPTURE)
} else {
g = grok.New();
}
scanner := bufio.NewScanner(os.Stdin)
for scanner.Scan() {
line := scanner.Text()
values, _ := g.Parse(*pattern, line)
delete(values, "")
encoded, _ := json.Marshal(values)
fmt.Println(string(encoded))
}
}
## Instruction:
Change to match the gemsi/grok New() usage update
## Code After:
package main
import (
"bufio"
"encoding/json"
"flag"
"fmt"
"os"
"github.com/gemsi/grok"
)
func main() {
pattern := flag.String("pattern", "%{GREEDYDATA:msg}", "a grok expression")
namedcapture := flag.Bool("namedcapture", false, "parse only named captures (default is false)")
flag.Parse()
var g *grok.Grok
if *namedcapture {
g = grok.NewWithConfig(&grok.Config{NamedCapturesOnly: true})
} else {
g = grok.New()
}
scanner := bufio.NewScanner(os.Stdin)
for scanner.Scan() {
line := scanner.Text()
values, _ := g.Parse(*pattern, line)
delete(values, "")
encoded, _ := json.Marshal(values)
fmt.Println(string(encoded))
}
}
|
4af4cdce9fe118f03fe1f551a0907ecfbff35d98
|
README.md
|
README.md
|
base64-js
=========
`base64-js` does basic base64 encoding/decoding in pure JS.
[](http://travis-ci.org/beatgammit/base64-js)
[](https://ci.testling.com/beatgammit/base64-js)
Many browsers already have base64 encoding/decoding functionality, but it is for text data, not all-purpose binary data.
Sometimes encoding/decoding binary data in the browser is useful, and that is what this module does.
## install
With [npm](https://npmjs.org) do:
`npm install base64-js`
## methods
`var base64 = require('base64-js')`
`base64` has three exposed functions, `byteLength`, `toByteArray` and `fromByteArray`, which both take a single argument.
* `byteLength` - Takes a base64 string and returns length of byte array
* `toByteArray` - Takes a base64 string and returns a byte array
* `fromByteArray` - Takes a byte array and returns a base64 string
## license
MIT
|
base64-js
=========
`base64-js` does basic base64 encoding/decoding in pure JS.
[](http://travis-ci.org/beatgammit/base64-js)
[](https://ci.testling.com/beatgammit/base64-js)
Many browsers already have base64 encoding/decoding functionality, but it is for text data, not all-purpose binary data.
Sometimes encoding/decoding binary data in the browser is useful, and that is what this module does.
## install
With [npm](https://npmjs.org) do:
`npm install base64-js` and `var base64js = require('base64-js')`
For use in web browsers do:
`<script src="base64js.min.js"></script>`
## methods
`base64js` has three exposed functions, `byteLength`, `toByteArray` and `fromByteArray`, which both take a single argument.
* `byteLength` - Takes a base64 string and returns length of byte array
* `toByteArray` - Takes a base64 string and returns a byte array
* `fromByteArray` - Takes a byte array and returns a base64 string
## license
MIT
|
Add getting started notes for use in webbroser
|
Add getting started notes for use in webbroser
|
Markdown
|
mit
|
beatgammit/base64-js
|
markdown
|
## Code Before:
base64-js
=========
`base64-js` does basic base64 encoding/decoding in pure JS.
[](http://travis-ci.org/beatgammit/base64-js)
[](https://ci.testling.com/beatgammit/base64-js)
Many browsers already have base64 encoding/decoding functionality, but it is for text data, not all-purpose binary data.
Sometimes encoding/decoding binary data in the browser is useful, and that is what this module does.
## install
With [npm](https://npmjs.org) do:
`npm install base64-js`
## methods
`var base64 = require('base64-js')`
`base64` has three exposed functions, `byteLength`, `toByteArray` and `fromByteArray`, which both take a single argument.
* `byteLength` - Takes a base64 string and returns length of byte array
* `toByteArray` - Takes a base64 string and returns a byte array
* `fromByteArray` - Takes a byte array and returns a base64 string
## license
MIT
## Instruction:
Add getting started notes for use in webbroser
## Code After:
base64-js
=========
`base64-js` does basic base64 encoding/decoding in pure JS.
[](http://travis-ci.org/beatgammit/base64-js)
[](https://ci.testling.com/beatgammit/base64-js)
Many browsers already have base64 encoding/decoding functionality, but it is for text data, not all-purpose binary data.
Sometimes encoding/decoding binary data in the browser is useful, and that is what this module does.
## install
With [npm](https://npmjs.org) do:
`npm install base64-js` and `var base64js = require('base64-js')`
For use in web browsers do:
`<script src="base64js.min.js"></script>`
## methods
`base64js` has three exposed functions, `byteLength`, `toByteArray` and `fromByteArray`, which both take a single argument.
* `byteLength` - Takes a base64 string and returns length of byte array
* `toByteArray` - Takes a base64 string and returns a byte array
* `fromByteArray` - Takes a byte array and returns a base64 string
## license
MIT
|
d6ec768fa7aee928210503c70eef0ce44a9c497d
|
vendor/stylesheets/prez.scss
|
vendor/stylesheets/prez.scss
|
@import "prez/variables";
body {
margin: 0;
padding: 0;
}
.header {
font-size: 32px;
}
.contact {
font-size: 25px;
}
.url {
color: blue;
}
.gem {
color: #bb0000;
font-weight: bold;
}
.prez-slide {
&, & input {
font-size: 50;
}
display: none;
min-height: $prez-slide-min-height;
padding: $prez-padding;
text-align: center;
&.left-aligned {
text-align: left;
}
&.right-aligned {
text-align: right;
}
.prez-element.hide-style.hidden {
display: none;
}
.prez-element.opacity-style.hidden {
opacity: 0.25;
}
}
.smaller {
font-size: 0.7em;
}
dt {
font-weight: bold;
}
dd {
margin-bottom: 42px;
}
.prez-notes {
display: none;
}
|
@import "prez/variables";
body {
margin: 0;
padding: 0;
}
.header {
font-size: 32px;
}
.contact {
font-size: 25px;
}
.url {
color: blue;
}
.gem {
color: #bb0000;
font-weight: bold;
}
.prez-slide {
&, & input {
font-size: 50;
}
display: none;
min-height: $prez-slide-min-height;
padding: $prez-padding;
text-align: center;
.center-aligned {
text-align: center;
}
&.left-aligned, .left-aligned {
text-align: left;
}
.left-aligned {
padding-left: 5%;
}
&.right-aligned, .right-aligned {
text-align: right;
}
.prez-element.hide-style.hidden {
display: none;
}
.prez-element.opacity-style.hidden {
opacity: 0.25;
}
}
.pre {
font-family: monospace;
font-size: 0.9em;
white-space: pre;
}
.smaller, .smaller.pre {
font-size: 0.7em;
}
.biggest {
font-size: 5.0em;
}
.red-background {
background-color: #ffcccc;
}
.green-background {
background-color: #ccffcc;
}
.blue-background {
background-color: #ccccff;
}
.emphasize {
font-weight: bold;
}
dt {
font-weight: bold;
}
dd {
margin-bottom: 42px;
}
.prez-notes {
display: none;
}
|
Add some more default styling options
|
Add some more default styling options
|
SCSS
|
mit
|
smellsblue/prez
|
scss
|
## Code Before:
@import "prez/variables";
body {
margin: 0;
padding: 0;
}
.header {
font-size: 32px;
}
.contact {
font-size: 25px;
}
.url {
color: blue;
}
.gem {
color: #bb0000;
font-weight: bold;
}
.prez-slide {
&, & input {
font-size: 50;
}
display: none;
min-height: $prez-slide-min-height;
padding: $prez-padding;
text-align: center;
&.left-aligned {
text-align: left;
}
&.right-aligned {
text-align: right;
}
.prez-element.hide-style.hidden {
display: none;
}
.prez-element.opacity-style.hidden {
opacity: 0.25;
}
}
.smaller {
font-size: 0.7em;
}
dt {
font-weight: bold;
}
dd {
margin-bottom: 42px;
}
.prez-notes {
display: none;
}
## Instruction:
Add some more default styling options
## Code After:
@import "prez/variables";
body {
margin: 0;
padding: 0;
}
.header {
font-size: 32px;
}
.contact {
font-size: 25px;
}
.url {
color: blue;
}
.gem {
color: #bb0000;
font-weight: bold;
}
.prez-slide {
&, & input {
font-size: 50;
}
display: none;
min-height: $prez-slide-min-height;
padding: $prez-padding;
text-align: center;
.center-aligned {
text-align: center;
}
&.left-aligned, .left-aligned {
text-align: left;
}
.left-aligned {
padding-left: 5%;
}
&.right-aligned, .right-aligned {
text-align: right;
}
.prez-element.hide-style.hidden {
display: none;
}
.prez-element.opacity-style.hidden {
opacity: 0.25;
}
}
.pre {
font-family: monospace;
font-size: 0.9em;
white-space: pre;
}
.smaller, .smaller.pre {
font-size: 0.7em;
}
.biggest {
font-size: 5.0em;
}
.red-background {
background-color: #ffcccc;
}
.green-background {
background-color: #ccffcc;
}
.blue-background {
background-color: #ccccff;
}
.emphasize {
font-weight: bold;
}
dt {
font-weight: bold;
}
dd {
margin-bottom: 42px;
}
.prez-notes {
display: none;
}
|
f4d42dce73a5d300cf2b87ba5caac9f0b356a3cd
|
index.js
|
index.js
|
// dependencies
var jipics = "http://jipics.net/"
, Request = require("request")
, fs = require("fs")
;
/**
* Upload method
*
* Arguments
* @options: a string representing the image path or an
* object contanining the following fields:
* - path: the path to the image
* - deleteAfterUpload: if true, the image will be deleted after a sucessful upload
*
* */
exports.upload = function (options, callback) {
// get the image from the request
if (typeof options === "string") {
options = {
path: options
}
}
// force options to be an object
options = Object (options);
// validate path
if (!options.path) {
return callback ("The path to the image must be provided.");
}
// upload the image to jipics.net
Request.post(jipics, function (err, res) {
// handle error
if (err) { return callback (err); }
// delete image
if (options.deleteAfterUpload) {
return fs.unlink(absoluteImagePath, callback);
}
callback (null, res);
// create the read stream from image file
}).form().append("image", fs.createReadStream(absoluteImagePath));
};
|
// dependencies
var jipics = "http://jipics.net/"
, Request = require("request")
, fs = require("fs")
;
/**
* Upload method
*
* Arguments
* @options: a string representing the image path or an
* object contanining the following fields:
* - path: the path to the image
* - deleteAfterUpload: if true, the image will be deleted after a sucessful upload
*
* */
exports.upload = function (options, callback) {
// get the image from the request
if (typeof options === "string") {
options = {
path: options
}
}
// force options to be an object
options = Object (options);
// validate path
if (!options.path) {
return callback ("The path to the image must be provided.");
}
// upload the image to jipics.net
Request.post(jipics, function (err, res) {
// handle error
if (err) { return callback (err); }
// delete image
if (options.deleteAfterUpload) {
return fs.unlink(absoluteImagePath, callback);
}
callback (null, res);
// create the read stream from image file
}).form().append("image", fs.createReadStream(options.path));
};
|
Use options.path instead of absoluteImagePath
|
Use options.path instead of absoluteImagePath
|
JavaScript
|
mit
|
jillix/node-jipics
|
javascript
|
## Code Before:
// dependencies
var jipics = "http://jipics.net/"
, Request = require("request")
, fs = require("fs")
;
/**
* Upload method
*
* Arguments
* @options: a string representing the image path or an
* object contanining the following fields:
* - path: the path to the image
* - deleteAfterUpload: if true, the image will be deleted after a sucessful upload
*
* */
exports.upload = function (options, callback) {
// get the image from the request
if (typeof options === "string") {
options = {
path: options
}
}
// force options to be an object
options = Object (options);
// validate path
if (!options.path) {
return callback ("The path to the image must be provided.");
}
// upload the image to jipics.net
Request.post(jipics, function (err, res) {
// handle error
if (err) { return callback (err); }
// delete image
if (options.deleteAfterUpload) {
return fs.unlink(absoluteImagePath, callback);
}
callback (null, res);
// create the read stream from image file
}).form().append("image", fs.createReadStream(absoluteImagePath));
};
## Instruction:
Use options.path instead of absoluteImagePath
## Code After:
// dependencies
var jipics = "http://jipics.net/"
, Request = require("request")
, fs = require("fs")
;
/**
* Upload method
*
* Arguments
* @options: a string representing the image path or an
* object contanining the following fields:
* - path: the path to the image
* - deleteAfterUpload: if true, the image will be deleted after a sucessful upload
*
* */
exports.upload = function (options, callback) {
// get the image from the request
if (typeof options === "string") {
options = {
path: options
}
}
// force options to be an object
options = Object (options);
// validate path
if (!options.path) {
return callback ("The path to the image must be provided.");
}
// upload the image to jipics.net
Request.post(jipics, function (err, res) {
// handle error
if (err) { return callback (err); }
// delete image
if (options.deleteAfterUpload) {
return fs.unlink(absoluteImagePath, callback);
}
callback (null, res);
// create the read stream from image file
}).form().append("image", fs.createReadStream(options.path));
};
|
ba5893b1e25aa45a6ee23894132c658a6eecee9d
|
circle.yml
|
circle.yml
|
general:
branches:
ignore:
- /dev.*/
machine:
environment:
PATH: /opt/local/bin:${PATH}
TINYTDS_VERSION: 2.1.0
ACTIVERECORD_UNITTEST_HOST: localhost
ACTIVERECORD_UNITTEST_DATASERVER: localhost
services:
- docker
dependencies:
override:
- sudo ./test/bin/install-openssl.sh
- openssl version
- sudo ./test/bin/install-freetds.sh
- tsql -C
- rvm-exec 2.2.10 bundle install
- rvm-exec 2.3.8 bundle install
- rvm-exec 2.4.5 bundle install
- rvm-exec 2.5.3 bundle install
database:
override:
- echo "Hello"
post:
- docker info
- ./test/bin/setup.sh
test:
override:
- rvm-exec 2.2.10 bundle exec rake test
- rvm-exec 2.3.8 bundle exec rake test
- rvm-exec 2.4.5 bundle exec rake test
- rvm-exec 2.5.3 bundle exec rake test
|
general:
branches:
ignore:
- /dev.*/
machine:
environment:
PATH: /opt/local/bin:${PATH}
TINYTDS_VERSION: 2.1.0
ACTIVERECORD_UNITTEST_HOST: localhost
ACTIVERECORD_UNITTEST_DATASERVER: localhost
services:
- docker
dependencies:
override:
- sudo ./test/bin/install-openssl.sh
- openssl version
- sudo ./test/bin/install-freetds.sh
- tsql -C
- rvm-exec 2.3.8 bundle install
- rvm-exec 2.4.5 bundle install
- rvm-exec 2.5.3 bundle install
- rvm-exec 2.6.0 bundle install
database:
override:
- echo "Hello"
post:
- docker info
- ./test/bin/setup.sh
test:
override:
- rvm-exec 2.3.8 bundle exec rake test
- rvm-exec 2.4.5 bundle exec rake test
- rvm-exec 2.5.3 bundle exec rake test
- rvm-exec 2.6.0 bundle exec rake test
|
Remove ruby 2.2 in favour of 2.6
|
Remove ruby 2.2 in favour of 2.6
|
YAML
|
mit
|
rails-sqlserver/activerecord-sqlserver-adapter,rails-sqlserver/activerecord-sqlserver-adapter
|
yaml
|
## Code Before:
general:
branches:
ignore:
- /dev.*/
machine:
environment:
PATH: /opt/local/bin:${PATH}
TINYTDS_VERSION: 2.1.0
ACTIVERECORD_UNITTEST_HOST: localhost
ACTIVERECORD_UNITTEST_DATASERVER: localhost
services:
- docker
dependencies:
override:
- sudo ./test/bin/install-openssl.sh
- openssl version
- sudo ./test/bin/install-freetds.sh
- tsql -C
- rvm-exec 2.2.10 bundle install
- rvm-exec 2.3.8 bundle install
- rvm-exec 2.4.5 bundle install
- rvm-exec 2.5.3 bundle install
database:
override:
- echo "Hello"
post:
- docker info
- ./test/bin/setup.sh
test:
override:
- rvm-exec 2.2.10 bundle exec rake test
- rvm-exec 2.3.8 bundle exec rake test
- rvm-exec 2.4.5 bundle exec rake test
- rvm-exec 2.5.3 bundle exec rake test
## Instruction:
Remove ruby 2.2 in favour of 2.6
## Code After:
general:
branches:
ignore:
- /dev.*/
machine:
environment:
PATH: /opt/local/bin:${PATH}
TINYTDS_VERSION: 2.1.0
ACTIVERECORD_UNITTEST_HOST: localhost
ACTIVERECORD_UNITTEST_DATASERVER: localhost
services:
- docker
dependencies:
override:
- sudo ./test/bin/install-openssl.sh
- openssl version
- sudo ./test/bin/install-freetds.sh
- tsql -C
- rvm-exec 2.3.8 bundle install
- rvm-exec 2.4.5 bundle install
- rvm-exec 2.5.3 bundle install
- rvm-exec 2.6.0 bundle install
database:
override:
- echo "Hello"
post:
- docker info
- ./test/bin/setup.sh
test:
override:
- rvm-exec 2.3.8 bundle exec rake test
- rvm-exec 2.4.5 bundle exec rake test
- rvm-exec 2.5.3 bundle exec rake test
- rvm-exec 2.6.0 bundle exec rake test
|
59bbe2b67c0a2cec9e98660ada1e35a26d64b416
|
views/index.jade
|
views/index.jade
|
body(style="text-align:center;")
div(style="height:325px; width:100%;")
button(id="signin", class="btn btn-large btn-block persona-button orange", style="clear:both; max-width:500px; font-size:25px; line-height:1.1; margin:auto;")
span Sign in with Persona
script(src='/lib/jquery.min.js')
script(src="/js/login.js")
|
body(style="text-align:center;")
div(style="height:325px; width:100%;")
button(id="signin", class="btn btn-block persona-button orange", style=" max-width:500px; font-size:25px; color:white; text-shadow:black 0 0 0; border-width:0px; line-height:1.1; margin:auto;")
span Sign in with Persona
script(src='/lib/jquery.min.js')
script(src="/js/login.js")
|
Fix style on login button
|
Fix style on login button
|
Jade
|
mit
|
vladikoff/tincan,rafaelfragosom/tincan,mozilla/tincan,rafaelfragosom/tincan
|
jade
|
## Code Before:
body(style="text-align:center;")
div(style="height:325px; width:100%;")
button(id="signin", class="btn btn-large btn-block persona-button orange", style="clear:both; max-width:500px; font-size:25px; line-height:1.1; margin:auto;")
span Sign in with Persona
script(src='/lib/jquery.min.js')
script(src="/js/login.js")
## Instruction:
Fix style on login button
## Code After:
body(style="text-align:center;")
div(style="height:325px; width:100%;")
button(id="signin", class="btn btn-block persona-button orange", style=" max-width:500px; font-size:25px; color:white; text-shadow:black 0 0 0; border-width:0px; line-height:1.1; margin:auto;")
span Sign in with Persona
script(src='/lib/jquery.min.js')
script(src="/js/login.js")
|
f57802a240ef528b5df1ee5c1dd828fbb5aeb8fd
|
assets/js/index.js
|
assets/js/index.js
|
import Vue from 'vue';
import VueRouter from 'vue-router';
import VueForm from 'vue-form';
import { sync } from 'vuex-router-sync';
import store from './vuex/store.js';
import * as actions from './vuex/actions.js';
import App from './app.vue';
import FeatureList from './components/featurelist.vue';
import FeatureForm from './components/featureform.vue';
Vue.use(VueRouter);
Vue.use(VueForm);
let router = new VueRouter({
linkActiveClass: 'active'
});
/* sync route info to store */
sync(store, router);
router.map({
'/list': {
name: 'home'
},
'/list/:page': {
component: FeatureList,
name: 'list-all'
},
'/new': {
component: FeatureForm,
name: 'new-feature'
}
});
/* Bootstrap the application */
router.start({
template: '<div><app></app></div>',
store,
components: { App },
vuex: {
actions
},
compiled() {
this.fetchFeatures();
this.fetchClients();
this.fetchProductAreas();
}
}, '#app');
router.redirect({
'*': '/list/1'
});
router.alias({
'/list': '/list/1'
});
|
import Vue from 'vue';
import VueRouter from 'vue-router';
import VueForm from 'vue-form';
import { sync } from 'vuex-router-sync';
import store from './vuex/store.js';
import * as actions from './vuex/actions.js';
import App from './app.vue';
import FeatureList from './components/featurelist.vue';
import FeatureForm from './components/featureform.vue';
Vue.use(VueRouter);
Vue.use(VueForm);
let router = new VueRouter({
linkActiveClass: 'active'
});
/* sync route info to store */
sync(store, router);
router.map({
'/list': {
name: 'home'
},
'/list/:page': {
component: FeatureList,
name: 'list-all'
},
'/new': {
component: FeatureForm,
name: 'new-feature'
}
});
router.redirect({
'*': '/list/1'
});
router.alias({
'/list': '/list/1'
});
/* Bootstrap the application */
router.start({
template: '<div><app></app></div>',
store,
components: { App },
vuex: {
actions
},
compiled() {
this.fetchFeatures();
this.fetchClients();
this.fetchProductAreas();
}
}, '#app');
|
Set redirect and alias config before starting app
|
Set redirect and alias config before starting app
|
JavaScript
|
mit
|
wkevina/feature-requests-app,wkevina/feature-requests-app,wkevina/feature-requests-app
|
javascript
|
## Code Before:
import Vue from 'vue';
import VueRouter from 'vue-router';
import VueForm from 'vue-form';
import { sync } from 'vuex-router-sync';
import store from './vuex/store.js';
import * as actions from './vuex/actions.js';
import App from './app.vue';
import FeatureList from './components/featurelist.vue';
import FeatureForm from './components/featureform.vue';
Vue.use(VueRouter);
Vue.use(VueForm);
let router = new VueRouter({
linkActiveClass: 'active'
});
/* sync route info to store */
sync(store, router);
router.map({
'/list': {
name: 'home'
},
'/list/:page': {
component: FeatureList,
name: 'list-all'
},
'/new': {
component: FeatureForm,
name: 'new-feature'
}
});
/* Bootstrap the application */
router.start({
template: '<div><app></app></div>',
store,
components: { App },
vuex: {
actions
},
compiled() {
this.fetchFeatures();
this.fetchClients();
this.fetchProductAreas();
}
}, '#app');
router.redirect({
'*': '/list/1'
});
router.alias({
'/list': '/list/1'
});
## Instruction:
Set redirect and alias config before starting app
## Code After:
import Vue from 'vue';
import VueRouter from 'vue-router';
import VueForm from 'vue-form';
import { sync } from 'vuex-router-sync';
import store from './vuex/store.js';
import * as actions from './vuex/actions.js';
import App from './app.vue';
import FeatureList from './components/featurelist.vue';
import FeatureForm from './components/featureform.vue';
Vue.use(VueRouter);
Vue.use(VueForm);
let router = new VueRouter({
linkActiveClass: 'active'
});
/* sync route info to store */
sync(store, router);
router.map({
'/list': {
name: 'home'
},
'/list/:page': {
component: FeatureList,
name: 'list-all'
},
'/new': {
component: FeatureForm,
name: 'new-feature'
}
});
router.redirect({
'*': '/list/1'
});
router.alias({
'/list': '/list/1'
});
/* Bootstrap the application */
router.start({
template: '<div><app></app></div>',
store,
components: { App },
vuex: {
actions
},
compiled() {
this.fetchFeatures();
this.fetchClients();
this.fetchProductAreas();
}
}, '#app');
|
44a4dfb6b5535c910a5e66a52061c662bf391a69
|
src/main/java/com/github/jmchilton/blend4j/galaxy/beans/HistoryDetails.java
|
src/main/java/com/github/jmchilton/blend4j/galaxy/beans/HistoryDetails.java
|
package com.github.jmchilton.blend4j.galaxy.beans;
import org.codehaus.jackson.annotate.JsonIgnoreProperties;
@JsonIgnoreProperties(ignoreUnknown=true)
public class HistoryDetails extends History {
private String state;
public String getState() {
return state;
}
public void setState(String state) {
this.state = state;
}
}
|
package com.github.jmchilton.blend4j.galaxy.beans;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.codehaus.jackson.annotate.JsonIgnoreProperties;
import org.codehaus.jackson.annotate.JsonProperty;
@JsonIgnoreProperties(ignoreUnknown=true)
public class HistoryDetails extends History {
private String state;
private Map<String, List<String>> stateIds = new HashMap<String, List<String>>();
public String getState() {
return state;
}
public void setState(String state) {
this.state = state;
}
@JsonProperty("state_ids")
public void setStateIds(final Map<String, List<String>> stateIds) {
this.stateIds = stateIds;
}
public Map<String, List<String>> getStateIds() {
return stateIds;
}
}
|
Add property to get state map from histories, figure out which HDAs are in what state - ok, failed, etc....
|
Add property to get state map from histories, figure out which HDAs are in what state - ok, failed, etc....
|
Java
|
epl-1.0
|
jmchilton/blend4j,apetkau/blend4j,greenwoodma/blend4j,apetkau/blend4j,biologghe/blend4j,greenwoodma/blend4j,jmchilton/blend4j
|
java
|
## Code Before:
package com.github.jmchilton.blend4j.galaxy.beans;
import org.codehaus.jackson.annotate.JsonIgnoreProperties;
@JsonIgnoreProperties(ignoreUnknown=true)
public class HistoryDetails extends History {
private String state;
public String getState() {
return state;
}
public void setState(String state) {
this.state = state;
}
}
## Instruction:
Add property to get state map from histories, figure out which HDAs are in what state - ok, failed, etc....
## Code After:
package com.github.jmchilton.blend4j.galaxy.beans;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.codehaus.jackson.annotate.JsonIgnoreProperties;
import org.codehaus.jackson.annotate.JsonProperty;
@JsonIgnoreProperties(ignoreUnknown=true)
public class HistoryDetails extends History {
private String state;
private Map<String, List<String>> stateIds = new HashMap<String, List<String>>();
public String getState() {
return state;
}
public void setState(String state) {
this.state = state;
}
@JsonProperty("state_ids")
public void setStateIds(final Map<String, List<String>> stateIds) {
this.stateIds = stateIds;
}
public Map<String, List<String>> getStateIds() {
return stateIds;
}
}
|
2c513c5d410e63da3f39ca9a05747da4dd3690c3
|
examples/js/dom.js
|
examples/js/dom.js
|
var image = new Image();
image.src = "img/BlueMarbleNasa.png";
// create shatter object after image has loaded
image.addEventListener("load", function() {
var div = document.querySelectorAll('.shatter');
var shatter = new Shatter(image, 14, 1.5);
// adjustment to center image on screen
var adjustment = (window.innerWidth / 2) - image.width / 2;
// loop through images in shatter object and insert into
// dom at correct position
for (var i = 0; i < shatter.images.length; i++) {
shatter.images[i][0].style.position = 'absolute';
shatter.images[i][0].style.left = shatter.images[i][1][0] + adjustment + 'px';
shatter.images[i][0].style.top = shatter.images[i][1][1] + 75 + 'px';
div[0].appendChild(shatter.images[i][0]);
}
// wait a bit to add dom gravity
window.setTimeout(function() {
$('body').jGravity({
target: 'everything',
ignoreClass: 'ignoreMe',
weight: 25,
depth: 5,
drag: true
});
}, 1000);
}, false);
|
var image = new Image();
image.src = "img/BlueMarbleNasa.png";
// create shatter object after image has loaded
image.addEventListener("load", function() {
var div = document.querySelectorAll('.shatter');
var shatter = new Shatter(image, 14, 1.5);
// adjustment to center image on screen
var adjustment = (window.innerWidth / 2) - image.width / 2;
// loop through images in shatter object and insert into
// dom at correct position
for (var i = 0; i < shatter.images.length; i++) {
shatter.images[i].image.style.position = 'absolute';
shatter.images[i].image.style.left = shatter.images[i].x + adjustment + 'px';
shatter.images[i].image.style.top = shatter.images[i].y + 75 + 'px';
div[0].appendChild(shatter.images[i].image);
}
// wait a bit to add dom gravity
window.setTimeout(function() {
$('body').jGravity({
target: 'everything',
ignoreClass: 'ignoreMe',
weight: 25,
depth: 5,
drag: true
});
}, 1000);
}, false);
|
Fix DOM example after breaking change to Shatter images array
|
Fix DOM example after breaking change to Shatter images array
|
JavaScript
|
mit
|
cdgugler/shatter.js,cdgugler/shatter.js
|
javascript
|
## Code Before:
var image = new Image();
image.src = "img/BlueMarbleNasa.png";
// create shatter object after image has loaded
image.addEventListener("load", function() {
var div = document.querySelectorAll('.shatter');
var shatter = new Shatter(image, 14, 1.5);
// adjustment to center image on screen
var adjustment = (window.innerWidth / 2) - image.width / 2;
// loop through images in shatter object and insert into
// dom at correct position
for (var i = 0; i < shatter.images.length; i++) {
shatter.images[i][0].style.position = 'absolute';
shatter.images[i][0].style.left = shatter.images[i][1][0] + adjustment + 'px';
shatter.images[i][0].style.top = shatter.images[i][1][1] + 75 + 'px';
div[0].appendChild(shatter.images[i][0]);
}
// wait a bit to add dom gravity
window.setTimeout(function() {
$('body').jGravity({
target: 'everything',
ignoreClass: 'ignoreMe',
weight: 25,
depth: 5,
drag: true
});
}, 1000);
}, false);
## Instruction:
Fix DOM example after breaking change to Shatter images array
## Code After:
var image = new Image();
image.src = "img/BlueMarbleNasa.png";
// create shatter object after image has loaded
image.addEventListener("load", function() {
var div = document.querySelectorAll('.shatter');
var shatter = new Shatter(image, 14, 1.5);
// adjustment to center image on screen
var adjustment = (window.innerWidth / 2) - image.width / 2;
// loop through images in shatter object and insert into
// dom at correct position
for (var i = 0; i < shatter.images.length; i++) {
shatter.images[i].image.style.position = 'absolute';
shatter.images[i].image.style.left = shatter.images[i].x + adjustment + 'px';
shatter.images[i].image.style.top = shatter.images[i].y + 75 + 'px';
div[0].appendChild(shatter.images[i].image);
}
// wait a bit to add dom gravity
window.setTimeout(function() {
$('body').jGravity({
target: 'everything',
ignoreClass: 'ignoreMe',
weight: 25,
depth: 5,
drag: true
});
}, 1000);
}, false);
|
de86e6aae62be31a949ccbfcd2849103b9e813e9
|
tasks/build-bundle/run.sh
|
tasks/build-bundle/run.sh
|
set -ex
lattice_release_version=$(git -C lattice-release describe --tags --always)
vagrant_box_version=$(cat vagrant-box-version/number)
lattice_tgz_url=$(cat lattice-tgz/url)
output_dir=lattice-bundle-$lattice_release_version
mkdir -p $output_dir/{vagrant,terraform}
box_version_filter="s/config\.vm\.box_version = '0'/config.vm.box_version = '$vagrant_box_version'/"
vagrantfile=$(sed "$box_version_filter" lattice-release/vagrant/Vagrantfile)
echo "LATTICE_TGZ_URL = '$lattice_tgz_url'\n$vagrantfile" > $output_dir/vagrant/Vagrantfile
cp -r lattice-release/terraform/aws $output_dir/terraform/
filter='{"variables": (.variables + {"lattice_tgz_url": {"default": "'"$lattice_tgz_url"'"}})}'
jq "$filter" terraform-ami-metadata/ami-metadata-v* > $output_dir/terraform/aws/lattice.tf.json
zip -r ${output_dir}.zip "$output_dir"
|
set -ex
lattice_release_version=$(git -C lattice-release describe --tags --always)
vagrant_box_version=$(cat vagrant-box-version/number)
lattice_tgz_url=$(cat lattice-tgz/url)
output_dir=lattice-bundle-$lattice_release_version
mkdir -p $output_dir/{vagrant,terraform}
box_version_filter="s/config\.vm\.box_version = '0'/config.vm.box_version = '$vagrant_box_version'/"
echo "LATTICE_TGZ_URL = '$lattice_tgz_url'" > $output_dir/vagrant/Vagrantfile
sed "$box_version_filter" lattice-release/vagrant/Vagrantfile >> $output_dir/vagrant/Vagrantfile
cp -r lattice-release/terraform/aws $output_dir/terraform/
filter='{"variables": (.variables + {"lattice_tgz_url": {"default": "'"$lattice_tgz_url"'"}})}'
jq "$filter" terraform-ami-metadata/ami-metadata-v* > $output_dir/terraform/aws/lattice.tf.json
zip -r ${output_dir}.zip "$output_dir"
|
Fix Vagrantfile lattice.tgz url branding
|
Fix Vagrantfile lattice.tgz url branding
[#104919732]
Signed-off-by: Stephen Levine <[email protected]>
|
Shell
|
apache-2.0
|
cloudfoundry-incubator/lattice-ci,cloudfoundry-incubator/lattice-ci,cloudfoundry-incubator/lattice-ci
|
shell
|
## Code Before:
set -ex
lattice_release_version=$(git -C lattice-release describe --tags --always)
vagrant_box_version=$(cat vagrant-box-version/number)
lattice_tgz_url=$(cat lattice-tgz/url)
output_dir=lattice-bundle-$lattice_release_version
mkdir -p $output_dir/{vagrant,terraform}
box_version_filter="s/config\.vm\.box_version = '0'/config.vm.box_version = '$vagrant_box_version'/"
vagrantfile=$(sed "$box_version_filter" lattice-release/vagrant/Vagrantfile)
echo "LATTICE_TGZ_URL = '$lattice_tgz_url'\n$vagrantfile" > $output_dir/vagrant/Vagrantfile
cp -r lattice-release/terraform/aws $output_dir/terraform/
filter='{"variables": (.variables + {"lattice_tgz_url": {"default": "'"$lattice_tgz_url"'"}})}'
jq "$filter" terraform-ami-metadata/ami-metadata-v* > $output_dir/terraform/aws/lattice.tf.json
zip -r ${output_dir}.zip "$output_dir"
## Instruction:
Fix Vagrantfile lattice.tgz url branding
[#104919732]
Signed-off-by: Stephen Levine <[email protected]>
## Code After:
set -ex
lattice_release_version=$(git -C lattice-release describe --tags --always)
vagrant_box_version=$(cat vagrant-box-version/number)
lattice_tgz_url=$(cat lattice-tgz/url)
output_dir=lattice-bundle-$lattice_release_version
mkdir -p $output_dir/{vagrant,terraform}
box_version_filter="s/config\.vm\.box_version = '0'/config.vm.box_version = '$vagrant_box_version'/"
echo "LATTICE_TGZ_URL = '$lattice_tgz_url'" > $output_dir/vagrant/Vagrantfile
sed "$box_version_filter" lattice-release/vagrant/Vagrantfile >> $output_dir/vagrant/Vagrantfile
cp -r lattice-release/terraform/aws $output_dir/terraform/
filter='{"variables": (.variables + {"lattice_tgz_url": {"default": "'"$lattice_tgz_url"'"}})}'
jq "$filter" terraform-ami-metadata/ami-metadata-v* > $output_dir/terraform/aws/lattice.tf.json
zip -r ${output_dir}.zip "$output_dir"
|
53e8165b77f4686353a78a77a089a9bef3620387
|
buildout.cfg
|
buildout.cfg
|
[buildout]
parts = django
find-links = http://bitbucket.org/ubernostrum/django-registration/downloads/django-registration-0.8-alpha-1.tar.gz
unzip = true
eggs = pkginfo
django-registration==0.8-alpha-1
[django]
recipe = djangorecipe
version = 1.1.1
settings = settings
eggs = ${buildout:eggs}
test = djangopypi
project = chishop
wsgi = true
|
[buildout]
parts = django
find-links = http://bitbucket.org/ubernostrum/django-registration/downloads/django-registration-0.8-alpha-1.tar.gz
unzip = true
eggs = pkginfo
django-registration==0.8-alpha-1
[django]
recipe = djangorecipe
version = 1.1.1
settings = development
eggs = ${buildout:eggs}
test = djangopypi
project = chishop
wsgi = true
|
Use development settings by default
|
Use development settings by default
|
INI
|
bsd-3-clause
|
popen2/djangopypi2,EightMedia/djangopypi,hsmade/djangopypi2,disqus/djangopypi,pitrho/djangopypi2,hsmade/djangopypi2,benliles/djangopypi,mattcaldwell/djangopypi,disqus/djangopypi,popen2/djangopypi2,EightMedia/djangopypi,pitrho/djangopypi2,ask/chishop
|
ini
|
## Code Before:
[buildout]
parts = django
find-links = http://bitbucket.org/ubernostrum/django-registration/downloads/django-registration-0.8-alpha-1.tar.gz
unzip = true
eggs = pkginfo
django-registration==0.8-alpha-1
[django]
recipe = djangorecipe
version = 1.1.1
settings = settings
eggs = ${buildout:eggs}
test = djangopypi
project = chishop
wsgi = true
## Instruction:
Use development settings by default
## Code After:
[buildout]
parts = django
find-links = http://bitbucket.org/ubernostrum/django-registration/downloads/django-registration-0.8-alpha-1.tar.gz
unzip = true
eggs = pkginfo
django-registration==0.8-alpha-1
[django]
recipe = djangorecipe
version = 1.1.1
settings = development
eggs = ${buildout:eggs}
test = djangopypi
project = chishop
wsgi = true
|
86eac8b3f0ab35a714600e42c58993ae334faf55
|
spotify-to-mp3.gemspec
|
spotify-to-mp3.gemspec
|
Gem::Specification.new do |gem|
gem.name = 'spotify-to-mp3'
gem.summary = 'Spotify to MP3'
gem.description = 'Download MP3 files of your Spotify tracks from Grooveshark'
gem.version = '0.7.1'
gem.author = 'Francesc Rosàs'
gem.email = '[email protected]'
gem.homepage = 'https://github.com/frosas/spotify-to-mp3'
gem.license = 'MIT'
gem.add_runtime_dependency 'rspotify', '~> 1.11.0'
gem.add_runtime_dependency 'grooveshark', '~> 0.2.12'
gem.add_runtime_dependency 'colorize', '~> 0.7.5'
gem.add_runtime_dependency 'ruby-progressbar', '~> 1.7.1'
gem.add_development_dependency 'rspec', '~> 2.14.1'
gem.files = `git ls-files`.split("\n")
gem.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
gem.require_paths = ['lib']
end
|
Gem::Specification.new do |gem|
gem.name = 'spotify-to-mp3'
gem.summary = 'Spotify to MP3'
gem.description = 'Download MP3 files of your Spotify tracks from Grooveshark'
gem.version = '0.7.1'
gem.author = 'Francesc Rosàs'
gem.email = '[email protected]'
gem.homepage = 'https://github.com/frosas/spotify-to-mp3'
gem.license = 'MIT'
gem.add_runtime_dependency 'rspotify', '~> 1.11', '>= 1.11.0'
gem.add_runtime_dependency 'grooveshark', '~> 0.2.12'
gem.add_runtime_dependency 'colorize', '~> 0.7.5'
gem.add_runtime_dependency 'ruby-progressbar', '~> 1.7', '>= 1.7.1'
gem.add_development_dependency 'rspec', '~> 2.14', '>= 2.14.1'
gem.files = `git ls-files`.split("\n")
gem.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
gem.require_paths = ['lib']
end
|
Fix "pessimistic dependency on ..." warnings
|
Fix "pessimistic dependency on ..." warnings
|
Ruby
|
mit
|
Morl99/spotify-to-mp3,frosas/spotify-to-mp3
|
ruby
|
## Code Before:
Gem::Specification.new do |gem|
gem.name = 'spotify-to-mp3'
gem.summary = 'Spotify to MP3'
gem.description = 'Download MP3 files of your Spotify tracks from Grooveshark'
gem.version = '0.7.1'
gem.author = 'Francesc Rosàs'
gem.email = '[email protected]'
gem.homepage = 'https://github.com/frosas/spotify-to-mp3'
gem.license = 'MIT'
gem.add_runtime_dependency 'rspotify', '~> 1.11.0'
gem.add_runtime_dependency 'grooveshark', '~> 0.2.12'
gem.add_runtime_dependency 'colorize', '~> 0.7.5'
gem.add_runtime_dependency 'ruby-progressbar', '~> 1.7.1'
gem.add_development_dependency 'rspec', '~> 2.14.1'
gem.files = `git ls-files`.split("\n")
gem.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
gem.require_paths = ['lib']
end
## Instruction:
Fix "pessimistic dependency on ..." warnings
## Code After:
Gem::Specification.new do |gem|
gem.name = 'spotify-to-mp3'
gem.summary = 'Spotify to MP3'
gem.description = 'Download MP3 files of your Spotify tracks from Grooveshark'
gem.version = '0.7.1'
gem.author = 'Francesc Rosàs'
gem.email = '[email protected]'
gem.homepage = 'https://github.com/frosas/spotify-to-mp3'
gem.license = 'MIT'
gem.add_runtime_dependency 'rspotify', '~> 1.11', '>= 1.11.0'
gem.add_runtime_dependency 'grooveshark', '~> 0.2.12'
gem.add_runtime_dependency 'colorize', '~> 0.7.5'
gem.add_runtime_dependency 'ruby-progressbar', '~> 1.7', '>= 1.7.1'
gem.add_development_dependency 'rspec', '~> 2.14', '>= 2.14.1'
gem.files = `git ls-files`.split("\n")
gem.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
gem.require_paths = ['lib']
end
|
014cafa3a222eff662e95e7519170e514c5ec4ec
|
lib/command.coffee
|
lib/command.coffee
|
js2coffee = require('./js2coffee')
_ = require('underscore')
fs = require('fs')
path = require('path')
UnsupportedError = js2coffee.UnsupportedError
basename = path.basename
cmd = basename(process.argv[1])
build_and_show = (fname) ->
contents = fs.readFileSync(fname, 'utf-8')
output = js2coffee.build(contents)
console.log "%s", output
runFiles = (proc) ->
files = process.argv.slice(2)
work = proc or build_and_show
try
work '/dev/stdin'
catch e
throw e unless e.code == 'EAGAIN'
if files.length == 0
console.warn "Usage:"
console.warn " #{cmd} file.js"
console.warn " #{cmd} file.js > output.txt"
console.warn " cat file.js | #{cmd}"
process.exit 1
_.each files, (fname) -> work fname
module.exports =
run: (args...) ->
try
runFiles.apply this, args
catch e
throw e unless e.constructor in [UnsupportedError, SyntaxError]
console.warn "Error: #{e.message}"
console.warn "Cursor position: #{e.cursor}"
|
js2coffee = require('./js2coffee')
_ = require('underscore')
fs = require('fs')
path = require('path')
tty = require('tty')
UnsupportedError = js2coffee.UnsupportedError
basename = path.basename
cmd = basename(process.argv[1])
build_and_show = (fname) ->
contents = fs.readFileSync(fname, 'utf-8')
output = js2coffee.build(contents)
console.log "%s", output
runFiles = (proc) ->
files = process.argv.slice(2)
work = proc or build_and_show
if tty.isatty process.stdin
# Nothing on stdin.
if files.length == 0
console.warn "Usage:"
console.warn " #{cmd} file.js"
console.warn " #{cmd} file.js > output.txt"
console.warn " cat file.js | #{cmd}"
process.exit 1
_.each files, (fname) -> work fname
else
# Something was piped or redirected into stdin; use that instead of filenames.
work '/dev/stdin'
module.exports =
run: (args...) ->
try
runFiles.apply this, args
catch e
throw e unless e.constructor in [UnsupportedError, SyntaxError]
console.warn "Error: #{e.message}"
console.warn "Cursor position: #{e.cursor}"
|
Fix stdin probing on Linux
|
Fix stdin probing on Linux
Fixes #54
Since linux doesn't throw EAGAIN when stdin is not ready,
we can instead probe to see if stdin is a not a tty (has a pipe).
When there is nothing on stdin and no files are given, print the
usage instructions.
|
CoffeeScript
|
mit
|
coffee-js/js2coffee
|
coffeescript
|
## Code Before:
js2coffee = require('./js2coffee')
_ = require('underscore')
fs = require('fs')
path = require('path')
UnsupportedError = js2coffee.UnsupportedError
basename = path.basename
cmd = basename(process.argv[1])
build_and_show = (fname) ->
contents = fs.readFileSync(fname, 'utf-8')
output = js2coffee.build(contents)
console.log "%s", output
runFiles = (proc) ->
files = process.argv.slice(2)
work = proc or build_and_show
try
work '/dev/stdin'
catch e
throw e unless e.code == 'EAGAIN'
if files.length == 0
console.warn "Usage:"
console.warn " #{cmd} file.js"
console.warn " #{cmd} file.js > output.txt"
console.warn " cat file.js | #{cmd}"
process.exit 1
_.each files, (fname) -> work fname
module.exports =
run: (args...) ->
try
runFiles.apply this, args
catch e
throw e unless e.constructor in [UnsupportedError, SyntaxError]
console.warn "Error: #{e.message}"
console.warn "Cursor position: #{e.cursor}"
## Instruction:
Fix stdin probing on Linux
Fixes #54
Since linux doesn't throw EAGAIN when stdin is not ready,
we can instead probe to see if stdin is a not a tty (has a pipe).
When there is nothing on stdin and no files are given, print the
usage instructions.
## Code After:
js2coffee = require('./js2coffee')
_ = require('underscore')
fs = require('fs')
path = require('path')
tty = require('tty')
UnsupportedError = js2coffee.UnsupportedError
basename = path.basename
cmd = basename(process.argv[1])
build_and_show = (fname) ->
contents = fs.readFileSync(fname, 'utf-8')
output = js2coffee.build(contents)
console.log "%s", output
runFiles = (proc) ->
files = process.argv.slice(2)
work = proc or build_and_show
if tty.isatty process.stdin
# Nothing on stdin.
if files.length == 0
console.warn "Usage:"
console.warn " #{cmd} file.js"
console.warn " #{cmd} file.js > output.txt"
console.warn " cat file.js | #{cmd}"
process.exit 1
_.each files, (fname) -> work fname
else
# Something was piped or redirected into stdin; use that instead of filenames.
work '/dev/stdin'
module.exports =
run: (args...) ->
try
runFiles.apply this, args
catch e
throw e unless e.constructor in [UnsupportedError, SyntaxError]
console.warn "Error: #{e.message}"
console.warn "Cursor position: #{e.cursor}"
|
3bd0e3a0ae27d078b4887ac60353a703a36aa555
|
web_app/views/partials/home.jade
|
web_app/views/partials/home.jade
|
div(class="row")
div(class="col-md-10 col-md-offset-1")
form
div(class="form-group")
h3 Search
input(ng-model="searchInput", class="form-control", type="text", placeholder="song, album, or artist name...")
div(class="row")
fl-loading(data="SpotifySearch.status", template="search/loading.html")
fl-error(data="SpotifySearch.status", template="search/error.html")
div(ng-if="!SpotifySearch.status.loading && !SpotifySearch.status.error", class="row")
div(class="col-md-10 col-md-offset-1")
div(class="row")
div(ng-repeat="r in SpotifySearch.results", class="col-md-6 search-result")
h4(class="track truncate") {{ r.name }}
p(class="artist truncate") Artist:
a(ng-href="/artist/{{ r.artists[0].href }}") {{ r.artists[0].name }}
p(class="album truncate") Album:
a(ng-href="/album/{{ r.album.href }}") {{ r.album.name }}
p(class="year") Year: {{ r.album.released }}
div(class="buttons btn-toolbar")
a(ng-click="Jukebox.play(r.href)", class="btn btn-small btn-success") add to queue
|
div(class="row")
div(class="col-md-10 col-md-offset-1")
form
div(class="form-group")
h3 Search
input(ng-model="searchInput", class="form-control", type="text", placeholder="song, album, or artist name...")
div(class="row")
div(class="col-md-10 col-md-offset-1")
fl-loading(data="SpotifySearch.status", template="search/loading.html")
fl-error(data="SpotifySearch.status", template="search/error.html")
div(ng-if="!SpotifySearch.status.loading && !SpotifySearch.status.error", class="row")
div(class="col-md-10 col-md-offset-1")
div(class="row")
div(ng-repeat="r in SpotifySearch.results", class="col-md-6 search-result")
h4(class="track truncate") {{ r.name }}
p(class="artist truncate") Artist:
a(ng-href="/artist/{{ r.artists[0].href }}") {{ r.artists[0].name }}
p(class="album truncate") Album:
a(ng-href="/album/{{ r.album.href }}") {{ r.album.name }}
p(class="year") Year: {{ r.album.released }}
div(class="buttons btn-toolbar")
a(ng-click="Jukebox.play(r.href)", class="btn btn-small btn-success") add to queue
|
Apply column div to restrict width
|
Apply column div to restrict width
|
Jade
|
mit
|
projectweekend/Pi-Jukebox,projectweekend/Pi-Jukebox,projectweekend/Pi-Jukebox
|
jade
|
## Code Before:
div(class="row")
div(class="col-md-10 col-md-offset-1")
form
div(class="form-group")
h3 Search
input(ng-model="searchInput", class="form-control", type="text", placeholder="song, album, or artist name...")
div(class="row")
fl-loading(data="SpotifySearch.status", template="search/loading.html")
fl-error(data="SpotifySearch.status", template="search/error.html")
div(ng-if="!SpotifySearch.status.loading && !SpotifySearch.status.error", class="row")
div(class="col-md-10 col-md-offset-1")
div(class="row")
div(ng-repeat="r in SpotifySearch.results", class="col-md-6 search-result")
h4(class="track truncate") {{ r.name }}
p(class="artist truncate") Artist:
a(ng-href="/artist/{{ r.artists[0].href }}") {{ r.artists[0].name }}
p(class="album truncate") Album:
a(ng-href="/album/{{ r.album.href }}") {{ r.album.name }}
p(class="year") Year: {{ r.album.released }}
div(class="buttons btn-toolbar")
a(ng-click="Jukebox.play(r.href)", class="btn btn-small btn-success") add to queue
## Instruction:
Apply column div to restrict width
## Code After:
div(class="row")
div(class="col-md-10 col-md-offset-1")
form
div(class="form-group")
h3 Search
input(ng-model="searchInput", class="form-control", type="text", placeholder="song, album, or artist name...")
div(class="row")
div(class="col-md-10 col-md-offset-1")
fl-loading(data="SpotifySearch.status", template="search/loading.html")
fl-error(data="SpotifySearch.status", template="search/error.html")
div(ng-if="!SpotifySearch.status.loading && !SpotifySearch.status.error", class="row")
div(class="col-md-10 col-md-offset-1")
div(class="row")
div(ng-repeat="r in SpotifySearch.results", class="col-md-6 search-result")
h4(class="track truncate") {{ r.name }}
p(class="artist truncate") Artist:
a(ng-href="/artist/{{ r.artists[0].href }}") {{ r.artists[0].name }}
p(class="album truncate") Album:
a(ng-href="/album/{{ r.album.href }}") {{ r.album.name }}
p(class="year") Year: {{ r.album.released }}
div(class="buttons btn-toolbar")
a(ng-click="Jukebox.play(r.href)", class="btn btn-small btn-success") add to queue
|
0b7060d48b2b1cb4b18c3288d65d8bc9cbc027a6
|
app/views/layouts/_support_navigator_banner.html.haml
|
app/views/layouts/_support_navigator_banner.html.haml
|
-# See config/browser.rb
- if !browser.modern?
#support-navigator-banner.row
.col-xs-12
= browser.name
= browser.version
\-
Attention, votre navigateur est trop ancien pour utiliser demarches-simplifiees.fr : certaines parties du site ne fonctionneront pas correctement.
%br/
%br/
Nous vous recommendons fortement de
%a{ href: "https://browser-update.org/fr/update.html" }mettre à jour votre navigateur
\.
|
-# See config/browser.rb
- if !browser.modern?
#support-navigator-banner.row
.col-xs-12
Attention, votre navigateur (#{browser.name} #{browser.version}) est trop ancien pour utiliser demarches-simplifiees.fr : certaines parties du site ne fonctionneront pas correctement.
%br/
%br/
Nous vous recommendons fortement de
%a{ href: "https://browser-update.org/fr/update.html" }mettre à jour votre navigateur
\.
|
Improve the outdated browser message
|
Improve the outdated browser message
|
Haml
|
agpl-3.0
|
sgmap/tps,sgmap/tps,sgmap/tps
|
haml
|
## Code Before:
-# See config/browser.rb
- if !browser.modern?
#support-navigator-banner.row
.col-xs-12
= browser.name
= browser.version
\-
Attention, votre navigateur est trop ancien pour utiliser demarches-simplifiees.fr : certaines parties du site ne fonctionneront pas correctement.
%br/
%br/
Nous vous recommendons fortement de
%a{ href: "https://browser-update.org/fr/update.html" }mettre à jour votre navigateur
\.
## Instruction:
Improve the outdated browser message
## Code After:
-# See config/browser.rb
- if !browser.modern?
#support-navigator-banner.row
.col-xs-12
Attention, votre navigateur (#{browser.name} #{browser.version}) est trop ancien pour utiliser demarches-simplifiees.fr : certaines parties du site ne fonctionneront pas correctement.
%br/
%br/
Nous vous recommendons fortement de
%a{ href: "https://browser-update.org/fr/update.html" }mettre à jour votre navigateur
\.
|
e762bb0391eebc2956a242478921202a9e907c53
|
public/include/pages/api/getuserworkers.inc.php
|
public/include/pages/api/getuserworkers.inc.php
|
<?php
// Make sure we are called from index.php
if (!defined('SECURITY')) die('Hacking attempt');
// Check if the API is activated
$api->isActive();
// Check user token
$user_id = $api->checkAccess($user->checkApiKey($_REQUEST['api_key']), @$_REQUEST['id']);
// Output JSON format
echo $api->get_json($worker->getWorkers($user_id));
// Supress master template
$supress_master = 1;
?>
|
<?php
// Make sure we are called from index.php
if (!defined('SECURITY')) die('Hacking attempt');
// Check if the API is activated
$api->isActive();
// Check user token
$user_id = $api->checkAccess($user->checkApiKey($_REQUEST['api_key']), @$_REQUEST['id']);
// Fetch data interval from admin settings
if ( ! $interval = $setting->getValue('statistics_ajax_data_interval')) $interval = 300;
// Output JSON format
echo $api->get_json($worker->getWorkers($user_id, $interval));
// Supress master template
$supress_master = 1;
?>
|
Use data interval on getuserworkers
|
[IMPROVED] Use data interval on getuserworkers
|
PHP
|
apache-2.0
|
mmitech/php-mpos,UNOMP/chunky-mpos,mculp/chunky-mpos,CoinHashMe/MPOS-SSO,bankonme/php-mpos,xisi/php-mpos,studio666/php-mpos,MPOS/php-mpos,MPOS/php-mpos,evgenyponomarev/pool,sixxkilur/php-mpos,sixxkilur/php-mpos,nimblecoin/web,sixxkilur/php-mpos,UNOMP/chunky-mpos,BlueDragon747/php-mpos,MPOS/php-mpos,machinecoin-project/php-mpos,shreeneve/test,shreeneve/test,CoinHashMe/MPOS-SSO,machinecoin-project/php-mpos,xisi/php-mpos,sasselin/xcoin-mpos,mculp/chunky-mpos,bankonme/php-mpos,BlueDragon747/php-mpos,nimblecoin/web,evgenyponomarev/pool,xisi/php-mpos,CoinHashMe/MPOS-SSO,evgenyponomarev/pool,ychaim/php-mpos,studio666/php-mpos,sasselin/xcoin-mpos,CoinHashMe/MPOS-SSO,ychaim/php-mpos,sasselin/xcoin-mpos,CoinHashMe/MPOS-SSO,mmitech/php-mpos,mculp/chunky-mpos,shreeneve/test,machinecoin-project/php-mpos,BlueDragon747/php-mpos,nimblecoin/web,UNOMP/chunky-mpos,ychaim/php-mpos,bankonme/php-mpos,UNOMP/chunky-mpos,mmitech/php-mpos,mculp/chunky-mpos,studio666/php-mpos
|
php
|
## Code Before:
<?php
// Make sure we are called from index.php
if (!defined('SECURITY')) die('Hacking attempt');
// Check if the API is activated
$api->isActive();
// Check user token
$user_id = $api->checkAccess($user->checkApiKey($_REQUEST['api_key']), @$_REQUEST['id']);
// Output JSON format
echo $api->get_json($worker->getWorkers($user_id));
// Supress master template
$supress_master = 1;
?>
## Instruction:
[IMPROVED] Use data interval on getuserworkers
## Code After:
<?php
// Make sure we are called from index.php
if (!defined('SECURITY')) die('Hacking attempt');
// Check if the API is activated
$api->isActive();
// Check user token
$user_id = $api->checkAccess($user->checkApiKey($_REQUEST['api_key']), @$_REQUEST['id']);
// Fetch data interval from admin settings
if ( ! $interval = $setting->getValue('statistics_ajax_data_interval')) $interval = 300;
// Output JSON format
echo $api->get_json($worker->getWorkers($user_id, $interval));
// Supress master template
$supress_master = 1;
?>
|
160c2c7dbc90abd269a65d1bbb9b84fa06e7d08a
|
app/models/gallery.rb
|
app/models/gallery.rb
|
class Gallery < ActiveRecord::Base
has_many :pictures
after_initialize do
if new_record?
self.slug ||= Base64.encode64(UUIDTools::UUID.random_create)[0..7]
end
end
end
|
class Gallery < ActiveRecord::Base
has_many :pictures, dependent: :destroy
after_initialize do
if new_record?
self.slug ||= Base64.encode64(UUIDTools::UUID.random_create)[0..7]
end
end
end
|
Delete pictures, when galleries are deleted.
|
Delete pictures, when galleries are deleted.
|
Ruby
|
agpl-3.0
|
nning/imgshr,nning/imgshr,nning/imgshr,nning/imgshr
|
ruby
|
## Code Before:
class Gallery < ActiveRecord::Base
has_many :pictures
after_initialize do
if new_record?
self.slug ||= Base64.encode64(UUIDTools::UUID.random_create)[0..7]
end
end
end
## Instruction:
Delete pictures, when galleries are deleted.
## Code After:
class Gallery < ActiveRecord::Base
has_many :pictures, dependent: :destroy
after_initialize do
if new_record?
self.slug ||= Base64.encode64(UUIDTools::UUID.random_create)[0..7]
end
end
end
|
c131df999589ab5c8f34dc630da43e1237621f63
|
README.md
|
README.md
|
A system for ranking game players by skill, based on Rémi Coulom's Whole History Rating algorithm.
Developed for use on [GoShrine](http://goshrine.com)
Installation
------------
* gem install whole-history-rating
Enjoy!
-Pete
|
A system for ranking game players by skill, based on Rémi Coulom's Whole History Rating algorithm.
Developed for use on [GoShrine](http://goshrine.com), but the code is not go specific. It can support any two player game, as long as the outcome is a simple win/loss. An addition to the algorithm is support for handicaps.
Installation
------------
* gem install whole-history-rating
Enjoy!
-Pete
|
Add note about supporting handicaps.
|
Add note about supporting handicaps.
|
Markdown
|
mit
|
goshrine/whole_history_rating
|
markdown
|
## Code Before:
A system for ranking game players by skill, based on Rémi Coulom's Whole History Rating algorithm.
Developed for use on [GoShrine](http://goshrine.com)
Installation
------------
* gem install whole-history-rating
Enjoy!
-Pete
## Instruction:
Add note about supporting handicaps.
## Code After:
A system for ranking game players by skill, based on Rémi Coulom's Whole History Rating algorithm.
Developed for use on [GoShrine](http://goshrine.com), but the code is not go specific. It can support any two player game, as long as the outcome is a simple win/loss. An addition to the algorithm is support for handicaps.
Installation
------------
* gem install whole-history-rating
Enjoy!
-Pete
|
fb25fa04cf553b1084425a1f2af6a9315266ffaf
|
salt/renderers/yaml_jinja.py
|
salt/renderers/yaml_jinja.py
|
'''
The default rendering engine, process yaml with the jinja2 templating engine
This renderer will take a yaml file with the jinja2 template and render it to a
high data format for salt states.
'''
# Import Python Modules
import os
# Import thirt party modules
import yaml
try:
yaml.Loader = yaml.CLoader
yaml.Dumper = yaml.CDumper
except:
pass
# Import Salt libs
from salt.utils.jinja import get_template
def render(template_file, env='', sls=''):
'''
Render the data passing the functions and grains into the rendering system
'''
if not os.path.isfile(template_file):
return {}
passthrough = {}
passthrough['salt'] = __salt__
passthrough['grains'] = __grains__
passthrough['env'] = env
passthrough['sls'] = sls
template = get_template(template_file, __opts__, env)
yaml_data = template.render(**passthrough)
return yaml.safe_load(yaml_data)
|
'''
The default rendering engine, process yaml with the jinja2 templating engine
This renderer will take a yaml file with the jinja2 template and render it to a
high data format for salt states.
'''
# Import Python Modules
import os
# Import thirt party modules
import yaml
try:
yaml.Loader = yaml.CLoader
yaml.Dumper = yaml.CDumper
except:
pass
# Import Salt libs
from salt.utils.jinja import get_template
def render(template_file, env='', sls=''):
'''
Render the data passing the functions and grains into the rendering system
'''
if not os.path.isfile(template_file):
return {}
passthrough = {}
passthrough['salt'] = __salt__
passthrough['grains'] = __grains__
passthrough['pillar'] = __pillar__
passthrough['env'] = env
passthrough['sls'] = sls
template = get_template(template_file, __opts__, env)
yaml_data = template.render(**passthrough)
return yaml.safe_load(yaml_data)
|
Add pillar data to default renderer
|
Add pillar data to default renderer
|
Python
|
apache-2.0
|
saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt
|
python
|
## Code Before:
'''
The default rendering engine, process yaml with the jinja2 templating engine
This renderer will take a yaml file with the jinja2 template and render it to a
high data format for salt states.
'''
# Import Python Modules
import os
# Import thirt party modules
import yaml
try:
yaml.Loader = yaml.CLoader
yaml.Dumper = yaml.CDumper
except:
pass
# Import Salt libs
from salt.utils.jinja import get_template
def render(template_file, env='', sls=''):
'''
Render the data passing the functions and grains into the rendering system
'''
if not os.path.isfile(template_file):
return {}
passthrough = {}
passthrough['salt'] = __salt__
passthrough['grains'] = __grains__
passthrough['env'] = env
passthrough['sls'] = sls
template = get_template(template_file, __opts__, env)
yaml_data = template.render(**passthrough)
return yaml.safe_load(yaml_data)
## Instruction:
Add pillar data to default renderer
## Code After:
'''
The default rendering engine, process yaml with the jinja2 templating engine
This renderer will take a yaml file with the jinja2 template and render it to a
high data format for salt states.
'''
# Import Python Modules
import os
# Import thirt party modules
import yaml
try:
yaml.Loader = yaml.CLoader
yaml.Dumper = yaml.CDumper
except:
pass
# Import Salt libs
from salt.utils.jinja import get_template
def render(template_file, env='', sls=''):
'''
Render the data passing the functions and grains into the rendering system
'''
if not os.path.isfile(template_file):
return {}
passthrough = {}
passthrough['salt'] = __salt__
passthrough['grains'] = __grains__
passthrough['pillar'] = __pillar__
passthrough['env'] = env
passthrough['sls'] = sls
template = get_template(template_file, __opts__, env)
yaml_data = template.render(**passthrough)
return yaml.safe_load(yaml_data)
|
b9dde502c51381e3762d108270e6129d7952fd36
|
autogen.sh
|
autogen.sh
|
giveup()
{
echo
echo " Something went wrong, giving up!"
echo
exit 1
}
OSTYPE=`uname -s`
for libtoolize in glibtoolize libtoolize; do
LIBTOOLIZE=`which $libtoolize 2>/dev/null`
if test -x "${LIBTOOLIZE}"; then
break;
fi
done
#AMFLAGS="--add-missing --copy --force-missing"
AMFLAGS="--add-missing --copy"
if test "$OSTYPE" = "IRIX" -o "$OSTYPE" = "IRIX64"; then
AMFLAGS=$AMFLAGS" --include-deps";
fi
echo "Running aclocal -I macros"
aclocal -I macros || giveup
echo "Running autoheader"
autoheader || giveup
echo "Running libtoolize"
$LIBTOOLIZE --force --copy || giveup
echo "Running automake"
automake $AMFLAGS # || giveup
echo "Running autoconf"
autoconf || giveup
echo "======================================"
echo "Now you are ready to run './configure'"
echo "======================================"
|
giveup()
{
echo
echo " Something went wrong, giving up!"
echo
exit 1
}
OSTYPE=`uname -s`
for aclocal in aclocal aclocal-1.10 aclocal-1.9; do
ACLOCAL=`which $aclocal 2>/dev/null`
if test -x "${ACLOCAL}"; then
break;
fi
done
for automake in automake automake-1.10 automake-1.9; do
AUTOMAKE=`which $automake 2>/dev/null`
if test -x "${AUTOMAKE}"; then
break;
fi
done
for libtoolize in glibtoolize libtoolize; do
LIBTOOLIZE=`which $libtoolize 2>/dev/null`
if test -x "${LIBTOOLIZE}"; then
break;
fi
done
#AMFLAGS="--add-missing --copy --force-missing"
AMFLAGS="--add-missing --copy"
if test "$OSTYPE" = "IRIX" -o "$OSTYPE" = "IRIX64"; then
AMFLAGS=$AMFLAGS" --include-deps";
fi
echo "Running aclocal -I macros"
$ACLOCAL -I macros || giveup
echo "Running autoheader"
autoheader || giveup
echo "Running libtoolize"
$LIBTOOLIZE --force --copy || giveup
echo "Running automake"
$AUTOMAKE $AMFLAGS # || giveup
echo "Running autoconf"
autoconf || giveup
echo "======================================"
echo "Now you are ready to run './configure'"
echo "======================================"
|
Add version test for aclocal and automake to allow OpenSolaris to work.
|
Add version test for aclocal and automake to allow OpenSolaris to work.
git-svn-id: 6c2b1bd10c324c49ea9d9e6e31006a80e70507cb@2241 5242fede-7e19-0410-aef8-94bd7d2200fb
|
Shell
|
lgpl-2.1
|
vmx/geos,Uli1/geos,Uli1/geos,vmx/geos,Uli1/geos,vmx/geos,Uli1/geos,vmx/geos,vmx/geos,Uli1/geos,Uli1/geos,vmx/geos,Uli1/geos
|
shell
|
## Code Before:
giveup()
{
echo
echo " Something went wrong, giving up!"
echo
exit 1
}
OSTYPE=`uname -s`
for libtoolize in glibtoolize libtoolize; do
LIBTOOLIZE=`which $libtoolize 2>/dev/null`
if test -x "${LIBTOOLIZE}"; then
break;
fi
done
#AMFLAGS="--add-missing --copy --force-missing"
AMFLAGS="--add-missing --copy"
if test "$OSTYPE" = "IRIX" -o "$OSTYPE" = "IRIX64"; then
AMFLAGS=$AMFLAGS" --include-deps";
fi
echo "Running aclocal -I macros"
aclocal -I macros || giveup
echo "Running autoheader"
autoheader || giveup
echo "Running libtoolize"
$LIBTOOLIZE --force --copy || giveup
echo "Running automake"
automake $AMFLAGS # || giveup
echo "Running autoconf"
autoconf || giveup
echo "======================================"
echo "Now you are ready to run './configure'"
echo "======================================"
## Instruction:
Add version test for aclocal and automake to allow OpenSolaris to work.
git-svn-id: 6c2b1bd10c324c49ea9d9e6e31006a80e70507cb@2241 5242fede-7e19-0410-aef8-94bd7d2200fb
## Code After:
giveup()
{
echo
echo " Something went wrong, giving up!"
echo
exit 1
}
OSTYPE=`uname -s`
for aclocal in aclocal aclocal-1.10 aclocal-1.9; do
ACLOCAL=`which $aclocal 2>/dev/null`
if test -x "${ACLOCAL}"; then
break;
fi
done
for automake in automake automake-1.10 automake-1.9; do
AUTOMAKE=`which $automake 2>/dev/null`
if test -x "${AUTOMAKE}"; then
break;
fi
done
for libtoolize in glibtoolize libtoolize; do
LIBTOOLIZE=`which $libtoolize 2>/dev/null`
if test -x "${LIBTOOLIZE}"; then
break;
fi
done
#AMFLAGS="--add-missing --copy --force-missing"
AMFLAGS="--add-missing --copy"
if test "$OSTYPE" = "IRIX" -o "$OSTYPE" = "IRIX64"; then
AMFLAGS=$AMFLAGS" --include-deps";
fi
echo "Running aclocal -I macros"
$ACLOCAL -I macros || giveup
echo "Running autoheader"
autoheader || giveup
echo "Running libtoolize"
$LIBTOOLIZE --force --copy || giveup
echo "Running automake"
$AUTOMAKE $AMFLAGS # || giveup
echo "Running autoconf"
autoconf || giveup
echo "======================================"
echo "Now you are ready to run './configure'"
echo "======================================"
|
a9307e1ac7778f6073d275a4822bc5f1df9c45fb
|
termedit.py
|
termedit.py
|
import os
import sys
import neovim
files = {os.path.abspath(arg) for arg in sys.argv[1:]}
if not files:
sys.exit(1)
addr = os.environ.get('NVIM_LISTEN_ADDRESS', None)
if not addr:
os.execvp('nvim', files)
nvim = neovim.attach('socket', path=addr)
tbuf = nvim.current.buffer
for fname in files:
nvim.command('drop {}'.format(fname))
nvim.command('autocmd BufUnload <buffer> silent! call rpcnotify({}, "m")'
.format(nvim.channel_id))
while files:
try:
nvim.session.next_message()
except:
pass
files.pop()
nvim.current.buffer = tbuf
nvim.input('i')
|
import os
import sys
import neovim
files = [os.path.abspath(arg) for arg in sys.argv[1:]]
if not files:
sys.exit(1)
addr = os.environ.get('NVIM_LISTEN_ADDRESS', None)
if not addr:
os.execvp('nvim', files)
nvim = neovim.attach('socket', path=addr)
tbuf = nvim.current.buffer
for fname in files:
fname = nvim.eval('fnameescape("{}")'.format(fname)).decode('utf-8')
nvim.command('drop {}'.format(fname))
nvim.command('autocmd BufUnload <buffer> silent! call rpcnotify({}, "m")'
.format(nvim.channel_id))
while files:
try:
nvim.session.next_message()
except:
pass
files.pop()
nvim.current.buffer = tbuf
nvim.input('i')
|
Fix not opening paths with spaces.
|
Fix not opening paths with spaces.
|
Python
|
apache-2.0
|
rliang/termedit.nvim
|
python
|
## Code Before:
import os
import sys
import neovim
files = {os.path.abspath(arg) for arg in sys.argv[1:]}
if not files:
sys.exit(1)
addr = os.environ.get('NVIM_LISTEN_ADDRESS', None)
if not addr:
os.execvp('nvim', files)
nvim = neovim.attach('socket', path=addr)
tbuf = nvim.current.buffer
for fname in files:
nvim.command('drop {}'.format(fname))
nvim.command('autocmd BufUnload <buffer> silent! call rpcnotify({}, "m")'
.format(nvim.channel_id))
while files:
try:
nvim.session.next_message()
except:
pass
files.pop()
nvim.current.buffer = tbuf
nvim.input('i')
## Instruction:
Fix not opening paths with spaces.
## Code After:
import os
import sys
import neovim
files = [os.path.abspath(arg) for arg in sys.argv[1:]]
if not files:
sys.exit(1)
addr = os.environ.get('NVIM_LISTEN_ADDRESS', None)
if not addr:
os.execvp('nvim', files)
nvim = neovim.attach('socket', path=addr)
tbuf = nvim.current.buffer
for fname in files:
fname = nvim.eval('fnameescape("{}")'.format(fname)).decode('utf-8')
nvim.command('drop {}'.format(fname))
nvim.command('autocmd BufUnload <buffer> silent! call rpcnotify({}, "m")'
.format(nvim.channel_id))
while files:
try:
nvim.session.next_message()
except:
pass
files.pop()
nvim.current.buffer = tbuf
nvim.input('i')
|
9c7e516c224c216a01ac50a7b41cfe9b69a71fe6
|
RELEASE_NOTES.md
|
RELEASE_NOTES.md
|
* Support for .NET core
### 0.2 - June 25th 2016
* String helper functions
* 40% faster processing large (> 1KB) inputs
### 0.1 - November 12th 2015
* 32bit Farmhash implemented
* 64bit Farmhash implemented
|
* Release Farmhash.Sharp under netstandard 1.0
* Switch to new MSBuild project files
### 0.2 - June 25th 2016
* String helper functions
* 40% faster processing large (> 1KB) inputs
### 0.1 - November 12th 2015
* 32bit Farmhash implemented
* 64bit Farmhash implemented
|
Update release notes with release date
|
Update release notes with release date
|
Markdown
|
mit
|
nickbabcock/Farmhash.Sharp,nickbabcock/Farmhash.Sharp,nickbabcock/Farmhash.Sharp,nickbabcock/Farmhash.Sharp
|
markdown
|
## Code Before:
* Support for .NET core
### 0.2 - June 25th 2016
* String helper functions
* 40% faster processing large (> 1KB) inputs
### 0.1 - November 12th 2015
* 32bit Farmhash implemented
* 64bit Farmhash implemented
## Instruction:
Update release notes with release date
## Code After:
* Release Farmhash.Sharp under netstandard 1.0
* Switch to new MSBuild project files
### 0.2 - June 25th 2016
* String helper functions
* 40% faster processing large (> 1KB) inputs
### 0.1 - November 12th 2015
* 32bit Farmhash implemented
* 64bit Farmhash implemented
|
73372378d709080c65b799aa8c1026de53f465e8
|
hero_mapper/app/models/heroe.rb
|
hero_mapper/app/models/heroe.rb
|
class Heroe < ApplicationRecord
validates :name, uniqueness: true
def self.save_hero_data
# offset = 0
response_count = nil
# until response_count == 0
# character_data = marvel_api_call
# if character_data['data']['results'].empty?
# end
# end
end
private
def self.marvel_api_call
url = "https://gateway.marvel.com:443/v1/public/characters?limit=100&offset=#{offset}&ts=#{timestamp}&apikey=#{ENV['MARVEL_PUBLIC']}&hash=#{marvel_hash}"
debugger
uri = URI(url)
response = Net::HTTP.get(uri)
response = JSON.parse(response)
end
def self.offset
Heroe.count
end
def self.marvel_hash
hash = Digest::MD5.hexdigest( timestamp + ENV['MARVEL_PRIVATE'] + ENV['MARVEL_PUBLIC'] )
end
def self.timestamp
Time.now.to_i.to_s
end
end
|
class Heroe < ApplicationRecord
validates :marvel_id, uniqueness: true
def self.save_hero_data
response_count = nil
until response_count == 0
character_data = marvel_api_call['data']
if !character_data['results'].empty?
character_data['results'].each do |hero|
character = Heroe.new( :name => hero['name'], :comics => hero['comics']['available'] )
character.save
end
response_count = character_data['count']
else
break
end
end
end
private
def self.marvel_api_call
url = "https://gateway.marvel.com:443/v1/public/characters?orderBy=modified&limit=100&offset=#{Heroe.count}&ts=#{timestamp}&apikey=#{ENV['MARVEL_PUBLIC']}&hash=#{marvel_hash}"
uri = URI(url)
response = Net::HTTP.get(uri)
response = JSON.parse(response)
end
def self.marvel_hash
hash = Digest::MD5.hexdigest( timestamp + ENV['MARVEL_PRIVATE'] + ENV['MARVEL_PUBLIC'] )
end
def self.timestamp
Time.now.to_i.to_s
end
end
|
Update to validate on unique marvel_id. Create loop to populate database
|
Update to validate on unique marvel_id. Create loop to populate database
|
Ruby
|
mit
|
wanderfal/saving_boston,wanderfal/saving_boston,wanderfal/saving_boston
|
ruby
|
## Code Before:
class Heroe < ApplicationRecord
validates :name, uniqueness: true
def self.save_hero_data
# offset = 0
response_count = nil
# until response_count == 0
# character_data = marvel_api_call
# if character_data['data']['results'].empty?
# end
# end
end
private
def self.marvel_api_call
url = "https://gateway.marvel.com:443/v1/public/characters?limit=100&offset=#{offset}&ts=#{timestamp}&apikey=#{ENV['MARVEL_PUBLIC']}&hash=#{marvel_hash}"
debugger
uri = URI(url)
response = Net::HTTP.get(uri)
response = JSON.parse(response)
end
def self.offset
Heroe.count
end
def self.marvel_hash
hash = Digest::MD5.hexdigest( timestamp + ENV['MARVEL_PRIVATE'] + ENV['MARVEL_PUBLIC'] )
end
def self.timestamp
Time.now.to_i.to_s
end
end
## Instruction:
Update to validate on unique marvel_id. Create loop to populate database
## Code After:
class Heroe < ApplicationRecord
validates :marvel_id, uniqueness: true
def self.save_hero_data
response_count = nil
until response_count == 0
character_data = marvel_api_call['data']
if !character_data['results'].empty?
character_data['results'].each do |hero|
character = Heroe.new( :name => hero['name'], :comics => hero['comics']['available'] )
character.save
end
response_count = character_data['count']
else
break
end
end
end
private
def self.marvel_api_call
url = "https://gateway.marvel.com:443/v1/public/characters?orderBy=modified&limit=100&offset=#{Heroe.count}&ts=#{timestamp}&apikey=#{ENV['MARVEL_PUBLIC']}&hash=#{marvel_hash}"
uri = URI(url)
response = Net::HTTP.get(uri)
response = JSON.parse(response)
end
def self.marvel_hash
hash = Digest::MD5.hexdigest( timestamp + ENV['MARVEL_PRIVATE'] + ENV['MARVEL_PUBLIC'] )
end
def self.timestamp
Time.now.to_i.to_s
end
end
|
3e85e5a3ee8b8f00edbc31fa701d0ebd92a87e47
|
src/cljs/comic_reader/pages/sites.cljs
|
src/cljs/comic_reader/pages/sites.cljs
|
(ns comic-reader.pages.sites
(:require [comic-reader.session :as session]
[reagent.core :as reagent :refer [atom]]
[secretary.core :refer [dispatch!]]))
(defn manga-site [site-data]
^{:key (:id site-data)} [:li (:name site-data)])
(defn site-list [sites]
[:div
[:h1 "Comic Sources"]
[:ul (map manga-site sites)]])
|
(ns comic-reader.pages.sites
(:require [comic-reader.session :as session]
[reagent.core :as reagent :refer [atom]]
[secretary.core :refer [dispatch!]]))
(defn manga-site [site-data]
^{:key (:id site-data)}
[:li
[:input {:type "button"
:value (:name site-data)
:on-click #(.log js/console
(str "You clicked the "
(:id site-data)
" button!"))}]])
(defn site-list [sites]
[:div
[:h1 "Comic Sources"]
[:ul (map manga-site sites)]])
|
Make the site components contain a button
|
Make the site components contain a button
|
Clojure
|
epl-1.0
|
RadicalZephyr/comic-reader,RadicalZephyr/comic-reader
|
clojure
|
## Code Before:
(ns comic-reader.pages.sites
(:require [comic-reader.session :as session]
[reagent.core :as reagent :refer [atom]]
[secretary.core :refer [dispatch!]]))
(defn manga-site [site-data]
^{:key (:id site-data)} [:li (:name site-data)])
(defn site-list [sites]
[:div
[:h1 "Comic Sources"]
[:ul (map manga-site sites)]])
## Instruction:
Make the site components contain a button
## Code After:
(ns comic-reader.pages.sites
(:require [comic-reader.session :as session]
[reagent.core :as reagent :refer [atom]]
[secretary.core :refer [dispatch!]]))
(defn manga-site [site-data]
^{:key (:id site-data)}
[:li
[:input {:type "button"
:value (:name site-data)
:on-click #(.log js/console
(str "You clicked the "
(:id site-data)
" button!"))}]])
(defn site-list [sites]
[:div
[:h1 "Comic Sources"]
[:ul (map manga-site sites)]])
|
5878abaa6cb74bdf833e960bba71545da812ce6a
|
.github/workflows/validate-release-notes.yml
|
.github/workflows/validate-release-notes.yml
|
on: pull_request
name: Validate release notes
jobs:
validateReleaseNotes:
name: Validate release notes
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- name: Extract release notes
uses: lee-dohm/[email protected]
if: "github.event.pull_request.user.type != 'Bot'"
|
on:
pull_request:
types: [opened, edited, reopened]
name: Validate release notes
jobs:
validateReleaseNotes:
name: Validate release notes
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- name: Extract release notes
uses: lee-dohm/[email protected]
if: "github.event.pull_request.user.type != 'Bot'"
|
Change pull request event types to validate release notes
|
Change pull request event types to validate release notes
|
YAML
|
mit
|
lee-dohm/atom-style-tweaks,lee-dohm/atom-style-tweaks,lee-dohm/atom-style-tweaks,lee-dohm/atom-style-tweaks
|
yaml
|
## Code Before:
on: pull_request
name: Validate release notes
jobs:
validateReleaseNotes:
name: Validate release notes
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- name: Extract release notes
uses: lee-dohm/[email protected]
if: "github.event.pull_request.user.type != 'Bot'"
## Instruction:
Change pull request event types to validate release notes
## Code After:
on:
pull_request:
types: [opened, edited, reopened]
name: Validate release notes
jobs:
validateReleaseNotes:
name: Validate release notes
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- name: Extract release notes
uses: lee-dohm/[email protected]
if: "github.event.pull_request.user.type != 'Bot'"
|
cdd63064da8b730a5fe6eaf0b51aefa8f1b13a73
|
index.html
|
index.html
|
---
layout: default
---
<p><code>softpunk</code> is the GitHub organization for the #code IRC channel, which is currently on Rizon.</p>
<h2>Our Projects</h2>
<h3><a href="https://github.com/softpunk/temperate-tabs">Temperate Tabs</a></h3>
<p>A Firefox addon for those of us who have a bad habit of opening dozens or hundreds of tabs at a time. It works by setting a maximum number of tabs (default is 20), warning you once you go past that, and finally preventing more tabs from opening once you're 10 past the limit.</p>
<p>Have an idea for a project? Join us in #code and let us know.</p>
<h2>Got a project idea?</h2>
<p>Just join us in #code and let us know.</p>
|
---
layout: default
---
<p><code>softpunk</code> is the GitHub organization for the #code IRC channel, which is currently on Rizon.</p>
<h2>Our Projects</h2>
<h3><a href="https://github.com/softpunk/temperate-tabs">Temperate Tabs</a></h3>
<p>A Firefox addon for those of us who have a bad habit of opening dozens or hundreds of tabs at a time. It works by setting a maximum number of tabs (default is 20), warning you once you go past that, and finally preventing more tabs from opening once you're 10 past the limit.</p>
<h2>Got a project idea?</h2>
<p>Just join us in #code and let us know.</p>
|
Remove first instance of project idea line
|
Remove first instance of project idea line
|
HTML
|
agpl-3.0
|
softpunk/softpunk.github.io
|
html
|
## Code Before:
---
layout: default
---
<p><code>softpunk</code> is the GitHub organization for the #code IRC channel, which is currently on Rizon.</p>
<h2>Our Projects</h2>
<h3><a href="https://github.com/softpunk/temperate-tabs">Temperate Tabs</a></h3>
<p>A Firefox addon for those of us who have a bad habit of opening dozens or hundreds of tabs at a time. It works by setting a maximum number of tabs (default is 20), warning you once you go past that, and finally preventing more tabs from opening once you're 10 past the limit.</p>
<p>Have an idea for a project? Join us in #code and let us know.</p>
<h2>Got a project idea?</h2>
<p>Just join us in #code and let us know.</p>
## Instruction:
Remove first instance of project idea line
## Code After:
---
layout: default
---
<p><code>softpunk</code> is the GitHub organization for the #code IRC channel, which is currently on Rizon.</p>
<h2>Our Projects</h2>
<h3><a href="https://github.com/softpunk/temperate-tabs">Temperate Tabs</a></h3>
<p>A Firefox addon for those of us who have a bad habit of opening dozens or hundreds of tabs at a time. It works by setting a maximum number of tabs (default is 20), warning you once you go past that, and finally preventing more tabs from opening once you're 10 past the limit.</p>
<h2>Got a project idea?</h2>
<p>Just join us in #code and let us know.</p>
|
980fcd1cd81a6fa09822faa09d37a47163ddb046
|
public/css/home.css
|
public/css/home.css
|
body {
background-color: #FFFFFF;
}
h2, h3, h4, p, small, strong, .accounts, .networks, .nonetworks, .main, .disclaimer {
text-align: center;
}
@media only screen and (max-width: 720px) {
img { max-width: 100%; }
}
img {
width: auto;
max-width: 300px;
min-width: 200px;
margin: 0 auto;
display: block;
}
|
.title {
background: #fceabb; /* Old browsers */
background: -moz-linear-gradient(top, #fceabb 0%, #fccd4d 50%, #f8b500 51%, #fbdf93 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#fceabb), color-stop(50%,#fccd4d), color-stop(51%,#f8b500), color-stop(100%,#fbdf93)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #fceabb 0%,#fccd4d 50%,#f8b500 51%,#fbdf93 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #fceabb 0%,#fccd4d 50%,#f8b500 51%,#fbdf93 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, #fceabb 0%,#fccd4d 50%,#f8b500 51%,#fbdf93 100%); /* IE10+ */
background: linear-gradient(to bottom, #fceabb 0%,#fccd4d 50%,#f8b500 51%,#fbdf93 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#fceabb', endColorstr='#fbdf93',GradientType=0 ); /* IE6-9 */
margin-top: 0;
}
div.title {
width: 50%;
margin: 0 auto;
text-align: center;
}
body {
background-color: #FFFFFF;
}
h2, h3, h4, p, small, strong, .accounts, .networks, .nonetworks, .main, .disclaimer {
text-align: center;
}
@media only screen and (max-width: 720px) {
img { max-width: 100%; }
}
img {
width: auto;
max-width: 300px;
min-width: 200px;
margin: 0 auto;
display: block;
}
|
Add style for title on index
|
Add style for title on index
|
CSS
|
mit
|
terriblesarcasm/Axihub
|
css
|
## Code Before:
body {
background-color: #FFFFFF;
}
h2, h3, h4, p, small, strong, .accounts, .networks, .nonetworks, .main, .disclaimer {
text-align: center;
}
@media only screen and (max-width: 720px) {
img { max-width: 100%; }
}
img {
width: auto;
max-width: 300px;
min-width: 200px;
margin: 0 auto;
display: block;
}
## Instruction:
Add style for title on index
## Code After:
.title {
background: #fceabb; /* Old browsers */
background: -moz-linear-gradient(top, #fceabb 0%, #fccd4d 50%, #f8b500 51%, #fbdf93 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#fceabb), color-stop(50%,#fccd4d), color-stop(51%,#f8b500), color-stop(100%,#fbdf93)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #fceabb 0%,#fccd4d 50%,#f8b500 51%,#fbdf93 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #fceabb 0%,#fccd4d 50%,#f8b500 51%,#fbdf93 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, #fceabb 0%,#fccd4d 50%,#f8b500 51%,#fbdf93 100%); /* IE10+ */
background: linear-gradient(to bottom, #fceabb 0%,#fccd4d 50%,#f8b500 51%,#fbdf93 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#fceabb', endColorstr='#fbdf93',GradientType=0 ); /* IE6-9 */
margin-top: 0;
}
div.title {
width: 50%;
margin: 0 auto;
text-align: center;
}
body {
background-color: #FFFFFF;
}
h2, h3, h4, p, small, strong, .accounts, .networks, .nonetworks, .main, .disclaimer {
text-align: center;
}
@media only screen and (max-width: 720px) {
img { max-width: 100%; }
}
img {
width: auto;
max-width: 300px;
min-width: 200px;
margin: 0 auto;
display: block;
}
|
23be1ec1be8e303fe223eb15d2793b24c33baee1
|
app/views/message/deadlines/_new.html.haml
|
app/views/message/deadlines/_new.html.haml
|
= semantic_form_for DeadlineMessage.new, url: thread_deadlines_path(@thread), html: { class: "navigate-away-warning" } do |f|
= f.inputs do
= f.input :all_day, input_html: {class: "all-day"}
= f.input :deadline, as: :date_picker, label: t("deadline_date")
= f.input :title
= f.actions do
= f.action :submit, label: t(".submit"), button_html: message_button_html
|
= semantic_form_for DeadlineMessage.new, url: thread_deadlines_path(@thread), html: { class: "navigate-away-warning" } do |f|
= f.inputs do
= f.input :all_day, input_html: {class: "all-day"}
= f.input :deadline, as: :date_picker, label: t("deadline_date"), input_html: { autocomplete: :off }
= f.input :title
= f.actions do
= f.action :submit, label: t(".submit"), button_html: message_button_html
|
Stop autocomplete on deadline input
|
Stop autocomplete on deadline input
Fixes #774
|
Haml
|
mit
|
cyclestreets/cyclescape,cyclestreets/cyclescape,cyclestreets/cyclescape
|
haml
|
## Code Before:
= semantic_form_for DeadlineMessage.new, url: thread_deadlines_path(@thread), html: { class: "navigate-away-warning" } do |f|
= f.inputs do
= f.input :all_day, input_html: {class: "all-day"}
= f.input :deadline, as: :date_picker, label: t("deadline_date")
= f.input :title
= f.actions do
= f.action :submit, label: t(".submit"), button_html: message_button_html
## Instruction:
Stop autocomplete on deadline input
Fixes #774
## Code After:
= semantic_form_for DeadlineMessage.new, url: thread_deadlines_path(@thread), html: { class: "navigate-away-warning" } do |f|
= f.inputs do
= f.input :all_day, input_html: {class: "all-day"}
= f.input :deadline, as: :date_picker, label: t("deadline_date"), input_html: { autocomplete: :off }
= f.input :title
= f.actions do
= f.action :submit, label: t(".submit"), button_html: message_button_html
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.