commit
stringlengths
40
40
old_file
stringlengths
4
184
new_file
stringlengths
4
184
old_contents
stringlengths
1
3.6k
new_contents
stringlengths
5
3.38k
subject
stringlengths
15
778
message
stringlengths
16
6.74k
lang
stringclasses
201 values
license
stringclasses
13 values
repos
stringlengths
6
116k
config
stringclasses
201 values
content
stringlengths
137
7.24k
diff
stringlengths
26
5.55k
diff_length
int64
1
123
relative_diff_length
float64
0.01
89
n_lines_added
int64
0
108
n_lines_deleted
int64
0
106
6d2da3279128020e1751a29cd450f7786c050009
circle.yml
circle.yml
machine: python: version: 3.5.2
machine: python: version: 3.5.2 # Set up the commands to run as a test (override), as well as the commands to # run before (pre) and after (post). test: pre: - mkdir -p $CIRCLE_TEST_REPORTS/junit/ override: - python3 -m pytest -v --cov --cov-report=term-missing:skip-covered --junitxml=$CIRCLE_TEST_REPORTS/junit/junit_output.xml post: - bash <(curl -s https://codecov.io/bash) -t 08234947-61d0-48ea-b0f0-1c82d3f2dfd7
Add JUnit XML output to our unit tests in CircleCI
Add JUnit XML output to our unit tests in CircleCI
YAML
apache-2.0
Lab41/pelops,dave-lab41/pelops,d-grossman/pelops,d-grossman/pelops,Lab41/pelops,dave-lab41/pelops
yaml
## Code Before: machine: python: version: 3.5.2 ## Instruction: Add JUnit XML output to our unit tests in CircleCI ## Code After: machine: python: version: 3.5.2 # Set up the commands to run as a test (override), as well as the commands to # run before (pre) and after (post). test: pre: - mkdir -p $CIRCLE_TEST_REPORTS/junit/ override: - python3 -m pytest -v --cov --cov-report=term-missing:skip-covered --junitxml=$CIRCLE_TEST_REPORTS/junit/junit_output.xml post: - bash <(curl -s https://codecov.io/bash) -t 08234947-61d0-48ea-b0f0-1c82d3f2dfd7
machine: python: version: 3.5.2 + + # Set up the commands to run as a test (override), as well as the commands to + # run before (pre) and after (post). + test: + pre: + - mkdir -p $CIRCLE_TEST_REPORTS/junit/ + override: + - python3 -m pytest -v --cov --cov-report=term-missing:skip-covered --junitxml=$CIRCLE_TEST_REPORTS/junit/junit_output.xml + post: + - bash <(curl -s https://codecov.io/bash) -t 08234947-61d0-48ea-b0f0-1c82d3f2dfd7
10
3.333333
10
0
6cf8aa436d3793b7f08206c394df674eb1546bae
.storybook/preview.js
.storybook/preview.js
import React from 'react'; import { addDecorator } from '@storybook/react'; import { ThemeProvider } from '@material-ui/core/styles'; import CssBaseline from '@material-ui/core/CssBaseline'; import { lightTheme } from '../lib/theme'; import '../components/app.css'; addDecorator(storyFn => ( <ThemeProvider theme={lightTheme}> <CssBaseline /> {storyFn()} </ThemeProvider> ));
import React from 'react'; import { addDecorator } from '@storybook/react'; import { ThemeProvider } from '@material-ui/core/styles'; import CssBaseline from '@material-ui/core/CssBaseline'; import { lightTheme } from '../lib/theme'; import '../components/app.css'; // Mock next/router // @see https://github.com/vercel/next.js/issues/1827#issuecomment-306740374 import Router from 'next/router'; const mockedRouter = { push: () => {}, prefetch: () => Promise.resolve() }; Router.router = mockedRouter; addDecorator(storyFn => ( <ThemeProvider theme={lightTheme}> <CssBaseline /> {storyFn()} </ThemeProvider> ));
Add next/route mock to storybook so that elements with <Link> can be put in storybook
Add next/route mock to storybook so that elements with <Link> can be put in storybook
JavaScript
mit
cofacts/rumors-site,cofacts/rumors-site
javascript
## Code Before: import React from 'react'; import { addDecorator } from '@storybook/react'; import { ThemeProvider } from '@material-ui/core/styles'; import CssBaseline from '@material-ui/core/CssBaseline'; import { lightTheme } from '../lib/theme'; import '../components/app.css'; addDecorator(storyFn => ( <ThemeProvider theme={lightTheme}> <CssBaseline /> {storyFn()} </ThemeProvider> )); ## Instruction: Add next/route mock to storybook so that elements with <Link> can be put in storybook ## Code After: import React from 'react'; import { addDecorator } from '@storybook/react'; import { ThemeProvider } from '@material-ui/core/styles'; import CssBaseline from '@material-ui/core/CssBaseline'; import { lightTheme } from '../lib/theme'; import '../components/app.css'; // Mock next/router // @see https://github.com/vercel/next.js/issues/1827#issuecomment-306740374 import Router from 'next/router'; const mockedRouter = { push: () => {}, prefetch: () => Promise.resolve() }; Router.router = mockedRouter; addDecorator(storyFn => ( <ThemeProvider theme={lightTheme}> <CssBaseline /> {storyFn()} </ThemeProvider> ));
import React from 'react'; import { addDecorator } from '@storybook/react'; import { ThemeProvider } from '@material-ui/core/styles'; import CssBaseline from '@material-ui/core/CssBaseline'; import { lightTheme } from '../lib/theme'; import '../components/app.css'; + // Mock next/router + // @see https://github.com/vercel/next.js/issues/1827#issuecomment-306740374 + import Router from 'next/router'; + const mockedRouter = { push: () => {}, prefetch: () => Promise.resolve() }; + Router.router = mockedRouter; + addDecorator(storyFn => ( <ThemeProvider theme={lightTheme}> <CssBaseline /> {storyFn()} </ThemeProvider> ));
6
0.461538
6
0
6f147e0efc95a0aea6c83699844dafc597a29afa
app/views/exercises/_form.html.erb
app/views/exercises/_form.html.erb
<div class="row"> <div class="col-md-offset-1 col-md-10"> <div class="box box-primary"> <div class="box-header with-border"> <h3 class="box-title">Lista de exercício</h3> </div> <div class="box-body"> <%= form_for @exercise do |f| %> <%= render 'shared/error_messages', object: f.object %> <div class="form-group"> <%= f.label "Título" %> <%= f.text_field :title, class: "form-control" %> </div> <div class="form-group"> <%= f.label "Descrição" %> <%= f.text_area :description, class: "form-control" %> </div> <%= f.submit yield(:button_text), class: "btn btn-primary pull-right" %> <% end %> </div> </div> </div> </div>
<div class="row"> <div class="col-md-offset-1 col-md-10"> <div class="box box-primary"> <div class="box-header with-border"> <h3 class="box-title">Lista de exercício</h3> </div> <div class="box-body"> <%= form_for @exercise do |f| %> <%= render 'shared/error_messages', object: f.object %> <div class="form-group"> <%= f.label "Título" %> <%= f.text_field :title, class: "form-control" %> </div> <div class="form-group"> <%= f.label "Descrição" %> <%= f.text_area :description, class: "form-control" %> </div> <%= f.submit yield(:button_text), class: "btn btn-primary pull-right" %> <% end %> </div> </div> </div> </div> <script type="text/javascript"> console.log($('textarea')[0]) var simplemde = new SimpleMDE( { element: $('textarea')[0], toolbar: ["preview", "|", "bold", "italic", "heading-1", "heading-2", "heading-3", "link", "image", "table", "code", "quote", "unordered-list", "ordered-list", "|", "guide"]}); </script>
Add simplemde markdown editor to form
Add simplemde markdown editor to form
HTML+ERB
mit
rwehresmann/farma_alg_reborn,rwehresmann/farma_alg_reborn,rwehresmann/farma_alg_reborn,rwehresmann/farma_alg_reborn,rwehresmann/farma_alg_reborn
html+erb
## Code Before: <div class="row"> <div class="col-md-offset-1 col-md-10"> <div class="box box-primary"> <div class="box-header with-border"> <h3 class="box-title">Lista de exercício</h3> </div> <div class="box-body"> <%= form_for @exercise do |f| %> <%= render 'shared/error_messages', object: f.object %> <div class="form-group"> <%= f.label "Título" %> <%= f.text_field :title, class: "form-control" %> </div> <div class="form-group"> <%= f.label "Descrição" %> <%= f.text_area :description, class: "form-control" %> </div> <%= f.submit yield(:button_text), class: "btn btn-primary pull-right" %> <% end %> </div> </div> </div> </div> ## Instruction: Add simplemde markdown editor to form ## Code After: <div class="row"> <div class="col-md-offset-1 col-md-10"> <div class="box box-primary"> <div class="box-header with-border"> <h3 class="box-title">Lista de exercício</h3> </div> <div class="box-body"> <%= form_for @exercise do |f| %> <%= render 'shared/error_messages', object: f.object %> <div class="form-group"> <%= f.label "Título" %> <%= f.text_field :title, class: "form-control" %> </div> <div class="form-group"> <%= f.label "Descrição" %> <%= f.text_area :description, class: "form-control" %> </div> <%= f.submit yield(:button_text), class: "btn btn-primary pull-right" %> <% end %> </div> </div> </div> </div> <script type="text/javascript"> console.log($('textarea')[0]) var simplemde = new SimpleMDE( { element: $('textarea')[0], toolbar: ["preview", "|", "bold", "italic", "heading-1", "heading-2", "heading-3", "link", "image", "table", "code", "quote", "unordered-list", "ordered-list", "|", "guide"]}); </script>
<div class="row"> <div class="col-md-offset-1 col-md-10"> <div class="box box-primary"> <div class="box-header with-border"> <h3 class="box-title">Lista de exercício</h3> </div> <div class="box-body"> <%= form_for @exercise do |f| %> <%= render 'shared/error_messages', object: f.object %> <div class="form-group"> <%= f.label "Título" %> <%= f.text_field :title, class: "form-control" %> </div> <div class="form-group"> <%= f.label "Descrição" %> <%= f.text_area :description, class: "form-control" %> </div> <%= f.submit yield(:button_text), class: "btn btn-primary pull-right" %> <% end %> </div> </div> </div> </div> + + <script type="text/javascript"> + console.log($('textarea')[0]) + var simplemde = new SimpleMDE( { element: $('textarea')[0], + toolbar: ["preview", + "|", + "bold", + "italic", + "heading-1", + "heading-2", + "heading-3", + "link", + "image", + "table", + "code", + "quote", + "unordered-list", + "ordered-list", + "|", + "guide"]}); + </script>
21
0.75
21
0
2f6d6bbc9405e4e20fbb906fbad9096c5ea815c1
fabricio.gemspec
fabricio.gemspec
lib = File.expand_path('../lib', __FILE__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) require 'fabricio/version' Gem::Specification.new do |spec| spec.name = "fabricio" spec.version = Fabricio::VERSION spec.authors = ["Egor Tolstoy", "Vadim Smal"] spec.email = 'igrekde@gmail.com' spec.summary = "A simple gem that fetches mobile application statistics from Fabric.io API." spec.license = "MIT" # spec.files = `git ls-files -z`.split("\x0").reject do |f| # f.match(%r{^(test|spec|features)/}) # end spec.files = Dir["lib/**/*", "bin/*", "docs/*", "README.md"] spec.bindir = "bin" spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) } spec.require_paths = ["lib"] spec.add_dependency 'faraday' spec.add_dependency "thor" spec.add_development_dependency 'rake', '~> 10.0' spec.add_development_dependency 'rspec', '~> 3.0' spec.add_development_dependency 'webmock' spec.add_development_dependency 'simplecov' spec.add_development_dependency 'codeclimate-test-reporter', '~> 1.0.0' end
lib = File.expand_path('../lib', __FILE__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) require 'fabricio/version' Gem::Specification.new do |spec| spec.name = "fabricio" spec.version = Fabricio::VERSION spec.authors = ["Egor Tolstoy", "Vadim Smal"] spec.email = 'igrekde@gmail.com' spec.summary = "A simple gem that fetches mobile application statistics from Fabric.io API." spec.license = "MIT" spec.files = Dir["lib/**/*", "bin/*", "docs/*", "README.md"] spec.bindir = "bin" spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) } spec.require_paths = ["lib"] spec.add_dependency 'faraday' spec.add_dependency "thor" spec.add_development_dependency 'rake', '~> 10.0' spec.add_development_dependency 'rspec', '~> 3.0' spec.add_development_dependency 'webmock' spec.add_development_dependency 'simplecov' spec.add_development_dependency 'codeclimate-test-reporter', '~> 1.0.0' end
Add bindir and optimize files in spec
[Bugfix] Add bindir and optimize files in spec
Ruby
mit
strongself/fabricio,strongself/fabricio
ruby
## Code Before: lib = File.expand_path('../lib', __FILE__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) require 'fabricio/version' Gem::Specification.new do |spec| spec.name = "fabricio" spec.version = Fabricio::VERSION spec.authors = ["Egor Tolstoy", "Vadim Smal"] spec.email = 'igrekde@gmail.com' spec.summary = "A simple gem that fetches mobile application statistics from Fabric.io API." spec.license = "MIT" # spec.files = `git ls-files -z`.split("\x0").reject do |f| # f.match(%r{^(test|spec|features)/}) # end spec.files = Dir["lib/**/*", "bin/*", "docs/*", "README.md"] spec.bindir = "bin" spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) } spec.require_paths = ["lib"] spec.add_dependency 'faraday' spec.add_dependency "thor" spec.add_development_dependency 'rake', '~> 10.0' spec.add_development_dependency 'rspec', '~> 3.0' spec.add_development_dependency 'webmock' spec.add_development_dependency 'simplecov' spec.add_development_dependency 'codeclimate-test-reporter', '~> 1.0.0' end ## Instruction: [Bugfix] Add bindir and optimize files in spec ## Code After: lib = File.expand_path('../lib', __FILE__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) require 'fabricio/version' Gem::Specification.new do |spec| spec.name = "fabricio" spec.version = Fabricio::VERSION spec.authors = ["Egor Tolstoy", "Vadim Smal"] spec.email = 'igrekde@gmail.com' spec.summary = "A simple gem that fetches mobile application statistics from Fabric.io API." spec.license = "MIT" spec.files = Dir["lib/**/*", "bin/*", "docs/*", "README.md"] spec.bindir = "bin" spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) } spec.require_paths = ["lib"] spec.add_dependency 'faraday' spec.add_dependency "thor" spec.add_development_dependency 'rake', '~> 10.0' spec.add_development_dependency 'rspec', '~> 3.0' spec.add_development_dependency 'webmock' spec.add_development_dependency 'simplecov' spec.add_development_dependency 'codeclimate-test-reporter', '~> 1.0.0' end
lib = File.expand_path('../lib', __FILE__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) require 'fabricio/version' Gem::Specification.new do |spec| spec.name = "fabricio" spec.version = Fabricio::VERSION spec.authors = ["Egor Tolstoy", "Vadim Smal"] spec.email = 'igrekde@gmail.com' spec.summary = "A simple gem that fetches mobile application statistics from Fabric.io API." spec.license = "MIT" - # spec.files = `git ls-files -z`.split("\x0").reject do |f| - # f.match(%r{^(test|spec|features)/}) - # end spec.files = Dir["lib/**/*", "bin/*", "docs/*", "README.md"] spec.bindir = "bin" spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) } spec.require_paths = ["lib"] spec.add_dependency 'faraday' spec.add_dependency "thor" spec.add_development_dependency 'rake', '~> 10.0' spec.add_development_dependency 'rspec', '~> 3.0' spec.add_development_dependency 'webmock' spec.add_development_dependency 'simplecov' spec.add_development_dependency 'codeclimate-test-reporter', '~> 1.0.0' end
3
0.096774
0
3
64762cf9c8a7150193de4acd0592fb0495a98558
app/views/static_pages/home.html.erb
app/views/static_pages/home.html.erb
<% provide(:title, "Home") %> <div class="center jumbotron"> <h1>Welcome to the Deliberate Finances App</h1> <h2>This is your money-managing home page. Woot!</h2> <%= link_to "Sign up", '#', class: "btn btn-lg btn-primary" %> </div>
<div class="center jumbotron"> <h1>Welcome to the Deliberate Finances App</h1> <h2>This is your money-managing home page. Woot!</h2> <%= link_to "Sign up", '#', class: "btn btn-lg btn-primary" %> </div>
Update home page title tag to reflect app name
Update home page title tag to reflect app name
HTML+ERB
mit
crwhitesides/deliberate_finances_app,crwhitesides/deliberate_finances_app,crwhitesides/deliberate_finances_app
html+erb
## Code Before: <% provide(:title, "Home") %> <div class="center jumbotron"> <h1>Welcome to the Deliberate Finances App</h1> <h2>This is your money-managing home page. Woot!</h2> <%= link_to "Sign up", '#', class: "btn btn-lg btn-primary" %> </div> ## Instruction: Update home page title tag to reflect app name ## Code After: <div class="center jumbotron"> <h1>Welcome to the Deliberate Finances App</h1> <h2>This is your money-managing home page. Woot!</h2> <%= link_to "Sign up", '#', class: "btn btn-lg btn-primary" %> </div>
- <% provide(:title, "Home") %> <div class="center jumbotron"> <h1>Welcome to the Deliberate Finances App</h1> <h2>This is your money-managing home page. Woot!</h2> <%= link_to "Sign up", '#', class: "btn btn-lg btn-primary" %> </div>
1
0.142857
0
1
94e033902bac9c948ff0cfb72576a8e6c7c3cdce
root/scripts/gebo/perform.js
root/scripts/gebo/perform.js
// For testing if (typeof module !== 'undefined') { $ = require('jquery'); gebo = require('../config').gebo; FormData = require('./__mocks__/FormData'); } /** * Send a request to the gebo. The message can be sent * as FormData or JSON. * * @param object * @param FormData - optional * @param function */ var perform = function(message, form, done) { var data = {}; if (typeof form === 'object') { data = new FormData(form); } else { done = form; } Object.keys(message).forEach(function(key) { var value = message[key]; if (typeof message[key] === 'object') { value = JSON.stringify(value); } if (typeof form === 'object') { data.append(key, value); } else { data[key] = value; } }); return $.ajax({ url: gebo + '/perform', type: 'POST', data: data, success: function(data) { done(); }, error: function(xhr, status, err) { done(err); }, }); }; if (typeof module !== 'undefined') { module.exports = perform; }
// For testing if (typeof module !== 'undefined') { $ = require('jquery'); gebo = require('../config').gebo; FormData = require('./__mocks__/FormData'); } /** * Send a request to the gebo. The message can be sent * as FormData or JSON. * * @param object * @param FormData - optional * @param function */ var perform = function(message, form, done) { var data = {}; if (typeof form === 'object') { data = new FormData(form); } else { done = form; } Object.keys(message).forEach(function(key) { var value = message[key]; if (typeof message[key] === 'object') { value = JSON.stringify(value); } if (typeof form === 'object') { data.append(key, value); } else { data[key] = value; } }); return $.ajax({ url: gebo + '/perform', type: 'POST', data: data, processData: false, contentType: false, success: function(data) { done(); }, error: function(xhr, status, err) { done(err); }, }); }; if (typeof module !== 'undefined') { module.exports = perform; }
Add processData and contentType properties to ajax call
Add processData and contentType properties to ajax call
JavaScript
mit
RaphaelDeLaGhetto/grunt-init-gebo-react-hai,RaphaelDeLaGhetto/grunt-init-gebo-react-hai
javascript
## Code Before: // For testing if (typeof module !== 'undefined') { $ = require('jquery'); gebo = require('../config').gebo; FormData = require('./__mocks__/FormData'); } /** * Send a request to the gebo. The message can be sent * as FormData or JSON. * * @param object * @param FormData - optional * @param function */ var perform = function(message, form, done) { var data = {}; if (typeof form === 'object') { data = new FormData(form); } else { done = form; } Object.keys(message).forEach(function(key) { var value = message[key]; if (typeof message[key] === 'object') { value = JSON.stringify(value); } if (typeof form === 'object') { data.append(key, value); } else { data[key] = value; } }); return $.ajax({ url: gebo + '/perform', type: 'POST', data: data, success: function(data) { done(); }, error: function(xhr, status, err) { done(err); }, }); }; if (typeof module !== 'undefined') { module.exports = perform; } ## Instruction: Add processData and contentType properties to ajax call ## Code After: // For testing if (typeof module !== 'undefined') { $ = require('jquery'); gebo = require('../config').gebo; FormData = require('./__mocks__/FormData'); } /** * Send a request to the gebo. The message can be sent * as FormData or JSON. * * @param object * @param FormData - optional * @param function */ var perform = function(message, form, done) { var data = {}; if (typeof form === 'object') { data = new FormData(form); } else { done = form; } Object.keys(message).forEach(function(key) { var value = message[key]; if (typeof message[key] === 'object') { value = JSON.stringify(value); } if (typeof form === 'object') { data.append(key, value); } else { data[key] = value; } }); return $.ajax({ url: gebo + '/perform', type: 'POST', data: data, processData: false, contentType: false, success: function(data) { done(); }, error: function(xhr, status, err) { done(err); }, }); }; if (typeof module !== 'undefined') { module.exports = perform; }
// For testing if (typeof module !== 'undefined') { $ = require('jquery'); gebo = require('../config').gebo; FormData = require('./__mocks__/FormData'); } /** * Send a request to the gebo. The message can be sent * as FormData or JSON. * * @param object * @param FormData - optional * @param function */ var perform = function(message, form, done) { var data = {}; if (typeof form === 'object') { data = new FormData(form); } else { done = form; } Object.keys(message).forEach(function(key) { var value = message[key]; if (typeof message[key] === 'object') { value = JSON.stringify(value); } if (typeof form === 'object') { data.append(key, value); } else { data[key] = value; } }); return $.ajax({ url: gebo + '/perform', type: 'POST', data: data, + processData: false, + contentType: false, success: function(data) { done(); }, error: function(xhr, status, err) { done(err); }, }); }; if (typeof module !== 'undefined') { module.exports = perform; }
2
0.036364
2
0
1aaa87f7e2fca83ad99cb4ef3e1dbe497e63a899
js/models/project_specific_mixin.js
js/models/project_specific_mixin.js
"use strict"; var _ = require('underscore') , Project = require('./project') /* * Mixin for models which require a project to be set. * * Looks for attribute, collection, and explicit passing in options. Will raise * an error if no project is found, or if different projects are found. */ module.exports = { constructor: function (attributes, options) { var candidates, results, slug; candidates = { options: options && options.project, collection: options && options.collection && options.collection.project, attributes: attributes && attributes.project } if (candidates.attributes) { slug = candidates.attributes.url.match(/[^\/]+/g).slice(-1); candidates.attributes = new Project({ name: candidates.attributes.name, slug: slug }); } results = _.chain(candidates).filter(function (p) { return p instanceof Project }); if (!results.value().length) { throw new Error('Must pass a project object, either in options, collection, or attributes.'); } if (results.map(function (p) { return p.get('slug') }).uniq().value().length > 1) { throw new Error('Two different projects passed. Not possible.') } // Take the first result this.project = results.first().value(); } }
"use strict"; var _ = require('underscore') , Project = require('./project') /* * Mixin for models which require a project to be set. * * Looks for attribute, collection, and explicit passing in options. Will raise * an error if no project is found, or if different projects are found. */ module.exports = { constructor: function (attributes, options) { var candidates, results, slug; candidates = { options: options && options.project, collection: options && options.collection && options.collection.project, attributes: attributes && attributes.project } if (candidates.attributes) { slug = candidates.attributes.url.match(/[^\/]+/g).slice(-1); candidates.attributes = new Project({ name: candidates.attributes.name, slug: slug }); } results = _.chain(candidates).filter(function (p) { return p instanceof Project }); if (!results.value().length) { throw new Error('Must pass a project object, either in options, collection, or attributes.'); } if (results.map(function (p) { return p.get('slug') }).flatten().uniq().value().length > 1) { throw new Error('Two different projects passed.') } // Take the first result this.project = results.first().value(); } }
Fix bug in project-specific backbone model mixin
Fix bug in project-specific backbone model mixin
JavaScript
agpl-3.0
editorsnotes/editorsnotes-renderer
javascript
## Code Before: "use strict"; var _ = require('underscore') , Project = require('./project') /* * Mixin for models which require a project to be set. * * Looks for attribute, collection, and explicit passing in options. Will raise * an error if no project is found, or if different projects are found. */ module.exports = { constructor: function (attributes, options) { var candidates, results, slug; candidates = { options: options && options.project, collection: options && options.collection && options.collection.project, attributes: attributes && attributes.project } if (candidates.attributes) { slug = candidates.attributes.url.match(/[^\/]+/g).slice(-1); candidates.attributes = new Project({ name: candidates.attributes.name, slug: slug }); } results = _.chain(candidates).filter(function (p) { return p instanceof Project }); if (!results.value().length) { throw new Error('Must pass a project object, either in options, collection, or attributes.'); } if (results.map(function (p) { return p.get('slug') }).uniq().value().length > 1) { throw new Error('Two different projects passed. Not possible.') } // Take the first result this.project = results.first().value(); } } ## Instruction: Fix bug in project-specific backbone model mixin ## Code After: "use strict"; var _ = require('underscore') , Project = require('./project') /* * Mixin for models which require a project to be set. * * Looks for attribute, collection, and explicit passing in options. Will raise * an error if no project is found, or if different projects are found. */ module.exports = { constructor: function (attributes, options) { var candidates, results, slug; candidates = { options: options && options.project, collection: options && options.collection && options.collection.project, attributes: attributes && attributes.project } if (candidates.attributes) { slug = candidates.attributes.url.match(/[^\/]+/g).slice(-1); candidates.attributes = new Project({ name: candidates.attributes.name, slug: slug }); } results = _.chain(candidates).filter(function (p) { return p instanceof Project }); if (!results.value().length) { throw new Error('Must pass a project object, either in options, collection, or attributes.'); } if (results.map(function (p) { return p.get('slug') }).flatten().uniq().value().length > 1) { throw new Error('Two different projects passed.') } // Take the first result this.project = results.first().value(); } }
"use strict"; var _ = require('underscore') , Project = require('./project') /* * Mixin for models which require a project to be set. * * Looks for attribute, collection, and explicit passing in options. Will raise * an error if no project is found, or if different projects are found. */ module.exports = { constructor: function (attributes, options) { var candidates, results, slug; candidates = { options: options && options.project, collection: options && options.collection && options.collection.project, attributes: attributes && attributes.project } if (candidates.attributes) { slug = candidates.attributes.url.match(/[^\/]+/g).slice(-1); candidates.attributes = new Project({ name: candidates.attributes.name, slug: slug }); } results = _.chain(candidates).filter(function (p) { return p instanceof Project }); if (!results.value().length) { throw new Error('Must pass a project object, either in options, collection, or attributes.'); } - if (results.map(function (p) { return p.get('slug') }).uniq().value().length > 1) { + if (results.map(function (p) { return p.get('slug') }).flatten().uniq().value().length > 1) { ? ++++++++++ - throw new Error('Two different projects passed. Not possible.') ? -------------- + throw new Error('Two different projects passed.') } // Take the first result this.project = results.first().value(); } }
4
0.090909
2
2
b660f07021efde654060d76b5e430b5d051d4ddc
app/app.css
app/app.css
/* app css stylesheet */ .menu { list-style: none; border-bottom: 0.1em solid black; margin-bottom: 2em; padding: 0 0 0.5em; } .menu:before { content: "["; } .menu:after { content: "]"; } .menu > li { display: inline; } .menu > li + li:before { content: "|"; padding-right: 0.3em; }
/* app css stylesheet */ .menu { list-style: none; border-bottom: 0.1em solid black; margin-bottom: 2em; padding: 0 0 0.5em; } .menu:before { content: "["; } .menu:after { content: "]"; } .menu > li { display: inline; } .menu > li + li:before { content: "|"; padding-right: 0.3em; } /*ASP TESTING**/ /* View: Phone detail */ .phone { background-color: white; border: 1px solid black; float: left; height: 400px; margin-bottom: 2em; margin-right: 3em; padding: 2em; width: 400px; } .phone-thumbs { list-style: none; margin: 0; } .phone-thumbs img { height: 100px; padding: 1em; width: 100px; } .phone-thumbs li { background-color: white; border: 1px solid black; display: inline-block; margin: 1em; } .specs { clear: both; list-style: none; margin: 0; padding: 0; } .specs dt { font-weight: bold; } .specs > li { display: inline-block; vertical-align: top; width: 200px; } .specs > li > span { font-size: 1.2em; font-weight: bold; }
Add css for list items
Add css for list items
CSS
mit
omnibot2k/heroesjs,omnibot2k/heroesjs
css
## Code Before: /* app css stylesheet */ .menu { list-style: none; border-bottom: 0.1em solid black; margin-bottom: 2em; padding: 0 0 0.5em; } .menu:before { content: "["; } .menu:after { content: "]"; } .menu > li { display: inline; } .menu > li + li:before { content: "|"; padding-right: 0.3em; } ## Instruction: Add css for list items ## Code After: /* app css stylesheet */ .menu { list-style: none; border-bottom: 0.1em solid black; margin-bottom: 2em; padding: 0 0 0.5em; } .menu:before { content: "["; } .menu:after { content: "]"; } .menu > li { display: inline; } .menu > li + li:before { content: "|"; padding-right: 0.3em; } /*ASP TESTING**/ /* View: Phone detail */ .phone { background-color: white; border: 1px solid black; float: left; height: 400px; margin-bottom: 2em; margin-right: 3em; padding: 2em; width: 400px; } .phone-thumbs { list-style: none; margin: 0; } .phone-thumbs img { height: 100px; padding: 1em; width: 100px; } .phone-thumbs li { background-color: white; border: 1px solid black; display: inline-block; margin: 1em; } .specs { clear: both; list-style: none; margin: 0; padding: 0; } .specs dt { font-weight: bold; } .specs > li { display: inline-block; vertical-align: top; width: 200px; } .specs > li > span { font-size: 1.2em; font-weight: bold; }
/* app css stylesheet */ .menu { list-style: none; border-bottom: 0.1em solid black; margin-bottom: 2em; padding: 0 0 0.5em; } .menu:before { content: "["; } .menu:after { content: "]"; } .menu > li { display: inline; } .menu > li + li:before { content: "|"; padding-right: 0.3em; } + + /*ASP TESTING**/ + /* View: Phone detail */ + .phone { + background-color: white; + border: 1px solid black; + float: left; + height: 400px; + margin-bottom: 2em; + margin-right: 3em; + padding: 2em; + width: 400px; + } + + .phone-thumbs { + list-style: none; + margin: 0; + } + + .phone-thumbs img { + height: 100px; + padding: 1em; + width: 100px; + } + + .phone-thumbs li { + background-color: white; + border: 1px solid black; + display: inline-block; + margin: 1em; + } + + .specs { + clear: both; + list-style: none; + margin: 0; + padding: 0; + } + + .specs dt { + font-weight: bold; + } + + .specs > li { + display: inline-block; + vertical-align: top; + width: 200px; + } + + .specs > li > span { + font-size: 1.2em; + font-weight: bold; + }
53
2.12
53
0
6c63cabb792b1f3ff0b6f4d25024b17901f53124
resources/scripts/index.js
resources/scripts/index.js
'use strict'; const $ = require('jquery'), remote = require('remote'); let main = remote.getCurrentWindow(); $(function(){ $('.tools .close').on('click', function(){ $('.app').addClass('closing'); setTimeout(function(){ main.close(); }, 300); }); $('.tools .maximize').on('click', function(){ main.maximize(); }); $('.tools .minimize').on('click', function(){ main.minimize(); }); });
'use strict'; const $ = require('jquery'), remote = require('remote'); let main = remote.getCurrentWindow(); $(function(){ $('.tools > div').on('click', function(e){ main[e.target.className](); }); });
Change back to original: Animations should depend on the DE.
Change back to original: Animations should depend on the DE.
JavaScript
mit
JamenMarz/cluster,JamenMarz/vint
javascript
## Code Before: 'use strict'; const $ = require('jquery'), remote = require('remote'); let main = remote.getCurrentWindow(); $(function(){ $('.tools .close').on('click', function(){ $('.app').addClass('closing'); setTimeout(function(){ main.close(); }, 300); }); $('.tools .maximize').on('click', function(){ main.maximize(); }); $('.tools .minimize').on('click', function(){ main.minimize(); }); }); ## Instruction: Change back to original: Animations should depend on the DE. ## Code After: 'use strict'; const $ = require('jquery'), remote = require('remote'); let main = remote.getCurrentWindow(); $(function(){ $('.tools > div').on('click', function(e){ main[e.target.className](); }); });
'use strict'; const $ = require('jquery'), remote = require('remote'); let main = remote.getCurrentWindow(); $(function(){ - $('.tools .close').on('click', function(){ ? ^^^^^^ + $('.tools > div').on('click', function(e){ ? ^^^^^ + + main[e.target.className](); - $('.app').addClass('closing'); - setTimeout(function(){ - main.close(); - }, 300); - }); - - $('.tools .maximize').on('click', function(){ - main.maximize(); - }); - - $('.tools .minimize').on('click', function(){ - main.minimize(); }); });
15
0.652174
2
13
5861707f0f2dfe198845c57c197542542e374803
.travis.yml
.travis.yml
language: ruby sudo: false cache: bundler gemfile: - gemfiles/rails_4.2.gemfile - gemfiles/rails_5.0.gemfile - gemfiles/rails_5.1.gemfile - gemfiles/rails_5.2.gemfile - Gemfile rvm: - '2.2.10' - '2.3.7' - '2.4.4' - '2.5.1' - jruby-9.1.15.0 matrix: include: - rvm: '2.3.7' gemfile: 'gemfiles/rails_4.0.gemfile' - rvm: '2.3.7' gemfile: 'gemfiles/rails_4.1.gemfile' - rvm: '2.4.4' gemfile: gemfiles/rails_head.gemfile allow_failures: - gemfile: gemfiles/rails_head.gemfile
language: ruby sudo: false cache: bundler gemfile: - gemfiles/rails_4.2.gemfile - gemfiles/rails_5.0.gemfile - gemfiles/rails_5.1.gemfile - gemfiles/rails_5.2.gemfile - Gemfile before_install: - gem update --system - gem install bundler rvm: - '2.2.10' - '2.3.7' - '2.4.4' - '2.5.1' - jruby-9.1.15.0 matrix: include: - rvm: '2.3.7' gemfile: 'gemfiles/rails_4.0.gemfile' - rvm: '2.3.7' gemfile: 'gemfiles/rails_4.1.gemfile' - rvm: '2.4.4' gemfile: gemfiles/rails_head.gemfile allow_failures: - gemfile: gemfiles/rails_head.gemfile
Update Rubygems and bundler before building
Update Rubygems and bundler before building Fixes https://github.com/travis-ci/travis-ci/issues/8978.
YAML
mit
lautis/encrypted_form_fields
yaml
## Code Before: language: ruby sudo: false cache: bundler gemfile: - gemfiles/rails_4.2.gemfile - gemfiles/rails_5.0.gemfile - gemfiles/rails_5.1.gemfile - gemfiles/rails_5.2.gemfile - Gemfile rvm: - '2.2.10' - '2.3.7' - '2.4.4' - '2.5.1' - jruby-9.1.15.0 matrix: include: - rvm: '2.3.7' gemfile: 'gemfiles/rails_4.0.gemfile' - rvm: '2.3.7' gemfile: 'gemfiles/rails_4.1.gemfile' - rvm: '2.4.4' gemfile: gemfiles/rails_head.gemfile allow_failures: - gemfile: gemfiles/rails_head.gemfile ## Instruction: Update Rubygems and bundler before building Fixes https://github.com/travis-ci/travis-ci/issues/8978. ## Code After: language: ruby sudo: false cache: bundler gemfile: - gemfiles/rails_4.2.gemfile - gemfiles/rails_5.0.gemfile - gemfiles/rails_5.1.gemfile - gemfiles/rails_5.2.gemfile - Gemfile before_install: - gem update --system - gem install bundler rvm: - '2.2.10' - '2.3.7' - '2.4.4' - '2.5.1' - jruby-9.1.15.0 matrix: include: - rvm: '2.3.7' gemfile: 'gemfiles/rails_4.0.gemfile' - rvm: '2.3.7' gemfile: 'gemfiles/rails_4.1.gemfile' - rvm: '2.4.4' gemfile: gemfiles/rails_head.gemfile allow_failures: - gemfile: gemfiles/rails_head.gemfile
language: ruby sudo: false cache: bundler gemfile: - gemfiles/rails_4.2.gemfile - gemfiles/rails_5.0.gemfile - gemfiles/rails_5.1.gemfile - gemfiles/rails_5.2.gemfile - Gemfile + before_install: + - gem update --system + - gem install bundler rvm: - '2.2.10' - '2.3.7' - '2.4.4' - '2.5.1' - jruby-9.1.15.0 matrix: include: - rvm: '2.3.7' gemfile: 'gemfiles/rails_4.0.gemfile' - rvm: '2.3.7' gemfile: 'gemfiles/rails_4.1.gemfile' - rvm: '2.4.4' gemfile: gemfiles/rails_head.gemfile allow_failures: - gemfile: gemfiles/rails_head.gemfile
3
0.12
3
0
300fb559f77b6631714178179685cdb2a77926fa
.travis.yml
.travis.yml
--- language: java install: true script: $TARGET jdk: - openjdk7 - oraclejdk7 - oraclejdk8 env: matrix: - TARGET='mvn test' - TARGET='./gradlew test -s' notifications: email: - michael@mosmann.de - m.joehren@gmail.com
--- language: java install: true script: $TARGET jdk: - openjdk7 - oraclejdk7 - oraclejdk8 env: matrix: - TARGET='mvn test' - TARGET='./gradlew test -s' notifications: email: - michael@mosmann.de - m.joehren@gmail.com cache: directories: - $HOME/.m2/repository
Add Maven repository to the Travis cache
Add Maven repository to the Travis cache This speeds up Travis because dependencies can be cached between builds.
YAML
apache-2.0
flapdoodle-oss/de.flapdoodle.embed.mongo,flapdoodle-oss/de.flapdoodle.embed.mongo
yaml
## Code Before: --- language: java install: true script: $TARGET jdk: - openjdk7 - oraclejdk7 - oraclejdk8 env: matrix: - TARGET='mvn test' - TARGET='./gradlew test -s' notifications: email: - michael@mosmann.de - m.joehren@gmail.com ## Instruction: Add Maven repository to the Travis cache This speeds up Travis because dependencies can be cached between builds. ## Code After: --- language: java install: true script: $TARGET jdk: - openjdk7 - oraclejdk7 - oraclejdk8 env: matrix: - TARGET='mvn test' - TARGET='./gradlew test -s' notifications: email: - michael@mosmann.de - m.joehren@gmail.com cache: directories: - $HOME/.m2/repository
--- language: java install: true script: $TARGET jdk: - openjdk7 - oraclejdk7 - oraclejdk8 env: matrix: - TARGET='mvn test' - TARGET='./gradlew test -s' notifications: email: - michael@mosmann.de - m.joehren@gmail.com + + cache: + directories: + - $HOME/.m2/repository
4
0.222222
4
0
b3f11286bd1046c67e285a54f96322f14355e26c
app/views/admin/shared/_list.html.erb
app/views/admin/shared/_list.html.erb
<h2><%= header %></h2> <% unless options[:selector] %> <ul> <% items.each do |item| %> <li><%= item %></li> <% end %> </ul> <% end %>
<%= content_tag('h2', header) if header %> <% unless options[:selector] %> <ul> <% items.each do |item| %> <li><%= item %></li> <% end %> </ul> <% end %>
Use content_tag to display header if available.
Use content_tag to display header if available.
HTML+ERB
mit
chiragshah/typus,gkleiman/typus_3dglabs,wollzelle/typus,brainsome-de/typus,burn-notice/typus,readyfor/typus,brainsome-de/typus,typus/typus,burn-notice/typus,typus/typus,readyfor/typus,brainsome-de/typus,thirdthing/typus,readyfor/typus,gkleiman/typus_3dglabs,thirdthing/typus,wollzelle/typus,readyfor/typus,baban/typus,thirdthing/typus,thirdthing/typus,wollzelle/typus,wollzelle/typus,chiragshah/typus,chiragshah/typus,burn-notice/typus,baban/typus,brainsome-de/typus,typus/typus,chiragshah/typus,baban/typus,baban/typus,burn-notice/typus,oruen/typus,oruen/typus,typus/typus
html+erb
## Code Before: <h2><%= header %></h2> <% unless options[:selector] %> <ul> <% items.each do |item| %> <li><%= item %></li> <% end %> </ul> <% end %> ## Instruction: Use content_tag to display header if available. ## Code After: <%= content_tag('h2', header) if header %> <% unless options[:selector] %> <ul> <% items.each do |item| %> <li><%= item %></li> <% end %> </ul> <% end %>
- <h2><%= header %></h2> + <%= content_tag('h2', header) if header %> <% unless options[:selector] %> <ul> <% items.each do |item| %> <li><%= item %></li> <% end %> </ul> <% end %>
2
0.181818
1
1
9b726e94a82b735fd9e64c23410e245af0dbbca7
pkgs/applications/networking/browsers/chromium/sources.nix
pkgs/applications/networking/browsers/chromium/sources.nix
{ dev = { version = "25.0.1364.36"; url = "http://commondatastorage.googleapis.com/chromium-browser-official/chromium-25.0.1364.36.tar.bz2"; sha256 = "1pn7qv1s6lcx8k26h89x9zdy43rzdq12f92s2l6cfdhr9ls9wv0s"; }; beta = { version = "25.0.1364.36"; url = "http://commondatastorage.googleapis.com/chromium-browser-official/chromium-25.0.1364.36.tar.bz2"; sha256 = "1pn7qv1s6lcx8k26h89x9zdy43rzdq12f92s2l6cfdhr9ls9wv0s"; }; stable = { version = "24.0.1312.52"; url = "http://commondatastorage.googleapis.com/chromium-browser-official/chromium-24.0.1312.52.tar.bz2"; sha256 = "04fp04591dszx07wwdsgxf0wb2sxm863z1qxn5dii6f9yjqgh3gk"; }; }
{ dev = { version = "25.0.1364.36"; url = "http://commondatastorage.googleapis.com/chromium-browser-official/chromium-25.0.1364.36.tar.bz2"; sha256 = "1pn7qv1s6lcx8k26h89x9zdy43rzdq12f92s2l6cfdhr9ls9wv0s"; }; beta = { version = "25.0.1364.36"; url = "http://commondatastorage.googleapis.com/chromium-browser-official/chromium-25.0.1364.36.tar.bz2"; sha256 = "1pn7qv1s6lcx8k26h89x9zdy43rzdq12f92s2l6cfdhr9ls9wv0s"; }; stable = { version = "24.0.1312.69"; url = "http://commondatastorage.googleapis.com/chromium-browser-official/chromium-24.0.1312.69.tar.bz2"; sha256 = "1nvnhkky72nywk601vx5bbjp1m2f5dygza9h34y20inz3jgg8nbr"; }; }
Update stable channel to v24.0.1312.69.
chromium: Update stable channel to v24.0.1312.69. Let's begin with the most trivial one: The stable version. This version just contains a few bug fixes and builds fine so far. Signed-off-by: aszlig <ee1aa092358634f9c53f01b5a783726c9e21b35a@redmoonstudios.org>
Nix
mit
NixOS/nixpkgs,SymbiFlow/nixpkgs,SymbiFlow/nixpkgs,triton/triton,NixOS/nixpkgs,SymbiFlow/nixpkgs,NixOS/nixpkgs,SymbiFlow/nixpkgs,SymbiFlow/nixpkgs,NixOS/nixpkgs,SymbiFlow/nixpkgs,triton/triton,triton/triton,NixOS/nixpkgs,triton/triton,triton/triton,NixOS/nixpkgs,SymbiFlow/nixpkgs,NixOS/nixpkgs,triton/triton,SymbiFlow/nixpkgs,SymbiFlow/nixpkgs,NixOS/nixpkgs,SymbiFlow/nixpkgs,NixOS/nixpkgs,SymbiFlow/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,triton/triton,triton/triton,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,SymbiFlow/nixpkgs,SymbiFlow/nixpkgs
nix
## Code Before: { dev = { version = "25.0.1364.36"; url = "http://commondatastorage.googleapis.com/chromium-browser-official/chromium-25.0.1364.36.tar.bz2"; sha256 = "1pn7qv1s6lcx8k26h89x9zdy43rzdq12f92s2l6cfdhr9ls9wv0s"; }; beta = { version = "25.0.1364.36"; url = "http://commondatastorage.googleapis.com/chromium-browser-official/chromium-25.0.1364.36.tar.bz2"; sha256 = "1pn7qv1s6lcx8k26h89x9zdy43rzdq12f92s2l6cfdhr9ls9wv0s"; }; stable = { version = "24.0.1312.52"; url = "http://commondatastorage.googleapis.com/chromium-browser-official/chromium-24.0.1312.52.tar.bz2"; sha256 = "04fp04591dszx07wwdsgxf0wb2sxm863z1qxn5dii6f9yjqgh3gk"; }; } ## Instruction: chromium: Update stable channel to v24.0.1312.69. Let's begin with the most trivial one: The stable version. This version just contains a few bug fixes and builds fine so far. Signed-off-by: aszlig <ee1aa092358634f9c53f01b5a783726c9e21b35a@redmoonstudios.org> ## Code After: { dev = { version = "25.0.1364.36"; url = "http://commondatastorage.googleapis.com/chromium-browser-official/chromium-25.0.1364.36.tar.bz2"; sha256 = "1pn7qv1s6lcx8k26h89x9zdy43rzdq12f92s2l6cfdhr9ls9wv0s"; }; beta = { version = "25.0.1364.36"; url = "http://commondatastorage.googleapis.com/chromium-browser-official/chromium-25.0.1364.36.tar.bz2"; sha256 = "1pn7qv1s6lcx8k26h89x9zdy43rzdq12f92s2l6cfdhr9ls9wv0s"; }; stable = { version = "24.0.1312.69"; url = "http://commondatastorage.googleapis.com/chromium-browser-official/chromium-24.0.1312.69.tar.bz2"; sha256 = "1nvnhkky72nywk601vx5bbjp1m2f5dygza9h34y20inz3jgg8nbr"; }; }
{ dev = { version = "25.0.1364.36"; url = "http://commondatastorage.googleapis.com/chromium-browser-official/chromium-25.0.1364.36.tar.bz2"; sha256 = "1pn7qv1s6lcx8k26h89x9zdy43rzdq12f92s2l6cfdhr9ls9wv0s"; }; beta = { version = "25.0.1364.36"; url = "http://commondatastorage.googleapis.com/chromium-browser-official/chromium-25.0.1364.36.tar.bz2"; sha256 = "1pn7qv1s6lcx8k26h89x9zdy43rzdq12f92s2l6cfdhr9ls9wv0s"; }; stable = { - version = "24.0.1312.52"; ? ^^ + version = "24.0.1312.69"; ? ^^ - url = "http://commondatastorage.googleapis.com/chromium-browser-official/chromium-24.0.1312.52.tar.bz2"; ? ^^ + url = "http://commondatastorage.googleapis.com/chromium-browser-official/chromium-24.0.1312.69.tar.bz2"; ? ^^ - sha256 = "04fp04591dszx07wwdsgxf0wb2sxm863z1qxn5dii6f9yjqgh3gk"; + sha256 = "1nvnhkky72nywk601vx5bbjp1m2f5dygza9h34y20inz3jgg8nbr"; }; }
6
0.352941
3
3
b728d057660ef855b3c92dd8dbcfc3c3bfd1071c
index.html
index.html
--- layout: default type: home title: Christian, Programmer, LEGO Fan script: /js/github-feed.js --- <header> <img class="img-responsive" width="250" height="250" src="/img/Triangle717.svg"> </header> <blockquote> For I am not ashamed of the gospel of Christ, for it is the power of God to salvation for everyone who believes... <a target="_blank" href="http://bible.com/114/rom.1.16.nkjv">Romans&nbsp;1:16a&nbsp;(NKJV)</a> </blockquote> <section class="homepage-columns"> <div id="info"> <h2>Welcome to Triangle Land!</h2> <p>You have discovered Triangle Land, the website I affectionately call home.</p> </div> <div class="gh-events"> <h2>Recent GitHub Activity</h2> </div> </section>
--- layout: default type: home title: Christian, Programmer, LEGO Fan script: /js/github-feed.js --- <header> <img class="img-responsive" width="250" height="250" src="/img/Triangle717.svg"> </header> <blockquote> For I am not ashamed of the gospel of Christ, for it is the power of God to salvation for everyone who believes... <a target="_blank" href="http://bible.com/114/rom.1.16.nkjv">Romans&nbsp;1:16a&nbsp;(NKJV)</a> </blockquote> <section class="homepage-columns"> <div id="info"> <h2>Welcome to Triangle Land!</h2> <p>You have discovered Triangle Land, the website I affectionately call home.</p> </div> <div class="gh-events"> <h2>Recent GitHub Activity</h2> <noscript>Unfortunately, that information did not load. If a quick page reload does not work, you can view the feed directly on <a target="_blank" href="{{ site.github.repository_url }}/commits/master">GitHub</a>.</noscript> </div> </section>
Add noscript fallback for GH events
Add noscript fallback for GH events
HTML
mit
le717/le717.github.io
html
## Code Before: --- layout: default type: home title: Christian, Programmer, LEGO Fan script: /js/github-feed.js --- <header> <img class="img-responsive" width="250" height="250" src="/img/Triangle717.svg"> </header> <blockquote> For I am not ashamed of the gospel of Christ, for it is the power of God to salvation for everyone who believes... <a target="_blank" href="http://bible.com/114/rom.1.16.nkjv">Romans&nbsp;1:16a&nbsp;(NKJV)</a> </blockquote> <section class="homepage-columns"> <div id="info"> <h2>Welcome to Triangle Land!</h2> <p>You have discovered Triangle Land, the website I affectionately call home.</p> </div> <div class="gh-events"> <h2>Recent GitHub Activity</h2> </div> </section> ## Instruction: Add noscript fallback for GH events ## Code After: --- layout: default type: home title: Christian, Programmer, LEGO Fan script: /js/github-feed.js --- <header> <img class="img-responsive" width="250" height="250" src="/img/Triangle717.svg"> </header> <blockquote> For I am not ashamed of the gospel of Christ, for it is the power of God to salvation for everyone who believes... <a target="_blank" href="http://bible.com/114/rom.1.16.nkjv">Romans&nbsp;1:16a&nbsp;(NKJV)</a> </blockquote> <section class="homepage-columns"> <div id="info"> <h2>Welcome to Triangle Land!</h2> <p>You have discovered Triangle Land, the website I affectionately call home.</p> </div> <div class="gh-events"> <h2>Recent GitHub Activity</h2> <noscript>Unfortunately, that information did not load. If a quick page reload does not work, you can view the feed directly on <a target="_blank" href="{{ site.github.repository_url }}/commits/master">GitHub</a>.</noscript> </div> </section>
--- layout: default type: home title: Christian, Programmer, LEGO Fan script: /js/github-feed.js --- <header> <img class="img-responsive" width="250" height="250" src="/img/Triangle717.svg"> </header> <blockquote> For I am not ashamed of the gospel of Christ, for it is the power of God to salvation for everyone who believes... <a target="_blank" href="http://bible.com/114/rom.1.16.nkjv">Romans&nbsp;1:16a&nbsp;(NKJV)</a> </blockquote> <section class="homepage-columns"> <div id="info"> <h2>Welcome to Triangle Land!</h2> <p>You have discovered Triangle Land, the website I affectionately call home.</p> </div> <div class="gh-events"> <h2>Recent GitHub Activity</h2> + <noscript>Unfortunately, that information did not load. If a quick page reload does not work, you can view the feed directly on <a target="_blank" href="{{ site.github.repository_url }}/commits/master">GitHub</a>.</noscript> </div> </section>
1
0.038462
1
0
2e568aa5fbf57ea3db6e984476c2fcc32e123e4d
lib/radbeacon/scanner.rb
lib/radbeacon/scanner.rb
module Radbeacon class Scanner < LeScanner C_DEVICE_NAME = "0x0003" RADBEACON_USB = "52 61 64 42 65 61 63 6f 6e 20 55 53 42" def scan radbeacons = Array.new devices = super devices.each do |dev| radbeacon = radbeacon_check(dev) if radbeacon radbeacons << radbeacon end end radbeacons end def radbeacon_check(device) radbeacon = nil case device.values[C_DEVICE_NAME] when RADBEACON_USB radbeacon = Usb.new(device) end radbeacon end end end
module Radbeacon class Scanner < LeScanner C_DEVICE_NAME = "0x0003" RADBEACON_USB = "52 61 64 42 65 61 63 6f 6e 20 55 53 42" def scan radbeacons = Array.new devices = super devices.each do |dev| radbeacon = radbeacon_check(dev) if radbeacon radbeacons << radbeacon end end radbeacons end def fetch(mac_address) radbeacon = nil dev = BluetoothLeDevice.new(mac_address, nil) if dev.fetch_characteristics radbeacon = radbeacon_check(dev) end radbeacon end def radbeacon_check(device) radbeacon = nil case device.values[C_DEVICE_NAME] when RADBEACON_USB radbeacon = Usb.new(device) end radbeacon end end end
Add fetch method to return a radbeacon with a given mac
Add fetch method to return a radbeacon with a given mac
Ruby
mit
RadiusNetworks/radbeacon-gem
ruby
## Code Before: module Radbeacon class Scanner < LeScanner C_DEVICE_NAME = "0x0003" RADBEACON_USB = "52 61 64 42 65 61 63 6f 6e 20 55 53 42" def scan radbeacons = Array.new devices = super devices.each do |dev| radbeacon = radbeacon_check(dev) if radbeacon radbeacons << radbeacon end end radbeacons end def radbeacon_check(device) radbeacon = nil case device.values[C_DEVICE_NAME] when RADBEACON_USB radbeacon = Usb.new(device) end radbeacon end end end ## Instruction: Add fetch method to return a radbeacon with a given mac ## Code After: module Radbeacon class Scanner < LeScanner C_DEVICE_NAME = "0x0003" RADBEACON_USB = "52 61 64 42 65 61 63 6f 6e 20 55 53 42" def scan radbeacons = Array.new devices = super devices.each do |dev| radbeacon = radbeacon_check(dev) if radbeacon radbeacons << radbeacon end end radbeacons end def fetch(mac_address) radbeacon = nil dev = BluetoothLeDevice.new(mac_address, nil) if dev.fetch_characteristics radbeacon = radbeacon_check(dev) end radbeacon end def radbeacon_check(device) radbeacon = nil case device.values[C_DEVICE_NAME] when RADBEACON_USB radbeacon = Usb.new(device) end radbeacon end end end
module Radbeacon class Scanner < LeScanner C_DEVICE_NAME = "0x0003" RADBEACON_USB = "52 61 64 42 65 61 63 6f 6e 20 55 53 42" def scan radbeacons = Array.new devices = super devices.each do |dev| radbeacon = radbeacon_check(dev) if radbeacon radbeacons << radbeacon end end radbeacons end + def fetch(mac_address) + radbeacon = nil + dev = BluetoothLeDevice.new(mac_address, nil) + if dev.fetch_characteristics + radbeacon = radbeacon_check(dev) + end + radbeacon + end + def radbeacon_check(device) radbeacon = nil case device.values[C_DEVICE_NAME] when RADBEACON_USB radbeacon = Usb.new(device) end radbeacon end end end
9
0.310345
9
0
23989cb24d82ae2557e393c2816402f70bd88e3b
.travis.yml
.travis.yml
git: depth: 10 language: node_js node_js: - '8.10.0' - '6.14.0' dist: trusty sudo: false addons: chrome: stable before_install: - google-chrome-stable --headless --disable-gpu --remote-debugging-port=9222 http://localhost & - curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.9.4 - export PATH=$HOME/.yarn/bin:$PATH install: - yarn - yarn run lerna bootstrap script: - yarn run build - yarn run test after_success: yarn run report-coverage
git: depth: 10 sudo: false language: node_js node_js: - '8.10.0' - '6.14.0' before_install: - curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.9.4 - export PATH=$HOME/.yarn/bin:$PATH install: - yarn - yarn run lerna bootstrap script: - yarn run build - yarn run test after_success: yarn run report-coverage
Revert "Try fixing TRAVIS and PUPPETEER"
Revert "Try fixing TRAVIS and PUPPETEER" This reverts commit b09d7884ac3a5bd5100b13c3170e5d14a0c3eff4.
YAML
mit
webmiddle/webmiddle
yaml
## Code Before: git: depth: 10 language: node_js node_js: - '8.10.0' - '6.14.0' dist: trusty sudo: false addons: chrome: stable before_install: - google-chrome-stable --headless --disable-gpu --remote-debugging-port=9222 http://localhost & - curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.9.4 - export PATH=$HOME/.yarn/bin:$PATH install: - yarn - yarn run lerna bootstrap script: - yarn run build - yarn run test after_success: yarn run report-coverage ## Instruction: Revert "Try fixing TRAVIS and PUPPETEER" This reverts commit b09d7884ac3a5bd5100b13c3170e5d14a0c3eff4. ## Code After: git: depth: 10 sudo: false language: node_js node_js: - '8.10.0' - '6.14.0' before_install: - curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.9.4 - export PATH=$HOME/.yarn/bin:$PATH install: - yarn - yarn run lerna bootstrap script: - yarn run build - yarn run test after_success: yarn run report-coverage
git: depth: 10 + sudo: false language: node_js node_js: - '8.10.0' - '6.14.0' - dist: trusty - sudo: false - addons: - chrome: stable before_install: - - google-chrome-stable --headless --disable-gpu --remote-debugging-port=9222 http://localhost & - curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.9.4 - export PATH=$HOME/.yarn/bin:$PATH install: - yarn - yarn run lerna bootstrap script: - yarn run build - yarn run test after_success: yarn run report-coverage
6
0.272727
1
5
5ece57bbeac8c110417311470c30ba691e44affa
FiveCalls/FiveCallsTests/ContactLogsTests.swift
FiveCalls/FiveCallsTests/ContactLogsTests.swift
// // ContactLogsTests.swift // FiveCalls // // Created by Ben Scheirman on 2/5/17. // Copyright © 2017 5calls. All rights reserved. // import XCTest import Pantry @testable import FiveCalls class ContactLogsTests: XCTestCase { override func setUp() { super.setUp() Pantry.removeAllCache() } override func tearDown() { super.tearDown() } func testLoadsEmptyContactLogs() { let logs = ContactLogs.load() let expected: [ContactLog] = [] XCTAssertEqual(logs.all, expected) } func testSavingLog() { let dateFormatter = DateFormatter() dateFormatter.dateFormat = "yyyy-MM-dd" let date = dateFormatter.date(from: "1984-01-24")! let log = ContactLog(issueId: "issue1", contactId: "contact1", phone: "111-222-3333", outcome: "Left Voicemail", date: date) Pantry.pack([log], key: "log") if let loadedLogs: [ContactLog] = Pantry.unpack("log") { XCTAssertEqual([log], loadedLogs) } else { XCTFail() } var logs = ContactLogs() logs.add(log: log) let loadedLogs = ContactLogs.load() XCTAssertEqual(loadedLogs.all, [log]) } }
// // ContactLogsTests.swift // FiveCalls // // Created by Ben Scheirman on 2/5/17. // Copyright © 2017 5calls. All rights reserved. // import XCTest import Pantry @testable import FiveCalls class ContactLogsTests: XCTestCase { override func setUp() { super.setUp() Pantry.removeAllCache() } override func tearDown() { super.tearDown() } func testLoadsEmptyContactLogs() { let logs = ContactLogs.load() let expected: [ContactLog] = [] XCTAssertEqual(logs.all, expected) } func testSavingLog() { let dateFormatter = DateFormatter() dateFormatter.dateFormat = "yyyy-MM-dd" let date = dateFormatter.date(from: "1984-01-24")! let log = ContactLog(issueId: "issue1", contactId: "contact1", phone: "111-222-3333", outcome: "Left Voicemail", date: date, reported: true) Pantry.pack([log], key: "log") if let loadedLogs: [ContactLog] = Pantry.unpack("log") { XCTAssertEqual([log], loadedLogs) } else { XCTFail() } var logs = ContactLogs() logs.add(log: log) let loadedLogs = ContactLogs.load() XCTAssertEqual(loadedLogs.all, [log]) } }
Add missing arg in ContactLog initializer in test
Add missing arg in ContactLog initializer in test
Swift
mit
5calls/ios,5calls/ios,5calls/ios,5calls/ios
swift
## Code Before: // // ContactLogsTests.swift // FiveCalls // // Created by Ben Scheirman on 2/5/17. // Copyright © 2017 5calls. All rights reserved. // import XCTest import Pantry @testable import FiveCalls class ContactLogsTests: XCTestCase { override func setUp() { super.setUp() Pantry.removeAllCache() } override func tearDown() { super.tearDown() } func testLoadsEmptyContactLogs() { let logs = ContactLogs.load() let expected: [ContactLog] = [] XCTAssertEqual(logs.all, expected) } func testSavingLog() { let dateFormatter = DateFormatter() dateFormatter.dateFormat = "yyyy-MM-dd" let date = dateFormatter.date(from: "1984-01-24")! let log = ContactLog(issueId: "issue1", contactId: "contact1", phone: "111-222-3333", outcome: "Left Voicemail", date: date) Pantry.pack([log], key: "log") if let loadedLogs: [ContactLog] = Pantry.unpack("log") { XCTAssertEqual([log], loadedLogs) } else { XCTFail() } var logs = ContactLogs() logs.add(log: log) let loadedLogs = ContactLogs.load() XCTAssertEqual(loadedLogs.all, [log]) } } ## Instruction: Add missing arg in ContactLog initializer in test ## Code After: // // ContactLogsTests.swift // FiveCalls // // Created by Ben Scheirman on 2/5/17. // Copyright © 2017 5calls. All rights reserved. // import XCTest import Pantry @testable import FiveCalls class ContactLogsTests: XCTestCase { override func setUp() { super.setUp() Pantry.removeAllCache() } override func tearDown() { super.tearDown() } func testLoadsEmptyContactLogs() { let logs = ContactLogs.load() let expected: [ContactLog] = [] XCTAssertEqual(logs.all, expected) } func testSavingLog() { let dateFormatter = DateFormatter() dateFormatter.dateFormat = "yyyy-MM-dd" let date = dateFormatter.date(from: "1984-01-24")! let log = ContactLog(issueId: "issue1", contactId: "contact1", phone: "111-222-3333", outcome: "Left Voicemail", date: date, reported: true) Pantry.pack([log], key: "log") if let loadedLogs: [ContactLog] = Pantry.unpack("log") { XCTAssertEqual([log], loadedLogs) } else { XCTFail() } var logs = ContactLogs() logs.add(log: log) let loadedLogs = ContactLogs.load() XCTAssertEqual(loadedLogs.all, [log]) } }
// // ContactLogsTests.swift // FiveCalls // // Created by Ben Scheirman on 2/5/17. // Copyright © 2017 5calls. All rights reserved. // import XCTest import Pantry @testable import FiveCalls class ContactLogsTests: XCTestCase { override func setUp() { super.setUp() Pantry.removeAllCache() } override func tearDown() { super.tearDown() } func testLoadsEmptyContactLogs() { let logs = ContactLogs.load() let expected: [ContactLog] = [] XCTAssertEqual(logs.all, expected) } func testSavingLog() { let dateFormatter = DateFormatter() dateFormatter.dateFormat = "yyyy-MM-dd" let date = dateFormatter.date(from: "1984-01-24")! - let log = ContactLog(issueId: "issue1", contactId: "contact1", phone: "111-222-3333", outcome: "Left Voicemail", date: date) + let log = ContactLog(issueId: "issue1", contactId: "contact1", phone: "111-222-3333", outcome: "Left Voicemail", date: date, reported: true) ? ++++++++++++++++ Pantry.pack([log], key: "log") if let loadedLogs: [ContactLog] = Pantry.unpack("log") { XCTAssertEqual([log], loadedLogs) } else { XCTFail() } var logs = ContactLogs() logs.add(log: log) let loadedLogs = ContactLogs.load() XCTAssertEqual(loadedLogs.all, [log]) } }
2
0.04
1
1
22e471fc0973b74569fbb450e806213f4f2252ef
app/controllers/api/search_controller.rb
app/controllers/api/search_controller.rb
class Api::SearchController < ApplicationController def show @search = Line.search(params[:term]).joins(:quote).includes(:character, :quote).map(&:quote) render json: @search end end
class Api::SearchController < ApplicationController def show @searches = Line.search(params[:term]).joins(:quote).includes(:character, :quote).map(&:quote) render json: @searches, root: :searches end end
Use plural searches instead of searches
Use plural searches instead of searches
Ruby
mit
aackerman/lebowski-api,shanebarringer/lebowski-api,aackerman/lebowski-api
ruby
## Code Before: class Api::SearchController < ApplicationController def show @search = Line.search(params[:term]).joins(:quote).includes(:character, :quote).map(&:quote) render json: @search end end ## Instruction: Use plural searches instead of searches ## Code After: class Api::SearchController < ApplicationController def show @searches = Line.search(params[:term]).joins(:quote).includes(:character, :quote).map(&:quote) render json: @searches, root: :searches end end
class Api::SearchController < ApplicationController def show - @search = Line.search(params[:term]).joins(:quote).includes(:character, :quote).map(&:quote) + @searches = Line.search(params[:term]).joins(:quote).includes(:character, :quote).map(&:quote) ? ++ - render json: @search + render json: @searches, root: :searches end end
4
0.666667
2
2
7c4dd4931f59f7edd4fe5ce140f59ab38952e0ea
recipes/install_remoteservices.rb
recipes/install_remoteservices.rb
include_recipe "java" include_recipe "redisio::install" include_recipe "redisio::enable" %w{remote-services v2v sosreport-plugins}.each do |pkg| package "abiquo-#{pkg}" do action :install end end service "abiquo-tomcat" do provider Chef::Provider::Service::RedhatNoStatus supports :restart => true pattern "tomcat" end
package "dhclient" do ignore_failure true action :purge end include_recipe "java" include_recipe "redisio::install" include_recipe "redisio::enable" %w{remote-services v2v sosreport-plugins}.each do |pkg| package "abiquo-#{pkg}" do action :install end end service "abiquo-tomcat" do provider Chef::Provider::Service::RedhatNoStatus supports :restart => true pattern "tomcat" end
Uninstall existing DHCP clients before installing
Uninstall existing DHCP clients before installing
Ruby
apache-2.0
abiquo/abiquo-cookbook,abiquo/abiquo-cookbook
ruby
## Code Before: include_recipe "java" include_recipe "redisio::install" include_recipe "redisio::enable" %w{remote-services v2v sosreport-plugins}.each do |pkg| package "abiquo-#{pkg}" do action :install end end service "abiquo-tomcat" do provider Chef::Provider::Service::RedhatNoStatus supports :restart => true pattern "tomcat" end ## Instruction: Uninstall existing DHCP clients before installing ## Code After: package "dhclient" do ignore_failure true action :purge end include_recipe "java" include_recipe "redisio::install" include_recipe "redisio::enable" %w{remote-services v2v sosreport-plugins}.each do |pkg| package "abiquo-#{pkg}" do action :install end end service "abiquo-tomcat" do provider Chef::Provider::Service::RedhatNoStatus supports :restart => true pattern "tomcat" end
+ + package "dhclient" do + ignore_failure true + action :purge + end include_recipe "java" include_recipe "redisio::install" include_recipe "redisio::enable" %w{remote-services v2v sosreport-plugins}.each do |pkg| package "abiquo-#{pkg}" do action :install end end service "abiquo-tomcat" do provider Chef::Provider::Service::RedhatNoStatus supports :restart => true pattern "tomcat" end
5
0.3125
5
0
cc5ede9378697ab9e97344a175512b906c080fe3
static/cppp-mode.js
static/cppp-mode.js
define(function (require) { 'use strict'; var jquery = require('jquery'); var monaco = require('monaco'); var cpp = require('vs/basic-languages/src/cpp'); // We need to create a new definition for cpp so we can remove invalid keywords function definition() { var cppp = jquery.extend(true, {}, cpp.language); // deep copy function removeKeyword(keyword) { var index = cppp.keywords.indexOf(keyword); if (index > -1) { cppp.keywords.splice(index, 1); } } removeKeyword("array"); removeKeyword("in"); removeKeyword("interface"); return cppp; } monaco.languages.register({id: 'cppp'}); monaco.languages.setMonarchTokensProvider('cppp', definition()); });
define(function (require) { 'use strict'; var jquery = require('jquery'); var monaco = require('monaco'); var cpp = require('vs/basic-languages/src/cpp'); // We need to create a new definition for cpp so we can remove invalid keywords function definition() { var cppp = jquery.extend(true, {}, cpp.language); // deep copy function removeKeyword(keyword) { var index = cppp.keywords.indexOf(keyword); if (index > -1) { cppp.keywords.splice(index, 1); } } removeKeyword("array"); removeKeyword("in"); removeKeyword("interface"); return cppp; } monaco.languages.register({id: 'cppp'}); monaco.languages.setLanguageConfiguration('cppp', cpp.conf); monaco.languages.setMonarchTokensProvider('cppp', definition()); });
Fix up indentation and other config fo cppp mode
Fix up indentation and other config fo cppp mode
JavaScript
bsd-2-clause
dkm/gcc-explorer,dkm/gcc-explorer,mattgodbolt/compiler-explorer,mattgodbolt/gcc-explorer,dkm/gcc-explorer,mattgodbolt/compiler-explorer,mattgodbolt/compiler-explorer,mattgodbolt/compiler-explorer,dkm/gcc-explorer,dkm/gcc-explorer,mattgodbolt/gcc-explorer,mattgodbolt/gcc-explorer,mattgodbolt/gcc-explorer,mattgodbolt/compiler-explorer,dkm/gcc-explorer,mattgodbolt/compiler-explorer,mattgodbolt/compiler-explorer,mattgodbolt/gcc-explorer,mattgodbolt/compiler-explorer,dkm/gcc-explorer,dkm/gcc-explorer,dkm/gcc-explorer
javascript
## Code Before: define(function (require) { 'use strict'; var jquery = require('jquery'); var monaco = require('monaco'); var cpp = require('vs/basic-languages/src/cpp'); // We need to create a new definition for cpp so we can remove invalid keywords function definition() { var cppp = jquery.extend(true, {}, cpp.language); // deep copy function removeKeyword(keyword) { var index = cppp.keywords.indexOf(keyword); if (index > -1) { cppp.keywords.splice(index, 1); } } removeKeyword("array"); removeKeyword("in"); removeKeyword("interface"); return cppp; } monaco.languages.register({id: 'cppp'}); monaco.languages.setMonarchTokensProvider('cppp', definition()); }); ## Instruction: Fix up indentation and other config fo cppp mode ## Code After: define(function (require) { 'use strict'; var jquery = require('jquery'); var monaco = require('monaco'); var cpp = require('vs/basic-languages/src/cpp'); // We need to create a new definition for cpp so we can remove invalid keywords function definition() { var cppp = jquery.extend(true, {}, cpp.language); // deep copy function removeKeyword(keyword) { var index = cppp.keywords.indexOf(keyword); if (index > -1) { cppp.keywords.splice(index, 1); } } removeKeyword("array"); removeKeyword("in"); removeKeyword("interface"); return cppp; } monaco.languages.register({id: 'cppp'}); monaco.languages.setLanguageConfiguration('cppp', cpp.conf); monaco.languages.setMonarchTokensProvider('cppp', definition()); });
define(function (require) { 'use strict'; var jquery = require('jquery'); var monaco = require('monaco'); var cpp = require('vs/basic-languages/src/cpp'); // We need to create a new definition for cpp so we can remove invalid keywords function definition() { var cppp = jquery.extend(true, {}, cpp.language); // deep copy function removeKeyword(keyword) { var index = cppp.keywords.indexOf(keyword); if (index > -1) { cppp.keywords.splice(index, 1); } } removeKeyword("array"); removeKeyword("in"); removeKeyword("interface"); return cppp; } monaco.languages.register({id: 'cppp'}); + monaco.languages.setLanguageConfiguration('cppp', cpp.conf); monaco.languages.setMonarchTokensProvider('cppp', definition()); });
1
0.035714
1
0
8ae272ef9189729cbd291c92341a48e26aeb687b
payment/templates/payment/paypal-card.html
payment/templates/payment/paypal-card.html
{% extends "payment/details.html" %} {% load as_bootstrap from bootstrap %} {% load gross from prices %} {% block forms %} <form method="post" class="form-horizontal"> {% csrf_token %} {{ form.non_field_errors|as_bootstrap }} {{ form.name|as_bootstrap }} {{ form.number|as_bootstrap }} <div class="control-group name required"> <label class="control-label">Expiry date</label> <div class="controls controls-row"> {{ form.expiration }} </div> </div> {{ form.cvv2|as_bootstrap }} <div class="form-actions"> <button type="submit" class="btn btn-primary"> Save changes </button> </div> </form> {% endblock forms %}
{% extends "payment/details.html" %} {% load as_bootstrap from bootstrap %} {% load gross from prices %} {% block forms %} <form method="post" class="form-horizontal"> {% csrf_token %} {{ form.non_field_errors|as_bootstrap }} {{ form.name|as_bootstrap }} {{ form.number|as_bootstrap }} <div class="control-group name required{% if form.expiration.errors %} error{% endif %}"> <label class="control-label">Expiry date</label> <div class="controls controls-row"> {{ form.expiration }} {% if form.expiration.errors %} <span class="help-inline error"> {% for error in form.expiration.errors %} {{ error }} {% endfor %} </span>{% endif %} </div> </div> {{ form.cvv2|as_bootstrap }} <div class="form-actions"> <button type="submit" class="btn btn-primary"> Save changes </button> </div> </form> {% endblock forms %}
Add errors display in pay card
Add errors display in pay card
HTML
bsd-3-clause
taedori81/saleor,maferelo/saleor,jreigel/saleor,taedori81/saleor,spartonia/saleor,avorio/saleor,dashmug/saleor,mociepka/saleor,Drekscott/Motlaesaleor,mociepka/saleor,UITools/saleor,rodrigozn/CW-Shop,UITools/saleor,paweltin/saleor,hongquan/saleor,car3oon/saleor,dashmug/saleor,Drekscott/Motlaesaleor,tfroehlich82/saleor,laosunhust/saleor,jreigel/saleor,hongquan/saleor,paweltin/saleor,paweltin/saleor,itbabu/saleor,josesanch/saleor,itbabu/saleor,mociepka/saleor,itbabu/saleor,avorio/saleor,maferelo/saleor,spartonia/saleor,jreigel/saleor,spartonia/saleor,HyperManTT/ECommerceSaleor,rchav/vinerack,laosunhust/saleor,arth-co/saleor,arth-co/saleor,rchav/vinerack,car3oon/saleor,avorio/saleor,KenMutemi/saleor,laosunhust/saleor,taedori81/saleor,hongquan/saleor,josesanch/saleor,KenMutemi/saleor,laosunhust/saleor,tfroehlich82/saleor,spartonia/saleor,KenMutemi/saleor,UITools/saleor,dashmug/saleor,Drekscott/Motlaesaleor,rodrigozn/CW-Shop,Drekscott/Motlaesaleor,arth-co/saleor,rchav/vinerack,HyperManTT/ECommerceSaleor,rodrigozn/CW-Shop,paweltin/saleor,car3oon/saleor,tfroehlich82/saleor,arth-co/saleor,josesanch/saleor,UITools/saleor,avorio/saleor,HyperManTT/ECommerceSaleor,maferelo/saleor,taedori81/saleor,UITools/saleor
html
## Code Before: {% extends "payment/details.html" %} {% load as_bootstrap from bootstrap %} {% load gross from prices %} {% block forms %} <form method="post" class="form-horizontal"> {% csrf_token %} {{ form.non_field_errors|as_bootstrap }} {{ form.name|as_bootstrap }} {{ form.number|as_bootstrap }} <div class="control-group name required"> <label class="control-label">Expiry date</label> <div class="controls controls-row"> {{ form.expiration }} </div> </div> {{ form.cvv2|as_bootstrap }} <div class="form-actions"> <button type="submit" class="btn btn-primary"> Save changes </button> </div> </form> {% endblock forms %} ## Instruction: Add errors display in pay card ## Code After: {% extends "payment/details.html" %} {% load as_bootstrap from bootstrap %} {% load gross from prices %} {% block forms %} <form method="post" class="form-horizontal"> {% csrf_token %} {{ form.non_field_errors|as_bootstrap }} {{ form.name|as_bootstrap }} {{ form.number|as_bootstrap }} <div class="control-group name required{% if form.expiration.errors %} error{% endif %}"> <label class="control-label">Expiry date</label> <div class="controls controls-row"> {{ form.expiration }} {% if form.expiration.errors %} <span class="help-inline error"> {% for error in form.expiration.errors %} {{ error }} {% endfor %} </span>{% endif %} </div> </div> {{ form.cvv2|as_bootstrap }} <div class="form-actions"> <button type="submit" class="btn btn-primary"> Save changes </button> </div> </form> {% endblock forms %}
{% extends "payment/details.html" %} {% load as_bootstrap from bootstrap %} {% load gross from prices %} {% block forms %} <form method="post" class="form-horizontal"> {% csrf_token %} {{ form.non_field_errors|as_bootstrap }} {{ form.name|as_bootstrap }} {{ form.number|as_bootstrap }} - <div class="control-group name required"> + <div class="control-group name required{% if form.expiration.errors %} error{% endif %}"> <label class="control-label">Expiry date</label> <div class="controls controls-row"> {{ form.expiration }} + {% if form.expiration.errors %} + <span class="help-inline error"> + {% for error in form.expiration.errors %} + {{ error }} + {% endfor %} + </span>{% endif %} </div> </div> {{ form.cvv2|as_bootstrap }} <div class="form-actions"> <button type="submit" class="btn btn-primary"> Save changes </button> </div> </form> {% endblock forms %}
8
0.32
7
1
03333459d126246df09625c1e516f30bdf910fc4
bremen/index.html
bremen/index.html
--- layout: lab title: Bremen # always same as lab ??? lab: OK Lab Bremen #needed for event and project aggregation lat: 53.079296 long: 8.801694 members: - name: John Doe username-github: johndoe username-twitter: johndoe links: - name: Test url: http://www.test.test leads: - name: John Doe url: mailto:johndoe@doe.com --- Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
--- layout: lab title: Bremen # always same as lab ??? lab: OK Lab Bremen #needed for event and project aggregation lat: 53.079296 long: 8.801694 members: - name: John Doe username-github: johndoe username-twitter: johndoe links: - name: Test url: http://www.test.test leads: - name: John Doe url: mailto:johndoe@doe.com --- Das OK Lab Bremen befindet sich gerade noch im Aufbau. Hast Du Lust mitzumachen? Super! Dann trag Dich unten ein, wir kontaktieren dich, sobald es losgeht. Oder interessierst Du Dich für den Entwicklungen im Projekt Code for Germany generell? Dann abonniere unseren Newsletter. Wir halten Dich auf dem Laufenden.
Add text for incubating labs
Add text for incubating labs
HTML
mit
marcel12bell/codefor.de,ChristianSch/codefor.de,saerdnaer/codefor.de,kiliankoe/codefor.de,webwurst/codefor.de,ChristianSch/codefor.de,metawops/codefor.de,zfhui/codefor.de,metawops/codefor.de,zfhui/codefor.de,saerdnaer/codefor.de,philippgeisler/codefor.de,kiliankoe/codefor.de,OffenesJena/codefor.de,saerdnaer/codefor.de,OffenesJena/codefor.de,metawops/codefor.de,karen-sch/codefor.de,konstin/codefor.de,zfhui/codefor.de,konstin/codefor.de,konstin/codefor.de,OffenesJena/codefor.de,balzer82/codefor.de,marcel12bell/codefor.de,balzer82/codefor.de,philippgeisler/codefor.de,kiliankoe/codefor.de,balzer82/codefor.de,ChristianSch/codefor.de,metawops/codefor.de,kiliankoe/codefor.de,ironjan/codefor.de,OffenesJena/codefor.de,balzer82/codefor.de,philippgeisler/codefor.de,kiliankoe/codefor.de,zfhui/codefor.de,ironjan/codefor.de,karen-sch/codefor.de,karen-sch/codefor.de,saerdnaer/codefor.de,saerdnaer/codefor.de,webwurst/codefor.de,karen-sch/codefor.de,codeforfrankfurt/codefor.de,marcel12bell/codefor.de,karen-sch/codefor.de,OffenesJena/codefor.de,marcel12bell/codefor.de,codeforfrankfurt/codefor.de,webwurst/codefor.de,zfhui/codefor.de,metawops/codefor.de,konstin/codefor.de,webwurst/codefor.de,ironjan/codefor.de,philippgeisler/codefor.de,philippgeisler/codefor.de,codeforfrankfurt/codefor.de,ironjan/codefor.de,webwurst/codefor.de,codeforfrankfurt/codefor.de
html
## Code Before: --- layout: lab title: Bremen # always same as lab ??? lab: OK Lab Bremen #needed for event and project aggregation lat: 53.079296 long: 8.801694 members: - name: John Doe username-github: johndoe username-twitter: johndoe links: - name: Test url: http://www.test.test leads: - name: John Doe url: mailto:johndoe@doe.com --- Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. ## Instruction: Add text for incubating labs ## Code After: --- layout: lab title: Bremen # always same as lab ??? lab: OK Lab Bremen #needed for event and project aggregation lat: 53.079296 long: 8.801694 members: - name: John Doe username-github: johndoe username-twitter: johndoe links: - name: Test url: http://www.test.test leads: - name: John Doe url: mailto:johndoe@doe.com --- Das OK Lab Bremen befindet sich gerade noch im Aufbau. Hast Du Lust mitzumachen? Super! Dann trag Dich unten ein, wir kontaktieren dich, sobald es losgeht. Oder interessierst Du Dich für den Entwicklungen im Projekt Code for Germany generell? Dann abonniere unseren Newsletter. Wir halten Dich auf dem Laufenden.
--- layout: lab title: Bremen # always same as lab ??? lab: OK Lab Bremen #needed for event and project aggregation lat: 53.079296 long: 8.801694 members: - name: John Doe username-github: johndoe username-twitter: johndoe links: - name: Test url: http://www.test.test leads: - name: John Doe url: mailto:johndoe@doe.com --- - Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. + Das OK Lab Bremen befindet sich gerade noch im Aufbau. Hast Du Lust mitzumachen? Super! Dann trag Dich unten ein, wir kontaktieren dich, sobald es losgeht. Oder interessierst Du Dich für den Entwicklungen im Projekt Code for Germany generell? Dann abonniere unseren Newsletter. Wir halten Dich auf dem Laufenden.
2
0.076923
1
1
7de1e14bfaeaf60702a1c450dcd673621ab37001
.travis.yml
.travis.yml
language: php sudo: false cache: directories: - $HOME/.composer/cache php: - 7.1 - 7.2 - 7.3 services: mongodb before_install: - pecl install -f mongodb before_script: - composer self-update - composer install --prefer-source - composer config "platform.ext-mongo" "1.6.16" - composer require alcaeus/mongo-php-adapter - composer require doctrine/mongodb-odm - composer require jackalope/jackalope-doctrine-dbal doctrine/phpcr-odm script: - ./vendor/bin/phpunit -v
language: php sudo: false cache: directories: - $HOME/.composer/cache php: - 7.1 - 7.2 - 7.3 services: mongodb before_install: - pecl install -f mongodb before_script: - composer self-update - composer config "platform.ext-mongo" "1.6.16" - composer require --no-update alcaeus/mongo-php-adapter - composer require --no-update doctrine/mongodb-odm "^1.3.0" - composer install --prefer-source - composer require jackalope/jackalope-doctrine-dbal doctrine/phpcr-odm script: - ./vendor/bin/phpunit -v
Test against MongoDB ODM 1.x only
Test against MongoDB ODM 1.x only
YAML
mit
doctrine/data-fixtures
yaml
## Code Before: language: php sudo: false cache: directories: - $HOME/.composer/cache php: - 7.1 - 7.2 - 7.3 services: mongodb before_install: - pecl install -f mongodb before_script: - composer self-update - composer install --prefer-source - composer config "platform.ext-mongo" "1.6.16" - composer require alcaeus/mongo-php-adapter - composer require doctrine/mongodb-odm - composer require jackalope/jackalope-doctrine-dbal doctrine/phpcr-odm script: - ./vendor/bin/phpunit -v ## Instruction: Test against MongoDB ODM 1.x only ## Code After: language: php sudo: false cache: directories: - $HOME/.composer/cache php: - 7.1 - 7.2 - 7.3 services: mongodb before_install: - pecl install -f mongodb before_script: - composer self-update - composer config "platform.ext-mongo" "1.6.16" - composer require --no-update alcaeus/mongo-php-adapter - composer require --no-update doctrine/mongodb-odm "^1.3.0" - composer install --prefer-source - composer require jackalope/jackalope-doctrine-dbal doctrine/phpcr-odm script: - ./vendor/bin/phpunit -v
language: php sudo: false cache: directories: - $HOME/.composer/cache php: - 7.1 - 7.2 - 7.3 services: mongodb before_install: - pecl install -f mongodb before_script: - composer self-update + - composer config "platform.ext-mongo" "1.6.16" + - composer require --no-update alcaeus/mongo-php-adapter + - composer require --no-update doctrine/mongodb-odm "^1.3.0" - composer install --prefer-source - - composer config "platform.ext-mongo" "1.6.16" - - composer require alcaeus/mongo-php-adapter - - composer require doctrine/mongodb-odm - composer require jackalope/jackalope-doctrine-dbal doctrine/phpcr-odm script: - ./vendor/bin/phpunit -v
6
0.214286
3
3
3b587d0e0c26c2e2605c8d7df00dfce4360cd03f
manifests/cf-manifest/operations.d/260-cf-upgrade-cflinuxfs2.yml
manifests/cf-manifest/operations.d/260-cf-upgrade-cflinuxfs2.yml
--- - type: replace path: /releases/name=cflinuxfs2 value: name: cflinuxfs2 url: https://bosh.io/d/github.com/cloudfoundry/cflinuxfs2-release?v=1.235.0 version: 1.235.0 sha1: 1ed4e65bdb8ec4ba58060705f47c157663c23cfa
--- - type: replace path: /releases/name=cflinuxfs2 value: name: cflinuxfs2 url: https://bosh.io/d/github.com/cloudfoundry/cflinuxfs2-release?v=1.238.0 version: 1.238.0 sha1: 353bdf06ded654ab6f1172adac2f53a02febabfd
Upgrade to latest version of cflinuxfs2
Upgrade to latest version of cflinuxfs2 This resolves USN-3770-1[1]. [1] https://www.cloudfoundry.org/blog/usn-3770-1/
YAML
mit
alphagov/paas-cf,alphagov/paas-cf,alphagov/paas-cf,alphagov/paas-cf,alphagov/paas-cf,alphagov/paas-cf,alphagov/paas-cf,alphagov/paas-cf
yaml
## Code Before: --- - type: replace path: /releases/name=cflinuxfs2 value: name: cflinuxfs2 url: https://bosh.io/d/github.com/cloudfoundry/cflinuxfs2-release?v=1.235.0 version: 1.235.0 sha1: 1ed4e65bdb8ec4ba58060705f47c157663c23cfa ## Instruction: Upgrade to latest version of cflinuxfs2 This resolves USN-3770-1[1]. [1] https://www.cloudfoundry.org/blog/usn-3770-1/ ## Code After: --- - type: replace path: /releases/name=cflinuxfs2 value: name: cflinuxfs2 url: https://bosh.io/d/github.com/cloudfoundry/cflinuxfs2-release?v=1.238.0 version: 1.238.0 sha1: 353bdf06ded654ab6f1172adac2f53a02febabfd
--- - type: replace path: /releases/name=cflinuxfs2 value: name: cflinuxfs2 - url: https://bosh.io/d/github.com/cloudfoundry/cflinuxfs2-release?v=1.235.0 ? ^ + url: https://bosh.io/d/github.com/cloudfoundry/cflinuxfs2-release?v=1.238.0 ? ^ - version: 1.235.0 ? ^ + version: 1.238.0 ? ^ - sha1: 1ed4e65bdb8ec4ba58060705f47c157663c23cfa + sha1: 353bdf06ded654ab6f1172adac2f53a02febabfd
6
0.666667
3
3
6058bc795563d482ce1672b3eb933e1c409c6ac8
setup.py
setup.py
from distutils.core import setup setup( name='Juju XaaS CLI', version='0.1.0', author='Justin SB', author_email='justin@fathomdb.com', packages=['jxaas'], url='http://pypi.python.org/pypi/jxaas/', license='LICENSE.txt', description='CLI for Juju XaaS.', long_description=open('README.md').read(), install_requires=[ ], scripts=[ 'bin/jxaas' ] )
from distutils.core import setup setup( name='Juju XaaS CLI', version='0.1.0', author='Justin SB', author_email='justin@fathomdb.com', packages=['jxaas'], url='http://pypi.python.org/pypi/jxaas/', license='LICENSE.txt', description='CLI for Juju XaaS.', long_description=open('README.md').read(), install_requires=[ 'cliff' ], scripts=[ 'bin/jxaas' ] )
Add cliff as a requirement
Add cliff as a requirement
Python
apache-2.0
jxaas/cli
python
## Code Before: from distutils.core import setup setup( name='Juju XaaS CLI', version='0.1.0', author='Justin SB', author_email='justin@fathomdb.com', packages=['jxaas'], url='http://pypi.python.org/pypi/jxaas/', license='LICENSE.txt', description='CLI for Juju XaaS.', long_description=open('README.md').read(), install_requires=[ ], scripts=[ 'bin/jxaas' ] ) ## Instruction: Add cliff as a requirement ## Code After: from distutils.core import setup setup( name='Juju XaaS CLI', version='0.1.0', author='Justin SB', author_email='justin@fathomdb.com', packages=['jxaas'], url='http://pypi.python.org/pypi/jxaas/', license='LICENSE.txt', description='CLI for Juju XaaS.', long_description=open('README.md').read(), install_requires=[ 'cliff' ], scripts=[ 'bin/jxaas' ] )
from distutils.core import setup setup( name='Juju XaaS CLI', version='0.1.0', author='Justin SB', author_email='justin@fathomdb.com', packages=['jxaas'], url='http://pypi.python.org/pypi/jxaas/', license='LICENSE.txt', description='CLI for Juju XaaS.', long_description=open('README.md').read(), install_requires=[ + 'cliff' ], scripts=[ 'bin/jxaas' ] )
1
0.055556
1
0
428cafc606bc0e812ef280d8683935c3b5b404cf
.travis.yml
.travis.yml
sudo: required language: java jdk: - oraclejdk7 cache: directories: - '$HOME/.m2/repository' install: /bin/true script: mvn deploy -s ./travis-settings.xml -V -Prun-its -q -B -e
sudo: required language: java jdk: - oraclejdk7 cache: directories: - '$HOME/.m2/repository' install: /bin/true script: - '[ "${TRAVIS_PULL_REQUEST}" = "false" ] && mvn -s ./travis-settings.xml -Prun-its -q -B -e install || mvn deploy -s ./travis-settings.xml -V -Prun-its -q -B -e'
Make deployment conditional on whether it's a PR build.
Make deployment conditional on whether it's a PR build.
YAML
apache-2.0
yma88/indy,pkocandr/indy,yma88/indy,ruhan1/indy,jdcasey/indy,ligangty/indy,ligangty/indy,ligangty/indy,ligangty/indy,ruhan1/indy,yma88/indy,ligangty/indy,yma88/indy,jdcasey/indy,ruhan1/indy,Commonjava/indy,jdcasey/indy,ruhan1/indy,Commonjava/indy,Commonjava/indy,pkocandr/indy,Commonjava/indy,Commonjava/indy,ligangty/indy,pkocandr/indy,Commonjava/indy,yma88/indy,jdcasey/indy,ruhan1/indy,jdcasey/indy,jdcasey/indy,pkocandr/indy,yma88/indy,pkocandr/indy,pkocandr/indy,ruhan1/indy
yaml
## Code Before: sudo: required language: java jdk: - oraclejdk7 cache: directories: - '$HOME/.m2/repository' install: /bin/true script: mvn deploy -s ./travis-settings.xml -V -Prun-its -q -B -e ## Instruction: Make deployment conditional on whether it's a PR build. ## Code After: sudo: required language: java jdk: - oraclejdk7 cache: directories: - '$HOME/.m2/repository' install: /bin/true script: - '[ "${TRAVIS_PULL_REQUEST}" = "false" ] && mvn -s ./travis-settings.xml -Prun-its -q -B -e install || mvn deploy -s ./travis-settings.xml -V -Prun-its -q -B -e'
sudo: required language: java jdk: - oraclejdk7 cache: directories: - '$HOME/.m2/repository' install: /bin/true - script: mvn deploy -s ./travis-settings.xml -V -Prun-its -q -B -e + script: + - '[ "${TRAVIS_PULL_REQUEST}" = "false" ] && mvn -s ./travis-settings.xml -Prun-its -q -B -e install || mvn deploy -s ./travis-settings.xml -V -Prun-its -q -B -e'
3
0.25
2
1
86f0dcaf90a87a4e3561d73a25c80d3135569804
app/views/custom_bigbluebutton_rooms/invite.html.haml
app/views/custom_bigbluebutton_rooms/invite.html.haml
= page_title t(".title", :name => @room.name).html_safe - if bigbluebutton_user.nil? - username = params[:user].nil? ? "" : params[:user][:name] - else - username = bigbluebutton_user.name = render partial: "invite_header", locals: { room: @room, page: 2 } #webconf-room-invite = simple_form_for :bigbluebutton_room, url: join_bigbluebutton_room_path(@room), html: { class: 'single-column' } do |f| .form-group = hidden_field_tag "user[name]", username %h3= username - unless user_signed_in? .change-name= link_to 'wrong name? change it', join_webconf_path(@room) - if @user_role == :key .form-group.form-password %label= t(".field_password") = password_field_tag "user[key]", "", autofocus: true, class: "string form-control" .form-actions = f.button :submit, t("join"), class: "btn btn-primary"
= page_title t(".title", :name => @room.name).html_safe - if bigbluebutton_user.nil? - username = params[:user].nil? ? "" : params[:user][:name] - else - username = bigbluebutton_user.name = render partial: "invite_header", locals: { room: @room, page: 2 } #webconf-room-invite = simple_form_for :bigbluebutton_room, url: join_bigbluebutton_room_path(@room), html: { class: 'single-column' } do |f| .form-group = hidden_field_tag "user[name]", username %h3= username - unless user_signed_in? - if guest_user_signed_in? .change-name= link_to t('.logout_guest'), logout_guest_path - else .change-name= link_to t('.logout_guest'), join_webconf_path(@room) - if @user_role == :key .form-group.form-password %label= t(".field_password") = password_field_tag "user[key]", "", autofocus: true, class: "string form-control" .form-actions = f.button :submit, t("join"), class: "btn btn-primary"
Add the guest logout link in rooms/invite
Add the guest logout link in rooms/invite
Haml
agpl-3.0
mconf/mconf-web,mconf/mconf-web,mconf/mconf-web,mconf/mconf-web
haml
## Code Before: = page_title t(".title", :name => @room.name).html_safe - if bigbluebutton_user.nil? - username = params[:user].nil? ? "" : params[:user][:name] - else - username = bigbluebutton_user.name = render partial: "invite_header", locals: { room: @room, page: 2 } #webconf-room-invite = simple_form_for :bigbluebutton_room, url: join_bigbluebutton_room_path(@room), html: { class: 'single-column' } do |f| .form-group = hidden_field_tag "user[name]", username %h3= username - unless user_signed_in? .change-name= link_to 'wrong name? change it', join_webconf_path(@room) - if @user_role == :key .form-group.form-password %label= t(".field_password") = password_field_tag "user[key]", "", autofocus: true, class: "string form-control" .form-actions = f.button :submit, t("join"), class: "btn btn-primary" ## Instruction: Add the guest logout link in rooms/invite ## Code After: = page_title t(".title", :name => @room.name).html_safe - if bigbluebutton_user.nil? - username = params[:user].nil? ? "" : params[:user][:name] - else - username = bigbluebutton_user.name = render partial: "invite_header", locals: { room: @room, page: 2 } #webconf-room-invite = simple_form_for :bigbluebutton_room, url: join_bigbluebutton_room_path(@room), html: { class: 'single-column' } do |f| .form-group = hidden_field_tag "user[name]", username %h3= username - unless user_signed_in? - if guest_user_signed_in? .change-name= link_to t('.logout_guest'), logout_guest_path - else .change-name= link_to t('.logout_guest'), join_webconf_path(@room) - if @user_role == :key .form-group.form-password %label= t(".field_password") = password_field_tag "user[key]", "", autofocus: true, class: "string form-control" .form-actions = f.button :submit, t("join"), class: "btn btn-primary"
= page_title t(".title", :name => @room.name).html_safe - if bigbluebutton_user.nil? - username = params[:user].nil? ? "" : params[:user][:name] - else - username = bigbluebutton_user.name = render partial: "invite_header", locals: { room: @room, page: 2 } #webconf-room-invite = simple_form_for :bigbluebutton_room, url: join_bigbluebutton_room_path(@room), html: { class: 'single-column' } do |f| .form-group = hidden_field_tag "user[name]", username %h3= username - unless user_signed_in? + - if guest_user_signed_in? + .change-name= link_to t('.logout_guest'), logout_guest_path + - else - .change-name= link_to 'wrong name? change it', join_webconf_path(@room) ? ^^ - ^^^^ ^^^^^^^^^^ + .change-name= link_to t('.logout_guest'), join_webconf_path(@room) ? ++ ++ ^^ ^^^^^^ ^ + - if @user_role == :key .form-group.form-password %label= t(".field_password") = password_field_tag "user[key]", "", autofocus: true, class: "string form-control" .form-actions = f.button :submit, t("join"), class: "btn btn-primary"
5
0.192308
4
1
94ef5e9cb718bac93dcb0229e19f5fcb554ce6b3
source/examples/demo_textured/main.cpp
source/examples/demo_textured/main.cpp
int main(int /*argc*/, char* /*argv*/[]) { // TODO: glfw return 0; }
using namespace gl; void error(int errnum, const char * errmsg) { std::cerr << errnum << ": " << errmsg << std::endl; } void key_callback(GLFWwindow * window, int key, int /*scancode*/, int action, int /*mods*/) { if (key == GLFW_KEY_ESCAPE && action == GLFW_PRESS) glfwSetWindowShouldClose(window, 1); } int main(int, char *[]) { if (!glfwInit()) return 1; glfwSetErrorCallback(error); glfwDefaultWindowHints(); #ifdef SYSTEM_DARWIN glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 2); glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, true); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); #endif GLFWwindow * window = glfwCreateWindow(640, 480, "Texture Demo", nullptr, nullptr); if (!window) { glfwTerminate(); return -1; } glfwSetKeyCallback(window, key_callback); glfwMakeContextCurrent(window); glbinding::Binding::initialize(false); // only resolve functions that are actually used (lazy) globjects::init(); while (!glfwWindowShouldClose(window)) { glfwPollEvents(); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glfwSwapBuffers(window); } glfwTerminate(); return 0; }
Add glfw window to texture demo
Add glfw window to texture demo
C++
mit
cginternals/glhimmel,cginternals/glhimmel,cginternals/glhimmel,cginternals/glhimmel
c++
## Code Before: int main(int /*argc*/, char* /*argv*/[]) { // TODO: glfw return 0; } ## Instruction: Add glfw window to texture demo ## Code After: using namespace gl; void error(int errnum, const char * errmsg) { std::cerr << errnum << ": " << errmsg << std::endl; } void key_callback(GLFWwindow * window, int key, int /*scancode*/, int action, int /*mods*/) { if (key == GLFW_KEY_ESCAPE && action == GLFW_PRESS) glfwSetWindowShouldClose(window, 1); } int main(int, char *[]) { if (!glfwInit()) return 1; glfwSetErrorCallback(error); glfwDefaultWindowHints(); #ifdef SYSTEM_DARWIN glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 2); glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, true); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); #endif GLFWwindow * window = glfwCreateWindow(640, 480, "Texture Demo", nullptr, nullptr); if (!window) { glfwTerminate(); return -1; } glfwSetKeyCallback(window, key_callback); glfwMakeContextCurrent(window); glbinding::Binding::initialize(false); // only resolve functions that are actually used (lazy) globjects::init(); while (!glfwWindowShouldClose(window)) { glfwPollEvents(); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glfwSwapBuffers(window); } glfwTerminate(); return 0; }
+ + using namespace gl; + + void error(int errnum, const char * errmsg) + { + std::cerr << errnum << ": " << errmsg << std::endl; + } + + void key_callback(GLFWwindow * window, int key, int /*scancode*/, int action, int /*mods*/) + { + if (key == GLFW_KEY_ESCAPE && action == GLFW_PRESS) + glfwSetWindowShouldClose(window, 1); + } - int main(int /*argc*/, char* /*argv*/[]) + int main(int, char *[]) { + if (!glfwInit()) + return 1; - // TODO: glfw + glfwSetErrorCallback(error); + glfwDefaultWindowHints(); + + #ifdef SYSTEM_DARWIN + glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); + glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 2); + glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, true); + glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); + #endif + + GLFWwindow * window = glfwCreateWindow(640, 480, "Texture Demo", nullptr, nullptr); + if (!window) + { + glfwTerminate(); + return -1; + } + + glfwSetKeyCallback(window, key_callback); + + glfwMakeContextCurrent(window); + + glbinding::Binding::initialize(false); // only resolve functions that are actually used (lazy) + globjects::init(); + + while (!glfwWindowShouldClose(window)) + { + glfwPollEvents(); + glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); + glfwSwapBuffers(window); + } + + glfwTerminate(); return 0; }
50
5.555556
48
2
445c6fcf835af3c7af438864765a6a1ded2edecd
javascript/multivaluefield.js
javascript/multivaluefield.js
jQuery(function($) { function addNewField() { var self = $(this); var val = self.val(); // check to see if the one after us is there already - if so, we don't need a new one var li = $(this).closest('li').next('li'); if (!val) { // lets also clean up if needbe var nextText = li.find('input.mventryfield'); var detach = true; nextText.each (function () { if ($(this) && $(this).val() && $(this).val().length > 0) { detach = false; } }); if (detach) { li.detach(); } } else { if (li.length) { return; } self.closest("li").clone() .find("input").val("").end() .find("select").val("").end() .appendTo(self.parents("ul.multivaluefieldlist")); } $(this).trigger('multiValueFieldAdded'); } $(document).on("keyup", ".mventryfield", addNewField); $(document).on("change", ".mventryfield:not(input)", addNewField); });
jQuery(function($) { function addNewField() { var self = $(this); var val = self.val(); // check to see if the one after us is there already - if so, we don't need a new one var li = $(this).closest('li').next('li'); if (!val) { // lets also clean up if needbe var nextText = li.find('input.mventryfield'); var detach = true; nextText.each (function () { if ($(this) && $(this).val() && $(this).val().length > 0) { detach = false; } }); if (detach) { li.detach(); } } else { if (li.length) { return; } var append = self.closest("li").clone() .find(".has-chzn").show().removeClass("").data("chosen", null).end() .find(".chzn-container").remove().end(); // Assign the new inputs a unique ID, so that chosen picks up // the correct container. append.find("input, select").val("").attr("id", function() { var pos = this.id.lastIndexOf(":"); var num = parseInt(this.id.substr(pos + 1)); return this.id.substr(0, pos + 1) + (num + 1).toString(); }); append.appendTo(self.parents("ul.multivaluefieldlist")); } $(this).trigger('multiValueFieldAdded'); } $(document).on("keyup", ".mventryfield", addNewField); $(document).on("change", ".mventryfield:not(input)", addNewField); });
Allow multi value dropdowns to be used with chosen.
Allow multi value dropdowns to be used with chosen.
JavaScript
bsd-3-clause
souldigital/silverstripe-multivaluefield,souldigital/silverstripe-multivaluefield,designcity/silverstripe-multivaluefield,silverstripe-australia/silverstripe-multivaluefield,silverstripe-australia/silverstripe-multivaluefield,designcity/silverstripe-multivaluefield
javascript
## Code Before: jQuery(function($) { function addNewField() { var self = $(this); var val = self.val(); // check to see if the one after us is there already - if so, we don't need a new one var li = $(this).closest('li').next('li'); if (!val) { // lets also clean up if needbe var nextText = li.find('input.mventryfield'); var detach = true; nextText.each (function () { if ($(this) && $(this).val() && $(this).val().length > 0) { detach = false; } }); if (detach) { li.detach(); } } else { if (li.length) { return; } self.closest("li").clone() .find("input").val("").end() .find("select").val("").end() .appendTo(self.parents("ul.multivaluefieldlist")); } $(this).trigger('multiValueFieldAdded'); } $(document).on("keyup", ".mventryfield", addNewField); $(document).on("change", ".mventryfield:not(input)", addNewField); }); ## Instruction: Allow multi value dropdowns to be used with chosen. ## Code After: jQuery(function($) { function addNewField() { var self = $(this); var val = self.val(); // check to see if the one after us is there already - if so, we don't need a new one var li = $(this).closest('li').next('li'); if (!val) { // lets also clean up if needbe var nextText = li.find('input.mventryfield'); var detach = true; nextText.each (function () { if ($(this) && $(this).val() && $(this).val().length > 0) { detach = false; } }); if (detach) { li.detach(); } } else { if (li.length) { return; } var append = self.closest("li").clone() .find(".has-chzn").show().removeClass("").data("chosen", null).end() .find(".chzn-container").remove().end(); // Assign the new inputs a unique ID, so that chosen picks up // the correct container. append.find("input, select").val("").attr("id", function() { var pos = this.id.lastIndexOf(":"); var num = parseInt(this.id.substr(pos + 1)); return this.id.substr(0, pos + 1) + (num + 1).toString(); }); append.appendTo(self.parents("ul.multivaluefieldlist")); } $(this).trigger('multiValueFieldAdded'); } $(document).on("keyup", ".mventryfield", addNewField); $(document).on("change", ".mventryfield:not(input)", addNewField); });
jQuery(function($) { function addNewField() { var self = $(this); var val = self.val(); // check to see if the one after us is there already - if so, we don't need a new one var li = $(this).closest('li').next('li'); if (!val) { // lets also clean up if needbe var nextText = li.find('input.mventryfield'); var detach = true; nextText.each (function () { if ($(this) && $(this).val() && $(this).val().length > 0) { detach = false; } }); if (detach) { li.detach(); } } else { if (li.length) { return; } - self.closest("li").clone() + var append = self.closest("li").clone() ? +++++++++++++ - .find("input").val("").end() - .find("select").val("").end() + .find(".has-chzn").show().removeClass("").data("chosen", null).end() + .find(".chzn-container").remove().end(); + + // Assign the new inputs a unique ID, so that chosen picks up + // the correct container. + append.find("input, select").val("").attr("id", function() { + var pos = this.id.lastIndexOf(":"); + var num = parseInt(this.id.substr(pos + 1)); + + return this.id.substr(0, pos + 1) + (num + 1).toString(); + }); + - .appendTo(self.parents("ul.multivaluefieldlist")); ? ^ + append.appendTo(self.parents("ul.multivaluefieldlist")); ? ^^^^^^ } $(this).trigger('multiValueFieldAdded'); } $(document).on("keyup", ".mventryfield", addNewField); $(document).on("change", ".mventryfield:not(input)", addNewField); });
18
0.45
14
4
f04f8eb2ed4901cac6959c3282240ca672768f6c
README.md
README.md
My dotfiles
My dotfiles This is actually the beginnings of an experiment. I'd like to create some sort of tool that makes it easy for people to create and manage git repositories of their dotfiles. I forsee this having two main stages: 1. semi automated backup of *my* dotfiles 1. a tool to backup *a person's* dotfiles Presently I'm still working on stage one. A few important features I'd like the tool to have: - [ ] Known list of common dotfiles ("sane defaults"), this part I imagine will be a "discover over time" thing; likely relying mostly on contributors. - [ ] Toggleable "sections" of things to look for/check in. - [ ] Ability to configure new files to track. - [ ] For each dotfile (or dotfile type, as I may architect it), a growing list of "bad patterns" to save the user from (easiest examples here are API keys), with varying levels (warn, require explicit ignore, and outright refusal). - [ ] Some more advanced autodetection (ie: if you're using neobundle only check in the lock file, not the bundle sub-directories). My general intended structure here is along the lines of: 1. Run a command to "detect" file layouts/options (confirming things with the user), this will generate a config. - During this, each file that *would* be checked in with the to-be-generated config is scanned for known "bad patterns", and each will either generate a warning, require user confirmation, or outright refuse to add the option to check in that file to the config, as appropriate. - Warnings, confirmations, and refusals will *always* include a "why this is/may be bad" and a "how to avoid this". Ie: the `.secrets` file I employ in my `.zshrc`. (This is what I do, there may be a better solution). 2. With a config (checked into the new dotfiles repository), run a second command to get the files as appropriate based on the config. - The same checks will be run again on any file detected to have changed. *All* warnings will be printed. Those with unconfirmed confirmation-required patterns will ask for confirmation (and log it to the config), or refuse to check it in. Likewise files with any refusal patterns will not be backed up (and an appropriate message printed). - As above, all warnings/confirmations/refusals *will* include a why, and how. - The exit code of this program will be a count of files that were refused to be backed up. 3. A third command will allow for an interactive exploration/modification of a config (explain what parts do, ask questions to add new parts: "do you use vim", etc.). I feel it goes without saying, but the "bad patterns" portion of this will be the most important; as people who use automation things like this generally don't care, and tend to not check their email, where they're getting warnings from amazon about some github repo they have.
Add project intentions to readme
Add project intentions to readme
Markdown
apache-2.0
conslo/.s,conslo/dots
markdown
## Code Before: My dotfiles ## Instruction: Add project intentions to readme ## Code After: My dotfiles This is actually the beginnings of an experiment. I'd like to create some sort of tool that makes it easy for people to create and manage git repositories of their dotfiles. I forsee this having two main stages: 1. semi automated backup of *my* dotfiles 1. a tool to backup *a person's* dotfiles Presently I'm still working on stage one. A few important features I'd like the tool to have: - [ ] Known list of common dotfiles ("sane defaults"), this part I imagine will be a "discover over time" thing; likely relying mostly on contributors. - [ ] Toggleable "sections" of things to look for/check in. - [ ] Ability to configure new files to track. - [ ] For each dotfile (or dotfile type, as I may architect it), a growing list of "bad patterns" to save the user from (easiest examples here are API keys), with varying levels (warn, require explicit ignore, and outright refusal). - [ ] Some more advanced autodetection (ie: if you're using neobundle only check in the lock file, not the bundle sub-directories). My general intended structure here is along the lines of: 1. Run a command to "detect" file layouts/options (confirming things with the user), this will generate a config. - During this, each file that *would* be checked in with the to-be-generated config is scanned for known "bad patterns", and each will either generate a warning, require user confirmation, or outright refuse to add the option to check in that file to the config, as appropriate. - Warnings, confirmations, and refusals will *always* include a "why this is/may be bad" and a "how to avoid this". Ie: the `.secrets` file I employ in my `.zshrc`. (This is what I do, there may be a better solution). 2. With a config (checked into the new dotfiles repository), run a second command to get the files as appropriate based on the config. - The same checks will be run again on any file detected to have changed. *All* warnings will be printed. Those with unconfirmed confirmation-required patterns will ask for confirmation (and log it to the config), or refuse to check it in. Likewise files with any refusal patterns will not be backed up (and an appropriate message printed). - As above, all warnings/confirmations/refusals *will* include a why, and how. - The exit code of this program will be a count of files that were refused to be backed up. 3. A third command will allow for an interactive exploration/modification of a config (explain what parts do, ask questions to add new parts: "do you use vim", etc.). I feel it goes without saying, but the "bad patterns" portion of this will be the most important; as people who use automation things like this generally don't care, and tend to not check their email, where they're getting warnings from amazon about some github repo they have.
My dotfiles + + This is actually the beginnings of an experiment. I'd like to create some sort of tool that makes it easy for people to create and manage git repositories of their dotfiles. + + I forsee this having two main stages: + 1. semi automated backup of *my* dotfiles + 1. a tool to backup *a person's* dotfiles + + Presently I'm still working on stage one. + + A few important features I'd like the tool to have: + - [ ] Known list of common dotfiles ("sane defaults"), this part I imagine will be a "discover over time" thing; likely relying mostly on contributors. + - [ ] Toggleable "sections" of things to look for/check in. + - [ ] Ability to configure new files to track. + - [ ] For each dotfile (or dotfile type, as I may architect it), a growing list of "bad patterns" to save the user from (easiest examples here are API keys), with varying levels (warn, require explicit ignore, and outright refusal). + - [ ] Some more advanced autodetection (ie: if you're using neobundle only check in the lock file, not the bundle sub-directories). + + My general intended structure here is along the lines of: + 1. Run a command to "detect" file layouts/options (confirming things with the user), this will generate a config. + - During this, each file that *would* be checked in with the to-be-generated config is scanned for known "bad patterns", and each will either generate a warning, require user confirmation, or outright refuse to add the option to check in that file to the config, as appropriate. + - Warnings, confirmations, and refusals will *always* include a "why this is/may be bad" and a "how to avoid this". Ie: the `.secrets` file I employ in my `.zshrc`. (This is what I do, there may be a better solution). + 2. With a config (checked into the new dotfiles repository), run a second command to get the files as appropriate based on the config. + - The same checks will be run again on any file detected to have changed. *All* warnings will be printed. Those with unconfirmed confirmation-required patterns will ask for confirmation (and log it to the config), or refuse to check it in. Likewise files with any refusal patterns will not be backed up (and an appropriate message printed). + - As above, all warnings/confirmations/refusals *will* include a why, and how. + - The exit code of this program will be a count of files that were refused to be backed up. + 3. A third command will allow for an interactive exploration/modification of a config (explain what parts do, ask questions to add new parts: "do you use vim", etc.). + + I feel it goes without saying, but the "bad patterns" portion of this will be the most important; as people who use automation things like this generally don't care, and tend to not check their email, where they're getting warnings from amazon about some github repo they have.
27
27
27
0
dec5ff4ccf8b95a907f657cec94c582b8aa69abe
README.md
README.md
[![Build Status](https://travis-ci.org/OCA/management-system.svg?branch=8.0)](https://travis-ci.org/OCA/management-system) [![Coverage Status](https://coveralls.io/repos/OCA/management-system/badge.png?branch=8.0)](https://coveralls.io/r/OCA/management-system?branch=8.0) # Management System Odoo modules to support management systems: * Quality (ISO 9001) * Environment (ISO 14001) * Security (ISO 27001, PCI-DSS) * IT services (ISO 20001, ITIL) * Health & Safety (OHSAS 18001)
[![Build Status](https://travis-ci.org/OCA/management-system.svg?branch=8.0)](https://travis-ci.org/OCA/management-system) [![Coverage Status](https://coveralls.io/repos/OCA/management-system/badge.png?branch=8.0)](https://coveralls.io/r/OCA/management-system?branch=8.0) # Management System Odoo modules to support management systems: * Quality (ISO 9001) * Environment (ISO 14001) * Security (ISO 27001, PCI-DSS) * IT services (ISO 20001, ITIL) * Health & Safety (OHSAS 18001) These presentation may help with an overviews of the modules: * [OpenDays 2013 presentation](http://www.slideshare.net/max3903/iso-anmanagement-systemswithopenerpena) of the Management System project * [Overview presentation](http://www.slideshare.net/max3903/openerp-management-system-modules) (2012) by Savoir-Faire Linux
Add reference to presentations of the modules
Add reference to presentations of the modules
Markdown
agpl-3.0
ClearCorp/management-system,don-systems/management-system,jobiols/management-system,abstract-open-solutions/management-system,yvaucher/management-system,ClearCorp-dev/management-system
markdown
## Code Before: [![Build Status](https://travis-ci.org/OCA/management-system.svg?branch=8.0)](https://travis-ci.org/OCA/management-system) [![Coverage Status](https://coveralls.io/repos/OCA/management-system/badge.png?branch=8.0)](https://coveralls.io/r/OCA/management-system?branch=8.0) # Management System Odoo modules to support management systems: * Quality (ISO 9001) * Environment (ISO 14001) * Security (ISO 27001, PCI-DSS) * IT services (ISO 20001, ITIL) * Health & Safety (OHSAS 18001) ## Instruction: Add reference to presentations of the modules ## Code After: [![Build Status](https://travis-ci.org/OCA/management-system.svg?branch=8.0)](https://travis-ci.org/OCA/management-system) [![Coverage Status](https://coveralls.io/repos/OCA/management-system/badge.png?branch=8.0)](https://coveralls.io/r/OCA/management-system?branch=8.0) # Management System Odoo modules to support management systems: * Quality (ISO 9001) * Environment (ISO 14001) * Security (ISO 27001, PCI-DSS) * IT services (ISO 20001, ITIL) * Health & Safety (OHSAS 18001) These presentation may help with an overviews of the modules: * [OpenDays 2013 presentation](http://www.slideshare.net/max3903/iso-anmanagement-systemswithopenerpena) of the Management System project * [Overview presentation](http://www.slideshare.net/max3903/openerp-management-system-modules) (2012) by Savoir-Faire Linux
[![Build Status](https://travis-ci.org/OCA/management-system.svg?branch=8.0)](https://travis-ci.org/OCA/management-system) [![Coverage Status](https://coveralls.io/repos/OCA/management-system/badge.png?branch=8.0)](https://coveralls.io/r/OCA/management-system?branch=8.0) # Management System Odoo modules to support management systems: * Quality (ISO 9001) * Environment (ISO 14001) * Security (ISO 27001, PCI-DSS) * IT services (ISO 20001, ITIL) * Health & Safety (OHSAS 18001) + + These presentation may help with an overviews of the modules: + + * [OpenDays 2013 presentation](http://www.slideshare.net/max3903/iso-anmanagement-systemswithopenerpena) of the Management System project + * [Overview presentation](http://www.slideshare.net/max3903/openerp-management-system-modules) (2012) by Savoir-Faire Linux
5
0.416667
5
0
692e2b7fbe2407fa4dce073b6c11290ba5632691
assets/css/main.css
assets/css/main.css
/* CSS for main view */ .list { padding: 12px; border: 1px solid #ddd; border-radius: 8px; line-height: 1.7; font-size: 16px; width: 800px; margin: 6px 0 24px; } .locale_list a { padding-left: 4px; } .product_list a { padding-left: 16px; } tr th { background: #fff; } .number { text-align: right; } .source_type { text-transform: uppercase; text-align: center; font-size: 0.9em; } .error { background-color: #ff5252; } .repository_link { font-size: 0.7em; display: inline-block; margin-left: 6px; text-transform: uppercase; } .github_link { margin-top: 30px; font-size: 0.9em; height: 38px; padding-left: 30px; background: url(../img/github.png) top left no-repeat transparent; }
/* CSS for main view */ .list { padding: 12px; border: 1px solid #ddd; border-radius: 8px; line-height: 1.7; font-size: 16px; width: 800px; margin: 6px 0 24px; } .locale_list a { padding-left: 4px; } .product_list a { padding-left: 16px; } tr th { background: #fff; } .number { text-align: right; } .source_type { text-transform: uppercase; text-align: center; font-size: 0.9em; } .error { background-color: #ff5252; } .repository_link { font-size: 0.7em; display: inline-block; margin-left: 6px; text-transform: uppercase; } .github_link { margin-top: 30px; font-size: 0.9em; height: 38px; line-height: 2.1; padding-left: 30px; background: url(../img/github.png) top left no-repeat transparent; }
Fix alignment of GitHub link
Fix alignment of GitHub link
CSS
mpl-2.0
mozilla-l10n/webstatus,mozilla-l10n/webstatus,flodolo/webstatus,mozilla-l10n/webstatus,flodolo/webstatus,flodolo/webstatus,mozilla-l10n/webstatus,flodolo/webstatus,mozilla-l10n/webstatus,flodolo/webstatus
css
## Code Before: /* CSS for main view */ .list { padding: 12px; border: 1px solid #ddd; border-radius: 8px; line-height: 1.7; font-size: 16px; width: 800px; margin: 6px 0 24px; } .locale_list a { padding-left: 4px; } .product_list a { padding-left: 16px; } tr th { background: #fff; } .number { text-align: right; } .source_type { text-transform: uppercase; text-align: center; font-size: 0.9em; } .error { background-color: #ff5252; } .repository_link { font-size: 0.7em; display: inline-block; margin-left: 6px; text-transform: uppercase; } .github_link { margin-top: 30px; font-size: 0.9em; height: 38px; padding-left: 30px; background: url(../img/github.png) top left no-repeat transparent; } ## Instruction: Fix alignment of GitHub link ## Code After: /* CSS for main view */ .list { padding: 12px; border: 1px solid #ddd; border-radius: 8px; line-height: 1.7; font-size: 16px; width: 800px; margin: 6px 0 24px; } .locale_list a { padding-left: 4px; } .product_list a { padding-left: 16px; } tr th { background: #fff; } .number { text-align: right; } .source_type { text-transform: uppercase; text-align: center; font-size: 0.9em; } .error { background-color: #ff5252; } .repository_link { font-size: 0.7em; display: inline-block; margin-left: 6px; text-transform: uppercase; } .github_link { margin-top: 30px; font-size: 0.9em; height: 38px; line-height: 2.1; padding-left: 30px; background: url(../img/github.png) top left no-repeat transparent; }
/* CSS for main view */ .list { padding: 12px; border: 1px solid #ddd; border-radius: 8px; line-height: 1.7; font-size: 16px; width: 800px; margin: 6px 0 24px; } .locale_list a { padding-left: 4px; } .product_list a { padding-left: 16px; } tr th { background: #fff; } .number { text-align: right; } .source_type { text-transform: uppercase; text-align: center; font-size: 0.9em; } .error { background-color: #ff5252; } .repository_link { font-size: 0.7em; display: inline-block; margin-left: 6px; text-transform: uppercase; } .github_link { margin-top: 30px; font-size: 0.9em; height: 38px; + line-height: 2.1; padding-left: 30px; background: url(../img/github.png) top left no-repeat transparent; }
1
0.019231
1
0
be5a7195861cf7d829e4c4e261fee5352b580139
validation/src/main/scala/hmda/validation/engine/lar/validity/LarValidityEngine.scala
validation/src/main/scala/hmda/validation/engine/lar/validity/LarValidityEngine.scala
package hmda.validation.engine.lar.validity import hmda.model.fi.lar.LoanApplicationRegister import hmda.validation.api.ValidationApi import hmda.validation.engine.lar.LarCommonEngine import hmda.validation.rules.lar.validity._ trait LarValidityEngine extends LarCommonEngine with ValidationApi { def checkValidity(lar: LoanApplicationRegister): LarValidation = { val checks = List( V220, V225, V255, V262, V340, V347, V375, V400, V575 ).map(check(_, lar)) validateAll(checks, lar) } }
package hmda.validation.engine.lar.validity import hmda.model.fi.lar.LoanApplicationRegister import hmda.validation.api.ValidationApi import hmda.validation.engine.lar.LarCommonEngine import hmda.validation.rules.lar.validity._ trait LarValidityEngine extends LarCommonEngine with ValidationApi { def checkValidity(lar: LoanApplicationRegister): LarValidation = { val checks = List( V220, V225, V255, V262, V340, V347, V375, V400, V410, V575 ).map(check(_, lar)) validateAll(checks, lar) } }
Include V410 in LAR validity engine
Include V410 in LAR validity engine
Scala
cc0-1.0
cfpb/hmda-platform,cfpb/hmda-platform,cfpb/hmda-platform
scala
## Code Before: package hmda.validation.engine.lar.validity import hmda.model.fi.lar.LoanApplicationRegister import hmda.validation.api.ValidationApi import hmda.validation.engine.lar.LarCommonEngine import hmda.validation.rules.lar.validity._ trait LarValidityEngine extends LarCommonEngine with ValidationApi { def checkValidity(lar: LoanApplicationRegister): LarValidation = { val checks = List( V220, V225, V255, V262, V340, V347, V375, V400, V575 ).map(check(_, lar)) validateAll(checks, lar) } } ## Instruction: Include V410 in LAR validity engine ## Code After: package hmda.validation.engine.lar.validity import hmda.model.fi.lar.LoanApplicationRegister import hmda.validation.api.ValidationApi import hmda.validation.engine.lar.LarCommonEngine import hmda.validation.rules.lar.validity._ trait LarValidityEngine extends LarCommonEngine with ValidationApi { def checkValidity(lar: LoanApplicationRegister): LarValidation = { val checks = List( V220, V225, V255, V262, V340, V347, V375, V400, V410, V575 ).map(check(_, lar)) validateAll(checks, lar) } }
package hmda.validation.engine.lar.validity import hmda.model.fi.lar.LoanApplicationRegister import hmda.validation.api.ValidationApi import hmda.validation.engine.lar.LarCommonEngine import hmda.validation.rules.lar.validity._ trait LarValidityEngine extends LarCommonEngine with ValidationApi { def checkValidity(lar: LoanApplicationRegister): LarValidation = { val checks = List( V220, V225, V255, V262, V340, V347, V375, V400, + V410, V575 ).map(check(_, lar)) validateAll(checks, lar) } }
1
0.04
1
0
0bfc4ecdf0d4115f32f1dff198cbbd94dd5e034e
src/app/home/home.e2e.ts
src/app/home/home.e2e.ts
import { browser } from 'protractor'; import { HomePage } from './home.po'; import 'tslib'; describe('Home', function() { let home: HomePage; beforeEach(() => { home = new HomePage(); home.navigateTo(); }); /* Protractor was not waiting for the page to fully load thus, 'async' and 'await' is used throughtout the test. */ it('Should check title', async function() { await expect(home.getPageTitleText()).toEqual('VA Website!'); }); it('Should navigate to Patient Login page', async function() { await home.getPatientCheckInBtn().click(); await expect(browser.getCurrentUrl()).toEqual('http://localhost:3000/login'); }); // Fail on purpose to show that the test was properly checking elements it('Should navigate to Audiologist Login page', async function() { await home.getAudiologistLoginBtn().click(); await expect(browser.getCurrentUrl()).toEqual('http://localhost:3000/FAIL'); }); });
import { browser } from 'protractor'; import { HomePage } from './home.po'; import 'tslib'; describe('Home', function() { let home: HomePage; beforeEach(() => { home = new HomePage(); home.navigateTo(); }); /* Protractor was not waiting for the page to fully load thus, 'async' and 'await' is used throughtout the test. */ it('Should show title text', async function() { await expect(home.getPageTitleText()).toEqual('VA Website!'); }); /* Both Patient Check In and Audiologist Login uses the same component so, only the two buttons functionalies are tested */ it('Should navigate to Patient Login page', async function() { await home.getPatientCheckInBtn().click(); await expect(browser.getCurrentUrl()).toEqual('http://localhost:3000/login'); }); it('Should navigate to Audiologist Login page', async function() { await home.getAudiologistLoginBtn().click(); await expect(browser.getCurrentUrl()).toEqual('http://localhost:3000/login'); }); });
Add new functional test file and test cases for THS component
Add new functional test file and test cases for THS component
TypeScript
mit
marissa-hagglund/VA-Audiology-Website,marissa-hagglund/VA-Audiology-Website,marissa-hagglund/VA-Audiology-Website
typescript
## Code Before: import { browser } from 'protractor'; import { HomePage } from './home.po'; import 'tslib'; describe('Home', function() { let home: HomePage; beforeEach(() => { home = new HomePage(); home.navigateTo(); }); /* Protractor was not waiting for the page to fully load thus, 'async' and 'await' is used throughtout the test. */ it('Should check title', async function() { await expect(home.getPageTitleText()).toEqual('VA Website!'); }); it('Should navigate to Patient Login page', async function() { await home.getPatientCheckInBtn().click(); await expect(browser.getCurrentUrl()).toEqual('http://localhost:3000/login'); }); // Fail on purpose to show that the test was properly checking elements it('Should navigate to Audiologist Login page', async function() { await home.getAudiologistLoginBtn().click(); await expect(browser.getCurrentUrl()).toEqual('http://localhost:3000/FAIL'); }); }); ## Instruction: Add new functional test file and test cases for THS component ## Code After: import { browser } from 'protractor'; import { HomePage } from './home.po'; import 'tslib'; describe('Home', function() { let home: HomePage; beforeEach(() => { home = new HomePage(); home.navigateTo(); }); /* Protractor was not waiting for the page to fully load thus, 'async' and 'await' is used throughtout the test. */ it('Should show title text', async function() { await expect(home.getPageTitleText()).toEqual('VA Website!'); }); /* Both Patient Check In and Audiologist Login uses the same component so, only the two buttons functionalies are tested */ it('Should navigate to Patient Login page', async function() { await home.getPatientCheckInBtn().click(); await expect(browser.getCurrentUrl()).toEqual('http://localhost:3000/login'); }); it('Should navigate to Audiologist Login page', async function() { await home.getAudiologistLoginBtn().click(); await expect(browser.getCurrentUrl()).toEqual('http://localhost:3000/login'); }); });
import { browser } from 'protractor'; import { HomePage } from './home.po'; import 'tslib'; describe('Home', function() { let home: HomePage; beforeEach(() => { home = new HomePage(); home.navigateTo(); }); /* Protractor was not waiting for the page to fully load thus, 'async' and 'await' is used throughtout the test. */ - it('Should check title', async function() { ? ^ ^^^ + it('Should show title text', async function() { ? ^ ^^ +++++ await expect(home.getPageTitleText()).toEqual('VA Website!'); }); + /* Both Patient Check In and Audiologist Login uses the same component + so, only the two buttons functionalies are tested + */ it('Should navigate to Patient Login page', async function() { await home.getPatientCheckInBtn().click(); await expect(browser.getCurrentUrl()).toEqual('http://localhost:3000/login'); }); - // Fail on purpose to show that the test was properly checking elements it('Should navigate to Audiologist Login page', async function() { await home.getAudiologistLoginBtn().click(); - await expect(browser.getCurrentUrl()).toEqual('http://localhost:3000/FAIL'); ? ^^^^ + await expect(browser.getCurrentUrl()).toEqual('http://localhost:3000/login'); ? ^^^^^ }); });
8
0.25
5
3
7351c624635ab705ce875d99dd3901a2e01389f5
src/extends/room/conflict.js
src/extends/room/conflict.js
'use strict' Room.prototype.getPlayerHostiles = function () { if (!this.__playerHostiles) { const hostiles = this.find(FIND_HOSTILE_CREEPS) this.__playerHostiles = _.filter(hostiles, Room.isPlayerHazard) } return this.__playerHostiles } Room.prototype.getHostilesByPlayer = function () { if (!this.__hostilesByPlayer) { const hostiles = this.getPlayerHostiles() this.__hostilesByPlayer = {} for (const hostile of hostiles) { const owner = hostile.owner.username if (!this.__hostilesByPlayer[owner]) { this.__hostilesByPlayer[owner] = [] } this.__hostilesByPlayer[owner].push(hostile) } } return this.__hostilesByPlayer } Room.isPlayerHazard = function (creep) { if (creep.owner.username === 'Invader' || creep.owner.username === 'Screeps') { return false } return this.isPotentialHazard(creep) } Room.isPotentialHazard = function (creep) { const hazardTypes = [ATTACK, RANGED_ATTACK, HEAL, WORK, CLAIM] return _.some(creep.body, b => _.include(hazardTypes, b.type)) }
'use strict' Room.prototype.getPlayerHostiles = function () { if (!this.__playerHostiles) { const hostiles = this.find(FIND_HOSTILE_CREEPS) this.__playerHostiles = _.filter(hostiles, Room.isPlayerHazard) } return this.__playerHostiles } Room.prototype.getHostilesByPlayer = function () { if (!this.__hostilesByPlayer) { const hostiles = this.getPlayerHostiles() this.__hostilesByPlayer = {} for (const hostile of hostiles) { const owner = hostile.owner.username if (!this.__hostilesByPlayer[owner]) { this.__hostilesByPlayer[owner] = [] } this.__hostilesByPlayer[owner].push(hostile) } } return this.__hostilesByPlayer } Room.isPlayerHazard = function (creep) { if (creep.owner.username === 'Invader' || creep.owner.username === 'Screeps') { return false } if (creep.my) { return false } return this.isPotentialHazard(creep) } Room.isPotentialHazard = function (creep) { const hazardTypes = [ATTACK, RANGED_ATTACK, HEAL, WORK, CLAIM] return _.some(creep.body, b => _.include(hazardTypes, b.type)) }
Add check for `creep.my` in `isPlayerHazard`
Add check for `creep.my` in `isPlayerHazard`
JavaScript
mit
ScreepsQuorum/screeps-quorum
javascript
## Code Before: 'use strict' Room.prototype.getPlayerHostiles = function () { if (!this.__playerHostiles) { const hostiles = this.find(FIND_HOSTILE_CREEPS) this.__playerHostiles = _.filter(hostiles, Room.isPlayerHazard) } return this.__playerHostiles } Room.prototype.getHostilesByPlayer = function () { if (!this.__hostilesByPlayer) { const hostiles = this.getPlayerHostiles() this.__hostilesByPlayer = {} for (const hostile of hostiles) { const owner = hostile.owner.username if (!this.__hostilesByPlayer[owner]) { this.__hostilesByPlayer[owner] = [] } this.__hostilesByPlayer[owner].push(hostile) } } return this.__hostilesByPlayer } Room.isPlayerHazard = function (creep) { if (creep.owner.username === 'Invader' || creep.owner.username === 'Screeps') { return false } return this.isPotentialHazard(creep) } Room.isPotentialHazard = function (creep) { const hazardTypes = [ATTACK, RANGED_ATTACK, HEAL, WORK, CLAIM] return _.some(creep.body, b => _.include(hazardTypes, b.type)) } ## Instruction: Add check for `creep.my` in `isPlayerHazard` ## Code After: 'use strict' Room.prototype.getPlayerHostiles = function () { if (!this.__playerHostiles) { const hostiles = this.find(FIND_HOSTILE_CREEPS) this.__playerHostiles = _.filter(hostiles, Room.isPlayerHazard) } return this.__playerHostiles } Room.prototype.getHostilesByPlayer = function () { if (!this.__hostilesByPlayer) { const hostiles = this.getPlayerHostiles() this.__hostilesByPlayer = {} for (const hostile of hostiles) { const owner = hostile.owner.username if (!this.__hostilesByPlayer[owner]) { this.__hostilesByPlayer[owner] = [] } this.__hostilesByPlayer[owner].push(hostile) } } return this.__hostilesByPlayer } Room.isPlayerHazard = function (creep) { if (creep.owner.username === 'Invader' || creep.owner.username === 'Screeps') { return false } if (creep.my) { return false } return this.isPotentialHazard(creep) } Room.isPotentialHazard = function (creep) { const hazardTypes = [ATTACK, RANGED_ATTACK, HEAL, WORK, CLAIM] return _.some(creep.body, b => _.include(hazardTypes, b.type)) }
'use strict' Room.prototype.getPlayerHostiles = function () { if (!this.__playerHostiles) { const hostiles = this.find(FIND_HOSTILE_CREEPS) this.__playerHostiles = _.filter(hostiles, Room.isPlayerHazard) } return this.__playerHostiles } Room.prototype.getHostilesByPlayer = function () { if (!this.__hostilesByPlayer) { const hostiles = this.getPlayerHostiles() this.__hostilesByPlayer = {} for (const hostile of hostiles) { const owner = hostile.owner.username if (!this.__hostilesByPlayer[owner]) { this.__hostilesByPlayer[owner] = [] } this.__hostilesByPlayer[owner].push(hostile) } } return this.__hostilesByPlayer } Room.isPlayerHazard = function (creep) { if (creep.owner.username === 'Invader' || creep.owner.username === 'Screeps') { return false } + if (creep.my) { + return false + } return this.isPotentialHazard(creep) } Room.isPotentialHazard = function (creep) { const hazardTypes = [ATTACK, RANGED_ATTACK, HEAL, WORK, CLAIM] return _.some(creep.body, b => _.include(hazardTypes, b.type)) }
3
0.083333
3
0
a3508982566258afad45ad9f6131f333545ff702
lib/DDG/Spice/DogoNews.pm
lib/DDG/Spice/DogoNews.pm
package DDG::Spice::DogoNews; use DDG::Spice; primary_example_queries "kids news", "current events", "news for kids"; secondary_example_queries "obama kids news", "nasa news articles", "kids science", "social studies for kids"; description "Search for kids news articles and current events"; name "DOGOnews"; code_url "https://github.com/dogomedia/zeroclickinfo-spice/blob/master/lib/DDG/Spice/DogoNews.pm"; topics "everyday", "social", "science"; category "time_sensitive"; attribution twitter => ['http://twitter.com/dogonews','dogonews'], facebook => ['https://www.facebook.com/pages/DOGONews/132351663495902', 'DOGOnews'], github => ['https://github.com/dogomedia','DOGO Media, Inc.']; triggers any => "dogonews", "dogo news", "dogo", "kids", "kid", "child", "children", "student", "students"; spice to => 'http://api.dogomedia.com/api/v2/news/search.json?query=$1&api_key={{ENV{DDG_SPICE_DOGO_APIKEY}}}'; spice wrap_jsonp_callback => 1; handle query_lc => sub { return $_ if $_ =~ /(news|newspaper|current event)/i; return; }; 1;
package DDG::Spice::DogoNews; use DDG::Spice; primary_example_queries "kids news", "current events", "news for kids"; secondary_example_queries "obama kids news", "nasa news articles", "kids science", "social studies for kids"; description "Search for kids news articles and current events"; name "DOGOnews"; code_url "https://github.com/dogomedia/zeroclickinfo-spice/blob/master/lib/DDG/Spice/DogoNews.pm"; topics "everyday", "social", "science"; category "time_sensitive"; attribution twitter => ['http://twitter.com/dogonews','dogonews'], facebook => ['https://www.facebook.com/pages/DOGONews/132351663495902', 'DOGOnews'], github => ['https://github.com/dogomedia','DOGO Media, Inc.']; triggers any => "dogonews", "dogo news", "dogo", "kids", "kid", "child", "children", "childrens", "children's", "student", "students"; spice to => 'http://api.dogomedia.com/api/v2/news/search.json?query=$1&api_key={{ENV{DDG_SPICE_DOGO_APIKEY}}}'; spice wrap_jsonp_callback => 1; handle query_lc => sub { return $_ if $_ =~ /(news|newspaper|current event)/i; return; }; 1;
Fix test failures by adding missing triggers.
Fix test failures by adding missing triggers.
Perl
apache-2.0
dogomedia/zeroclickinfo-spice,Faiz7412/zeroclickinfo-spice,Kr1tya3/zeroclickinfo-spice,ColasBroux/zeroclickinfo-spice,lw7360/zeroclickinfo-spice,soleo/zeroclickinfo-spice,mohan08p/zeroclickinfo-spice,GrandpaCardigan/zeroclickinfo-spice,whalenrp/zeroclickinfo-spice,bdjnk/zeroclickinfo-spice,lernae/zeroclickinfo-spice,lerna/zeroclickinfo-spice,lw7360/zeroclickinfo-spice,dachinzo/zeroclickinfo-spice,lernae/zeroclickinfo-spice,jyounker/zeroclickinfo-spice,xaviervalarino/zeroclickinfo-spice,xaviervalarino/zeroclickinfo-spice,jyounker/zeroclickinfo-spice,Faiz7412/zeroclickinfo-spice,stevenmg/zeroclickinfo-spice,Dwaligon/zeroclickinfo-spice,navjotahuja92/zeroclickinfo-spice,TomBebbington/zeroclickinfo-spice,MoriTanosuke/zeroclickinfo-spice,deserted/zeroclickinfo-spice,sevki/zeroclickinfo-spice,bigcurl/zeroclickinfo-spice,loganom/zeroclickinfo-spice,MoriTanosuke/zeroclickinfo-spice,deserted/zeroclickinfo-spice,dheeraj143/zeroclickinfo-spice,stennie/zeroclickinfo-spice,samskeller/zeroclickinfo-spice,iambibhas/zeroclickinfo-spice,levaly/zeroclickinfo-spice,marianosimone/zeroclickinfo-spice,tagawa/zeroclickinfo-spice,kevintab95/zeroclickinfo-spice,AcriCAA/zeroclickinfo-spice,Kr1tya3/zeroclickinfo-spice,ppant/zeroclickinfo-spice,dogomedia/zeroclickinfo-spice,mayo/zeroclickinfo-spice,bdjnk/zeroclickinfo-spice,levaly/zeroclickinfo-spice,mr-karan/zeroclickinfo-spice,tagawa/zeroclickinfo-spice,Kakkoroid/zeroclickinfo-spice,lernae/zeroclickinfo-spice,shyamalschandra/zeroclickinfo-spice,Kakkoroid/zeroclickinfo-spice,xaviervalarino/zeroclickinfo-spice,marianosimone/zeroclickinfo-spice,sevki/zeroclickinfo-spice,cylgom/zeroclickinfo-spice,xaviervalarino/zeroclickinfo-spice,bigcurl/zeroclickinfo-spice,andrey-p/zeroclickinfo-spice,P71/zeroclickinfo-spice,bibliotechy/zeroclickinfo-spice,mr-karan/zeroclickinfo-spice,ScreapDK/zeroclickinfo-spice,evejweinberg/zeroclickinfo-spice,imwally/zeroclickinfo-spice,navjotahuja92/zeroclickinfo-spice,lernae/zeroclickinfo-spice,GrandpaCardigan/zeroclickinfo-spice,navjotahuja92/zeroclickinfo-spice,stevenmg/zeroclickinfo-spice,deserted/zeroclickinfo-spice,lw7360/zeroclickinfo-spice,gautamkrishnar/zeroclickinfo-spice,Dwaligon/zeroclickinfo-spice,Faiz7412/zeroclickinfo-spice,bdjnk/zeroclickinfo-spice,marianosimone/zeroclickinfo-spice,kevintab95/zeroclickinfo-spice,mohan08p/zeroclickinfo-spice,Retrobottega/zeroclickinfo-spice,andrey-p/zeroclickinfo-spice,rubinovitz/zeroclickinfo-spice,alexandernext/zeroclickinfo-spice,kevintab95/zeroclickinfo-spice,digit4lfa1l/zeroclickinfo-spice,levaly/zeroclickinfo-spice,brianrisk/zeroclickinfo-spice,ScreapDK/zeroclickinfo-spice,deserted/zeroclickinfo-spice,rmad17/zeroclickinfo-spice,Queeniebee/zeroclickinfo-spice,ColasBroux/zeroclickinfo-spice,bigcurl/zeroclickinfo-spice,navjotahuja92/zeroclickinfo-spice,shyamalschandra/zeroclickinfo-spice,jyounker/zeroclickinfo-spice,rmad17/zeroclickinfo-spice,sagarhani/zeroclickinfo-spice,Faiz7412/zeroclickinfo-spice,cylgom/zeroclickinfo-spice,gautamkrishnar/zeroclickinfo-spice,rubinovitz/zeroclickinfo-spice,ScreapDK/zeroclickinfo-spice,soleo/zeroclickinfo-spice,echosa/zeroclickinfo-spice,MoriTanosuke/zeroclickinfo-spice,bigcurl/zeroclickinfo-spice,bdjnk/zeroclickinfo-spice,echosa/zeroclickinfo-spice,bigcurl/zeroclickinfo-spice,mr-karan/zeroclickinfo-spice,Kr1tya3/zeroclickinfo-spice,AcriCAA/zeroclickinfo-spice,Queeniebee/zeroclickinfo-spice,hshackathons/zeroclickinfo-spice,lw7360/zeroclickinfo-spice,evejweinberg/zeroclickinfo-spice,marianosimone/zeroclickinfo-spice,hshackathons/zeroclickinfo-spice,gautamkrishnar/zeroclickinfo-spice,kevintab95/zeroclickinfo-spice,shyamalschandra/zeroclickinfo-spice,xaviervalarino/zeroclickinfo-spice,evejweinberg/zeroclickinfo-spice,whalenrp/zeroclickinfo-spice,AcriCAA/zeroclickinfo-spice,loganom/zeroclickinfo-spice,iambibhas/zeroclickinfo-spice,Retrobottega/zeroclickinfo-spice,bibliotechy/zeroclickinfo-spice,stennie/zeroclickinfo-spice,marianosimone/zeroclickinfo-spice,tagawa/zeroclickinfo-spice,ppant/zeroclickinfo-spice,alexandernext/zeroclickinfo-spice,dheeraj143/zeroclickinfo-spice,gautamkrishnar/zeroclickinfo-spice,whalenrp/zeroclickinfo-spice,alexandernext/zeroclickinfo-spice,Retrobottega/zeroclickinfo-spice,brianrisk/zeroclickinfo-spice,soleo/zeroclickinfo-spice,rubinovitz/zeroclickinfo-spice,stennie/zeroclickinfo-spice,P71/zeroclickinfo-spice,soleo/zeroclickinfo-spice,iambibhas/zeroclickinfo-spice,Kr1tya3/zeroclickinfo-spice,jyounker/zeroclickinfo-spice,echosa/zeroclickinfo-spice,stevenmg/zeroclickinfo-spice,xaviervalarino/zeroclickinfo-spice,andrey-p/zeroclickinfo-spice,dheeraj143/zeroclickinfo-spice,brianrisk/zeroclickinfo-spice,dogomedia/zeroclickinfo-spice,tagawa/zeroclickinfo-spice,TomBebbington/zeroclickinfo-spice,mayo/zeroclickinfo-spice,ScreapDK/zeroclickinfo-spice,rmad17/zeroclickinfo-spice,rmad17/zeroclickinfo-spice,alexandernext/zeroclickinfo-spice,sevki/zeroclickinfo-spice,Queeniebee/zeroclickinfo-spice,GrandpaCardigan/zeroclickinfo-spice,ColasBroux/zeroclickinfo-spice,iambibhas/zeroclickinfo-spice,Retrobottega/zeroclickinfo-spice,deserted/zeroclickinfo-spice,lerna/zeroclickinfo-spice,iambibhas/zeroclickinfo-spice,rmad17/zeroclickinfo-spice,loganom/zeroclickinfo-spice,bibliotechy/zeroclickinfo-spice,levaly/zeroclickinfo-spice,levaly/zeroclickinfo-spice,hshackathons/zeroclickinfo-spice,Retrobottega/zeroclickinfo-spice,stevenmg/zeroclickinfo-spice,shyamalschandra/zeroclickinfo-spice,mayo/zeroclickinfo-spice,tagawa/zeroclickinfo-spice,cylgom/zeroclickinfo-spice,lernae/zeroclickinfo-spice,lerna/zeroclickinfo-spice,sagarhani/zeroclickinfo-spice,iambibhas/zeroclickinfo-spice,sagarhani/zeroclickinfo-spice,mohan08p/zeroclickinfo-spice,dogomedia/zeroclickinfo-spice,andrey-p/zeroclickinfo-spice,mohan08p/zeroclickinfo-spice,ppant/zeroclickinfo-spice,imwally/zeroclickinfo-spice,Kakkoroid/zeroclickinfo-spice,kevintab95/zeroclickinfo-spice,marianosimone/zeroclickinfo-spice,Queeniebee/zeroclickinfo-spice,digit4lfa1l/zeroclickinfo-spice,sagarhani/zeroclickinfo-spice,dogomedia/zeroclickinfo-spice,bibliotechy/zeroclickinfo-spice,cylgom/zeroclickinfo-spice,GrandpaCardigan/zeroclickinfo-spice,digit4lfa1l/zeroclickinfo-spice,mr-karan/zeroclickinfo-spice,samskeller/zeroclickinfo-spice,loganom/zeroclickinfo-spice,sevki/zeroclickinfo-spice,deserted/zeroclickinfo-spice,brianrisk/zeroclickinfo-spice,lerna/zeroclickinfo-spice,MoriTanosuke/zeroclickinfo-spice,whalenrp/zeroclickinfo-spice,Kakkoroid/zeroclickinfo-spice,lernae/zeroclickinfo-spice,echosa/zeroclickinfo-spice,andrey-p/zeroclickinfo-spice,sagarhani/zeroclickinfo-spice,shyamalschandra/zeroclickinfo-spice,levaly/zeroclickinfo-spice,Kr1tya3/zeroclickinfo-spice,imwally/zeroclickinfo-spice,rubinovitz/zeroclickinfo-spice,AcriCAA/zeroclickinfo-spice,echosa/zeroclickinfo-spice,samskeller/zeroclickinfo-spice,cylgom/zeroclickinfo-spice,kevintab95/zeroclickinfo-spice,hshackathons/zeroclickinfo-spice,lerna/zeroclickinfo-spice,samskeller/zeroclickinfo-spice,evejweinberg/zeroclickinfo-spice,bigcurl/zeroclickinfo-spice,P71/zeroclickinfo-spice,imwally/zeroclickinfo-spice,stennie/zeroclickinfo-spice,AcriCAA/zeroclickinfo-spice,Kakkoroid/zeroclickinfo-spice,dachinzo/zeroclickinfo-spice,Dwaligon/zeroclickinfo-spice,mr-karan/zeroclickinfo-spice,imwally/zeroclickinfo-spice,TomBebbington/zeroclickinfo-spice,soleo/zeroclickinfo-spice,ScreapDK/zeroclickinfo-spice,whalenrp/zeroclickinfo-spice,dachinzo/zeroclickinfo-spice,whalenrp/zeroclickinfo-spice,soleo/zeroclickinfo-spice,P71/zeroclickinfo-spice,MoriTanosuke/zeroclickinfo-spice,dheeraj143/zeroclickinfo-spice,TomBebbington/zeroclickinfo-spice,ppant/zeroclickinfo-spice,GrandpaCardigan/zeroclickinfo-spice,mayo/zeroclickinfo-spice,Dwaligon/zeroclickinfo-spice,digit4lfa1l/zeroclickinfo-spice,dachinzo/zeroclickinfo-spice,cylgom/zeroclickinfo-spice,brianrisk/zeroclickinfo-spice,ColasBroux/zeroclickinfo-spice
perl
## Code Before: package DDG::Spice::DogoNews; use DDG::Spice; primary_example_queries "kids news", "current events", "news for kids"; secondary_example_queries "obama kids news", "nasa news articles", "kids science", "social studies for kids"; description "Search for kids news articles and current events"; name "DOGOnews"; code_url "https://github.com/dogomedia/zeroclickinfo-spice/blob/master/lib/DDG/Spice/DogoNews.pm"; topics "everyday", "social", "science"; category "time_sensitive"; attribution twitter => ['http://twitter.com/dogonews','dogonews'], facebook => ['https://www.facebook.com/pages/DOGONews/132351663495902', 'DOGOnews'], github => ['https://github.com/dogomedia','DOGO Media, Inc.']; triggers any => "dogonews", "dogo news", "dogo", "kids", "kid", "child", "children", "student", "students"; spice to => 'http://api.dogomedia.com/api/v2/news/search.json?query=$1&api_key={{ENV{DDG_SPICE_DOGO_APIKEY}}}'; spice wrap_jsonp_callback => 1; handle query_lc => sub { return $_ if $_ =~ /(news|newspaper|current event)/i; return; }; 1; ## Instruction: Fix test failures by adding missing triggers. ## Code After: package DDG::Spice::DogoNews; use DDG::Spice; primary_example_queries "kids news", "current events", "news for kids"; secondary_example_queries "obama kids news", "nasa news articles", "kids science", "social studies for kids"; description "Search for kids news articles and current events"; name "DOGOnews"; code_url "https://github.com/dogomedia/zeroclickinfo-spice/blob/master/lib/DDG/Spice/DogoNews.pm"; topics "everyday", "social", "science"; category "time_sensitive"; attribution twitter => ['http://twitter.com/dogonews','dogonews'], facebook => ['https://www.facebook.com/pages/DOGONews/132351663495902', 'DOGOnews'], github => ['https://github.com/dogomedia','DOGO Media, Inc.']; triggers any => "dogonews", "dogo news", "dogo", "kids", "kid", "child", "children", "childrens", "children's", "student", "students"; spice to => 'http://api.dogomedia.com/api/v2/news/search.json?query=$1&api_key={{ENV{DDG_SPICE_DOGO_APIKEY}}}'; spice wrap_jsonp_callback => 1; handle query_lc => sub { return $_ if $_ =~ /(news|newspaper|current event)/i; return; }; 1;
package DDG::Spice::DogoNews; use DDG::Spice; primary_example_queries "kids news", "current events", "news for kids"; secondary_example_queries "obama kids news", "nasa news articles", "kids science", "social studies for kids"; description "Search for kids news articles and current events"; name "DOGOnews"; code_url "https://github.com/dogomedia/zeroclickinfo-spice/blob/master/lib/DDG/Spice/DogoNews.pm"; topics "everyday", "social", "science"; category "time_sensitive"; attribution twitter => ['http://twitter.com/dogonews','dogonews'], facebook => ['https://www.facebook.com/pages/DOGONews/132351663495902', 'DOGOnews'], github => ['https://github.com/dogomedia','DOGO Media, Inc.']; - triggers any => "dogonews", "dogo news", "dogo", "kids", "kid", "child", "children", "student", "students"; + triggers any => "dogonews", "dogo news", "dogo", "kids", "kid", "child", "children", "childrens", "children's", "student", "students"; ? +++++++++++++++++++++++++++ spice to => 'http://api.dogomedia.com/api/v2/news/search.json?query=$1&api_key={{ENV{DDG_SPICE_DOGO_APIKEY}}}'; spice wrap_jsonp_callback => 1; handle query_lc => sub { return $_ if $_ =~ /(news|newspaper|current event)/i; return; }; 1;
2
0.076923
1
1
26f8b20263e5fa85cf0cbdc857610ac539c26c92
.travis.yml
.travis.yml
language: ruby rvm: - 2.1.1 - 2.0.0 addons: code_climate: repo_token: secure: LxxjLwtN6WyRAKiu0nWre58NK0p7xB4/h/DYZwQ5ALnaYaOwSNRwqnEX5WcqawZVAuBExVjYV7E2k1ZpUGpmOyt/XI+6QGqFToLldUoB0lUwzlQ5QTmZN+hZsnZ9+G8+LSVevJtuyLe9UrIIrtUWRnCKFD6hzrsl4TQMaUCeyVs= notifications: slack: secure: G6VLedqT8kXanccqUeRRej2aXkR0SMFSwCBX/hbsNy+qoC7WSTFjMr98ijTn3eTykz1nBk+d2d2sfSm5dreIsl7jsF+eqHYKmZzGb13/YG6lvf2+GNyFduhoKJC3NWj1dqPO2QS+8g9YYBpGJIpnlp+PkSck5ewqd+mDXr53QbA=
language: ruby rvm: - 2.1.1 - 2.0.0 addons: code_climate: repo_token: secure: eKtahgCOYZC/FzHgPSRYWLG/c7dRelaUZgCHV5TyoIn+akelAPRs+B334J8ahAfArLIVL2iUNpGQVdbDAMyQNd0BcQROkzj2qicGX5BTpaGRjDRHOVUDpevykZJl6oqy4WjvMevSp2xxY1ejZmbOwW/NzRQfSd79ekxGr+J0V/0= notifications: slack: secure: G6VLedqT8kXanccqUeRRej2aXkR0SMFSwCBX/hbsNy+qoC7WSTFjMr98ijTn3eTykz1nBk+d2d2sfSm5dreIsl7jsF+eqHYKmZzGb13/YG6lvf2+GNyFduhoKJC3NWj1dqPO2QS+8g9YYBpGJIpnlp+PkSck5ewqd+mDXr53QbA=
Update code climate test coverage token
Update code climate test coverage token
YAML
mit
openmcac/basechurch,openmcac/basechurch,openmcac/basechurch,openmcac/basechurch
yaml
## Code Before: language: ruby rvm: - 2.1.1 - 2.0.0 addons: code_climate: repo_token: secure: LxxjLwtN6WyRAKiu0nWre58NK0p7xB4/h/DYZwQ5ALnaYaOwSNRwqnEX5WcqawZVAuBExVjYV7E2k1ZpUGpmOyt/XI+6QGqFToLldUoB0lUwzlQ5QTmZN+hZsnZ9+G8+LSVevJtuyLe9UrIIrtUWRnCKFD6hzrsl4TQMaUCeyVs= notifications: slack: secure: G6VLedqT8kXanccqUeRRej2aXkR0SMFSwCBX/hbsNy+qoC7WSTFjMr98ijTn3eTykz1nBk+d2d2sfSm5dreIsl7jsF+eqHYKmZzGb13/YG6lvf2+GNyFduhoKJC3NWj1dqPO2QS+8g9YYBpGJIpnlp+PkSck5ewqd+mDXr53QbA= ## Instruction: Update code climate test coverage token ## Code After: language: ruby rvm: - 2.1.1 - 2.0.0 addons: code_climate: repo_token: secure: eKtahgCOYZC/FzHgPSRYWLG/c7dRelaUZgCHV5TyoIn+akelAPRs+B334J8ahAfArLIVL2iUNpGQVdbDAMyQNd0BcQROkzj2qicGX5BTpaGRjDRHOVUDpevykZJl6oqy4WjvMevSp2xxY1ejZmbOwW/NzRQfSd79ekxGr+J0V/0= notifications: slack: secure: G6VLedqT8kXanccqUeRRej2aXkR0SMFSwCBX/hbsNy+qoC7WSTFjMr98ijTn3eTykz1nBk+d2d2sfSm5dreIsl7jsF+eqHYKmZzGb13/YG6lvf2+GNyFduhoKJC3NWj1dqPO2QS+8g9YYBpGJIpnlp+PkSck5ewqd+mDXr53QbA=
language: ruby rvm: - 2.1.1 - 2.0.0 addons: code_climate: repo_token: - secure: LxxjLwtN6WyRAKiu0nWre58NK0p7xB4/h/DYZwQ5ALnaYaOwSNRwqnEX5WcqawZVAuBExVjYV7E2k1ZpUGpmOyt/XI+6QGqFToLldUoB0lUwzlQ5QTmZN+hZsnZ9+G8+LSVevJtuyLe9UrIIrtUWRnCKFD6hzrsl4TQMaUCeyVs= + secure: eKtahgCOYZC/FzHgPSRYWLG/c7dRelaUZgCHV5TyoIn+akelAPRs+B334J8ahAfArLIVL2iUNpGQVdbDAMyQNd0BcQROkzj2qicGX5BTpaGRjDRHOVUDpevykZJl6oqy4WjvMevSp2xxY1ejZmbOwW/NzRQfSd79ekxGr+J0V/0= notifications: slack: secure: G6VLedqT8kXanccqUeRRej2aXkR0SMFSwCBX/hbsNy+qoC7WSTFjMr98ijTn3eTykz1nBk+d2d2sfSm5dreIsl7jsF+eqHYKmZzGb13/YG6lvf2+GNyFduhoKJC3NWj1dqPO2QS+8g9YYBpGJIpnlp+PkSck5ewqd+mDXr53QbA=
2
0.181818
1
1
d851a9f0696cdc6f421591d689f7c74e2c267d4f
data/transition-sites/cabinetoffice_digitalstandards.yml
data/transition-sites/cabinetoffice_digitalstandards.yml
--- site: cabinetoffice_digitalstandards whitehall_slug: cabinet-office host: digitalstandards.cabinetoffice.gov.uk redirection_date: 1st November 2013 tna_timestamp: 20130413020040 title: Cabinet Office furl: www.gov.uk/service-manual homepage: https://www.gov.uk/service-manual css: cabinet-office
--- site: cabinetoffice_digitalstandards whitehall_slug: cabinet-office host: digitalstandards.cabinetoffice.gov.uk redirection_date: 24th January 2014 tna_timestamp: 20130413020040 title: Cabinet Office furl: www.gov.uk/service-manual homepage: https://www.gov.uk/service-manual css: cabinet-office
Change date of digital standards
Change date of digital standards
YAML
mit
alphagov/transition-config,alphagov/transition-config
yaml
## Code Before: --- site: cabinetoffice_digitalstandards whitehall_slug: cabinet-office host: digitalstandards.cabinetoffice.gov.uk redirection_date: 1st November 2013 tna_timestamp: 20130413020040 title: Cabinet Office furl: www.gov.uk/service-manual homepage: https://www.gov.uk/service-manual css: cabinet-office ## Instruction: Change date of digital standards ## Code After: --- site: cabinetoffice_digitalstandards whitehall_slug: cabinet-office host: digitalstandards.cabinetoffice.gov.uk redirection_date: 24th January 2014 tna_timestamp: 20130413020040 title: Cabinet Office furl: www.gov.uk/service-manual homepage: https://www.gov.uk/service-manual css: cabinet-office
--- site: cabinetoffice_digitalstandards whitehall_slug: cabinet-office host: digitalstandards.cabinetoffice.gov.uk - redirection_date: 1st November 2013 + redirection_date: 24th January 2014 tna_timestamp: 20130413020040 title: Cabinet Office furl: www.gov.uk/service-manual homepage: https://www.gov.uk/service-manual css: cabinet-office
2
0.2
1
1
092681dc3b7259889901ae9ccb99ac4b94619977
src/styleguide/Wrapper.js
src/styleguide/Wrapper.js
import React, { Component } from 'react' import lightBaseTheme from 'material-ui/styles/baseThemes/lightBaseTheme' import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider' import getMuiTheme from 'material-ui/styles/getMuiTheme' import injectTapEventPlugin from 'react-tap-event-plugin' injectTapEventPlugin() export default class Wrapper extends Component { render () { return ( <MuiThemeProvider muiTheme={getMuiTheme(lightBaseTheme)}> <div style={{fontFamily: 'Roboto, sans-serif'}}> {this.props.children} </div> </MuiThemeProvider> ) } }
import React, { Component } from 'react' import lightBaseTheme from 'material-ui/styles/baseThemes/lightBaseTheme' import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider' import getMuiTheme from 'material-ui/styles/getMuiTheme' export default class Wrapper extends Component { render () { return ( <MuiThemeProvider muiTheme={getMuiTheme(lightBaseTheme)}> <div style={{fontFamily: 'Roboto, sans-serif'}}> {this.props.children} </div> </MuiThemeProvider> ) } }
Remove react-tap-event-plugin from the styleguide.
Remove react-tap-event-plugin from the styleguide.
JavaScript
mit
TeamWertarbyte/material-ui-bottom-sheet
javascript
## Code Before: import React, { Component } from 'react' import lightBaseTheme from 'material-ui/styles/baseThemes/lightBaseTheme' import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider' import getMuiTheme from 'material-ui/styles/getMuiTheme' import injectTapEventPlugin from 'react-tap-event-plugin' injectTapEventPlugin() export default class Wrapper extends Component { render () { return ( <MuiThemeProvider muiTheme={getMuiTheme(lightBaseTheme)}> <div style={{fontFamily: 'Roboto, sans-serif'}}> {this.props.children} </div> </MuiThemeProvider> ) } } ## Instruction: Remove react-tap-event-plugin from the styleguide. ## Code After: import React, { Component } from 'react' import lightBaseTheme from 'material-ui/styles/baseThemes/lightBaseTheme' import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider' import getMuiTheme from 'material-ui/styles/getMuiTheme' export default class Wrapper extends Component { render () { return ( <MuiThemeProvider muiTheme={getMuiTheme(lightBaseTheme)}> <div style={{fontFamily: 'Roboto, sans-serif'}}> {this.props.children} </div> </MuiThemeProvider> ) } }
import React, { Component } from 'react' import lightBaseTheme from 'material-ui/styles/baseThemes/lightBaseTheme' import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider' import getMuiTheme from 'material-ui/styles/getMuiTheme' - import injectTapEventPlugin from 'react-tap-event-plugin' - injectTapEventPlugin() export default class Wrapper extends Component { render () { return ( <MuiThemeProvider muiTheme={getMuiTheme(lightBaseTheme)}> <div style={{fontFamily: 'Roboto, sans-serif'}}> {this.props.children} </div> </MuiThemeProvider> ) } }
2
0.111111
0
2
128a3d691d9be875ca5a53fbbc7237d3ba4f234a
main.js
main.js
var Bind = require("github/jillix/bind"); var Events = require("github/jillix/events"); module.exports = function(config) { var self = this; Events.call(self, config); for (var i in config.roles) { $("." + config.roles[i]).hide(); } var cache; self.updateLinks = function (data) { cache = cache || data; data = cache || {}; data.role = data.role || config.publicRole; $("." + data.role).fadeIn(); var index = config.roles.indexOf(data.role); if (index !== -1) { config.roles.splice(index, 1); } for (var i in config.roles) { $("." + config.roles[i]).remove(); } self.emit("updatedLinks", data); }; };
var Bind = require("github/jillix/bind"); var Events = require("github/jillix/events"); module.exports = function(config) { var self = this; Events.call(self, config); for (var i in config.roles) { $("." + config.roles[i]).hide(); } var cache; self.updateLinks = function (data) { cache = cache || data; data = cache || {}; data.role = data.role || config.publicRole; $("." + data.role).fadeIn(); var index = config.roles.indexOf(data.role); if (index !== -1) { config.roles.splice(index, 1); } for (var i in config.roles) { $("." + config.roles[i] + ":not('." + data.role + "')").remove(); } self.emit("updatedLinks", data); }; };
Remove only links that have not the data.role class.
Remove only links that have not the data.role class.
JavaScript
mit
jxmono/links
javascript
## Code Before: var Bind = require("github/jillix/bind"); var Events = require("github/jillix/events"); module.exports = function(config) { var self = this; Events.call(self, config); for (var i in config.roles) { $("." + config.roles[i]).hide(); } var cache; self.updateLinks = function (data) { cache = cache || data; data = cache || {}; data.role = data.role || config.publicRole; $("." + data.role).fadeIn(); var index = config.roles.indexOf(data.role); if (index !== -1) { config.roles.splice(index, 1); } for (var i in config.roles) { $("." + config.roles[i]).remove(); } self.emit("updatedLinks", data); }; }; ## Instruction: Remove only links that have not the data.role class. ## Code After: var Bind = require("github/jillix/bind"); var Events = require("github/jillix/events"); module.exports = function(config) { var self = this; Events.call(self, config); for (var i in config.roles) { $("." + config.roles[i]).hide(); } var cache; self.updateLinks = function (data) { cache = cache || data; data = cache || {}; data.role = data.role || config.publicRole; $("." + data.role).fadeIn(); var index = config.roles.indexOf(data.role); if (index !== -1) { config.roles.splice(index, 1); } for (var i in config.roles) { $("." + config.roles[i] + ":not('." + data.role + "')").remove(); } self.emit("updatedLinks", data); }; };
var Bind = require("github/jillix/bind"); var Events = require("github/jillix/events"); module.exports = function(config) { var self = this; Events.call(self, config); for (var i in config.roles) { $("." + config.roles[i]).hide(); } var cache; self.updateLinks = function (data) { cache = cache || data; data = cache || {}; data.role = data.role || config.publicRole; $("." + data.role).fadeIn(); var index = config.roles.indexOf(data.role); if (index !== -1) { config.roles.splice(index, 1); } for (var i in config.roles) { - $("." + config.roles[i]).remove(); + $("." + config.roles[i] + ":not('." + data.role + "')").remove(); } self.emit("updatedLinks", data); }; };
2
0.057143
1
1
077a62f63b22e9fb196e2aceb44548ef4dc54787
src/api/scala/k2b6s9j/boatcraft/api/registry/ModifierRegistry.scala
src/api/scala/k2b6s9j/boatcraft/api/registry/ModifierRegistry.scala
package k2b6s9j.boatcraft.api.registry import java.util.{HashMap, List, Map} import scala.collection.JavaConversions.asScalaBuffer import k2b6s9j.boatcraft.api.traits.Modifier import net.minecraft.item.ItemStack /** Contains the methods needed to register Materials with BoatCraft:Core. */ object ModifierRegistry { var modifiers: Map[String, Modifier] = new HashMap[String, Modifier] def addModifier(newMaterial: Modifier) { modifiers put(newMaterial toString, newMaterial) } def addModifiers(newMaterials: List[Modifier]) { for (modifier <- newMaterials) modifiers put(modifier toString, modifier) } def getModifier(name: String) = modifiers get name def getModifier(stack: ItemStack) = modifiers get (stack.stackTagCompound getString "modifier") }
package k2b6s9j.boatcraft.api.registry import java.util.{HashMap, List, Map} import scala.collection.JavaConversions.asScalaBuffer import k2b6s9j.boatcraft.api.traits.Modifier import net.minecraft.item.ItemStack /** Contains the methods needed to register Materials with BoatCraft:Core. */ object ModifierRegistry { var modifiers: Map[String, Modifier] = new HashMap[String, Modifier] /** Adds a single Modifier to the Map used by BoatCraft:Core for boat creation. * * @param newModifier the Modifier being registered */ def addModifier(newModifier: Modifier) { modifiers put(newModifier toString, newModifier) } /** Adds a List of Modifiers to the Map used by BoatCraft:Core for boat creation. * * @param newModifiers list of Modifiers being registered */ def addModifiers(newModifiers: List[Modifier]) { for (modifier <- newModifiers) modifiers put(modifier toString, modifier) } def getModifier(name: String) = modifiers get name def getModifier(stack: ItemStack) = modifiers get (stack.stackTagCompound getString "modifier") }
Add documentation comments for addModifier() and addModifiers()
Add documentation comments for addModifier() and addModifiers()
Scala
mit
Open-Code-Developers/BoatCraft
scala
## Code Before: package k2b6s9j.boatcraft.api.registry import java.util.{HashMap, List, Map} import scala.collection.JavaConversions.asScalaBuffer import k2b6s9j.boatcraft.api.traits.Modifier import net.minecraft.item.ItemStack /** Contains the methods needed to register Materials with BoatCraft:Core. */ object ModifierRegistry { var modifiers: Map[String, Modifier] = new HashMap[String, Modifier] def addModifier(newMaterial: Modifier) { modifiers put(newMaterial toString, newMaterial) } def addModifiers(newMaterials: List[Modifier]) { for (modifier <- newMaterials) modifiers put(modifier toString, modifier) } def getModifier(name: String) = modifiers get name def getModifier(stack: ItemStack) = modifiers get (stack.stackTagCompound getString "modifier") } ## Instruction: Add documentation comments for addModifier() and addModifiers() ## Code After: package k2b6s9j.boatcraft.api.registry import java.util.{HashMap, List, Map} import scala.collection.JavaConversions.asScalaBuffer import k2b6s9j.boatcraft.api.traits.Modifier import net.minecraft.item.ItemStack /** Contains the methods needed to register Materials with BoatCraft:Core. */ object ModifierRegistry { var modifiers: Map[String, Modifier] = new HashMap[String, Modifier] /** Adds a single Modifier to the Map used by BoatCraft:Core for boat creation. * * @param newModifier the Modifier being registered */ def addModifier(newModifier: Modifier) { modifiers put(newModifier toString, newModifier) } /** Adds a List of Modifiers to the Map used by BoatCraft:Core for boat creation. * * @param newModifiers list of Modifiers being registered */ def addModifiers(newModifiers: List[Modifier]) { for (modifier <- newModifiers) modifiers put(modifier toString, modifier) } def getModifier(name: String) = modifiers get name def getModifier(stack: ItemStack) = modifiers get (stack.stackTagCompound getString "modifier") }
package k2b6s9j.boatcraft.api.registry import java.util.{HashMap, List, Map} import scala.collection.JavaConversions.asScalaBuffer import k2b6s9j.boatcraft.api.traits.Modifier import net.minecraft.item.ItemStack /** Contains the methods needed to register Materials with BoatCraft:Core. */ object ModifierRegistry { var modifiers: Map[String, Modifier] = new HashMap[String, Modifier] - + + /** Adds a single Modifier to the Map used by BoatCraft:Core for boat creation. + * + * @param newModifier the Modifier being registered + */ - def addModifier(newMaterial: Modifier) ? ^ ^^ --- + def addModifier(newModifier: Modifier) ? ^^ ^^^^^ { - modifiers put(newMaterial toString, newMaterial) ? ^^ --- ^^ --- + modifiers put(newModifier toString, newModifier) ? ^^^^^ ^^^^^ } + /** Adds a List of Modifiers to the Map used by BoatCraft:Core for boat creation. + * + * @param newModifiers list of Modifiers being registered + */ - def addModifiers(newMaterials: List[Modifier]) ? ^^ --- + def addModifiers(newModifiers: List[Modifier]) ? ^^^^^ { - for (modifier <- newMaterials) ? ^^ --- + for (modifier <- newModifiers) ? ^^^^^ modifiers put(modifier toString, modifier) } def getModifier(name: String) = modifiers get name def getModifier(stack: ItemStack) = modifiers get (stack.stackTagCompound getString "modifier") }
18
0.580645
13
5
4259a8708690943817c5b6f0085d8bbd4d7451c1
Casks/devonthink-pro-office.rb
Casks/devonthink-pro-office.rb
cask :v1 => 'devonthink-pro-office' do version '2.8.6' sha256 'a9229681cb57738bc89f7e74c1f42a1e60689b03345f5c9540f239e43b66a449' # amazonaws.com is the official download host per the vendor homepage url "https://s3.amazonaws.com/DTWebsiteSupport/download/devonthink/#{version}/DEVONthink_Pro_Office.dmg.zip" appcast 'http://www.devon-technologies.com/Sparkle/DEVONthinkProOffice2.xml', :sha256 => 'a6cbe5a8265c35dc5d840725cf102aa207c27d9bd43fc6fda0103bb6bb50d342' name 'DEVONthink Pro Office' homepage 'http://www.devontechnologies.com/products/devonthink/devonthink-pro-office.html' license :commercial container :nested => 'DEVONthink_Pro_Office.dmg' # Renamed for consistency: app name is different in the Finder and in a shell. # Original discussion: https://github.com/caskroom/homebrew-cask/pull/3838 app 'DEVONthink Pro.app', :target => 'DEVONthink Pro Office.app' depends_on :macos => '>= :mountain_lion' end
cask :v1 => 'devonthink-pro-office' do version '2.8.7' sha256 '3c272a0656afe1bee9a683190dbc55484724a81492a3b2ae7f50af8bc96b5894' # amazonaws.com is the official download host per the vendor homepage url "https://s3.amazonaws.com/DTWebsiteSupport/download/devonthink/#{version}/DEVONthink_Pro_Office.dmg.zip" appcast 'http://www.devon-technologies.com/Sparkle/DEVONthinkProOffice2.xml', :sha256 => 'ba7fe4186fdd3577f33e06ede3712de88977e4080388558a4b6990c42bf8bf76' name 'DEVONthink Pro Office' homepage 'http://www.devontechnologies.com/products/devonthink/devonthink-pro-office.html' license :commercial container :nested => 'DEVONthink_Pro_Office.dmg' # Renamed for consistency: app name is different in the Finder and in a shell. # Original discussion: https://github.com/caskroom/homebrew-cask/pull/3838 app 'DEVONthink Pro.app', :target => 'DEVONthink Pro Office.app' depends_on :macos => '>= :mountain_lion' end
Update DEVONthink Pro Office to 2.8.6
Update DEVONthink Pro Office to 2.8.6
Ruby
bsd-2-clause
haha1903/homebrew-cask,julionc/homebrew-cask,elnappo/homebrew-cask,jeroenj/homebrew-cask,miku/homebrew-cask,alebcay/homebrew-cask,wKovacs64/homebrew-cask,johndbritton/homebrew-cask,Ngrd/homebrew-cask,tan9/homebrew-cask,dwkns/homebrew-cask,julionc/homebrew-cask,MircoT/homebrew-cask,hellosky806/homebrew-cask,theoriginalgri/homebrew-cask,jedahan/homebrew-cask,stonehippo/homebrew-cask,antogg/homebrew-cask,afh/homebrew-cask,pacav69/homebrew-cask,sjackman/homebrew-cask,klane/homebrew-cask,renard/homebrew-cask,ericbn/homebrew-cask,nrlquaker/homebrew-cask,scottsuch/homebrew-cask,reitermarkus/homebrew-cask,cedwardsmedia/homebrew-cask,hakamadare/homebrew-cask,nshemonsky/homebrew-cask,forevergenin/homebrew-cask,opsdev-ws/homebrew-cask,reelsense/homebrew-cask,nathanielvarona/homebrew-cask,reitermarkus/homebrew-cask,tyage/homebrew-cask,stevehedrick/homebrew-cask,lifepillar/homebrew-cask,lantrix/homebrew-cask,casidiablo/homebrew-cask,optikfluffel/homebrew-cask,scottsuch/homebrew-cask,pkq/homebrew-cask,kTitan/homebrew-cask,JosephViolago/homebrew-cask,Cottser/homebrew-cask,maxnordlund/homebrew-cask,scribblemaniac/homebrew-cask,yutarody/homebrew-cask,JacopKane/homebrew-cask,joschi/homebrew-cask,claui/homebrew-cask,howie/homebrew-cask,jgarber623/homebrew-cask,dictcp/homebrew-cask,BenjaminHCCarr/homebrew-cask,flaviocamilo/homebrew-cask,victorpopkov/homebrew-cask,tan9/homebrew-cask,Dremora/homebrew-cask,claui/homebrew-cask,scribblemaniac/homebrew-cask,optikfluffel/homebrew-cask,malob/homebrew-cask,rogeriopradoj/homebrew-cask,jiashuw/homebrew-cask,Keloran/homebrew-cask,timsutton/homebrew-cask,crzrcn/homebrew-cask,imgarylai/homebrew-cask,nrlquaker/homebrew-cask,elyscape/homebrew-cask,yurikoles/homebrew-cask,singingwolfboy/homebrew-cask,brianshumate/homebrew-cask,flaviocamilo/homebrew-cask,mwean/homebrew-cask,alebcay/homebrew-cask,corbt/homebrew-cask,13k/homebrew-cask,asbachb/homebrew-cask,scribblemaniac/homebrew-cask,renaudguerin/homebrew-cask,fanquake/homebrew-cask,doits/homebrew-cask,jalaziz/homebrew-cask,santoshsahoo/homebrew-cask,wickles/homebrew-cask,markthetech/homebrew-cask,seanzxx/homebrew-cask,tmoreira2020/homebrew,colindean/homebrew-cask,okket/homebrew-cask,Fedalto/homebrew-cask,devmynd/homebrew-cask,tjt263/homebrew-cask,Cottser/homebrew-cask,chrisfinazzo/homebrew-cask,troyxmccall/homebrew-cask,ddm/homebrew-cask,mjdescy/homebrew-cask,moogar0880/homebrew-cask,CameronGarrett/homebrew-cask,michelegera/homebrew-cask,vitorgalvao/homebrew-cask,RJHsiao/homebrew-cask,colindean/homebrew-cask,jgarber623/homebrew-cask,a1russell/homebrew-cask,rajiv/homebrew-cask,optikfluffel/homebrew-cask,shorshe/homebrew-cask,n8henrie/homebrew-cask,afh/homebrew-cask,corbt/homebrew-cask,helloIAmPau/homebrew-cask,n0ts/homebrew-cask,gurghet/homebrew-cask,squid314/homebrew-cask,mattrobenolt/homebrew-cask,chrisfinazzo/homebrew-cask,tjnycum/homebrew-cask,tedski/homebrew-cask,FredLackeyOfficial/homebrew-cask,diogodamiani/homebrew-cask,timsutton/homebrew-cask,hanxue/caskroom,malford/homebrew-cask,devmynd/homebrew-cask,joshka/homebrew-cask,chuanxd/homebrew-cask,stevehedrick/homebrew-cask,hanxue/caskroom,jconley/homebrew-cask,sosedoff/homebrew-cask,kiliankoe/homebrew-cask,m3nu/homebrew-cask,coeligena/homebrew-customized,markthetech/homebrew-cask,yurikoles/homebrew-cask,deiga/homebrew-cask,morganestes/homebrew-cask,pacav69/homebrew-cask,sebcode/homebrew-cask,Ephemera/homebrew-cask,kesara/homebrew-cask,jhowtan/homebrew-cask,guerrero/homebrew-cask,napaxton/homebrew-cask,ianyh/homebrew-cask,leipert/homebrew-cask,6uclz1/homebrew-cask,alexg0/homebrew-cask,napaxton/homebrew-cask,ksato9700/homebrew-cask,winkelsdorf/homebrew-cask,tangestani/homebrew-cask,tyage/homebrew-cask,rajiv/homebrew-cask,AnastasiaSulyagina/homebrew-cask,pkq/homebrew-cask,gerrypower/homebrew-cask,psibre/homebrew-cask,elyscape/homebrew-cask,feigaochn/homebrew-cask,vigosan/homebrew-cask,syscrusher/homebrew-cask,dcondrey/homebrew-cask,inta/homebrew-cask,danielbayley/homebrew-cask,ericbn/homebrew-cask,gibsjose/homebrew-cask,gabrielizaias/homebrew-cask,mhubig/homebrew-cask,bcomnes/homebrew-cask,gmkey/homebrew-cask,okket/homebrew-cask,skatsuta/homebrew-cask,bdhess/homebrew-cask,alexg0/homebrew-cask,fharbe/homebrew-cask,cblecker/homebrew-cask,cblecker/homebrew-cask,sgnh/homebrew-cask,tolbkni/homebrew-cask,tsparber/homebrew-cask,ianyh/homebrew-cask,mjgardner/homebrew-cask,onlynone/homebrew-cask,thomanq/homebrew-cask,williamboman/homebrew-cask,jaredsampson/homebrew-cask,neverfox/homebrew-cask,riyad/homebrew-cask,codeurge/homebrew-cask,xyb/homebrew-cask,axodys/homebrew-cask,mikem/homebrew-cask,xakraz/homebrew-cask,chadcatlett/caskroom-homebrew-cask,buo/homebrew-cask,kronicd/homebrew-cask,faun/homebrew-cask,gilesdring/homebrew-cask,JacopKane/homebrew-cask,ksylvan/homebrew-cask,RJHsiao/homebrew-cask,mlocher/homebrew-cask,coeligena/homebrew-customized,joschi/homebrew-cask,exherb/homebrew-cask,jeroenseegers/homebrew-cask,0xadada/homebrew-cask,wastrachan/homebrew-cask,ptb/homebrew-cask,Amorymeltzer/homebrew-cask,leipert/homebrew-cask,cprecioso/homebrew-cask,mingzhi22/homebrew-cask,mishari/homebrew-cask,troyxmccall/homebrew-cask,SentinelWarren/homebrew-cask,goxberry/homebrew-cask,otaran/homebrew-cask,paour/homebrew-cask,kesara/homebrew-cask,Ngrd/homebrew-cask,xcezx/homebrew-cask,MerelyAPseudonym/homebrew-cask,yumitsu/homebrew-cask,cliffcotino/homebrew-cask,Labutin/homebrew-cask,larseggert/homebrew-cask,reelsense/homebrew-cask,jconley/homebrew-cask,jasmas/homebrew-cask,shoichiaizawa/homebrew-cask,larseggert/homebrew-cask,mjgardner/homebrew-cask,robertgzr/homebrew-cask,wKovacs64/homebrew-cask,kpearson/homebrew-cask,jmeridth/homebrew-cask,athrunsun/homebrew-cask,FinalDes/homebrew-cask,samdoran/homebrew-cask,caskroom/homebrew-cask,jeroenj/homebrew-cask,Labutin/homebrew-cask,usami-k/homebrew-cask,zerrot/homebrew-cask,tolbkni/homebrew-cask,colindunn/homebrew-cask,andrewdisley/homebrew-cask,andrewdisley/homebrew-cask,imgarylai/homebrew-cask,haha1903/homebrew-cask,mlocher/homebrew-cask,farmerchris/homebrew-cask,jpmat296/homebrew-cask,sosedoff/homebrew-cask,cfillion/homebrew-cask,bric3/homebrew-cask,jawshooah/homebrew-cask,kassi/homebrew-cask,wmorin/homebrew-cask,perfide/homebrew-cask,hristozov/homebrew-cask,stephenwade/homebrew-cask,cprecioso/homebrew-cask,mingzhi22/homebrew-cask,winkelsdorf/homebrew-cask,kingthorin/homebrew-cask,ericbn/homebrew-cask,mjgardner/homebrew-cask,jonathanwiesel/homebrew-cask,crzrcn/homebrew-cask,linc01n/homebrew-cask,slack4u/homebrew-cask,kongslund/homebrew-cask,jalaziz/homebrew-cask,pkq/homebrew-cask,asins/homebrew-cask,schneidmaster/homebrew-cask,forevergenin/homebrew-cask,wickedsp1d3r/homebrew-cask,y00rb/homebrew-cask,ddm/homebrew-cask,tangestani/homebrew-cask,miccal/homebrew-cask,santoshsahoo/homebrew-cask,mwean/homebrew-cask,sscotth/homebrew-cask,jppelteret/homebrew-cask,nathancahill/homebrew-cask,hovancik/homebrew-cask,kteru/homebrew-cask,lumaxis/homebrew-cask,shoichiaizawa/homebrew-cask,mrmachine/homebrew-cask,syscrusher/homebrew-cask,greg5green/homebrew-cask,lucasmezencio/homebrew-cask,jangalinski/homebrew-cask,fharbe/homebrew-cask,Fedalto/homebrew-cask,neverfox/homebrew-cask,samdoran/homebrew-cask,daften/homebrew-cask,stephenwade/homebrew-cask,athrunsun/homebrew-cask,cfillion/homebrew-cask,squid314/homebrew-cask,xight/homebrew-cask,stonehippo/homebrew-cask,theoriginalgri/homebrew-cask,yuhki50/homebrew-cask,danielbayley/homebrew-cask,mindriot101/homebrew-cask,mauricerkelly/homebrew-cask,miguelfrde/homebrew-cask,mauricerkelly/homebrew-cask,thomanq/homebrew-cask,usami-k/homebrew-cask,gabrielizaias/homebrew-cask,skatsuta/homebrew-cask,jonathanwiesel/homebrew-cask,inz/homebrew-cask,daften/homebrew-cask,onlynone/homebrew-cask,nshemonsky/homebrew-cask,julionc/homebrew-cask,seanorama/homebrew-cask,williamboman/homebrew-cask,Ephemera/homebrew-cask,albertico/homebrew-cask,lumaxis/homebrew-cask,xtian/homebrew-cask,aguynamedryan/homebrew-cask,miccal/homebrew-cask,koenrh/homebrew-cask,mhubig/homebrew-cask,timsutton/homebrew-cask,mgryszko/homebrew-cask,opsdev-ws/homebrew-cask,Ketouem/homebrew-cask,deanmorin/homebrew-cask,Amorymeltzer/homebrew-cask,stonehippo/homebrew-cask,sanyer/homebrew-cask,mahori/homebrew-cask,kesara/homebrew-cask,neverfox/homebrew-cask,malob/homebrew-cask,nathansgreen/homebrew-cask,Ketouem/homebrew-cask,klane/homebrew-cask,mchlrmrz/homebrew-cask,mchlrmrz/homebrew-cask,kingthorin/homebrew-cask,dvdoliveira/homebrew-cask,boecko/homebrew-cask,retbrown/homebrew-cask,ldong/homebrew-cask,amatos/homebrew-cask,muan/homebrew-cask,gyndav/homebrew-cask,samshadwell/homebrew-cask,sohtsuka/homebrew-cask,jellyfishcoder/homebrew-cask,johnjelinek/homebrew-cask,slack4u/homebrew-cask,jbeagley52/homebrew-cask,deiga/homebrew-cask,KosherBacon/homebrew-cask,adrianchia/homebrew-cask,jeanregisser/homebrew-cask,tjnycum/homebrew-cask,ebraminio/homebrew-cask,uetchy/homebrew-cask,JikkuJose/homebrew-cask,moogar0880/homebrew-cask,ksato9700/homebrew-cask,shoichiaizawa/homebrew-cask,mazehall/homebrew-cask,MerelyAPseudonym/homebrew-cask,rogeriopradoj/homebrew-cask,xtian/homebrew-cask,artdevjs/homebrew-cask,artdevjs/homebrew-cask,mattrobenolt/homebrew-cask,markhuber/homebrew-cask,casidiablo/homebrew-cask,ksylvan/homebrew-cask,jeroenseegers/homebrew-cask,Gasol/homebrew-cask,alexg0/homebrew-cask,brianshumate/homebrew-cask,miku/homebrew-cask,blogabe/homebrew-cask,mathbunnyru/homebrew-cask,thii/homebrew-cask,kronicd/homebrew-cask,wmorin/homebrew-cask,gmkey/homebrew-cask,yuhki50/homebrew-cask,diguage/homebrew-cask,arronmabrey/homebrew-cask,nrlquaker/homebrew-cask,malob/homebrew-cask,Amorymeltzer/homebrew-cask,schneidmaster/homebrew-cask,yumitsu/homebrew-cask,moimikey/homebrew-cask,axodys/homebrew-cask,cliffcotino/homebrew-cask,Bombenleger/homebrew-cask,wickedsp1d3r/homebrew-cask,ldong/homebrew-cask,shonjir/homebrew-cask,xcezx/homebrew-cask,decrement/homebrew-cask,hovancik/homebrew-cask,rickychilcott/homebrew-cask,guerrero/homebrew-cask,vin047/homebrew-cask,wastrachan/homebrew-cask,buo/homebrew-cask,feigaochn/homebrew-cask,nightscape/homebrew-cask,sanchezm/homebrew-cask,adrianchia/homebrew-cask,yutarody/homebrew-cask,hristozov/homebrew-cask,aguynamedryan/homebrew-cask,deanmorin/homebrew-cask,bcomnes/homebrew-cask,mathbunnyru/homebrew-cask,nightscape/homebrew-cask,ninjahoahong/homebrew-cask,jiashuw/homebrew-cask,hellosky806/homebrew-cask,esebastian/homebrew-cask,ywfwj2008/homebrew-cask,xyb/homebrew-cask,morganestes/homebrew-cask,lcasey001/homebrew-cask,Keloran/homebrew-cask,jppelteret/homebrew-cask,joshka/homebrew-cask,johndbritton/homebrew-cask,puffdad/homebrew-cask,cedwardsmedia/homebrew-cask,seanzxx/homebrew-cask,sjackman/homebrew-cask,rajiv/homebrew-cask,zmwangx/homebrew-cask,kteru/homebrew-cask,shonjir/homebrew-cask,andrewdisley/homebrew-cask,jasmas/homebrew-cask,mahori/homebrew-cask,giannitm/homebrew-cask,hanxue/caskroom,albertico/homebrew-cask,dictcp/homebrew-cask,rickychilcott/homebrew-cask,tjt263/homebrew-cask,sanchezm/homebrew-cask,miccal/homebrew-cask,codeurge/homebrew-cask,yurikoles/homebrew-cask,adrianchia/homebrew-cask,jawshooah/homebrew-cask,My2ndAngelic/homebrew-cask,hyuna917/homebrew-cask,markhuber/homebrew-cask,mishari/homebrew-cask,FranklinChen/homebrew-cask,sebcode/homebrew-cask,bosr/homebrew-cask,retrography/homebrew-cask,sanyer/homebrew-cask,anbotero/homebrew-cask,joschi/homebrew-cask,KosherBacon/homebrew-cask,gyndav/homebrew-cask,ninjahoahong/homebrew-cask,elnappo/homebrew-cask,miguelfrde/homebrew-cask,stigkj/homebrew-caskroom-cask,victorpopkov/homebrew-cask,dwihn0r/homebrew-cask,tedski/homebrew-cask,samshadwell/homebrew-cask,asins/homebrew-cask,chadcatlett/caskroom-homebrew-cask,JosephViolago/homebrew-cask,bric3/homebrew-cask,cobyism/homebrew-cask,cobyism/homebrew-cask,tsparber/homebrew-cask,psibre/homebrew-cask,BenjaminHCCarr/homebrew-cask,jpmat296/homebrew-cask,tmoreira2020/homebrew,decrement/homebrew-cask,helloIAmPau/homebrew-cask,diogodamiani/homebrew-cask,kamilboratynski/homebrew-cask,josa42/homebrew-cask,kpearson/homebrew-cask,mgryszko/homebrew-cask,caskroom/homebrew-cask,arronmabrey/homebrew-cask,samnung/homebrew-cask,bdhess/homebrew-cask,jellyfishcoder/homebrew-cask,blogabe/homebrew-cask,MoOx/homebrew-cask,kkdd/homebrew-cask,colindunn/homebrew-cask,tangestani/homebrew-cask,0rax/homebrew-cask,JacopKane/homebrew-cask,tedbundyjr/homebrew-cask,lucasmezencio/homebrew-cask,janlugt/homebrew-cask,ebraminio/homebrew-cask,stephenwade/homebrew-cask,paour/homebrew-cask,m3nu/homebrew-cask,lukeadams/homebrew-cask,tedbundyjr/homebrew-cask,Bombenleger/homebrew-cask,uetchy/homebrew-cask,phpwutz/homebrew-cask,nathanielvarona/homebrew-cask,blainesch/homebrew-cask,lifepillar/homebrew-cask,AnastasiaSulyagina/homebrew-cask,malford/homebrew-cask,Saklad5/homebrew-cask,inta/homebrew-cask,exherb/homebrew-cask,johnjelinek/homebrew-cask,antogg/homebrew-cask,gibsjose/homebrew-cask,MoOx/homebrew-cask,samnung/homebrew-cask,nathancahill/homebrew-cask,jacobbednarz/homebrew-cask,a1russell/homebrew-cask,nathansgreen/homebrew-cask,farmerchris/homebrew-cask,deiga/homebrew-cask,FranklinChen/homebrew-cask,patresi/homebrew-cask,paour/homebrew-cask,zerrot/homebrew-cask,renaudguerin/homebrew-cask,zmwangx/homebrew-cask,alebcay/homebrew-cask,jaredsampson/homebrew-cask,mikem/homebrew-cask,lukasbestle/homebrew-cask,thehunmonkgroup/homebrew-cask,FredLackeyOfficial/homebrew-cask,0xadada/homebrew-cask,kongslund/homebrew-cask,toonetown/homebrew-cask,blainesch/homebrew-cask,howie/homebrew-cask,winkelsdorf/homebrew-cask,dwkns/homebrew-cask,coeligena/homebrew-customized,lcasey001/homebrew-cask,faun/homebrew-cask,xakraz/homebrew-cask,vitorgalvao/homebrew-cask,wmorin/homebrew-cask,renard/homebrew-cask,stigkj/homebrew-caskroom-cask,michelegera/homebrew-cask,jangalinski/homebrew-cask,sgnh/homebrew-cask,jeanregisser/homebrew-cask,Ibuprofen/homebrew-cask,inz/homebrew-cask,moimikey/homebrew-cask,jhowtan/homebrew-cask,singingwolfboy/homebrew-cask,franklouwers/homebrew-cask,sohtsuka/homebrew-cask,riyad/homebrew-cask,dcondrey/homebrew-cask,retbrown/homebrew-cask,esebastian/homebrew-cask,Saklad5/homebrew-cask,shorshe/homebrew-cask,mchlrmrz/homebrew-cask,dwihn0r/homebrew-cask,ptb/homebrew-cask,singingwolfboy/homebrew-cask,mattrobenolt/homebrew-cask,Ibuprofen/homebrew-cask,Dremora/homebrew-cask,My2ndAngelic/homebrew-cask,patresi/homebrew-cask,dictcp/homebrew-cask,y00rb/homebrew-cask,JikkuJose/homebrew-cask,Gasol/homebrew-cask,maxnordlund/homebrew-cask,franklouwers/homebrew-cask,cblecker/homebrew-cask,6uclz1/homebrew-cask,cobyism/homebrew-cask,hyuna917/homebrew-cask,gerrypower/homebrew-cask,sscotth/homebrew-cask,robertgzr/homebrew-cask,danielbayley/homebrew-cask,jedahan/homebrew-cask,MircoT/homebrew-cask,wickles/homebrew-cask,dvdoliveira/homebrew-cask,mazehall/homebrew-cask,CameronGarrett/homebrew-cask,vigosan/homebrew-cask,giannitm/homebrew-cask,diguage/homebrew-cask,puffdad/homebrew-cask,mrmachine/homebrew-cask,yutarody/homebrew-cask,kingthorin/homebrew-cask,chrisfinazzo/homebrew-cask,thehunmonkgroup/homebrew-cask,kkdd/homebrew-cask,seanorama/homebrew-cask,n0ts/homebrew-cask,mahori/homebrew-cask,hakamadare/homebrew-cask,ywfwj2008/homebrew-cask,n8henrie/homebrew-cask,gyndav/homebrew-cask,kassi/homebrew-cask,perfide/homebrew-cask,jalaziz/homebrew-cask,doits/homebrew-cask,joshka/homebrew-cask,shonjir/homebrew-cask,koenrh/homebrew-cask,linc01n/homebrew-cask,thii/homebrew-cask,lantrix/homebrew-cask,reitermarkus/homebrew-cask,mindriot101/homebrew-cask,mjdescy/homebrew-cask,goxberry/homebrew-cask,phpwutz/homebrew-cask,scottsuch/homebrew-cask,amatos/homebrew-cask,sanyer/homebrew-cask,bric3/homebrew-cask,MichaelPei/homebrew-cask,tjnycum/homebrew-cask,moimikey/homebrew-cask,vin047/homebrew-cask,asbachb/homebrew-cask,13k/homebrew-cask,tarwich/homebrew-cask,SentinelWarren/homebrew-cask,uetchy/homebrew-cask,antogg/homebrew-cask,chuanxd/homebrew-cask,a1russell/homebrew-cask,gurghet/homebrew-cask,josa42/homebrew-cask,esebastian/homebrew-cask,0rax/homebrew-cask,xight/homebrew-cask,andyli/homebrew-cask,m3nu/homebrew-cask,fanquake/homebrew-cask,jacobbednarz/homebrew-cask,kamilboratynski/homebrew-cask,claui/homebrew-cask,mathbunnyru/homebrew-cask,otaran/homebrew-cask,xight/homebrew-cask,jbeagley52/homebrew-cask,bosr/homebrew-cask,dustinblackman/homebrew-cask,lukasbestle/homebrew-cask,FinalDes/homebrew-cask,JosephViolago/homebrew-cask,imgarylai/homebrew-cask,janlugt/homebrew-cask,retrography/homebrew-cask,MichaelPei/homebrew-cask,kiliankoe/homebrew-cask,toonetown/homebrew-cask,rogeriopradoj/homebrew-cask,muan/homebrew-cask,nathanielvarona/homebrew-cask,blogabe/homebrew-cask,andyli/homebrew-cask,xyb/homebrew-cask,gilesdring/homebrew-cask,boecko/homebrew-cask,Ephemera/homebrew-cask,dustinblackman/homebrew-cask,sscotth/homebrew-cask,lukeadams/homebrew-cask,josa42/homebrew-cask,tarwich/homebrew-cask,BenjaminHCCarr/homebrew-cask,jgarber623/homebrew-cask,jmeridth/homebrew-cask,kTitan/homebrew-cask,greg5green/homebrew-cask,anbotero/homebrew-cask
ruby
## Code Before: cask :v1 => 'devonthink-pro-office' do version '2.8.6' sha256 'a9229681cb57738bc89f7e74c1f42a1e60689b03345f5c9540f239e43b66a449' # amazonaws.com is the official download host per the vendor homepage url "https://s3.amazonaws.com/DTWebsiteSupport/download/devonthink/#{version}/DEVONthink_Pro_Office.dmg.zip" appcast 'http://www.devon-technologies.com/Sparkle/DEVONthinkProOffice2.xml', :sha256 => 'a6cbe5a8265c35dc5d840725cf102aa207c27d9bd43fc6fda0103bb6bb50d342' name 'DEVONthink Pro Office' homepage 'http://www.devontechnologies.com/products/devonthink/devonthink-pro-office.html' license :commercial container :nested => 'DEVONthink_Pro_Office.dmg' # Renamed for consistency: app name is different in the Finder and in a shell. # Original discussion: https://github.com/caskroom/homebrew-cask/pull/3838 app 'DEVONthink Pro.app', :target => 'DEVONthink Pro Office.app' depends_on :macos => '>= :mountain_lion' end ## Instruction: Update DEVONthink Pro Office to 2.8.6 ## Code After: cask :v1 => 'devonthink-pro-office' do version '2.8.7' sha256 '3c272a0656afe1bee9a683190dbc55484724a81492a3b2ae7f50af8bc96b5894' # amazonaws.com is the official download host per the vendor homepage url "https://s3.amazonaws.com/DTWebsiteSupport/download/devonthink/#{version}/DEVONthink_Pro_Office.dmg.zip" appcast 'http://www.devon-technologies.com/Sparkle/DEVONthinkProOffice2.xml', :sha256 => 'ba7fe4186fdd3577f33e06ede3712de88977e4080388558a4b6990c42bf8bf76' name 'DEVONthink Pro Office' homepage 'http://www.devontechnologies.com/products/devonthink/devonthink-pro-office.html' license :commercial container :nested => 'DEVONthink_Pro_Office.dmg' # Renamed for consistency: app name is different in the Finder and in a shell. # Original discussion: https://github.com/caskroom/homebrew-cask/pull/3838 app 'DEVONthink Pro.app', :target => 'DEVONthink Pro Office.app' depends_on :macos => '>= :mountain_lion' end
cask :v1 => 'devonthink-pro-office' do - version '2.8.6' ? ^ + version '2.8.7' ? ^ - sha256 'a9229681cb57738bc89f7e74c1f42a1e60689b03345f5c9540f239e43b66a449' + sha256 '3c272a0656afe1bee9a683190dbc55484724a81492a3b2ae7f50af8bc96b5894' # amazonaws.com is the official download host per the vendor homepage url "https://s3.amazonaws.com/DTWebsiteSupport/download/devonthink/#{version}/DEVONthink_Pro_Office.dmg.zip" appcast 'http://www.devon-technologies.com/Sparkle/DEVONthinkProOffice2.xml', - :sha256 => 'a6cbe5a8265c35dc5d840725cf102aa207c27d9bd43fc6fda0103bb6bb50d342' + :sha256 => 'ba7fe4186fdd3577f33e06ede3712de88977e4080388558a4b6990c42bf8bf76' name 'DEVONthink Pro Office' homepage 'http://www.devontechnologies.com/products/devonthink/devonthink-pro-office.html' license :commercial container :nested => 'DEVONthink_Pro_Office.dmg' # Renamed for consistency: app name is different in the Finder and in a shell. # Original discussion: https://github.com/caskroom/homebrew-cask/pull/3838 app 'DEVONthink Pro.app', :target => 'DEVONthink Pro Office.app' depends_on :macos => '>= :mountain_lion' end
6
0.315789
3
3
fc818ccd0d83ff6b37b38e5e9d03abcae408b503
froide/problem/templatetags/problemreport_tags.py
froide/problem/templatetags/problemreport_tags.py
from collections import defaultdict from django import template from ..models import ProblemReport from ..forms import ProblemReportForm register = template.Library() @register.inclusion_tag('problem/message_toolbar_item.html') def render_problem_button(message): if not hasattr(message, 'problemreports'): # Get all problem reports for all messages request = message.request reports = ProblemReport.objects.filter(message__in=request.messages) message_reports = defaultdict(list) for report in reports: message_reports[report.message_id].append(report) for message in request.messages: message.problemreports = message_reports[message.id] message.problemreports_count = len(message.problemreports) message.problemreports_unresolved_count = len([ r for r in message.problemreports if not r.resolved ]) message.problemreports_form = ProblemReportForm(message=message) return { 'message': message }
from collections import defaultdict from django import template from ..models import ProblemReport from ..forms import ProblemReportForm register = template.Library() @register.inclusion_tag('problem/message_toolbar_item.html') def render_problem_button(message): if not hasattr(message, 'problemreports'): # Get all problem reports for all messages request = message.request reports = ProblemReport.objects.filter(message__in=request.messages) message_reports = defaultdict(list) for report in reports: message_reports[report.message_id].append(report) for mes in request.messages: mes.problemreports = message_reports[mes.id] mes.problemreports_count = len(mes.problemreports) mes.problemreports_unresolved_count = len([ r for r in mes.problemreports if not r.resolved ]) mes.problemreports_form = ProblemReportForm(message=mes) return { 'message': message }
Fix overriding variable in problem report tag
Fix overriding variable in problem report tag
Python
mit
stefanw/froide,stefanw/froide,stefanw/froide,fin/froide,fin/froide,stefanw/froide,stefanw/froide,fin/froide,fin/froide
python
## Code Before: from collections import defaultdict from django import template from ..models import ProblemReport from ..forms import ProblemReportForm register = template.Library() @register.inclusion_tag('problem/message_toolbar_item.html') def render_problem_button(message): if not hasattr(message, 'problemreports'): # Get all problem reports for all messages request = message.request reports = ProblemReport.objects.filter(message__in=request.messages) message_reports = defaultdict(list) for report in reports: message_reports[report.message_id].append(report) for message in request.messages: message.problemreports = message_reports[message.id] message.problemreports_count = len(message.problemreports) message.problemreports_unresolved_count = len([ r for r in message.problemreports if not r.resolved ]) message.problemreports_form = ProblemReportForm(message=message) return { 'message': message } ## Instruction: Fix overriding variable in problem report tag ## Code After: from collections import defaultdict from django import template from ..models import ProblemReport from ..forms import ProblemReportForm register = template.Library() @register.inclusion_tag('problem/message_toolbar_item.html') def render_problem_button(message): if not hasattr(message, 'problemreports'): # Get all problem reports for all messages request = message.request reports = ProblemReport.objects.filter(message__in=request.messages) message_reports = defaultdict(list) for report in reports: message_reports[report.message_id].append(report) for mes in request.messages: mes.problemreports = message_reports[mes.id] mes.problemreports_count = len(mes.problemreports) mes.problemreports_unresolved_count = len([ r for r in mes.problemreports if not r.resolved ]) mes.problemreports_form = ProblemReportForm(message=mes) return { 'message': message }
from collections import defaultdict from django import template from ..models import ProblemReport from ..forms import ProblemReportForm register = template.Library() @register.inclusion_tag('problem/message_toolbar_item.html') def render_problem_button(message): if not hasattr(message, 'problemreports'): # Get all problem reports for all messages request = message.request reports = ProblemReport.objects.filter(message__in=request.messages) message_reports = defaultdict(list) for report in reports: message_reports[report.message_id].append(report) - for message in request.messages: ? ---- + for mes in request.messages: - message.problemreports = message_reports[message.id] ? ---- ---- + mes.problemreports = message_reports[mes.id] - message.problemreports_count = len(message.problemreports) ? ---- ---- + mes.problemreports_count = len(mes.problemreports) - message.problemreports_unresolved_count = len([ ? ---- + mes.problemreports_unresolved_count = len([ - r for r in message.problemreports if not r.resolved ? ---- + r for r in mes.problemreports if not r.resolved ]) - message.problemreports_form = ProblemReportForm(message=message) ? ---- ---- + mes.problemreports_form = ProblemReportForm(message=mes) return { 'message': message }
12
0.413793
6
6
52dc13d0483783f8d2b71aefb4380b3347838a7c
2017-code/elections/ex1/1-structure/14-collections.csv
2017-code/elections/ex1/1-structure/14-collections.csv
Collection id , Manager , CVR type , Contests DEN-A01 , abe@co.gov , CVR , DEN-prop-1 , DEN-prop-2 , US-Senate-1 DEN-A02 , bob@co.gov , CVR , DEN-prop-1 , DEN-prop-2 , US-Senate-1 LOG-B13 , carol@co.gov , noCVR , LOG-mayor , US-Senate-1,
Collection id , Manager , CVR type , Required Contests, Possible Contests DEN-A01 , abe@co.gov , CVR , DENVER, DENVER DEN-A02 , bob@co.gov , CVR , DENVER, DENVER LOG-B13 , carol@co.gov , noCVR , LOGANREC, LOGANPOSS
Modify ex1 election example: collections file has required and possible contests.
Modify ex1 election example: collections file has required and possible contests.
CSV
mit
ron-rivest/2017-bayes-audit,ron-rivest/2017-bayes-audit
csv
## Code Before: Collection id , Manager , CVR type , Contests DEN-A01 , abe@co.gov , CVR , DEN-prop-1 , DEN-prop-2 , US-Senate-1 DEN-A02 , bob@co.gov , CVR , DEN-prop-1 , DEN-prop-2 , US-Senate-1 LOG-B13 , carol@co.gov , noCVR , LOG-mayor , US-Senate-1, ## Instruction: Modify ex1 election example: collections file has required and possible contests. ## Code After: Collection id , Manager , CVR type , Required Contests, Possible Contests DEN-A01 , abe@co.gov , CVR , DENVER, DENVER DEN-A02 , bob@co.gov , CVR , DENVER, DENVER LOG-B13 , carol@co.gov , noCVR , LOGANREC, LOGANPOSS
- Collection id , Manager , CVR type , Contests + Collection id , Manager , CVR type , Required Contests, Possible Contests ? +++++++++ + +++++++++++++++++ - DEN-A01 , abe@co.gov , CVR , DEN-prop-1 , DEN-prop-2 , US-Senate-1 - DEN-A02 , bob@co.gov , CVR , DEN-prop-1 , DEN-prop-2 , US-Senate-1 - LOG-B13 , carol@co.gov , noCVR , LOG-mayor , US-Senate-1, + DEN-A01 , abe@co.gov , CVR , DENVER, DENVER + DEN-A02 , bob@co.gov , CVR , DENVER, DENVER + LOG-B13 , carol@co.gov , noCVR , LOGANREC, LOGANPOSS
8
1.6
4
4
b9a72302fddca4a3104ccc6e951acc7c221ec1d3
backend/server/db/model/db.js
backend/server/db/model/db.js
module.exports = function(r) { 'use strict'; return { insert: insert, update: update, updateAll: updateAll }; ///////////////// function *update(table, id, json) { let rql = r.table(table).get(id); let result = yield rql.update(json, {returnChanges: true}).run(); return result.changes[0].new_val; } function *updateAll(rql, json) { let items = []; let results = yield rql.update(json, {returnChanges: true}).run(); results.changes.forEach(function(item) { items.push(item.new_val); }); return items; } function *insert(table, json) { let rql = r.table(table); let result = yield rql.insert(json, {returnChanges: true}).run(); return result.changes[0].new_val; } ////////////////// private ////////////////// };
module.exports = function(r) { 'use strict'; return { insert: insert, update: update, updateAll: updateAll }; ///////////////// function *update(table, id, json) { let rql = r.table(table).get(id); let result = yield rql.update(json, {returnChanges: true}).run(); return result.changes[0].new_val; } function *updateAll(rql, json) { let items = []; let results = yield rql.update(json, {returnChanges: true}).run(); results.changes.forEach(function(item) { items.push(item.new_val); }); return items; } function *insert(table, json, options) { let asArray = options ? options.toArray : false; let rql = r.table(table); let result = yield rql.insert(json, {returnChanges: true}).run(); if (result.changes.length == 1) { let val = result.changes[0].new_val; return asArray ? [val] : val; } else { let results = []; result.changes.forEach(function(result) { results.push(result.new_val); }); return results; } } ////////////////// private ////////////////// };
Insert now handles sending back a list of items created. Optionally if there is one item created you have have it returned as an array.
Insert now handles sending back a list of items created. Optionally if there is one item created you have have it returned as an array.
JavaScript
mit
materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org
javascript
## Code Before: module.exports = function(r) { 'use strict'; return { insert: insert, update: update, updateAll: updateAll }; ///////////////// function *update(table, id, json) { let rql = r.table(table).get(id); let result = yield rql.update(json, {returnChanges: true}).run(); return result.changes[0].new_val; } function *updateAll(rql, json) { let items = []; let results = yield rql.update(json, {returnChanges: true}).run(); results.changes.forEach(function(item) { items.push(item.new_val); }); return items; } function *insert(table, json) { let rql = r.table(table); let result = yield rql.insert(json, {returnChanges: true}).run(); return result.changes[0].new_val; } ////////////////// private ////////////////// }; ## Instruction: Insert now handles sending back a list of items created. Optionally if there is one item created you have have it returned as an array. ## Code After: module.exports = function(r) { 'use strict'; return { insert: insert, update: update, updateAll: updateAll }; ///////////////// function *update(table, id, json) { let rql = r.table(table).get(id); let result = yield rql.update(json, {returnChanges: true}).run(); return result.changes[0].new_val; } function *updateAll(rql, json) { let items = []; let results = yield rql.update(json, {returnChanges: true}).run(); results.changes.forEach(function(item) { items.push(item.new_val); }); return items; } function *insert(table, json, options) { let asArray = options ? options.toArray : false; let rql = r.table(table); let result = yield rql.insert(json, {returnChanges: true}).run(); if (result.changes.length == 1) { let val = result.changes[0].new_val; return asArray ? [val] : val; } else { let results = []; result.changes.forEach(function(result) { results.push(result.new_val); }); return results; } } ////////////////// private ////////////////// };
module.exports = function(r) { 'use strict'; return { insert: insert, update: update, updateAll: updateAll }; ///////////////// function *update(table, id, json) { let rql = r.table(table).get(id); let result = yield rql.update(json, {returnChanges: true}).run(); return result.changes[0].new_val; } function *updateAll(rql, json) { let items = []; let results = yield rql.update(json, {returnChanges: true}).run(); results.changes.forEach(function(item) { items.push(item.new_val); }); return items; } - function *insert(table, json) { + function *insert(table, json, options) { ? +++++++++ + let asArray = options ? options.toArray : false; let rql = r.table(table); let result = yield rql.insert(json, {returnChanges: true}).run(); + if (result.changes.length == 1) { - return result.changes[0].new_val; ? ^ ^^^ + let val = result.changes[0].new_val; ? ^^^^^ ^^^^^^ + return asArray ? [val] : val; + } else { + let results = []; + result.changes.forEach(function(result) { + results.push(result.new_val); + }); + return results; + } } ////////////////// private ////////////////// };
14
0.4
12
2
512e4d86b4a9bbd37027678dfe13382c055cd09c
defaults/main.yml
defaults/main.yml
--- # defaults file for envconsul envconsul_ver: "0.5.0" envconsul_arch: "linux_amd64" envconsul_zip: "envconsul_{{envconsul_ver}}_{{envconsul_arch}}.tar.gz" envconsul_url: "https://github.com/hashicorp/envconsul/releases/download/v{{envconsul_ver}}/{{envconsul_zip}}" envconsul_bin_path: "/usr/local/bin" envconsul_install_script: "{{envconsul_bin_path}}/install-envconsul" envconsul_dl_dir: "/tmp" envconsul_bin_name: "envconsul"
--- # defaults file for envconsul envconsul_ver: "0.6.1" envconsul_arch: "linux_amd64" envconsul_zip: "envconsul_{{envconsul_ver}}_{{envconsul_arch}}.zip" envconsul_url: "https://releases.hashicorp.com/envconsul/{{envconsul_ver}}/{{envconsul_zip}}" envconsul_bin_path: "/usr/local/bin" envconsul_install_script: "{{envconsul_bin_path}}/install-envconsul" envconsul_dl_dir: "/tmp" envconsul_bin_name: "envconsul"
Update install url to releases.hashicorp
Update install url to releases.hashicorp
YAML
mit
mtchavez/ansible-envconsul
yaml
## Code Before: --- # defaults file for envconsul envconsul_ver: "0.5.0" envconsul_arch: "linux_amd64" envconsul_zip: "envconsul_{{envconsul_ver}}_{{envconsul_arch}}.tar.gz" envconsul_url: "https://github.com/hashicorp/envconsul/releases/download/v{{envconsul_ver}}/{{envconsul_zip}}" envconsul_bin_path: "/usr/local/bin" envconsul_install_script: "{{envconsul_bin_path}}/install-envconsul" envconsul_dl_dir: "/tmp" envconsul_bin_name: "envconsul" ## Instruction: Update install url to releases.hashicorp ## Code After: --- # defaults file for envconsul envconsul_ver: "0.6.1" envconsul_arch: "linux_amd64" envconsul_zip: "envconsul_{{envconsul_ver}}_{{envconsul_arch}}.zip" envconsul_url: "https://releases.hashicorp.com/envconsul/{{envconsul_ver}}/{{envconsul_zip}}" envconsul_bin_path: "/usr/local/bin" envconsul_install_script: "{{envconsul_bin_path}}/install-envconsul" envconsul_dl_dir: "/tmp" envconsul_bin_name: "envconsul"
--- # defaults file for envconsul - envconsul_ver: "0.5.0" ? ^ ^ + envconsul_ver: "0.6.1" ? ^ ^ envconsul_arch: "linux_amd64" - envconsul_zip: "envconsul_{{envconsul_ver}}_{{envconsul_arch}}.tar.gz" ? ----- + envconsul_zip: "envconsul_{{envconsul_ver}}_{{envconsul_arch}}.zip" ? ++ - envconsul_url: "https://github.com/hashicorp/envconsul/releases/download/v{{envconsul_ver}}/{{envconsul_zip}}" ? ^^^^^^ ---- ------------------- + envconsul_url: "https://releases.hashicorp.com/envconsul/{{envconsul_ver}}/{{envconsul_zip}}" ? ^^^^^^^^ ++++ envconsul_bin_path: "/usr/local/bin" envconsul_install_script: "{{envconsul_bin_path}}/install-envconsul" envconsul_dl_dir: "/tmp" envconsul_bin_name: "envconsul"
6
0.545455
3
3
368c22d0fd0fa85db5dd7b5e7c5f1ab4cfa36155
CMakeLists.txt
CMakeLists.txt
project(DTIProcess) cmake_minimum_required(VERSION 2.8.7) include(${CMAKE_CURRENT_SOURCE_DIR}/Common.cmake) option( DTIProcess_SUPERBUILD "Build DTIProcess as a Superbuild project" ON ) if( DTIProcess_SUPERBUILD ) include("${CMAKE_CURRENT_SOURCE_DIR}/SuperBuild.cmake") else() include("${CMAKE_CURRENT_SOURCE_DIR}/DTIProcess.cmake") endif()
cmake_minimum_required(VERSION 2.8.7) option( DTIProcess_SUPERBUILD "Build DTIProcess as a Superbuild project" ON ) if( DTIProcess_SUPERBUILD ) project(DTIProcessToolkit) include(${CMAKE_CURRENT_SOURCE_DIR}/Common.cmake) include("${CMAKE_CURRENT_SOURCE_DIR}/SuperBuild.cmake") else() project(DTIProcess) include(${CMAKE_CURRENT_SOURCE_DIR}/Common.cmake) include("${CMAKE_CURRENT_SOURCE_DIR}/DTIProcess.cmake") endif()
Set the project name and include the common file
BUG: Set the project name and include the common file Set the superbuild project differently for the superbuild and the inner build
Text
apache-2.0
juanprietob/DTIProcessToolkit,NIRALUser/DTIProcessToolkit,juanprietob/DTIProcessToolkit,NIRALUser/DTIProcessToolkit
text
## Code Before: project(DTIProcess) cmake_minimum_required(VERSION 2.8.7) include(${CMAKE_CURRENT_SOURCE_DIR}/Common.cmake) option( DTIProcess_SUPERBUILD "Build DTIProcess as a Superbuild project" ON ) if( DTIProcess_SUPERBUILD ) include("${CMAKE_CURRENT_SOURCE_DIR}/SuperBuild.cmake") else() include("${CMAKE_CURRENT_SOURCE_DIR}/DTIProcess.cmake") endif() ## Instruction: BUG: Set the project name and include the common file Set the superbuild project differently for the superbuild and the inner build ## Code After: cmake_minimum_required(VERSION 2.8.7) option( DTIProcess_SUPERBUILD "Build DTIProcess as a Superbuild project" ON ) if( DTIProcess_SUPERBUILD ) project(DTIProcessToolkit) include(${CMAKE_CURRENT_SOURCE_DIR}/Common.cmake) include("${CMAKE_CURRENT_SOURCE_DIR}/SuperBuild.cmake") else() project(DTIProcess) include(${CMAKE_CURRENT_SOURCE_DIR}/Common.cmake) include("${CMAKE_CURRENT_SOURCE_DIR}/DTIProcess.cmake") endif()
- project(DTIProcess) + cmake_minimum_required(VERSION 2.8.7) - - include(${CMAKE_CURRENT_SOURCE_DIR}/Common.cmake) option( DTIProcess_SUPERBUILD "Build DTIProcess as a Superbuild project" ON ) if( DTIProcess_SUPERBUILD ) + project(DTIProcessToolkit) + include(${CMAKE_CURRENT_SOURCE_DIR}/Common.cmake) include("${CMAKE_CURRENT_SOURCE_DIR}/SuperBuild.cmake") else() + project(DTIProcess) + include(${CMAKE_CURRENT_SOURCE_DIR}/Common.cmake) include("${CMAKE_CURRENT_SOURCE_DIR}/DTIProcess.cmake") endif()
8
0.615385
5
3
2a5f2aabd47200e4a919e6c64da42050f76a5707
.travis.yml
.travis.yml
language: python python: - '3.5' install: - pip install . - pip install -r .travis-requirements.txt script: nosetests
language: python python: - '3.5' install: - pip install . - pip install -r .travis-requirements.txt script: nosetests notifications: slack: secure: JAyJidj1nalEoJhp7JL22tabEXn1xBl6MXQOnP6pratbVyz/haWuDh7OQGZxf0kXO1zaKu6k9A4zQZKr0LiKeUT1Xx5kdeP8C9NzZrYtf6IKLw50HhTq7OhnQ9PtdR2DQ+uT1PcudQWNOeq8+0Yu3aTD/nBH626Gp7qQqRhuX3vUYZs1V05mmxbIrND2OtjR69UkIWwnzFzJDsJCbjY5PojPtfQ1lDlXwulkNV66RfJnJYeWf0ndBgCnEff6OXJ993oUcCWHEsQP5HdgR2IEnyuXHzgjiAnc+M6C4Xes/uS1FEOlwVvpkvysx+FvbQl+SEet+9ottakp5P8QjSKG4159L0Po3n2AISfIcZgMSVuCkIF9mHl23vo8Sb0LdoliHSZhbRP05spAioxf0cfBLBa3isMV2Ur7/BhHjc9Tjxs+obLdJmPRzcch1bYWePFDVJySA57nZUR0CdvObl0h+he+ye5z9/MkfRvHN+kUXkOb5tI+CY1n76vjqoVT6AUagA3Vpsn8Q3dQKhd4JmXg70NeEgM9M0Msql2TDCtEVvk47twEQrlQXCOjGU1B/JJ9l98qQdF3YkuS1vSbjXXZnFYHDg0M6vSddmFhVADfflATbM2pU7v7jdBpTbJxL9rz75Lf535Dk0haM1IWeafmnZhrddq5qrj5+qqsFHmA/ww=
Add Travis integration to Slack
Add Travis integration to Slack
YAML
mit
who-emro/meerkat_frontend,meerkat-code/meerkat_frontend,who-emro/meerkat_frontend,meerkat-code/meerkat_frontend,who-emro/meerkat_frontend,meerkat-code/meerkat_frontend
yaml
## Code Before: language: python python: - '3.5' install: - pip install . - pip install -r .travis-requirements.txt script: nosetests ## Instruction: Add Travis integration to Slack ## Code After: language: python python: - '3.5' install: - pip install . - pip install -r .travis-requirements.txt script: nosetests notifications: slack: secure: JAyJidj1nalEoJhp7JL22tabEXn1xBl6MXQOnP6pratbVyz/haWuDh7OQGZxf0kXO1zaKu6k9A4zQZKr0LiKeUT1Xx5kdeP8C9NzZrYtf6IKLw50HhTq7OhnQ9PtdR2DQ+uT1PcudQWNOeq8+0Yu3aTD/nBH626Gp7qQqRhuX3vUYZs1V05mmxbIrND2OtjR69UkIWwnzFzJDsJCbjY5PojPtfQ1lDlXwulkNV66RfJnJYeWf0ndBgCnEff6OXJ993oUcCWHEsQP5HdgR2IEnyuXHzgjiAnc+M6C4Xes/uS1FEOlwVvpkvysx+FvbQl+SEet+9ottakp5P8QjSKG4159L0Po3n2AISfIcZgMSVuCkIF9mHl23vo8Sb0LdoliHSZhbRP05spAioxf0cfBLBa3isMV2Ur7/BhHjc9Tjxs+obLdJmPRzcch1bYWePFDVJySA57nZUR0CdvObl0h+he+ye5z9/MkfRvHN+kUXkOb5tI+CY1n76vjqoVT6AUagA3Vpsn8Q3dQKhd4JmXg70NeEgM9M0Msql2TDCtEVvk47twEQrlQXCOjGU1B/JJ9l98qQdF3YkuS1vSbjXXZnFYHDg0M6vSddmFhVADfflATbM2pU7v7jdBpTbJxL9rz75Lf535Dk0haM1IWeafmnZhrddq5qrj5+qqsFHmA/ww=
language: python - python: - '3.5' - install: - pip install . - pip install -r .travis-requirements.txt - script: nosetests + notifications: + slack: + secure: JAyJidj1nalEoJhp7JL22tabEXn1xBl6MXQOnP6pratbVyz/haWuDh7OQGZxf0kXO1zaKu6k9A4zQZKr0LiKeUT1Xx5kdeP8C9NzZrYtf6IKLw50HhTq7OhnQ9PtdR2DQ+uT1PcudQWNOeq8+0Yu3aTD/nBH626Gp7qQqRhuX3vUYZs1V05mmxbIrND2OtjR69UkIWwnzFzJDsJCbjY5PojPtfQ1lDlXwulkNV66RfJnJYeWf0ndBgCnEff6OXJ993oUcCWHEsQP5HdgR2IEnyuXHzgjiAnc+M6C4Xes/uS1FEOlwVvpkvysx+FvbQl+SEet+9ottakp5P8QjSKG4159L0Po3n2AISfIcZgMSVuCkIF9mHl23vo8Sb0LdoliHSZhbRP05spAioxf0cfBLBa3isMV2Ur7/BhHjc9Tjxs+obLdJmPRzcch1bYWePFDVJySA57nZUR0CdvObl0h+he+ye5z9/MkfRvHN+kUXkOb5tI+CY1n76vjqoVT6AUagA3Vpsn8Q3dQKhd4JmXg70NeEgM9M0Msql2TDCtEVvk47twEQrlQXCOjGU1B/JJ9l98qQdF3YkuS1vSbjXXZnFYHDg0M6vSddmFhVADfflATbM2pU7v7jdBpTbJxL9rz75Lf535Dk0haM1IWeafmnZhrddq5qrj5+qqsFHmA/ww=
6
0.6
3
3
e90fd1ddabd37ae7d7538b4972f403c9ab54e63b
core/app/assets/stylesheets/facts/fact_view.css.less
core/app/assets/stylesheets/facts/fact_view.css.less
@import "bootstrap/mixins"; @import "bootstrap/variables"; div.fact-view { color: @baseFontColor; font-size: 14px; line-height: 19px; padding: 20px 0 10px; position: relative; .clearfix(); border-bottom: 1px solid @baseBorderColor; #close { z-index: 2147483647; position: absolute; top: 3px; right: 4px; .opacity(.50); } } #activity_for_channel div.fact-view { padding: 10px 0 0; }
@import "bootstrap/mixins"; @import "bootstrap/variables"; div.fact-view { color: @baseFontColor; font-size: 14px; line-height: 19px; padding: 20px 0 10px; position: relative; .clearfix(); border-bottom: 1px solid @baseBorderColor; #close { z-index: 2147483647; position: absolute; top: 3px; right: 4px; .opacity(.50); cursor: pointer; } } #activity_for_channel div.fact-view { padding: 10px 0 0; }
Make sure a hand cursor is shown when hovering over the modal close button in the client.
Make sure a hand cursor is shown when hovering over the modal close button in the client.
Less
mit
Factlink/factlink-core,daukantas/factlink-core,daukantas/factlink-core,Factlink/factlink-core,daukantas/factlink-core,Factlink/factlink-core,daukantas/factlink-core,Factlink/factlink-core
less
## Code Before: @import "bootstrap/mixins"; @import "bootstrap/variables"; div.fact-view { color: @baseFontColor; font-size: 14px; line-height: 19px; padding: 20px 0 10px; position: relative; .clearfix(); border-bottom: 1px solid @baseBorderColor; #close { z-index: 2147483647; position: absolute; top: 3px; right: 4px; .opacity(.50); } } #activity_for_channel div.fact-view { padding: 10px 0 0; } ## Instruction: Make sure a hand cursor is shown when hovering over the modal close button in the client. ## Code After: @import "bootstrap/mixins"; @import "bootstrap/variables"; div.fact-view { color: @baseFontColor; font-size: 14px; line-height: 19px; padding: 20px 0 10px; position: relative; .clearfix(); border-bottom: 1px solid @baseBorderColor; #close { z-index: 2147483647; position: absolute; top: 3px; right: 4px; .opacity(.50); cursor: pointer; } } #activity_for_channel div.fact-view { padding: 10px 0 0; }
@import "bootstrap/mixins"; @import "bootstrap/variables"; div.fact-view { color: @baseFontColor; font-size: 14px; line-height: 19px; padding: 20px 0 10px; position: relative; .clearfix(); border-bottom: 1px solid @baseBorderColor; #close { z-index: 2147483647; position: absolute; top: 3px; right: 4px; .opacity(.50); + cursor: pointer; } } #activity_for_channel div.fact-view { padding: 10px 0 0; }
1
0.037037
1
0
b746ff2d40277ad289f9bd7abf09e41370477308
akonadi/resources/nepomuktag/CMakeLists.txt
akonadi/resources/nepomuktag/CMakeLists.txt
set( nepomuktagresource_SRCS nepomuktagresource.cpp ) install( FILES nepomuktagresource.desktop DESTINATION "${CMAKE_INSTALL_PREFIX}/share/akonadi/agents" ) qt4_generate_dbus_interface( ${CMAKE_CURRENT_SOURCE_DIR}/nepomuktagresource.h org.kde.Akonadi.NepomukTag.Resource.xml ) qt4_add_dbus_adaptor( nepomuktagresource_SRCS ${CMAKE_CURRENT_BINARY_DIR}/org.kde.Akonadi.NepomukTag.Resource.xml nepomuktagresource.h NepomukTagResource ) kde4_add_executable(akonadi_nepomuktag_resource RUN_UNINSTALLED ${nepomuktagresource_SRCS}) target_link_libraries(akonadi_nepomuktag_resource ${KDE4_KDECORE_LIBS} ${KDE4_KDEUI_LIBS} ${KDEPIMLIBS_AKONADI_LIBS} ${QT_QTDBUS_LIBRARY} ${QT_QTCORE_LIBRARY} ${NEPOMUK_LIBRARIES} ) install(TARGETS akonadi_nepomuktag_resource ${INSTALL_TARGETS_DEFAULT_ARGS})
set( nepomuktagresource_SRCS nepomuktagresource.cpp ) install( FILES nepomuktagresource.desktop DESTINATION "${CMAKE_INSTALL_PREFIX}/share/akonadi/agents" ) qt4_generate_dbus_interface( ${CMAKE_CURRENT_SOURCE_DIR}/nepomuktagresource.h org.kde.Akonadi.NepomukTag.Resource.xml ) qt4_add_dbus_adaptor( nepomuktagresource_SRCS ${CMAKE_CURRENT_BINARY_DIR}/org.kde.Akonadi.NepomukTag.Resource.xml nepomuktagresource.h NepomukTagResource ) kde4_add_executable(akonadi_nepomuktag_resource RUN_UNINSTALLED ${nepomuktagresource_SRCS}) target_link_libraries(akonadi_nepomuktag_resource ${KDE4_KDECORE_LIBS} ${KDE4_KDEUI_LIBS} ${KDEPIMLIBS_AKONADI_LIBS} ${QT_QTDBUS_LIBRARY} ${QT_QTCORE_LIBRARY} ${KDE4_NEPOMUK_LIBS} ) install(TARGETS akonadi_nepomuktag_resource ${INSTALL_TARGETS_DEFAULT_ARGS})
Fix link error about soprano not being linked in - the fix was found by Brad King
Fix link error about soprano not being linked in - the fix was found by Brad King svn path=/branches/KDE/4.3/kdepim/; revision=990589
Text
lgpl-2.1
lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi
text
## Code Before: set( nepomuktagresource_SRCS nepomuktagresource.cpp ) install( FILES nepomuktagresource.desktop DESTINATION "${CMAKE_INSTALL_PREFIX}/share/akonadi/agents" ) qt4_generate_dbus_interface( ${CMAKE_CURRENT_SOURCE_DIR}/nepomuktagresource.h org.kde.Akonadi.NepomukTag.Resource.xml ) qt4_add_dbus_adaptor( nepomuktagresource_SRCS ${CMAKE_CURRENT_BINARY_DIR}/org.kde.Akonadi.NepomukTag.Resource.xml nepomuktagresource.h NepomukTagResource ) kde4_add_executable(akonadi_nepomuktag_resource RUN_UNINSTALLED ${nepomuktagresource_SRCS}) target_link_libraries(akonadi_nepomuktag_resource ${KDE4_KDECORE_LIBS} ${KDE4_KDEUI_LIBS} ${KDEPIMLIBS_AKONADI_LIBS} ${QT_QTDBUS_LIBRARY} ${QT_QTCORE_LIBRARY} ${NEPOMUK_LIBRARIES} ) install(TARGETS akonadi_nepomuktag_resource ${INSTALL_TARGETS_DEFAULT_ARGS}) ## Instruction: Fix link error about soprano not being linked in - the fix was found by Brad King svn path=/branches/KDE/4.3/kdepim/; revision=990589 ## Code After: set( nepomuktagresource_SRCS nepomuktagresource.cpp ) install( FILES nepomuktagresource.desktop DESTINATION "${CMAKE_INSTALL_PREFIX}/share/akonadi/agents" ) qt4_generate_dbus_interface( ${CMAKE_CURRENT_SOURCE_DIR}/nepomuktagresource.h org.kde.Akonadi.NepomukTag.Resource.xml ) qt4_add_dbus_adaptor( nepomuktagresource_SRCS ${CMAKE_CURRENT_BINARY_DIR}/org.kde.Akonadi.NepomukTag.Resource.xml nepomuktagresource.h NepomukTagResource ) kde4_add_executable(akonadi_nepomuktag_resource RUN_UNINSTALLED ${nepomuktagresource_SRCS}) target_link_libraries(akonadi_nepomuktag_resource ${KDE4_KDECORE_LIBS} ${KDE4_KDEUI_LIBS} ${KDEPIMLIBS_AKONADI_LIBS} ${QT_QTDBUS_LIBRARY} ${QT_QTCORE_LIBRARY} ${KDE4_NEPOMUK_LIBS} ) install(TARGETS akonadi_nepomuktag_resource ${INSTALL_TARGETS_DEFAULT_ARGS})
set( nepomuktagresource_SRCS nepomuktagresource.cpp ) install( FILES nepomuktagresource.desktop DESTINATION "${CMAKE_INSTALL_PREFIX}/share/akonadi/agents" ) qt4_generate_dbus_interface( ${CMAKE_CURRENT_SOURCE_DIR}/nepomuktagresource.h org.kde.Akonadi.NepomukTag.Resource.xml ) qt4_add_dbus_adaptor( nepomuktagresource_SRCS ${CMAKE_CURRENT_BINARY_DIR}/org.kde.Akonadi.NepomukTag.Resource.xml nepomuktagresource.h NepomukTagResource ) kde4_add_executable(akonadi_nepomuktag_resource RUN_UNINSTALLED ${nepomuktagresource_SRCS}) - target_link_libraries(akonadi_nepomuktag_resource ${KDE4_KDECORE_LIBS} ${KDE4_KDEUI_LIBS} ${KDEPIMLIBS_AKONADI_LIBS} ${QT_QTDBUS_LIBRARY} ${QT_QTCORE_LIBRARY} ${NEPOMUK_LIBRARIES} ) ? ----- + target_link_libraries(akonadi_nepomuktag_resource ${KDE4_KDECORE_LIBS} ${KDE4_KDEUI_LIBS} ${KDEPIMLIBS_AKONADI_LIBS} ${QT_QTDBUS_LIBRARY} ${QT_QTCORE_LIBRARY} ${KDE4_NEPOMUK_LIBS} ) ? +++++ install(TARGETS akonadi_nepomuktag_resource ${INSTALL_TARGETS_DEFAULT_ARGS})
2
0.111111
1
1
c0073085ba2ba27831cbc009f413d55582bac062
rails-timeago.gemspec
rails-timeago.gemspec
require File.expand_path('../lib/rails-timeago/version', __FILE__) Gem::Specification.new do |gem| gem.authors = ['Jan Graichen'] gem.email = ['jan.graichen@altimos.de'] gem.description = 'jQuery Timeago helper for Rails 3' gem.summary = 'A Rails Helper to create time tags usable for jQuery Timeago plugin' gem.homepage = 'https://github.com/jgraichen/rails-timeago' gem.license = 'MIT' gem.executables = `git ls-files -- bin/*`.split("\n").map {|f| File.basename(f) } gem.files = `git ls-files`.split("\n").reject {|file| file =~ /^scripts/ } gem.test_files = `git ls-files -- {test,spec,features}/*`.split("\n") gem.name = 'rails-timeago' gem.require_paths = ['lib'] gem.version = Rails::Timeago::VERSION gem.add_dependency 'activesupport', '>= 3.1' gem.add_dependency 'actionpack', '>= 3.1' end
require File.expand_path('../lib/rails-timeago/version', __FILE__) Gem::Specification.new do |gem| gem.authors = ['Jan Graichen'] gem.email = ['jan.graichen@altimos.de'] gem.description = 'jQuery Timeago helper for Rails 3' gem.summary = 'A Rails Helper to create time tags usable for jQuery Timeago plugin' gem.homepage = 'https://github.com/jgraichen/rails-timeago' gem.license = 'MIT' # Specify which files should be added to the gem when it is released. # The `git ls-files -z` loads the files in the RubyGem that have been added into git. gem.files = Dir.chdir(File.expand_path('..', __FILE__)) do `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(features|scripts|spec|test)/}) } end gem.executables = gem.files.grep(%r{^bin/}) { |f| File.basename(f) } gem.name = 'rails-timeago' gem.require_paths = ['lib'] gem.version = Rails::Timeago::VERSION gem.add_dependency 'activesupport', '>= 3.1' gem.add_dependency 'actionpack', '>= 3.1' end
Exclude spec files from gem archive, remove deprecated test_files setting
Exclude spec files from gem archive, remove deprecated test_files setting
Ruby
mit
jgraichen/rails-timeago,jgraichen/rails-timeago
ruby
## Code Before: require File.expand_path('../lib/rails-timeago/version', __FILE__) Gem::Specification.new do |gem| gem.authors = ['Jan Graichen'] gem.email = ['jan.graichen@altimos.de'] gem.description = 'jQuery Timeago helper for Rails 3' gem.summary = 'A Rails Helper to create time tags usable for jQuery Timeago plugin' gem.homepage = 'https://github.com/jgraichen/rails-timeago' gem.license = 'MIT' gem.executables = `git ls-files -- bin/*`.split("\n").map {|f| File.basename(f) } gem.files = `git ls-files`.split("\n").reject {|file| file =~ /^scripts/ } gem.test_files = `git ls-files -- {test,spec,features}/*`.split("\n") gem.name = 'rails-timeago' gem.require_paths = ['lib'] gem.version = Rails::Timeago::VERSION gem.add_dependency 'activesupport', '>= 3.1' gem.add_dependency 'actionpack', '>= 3.1' end ## Instruction: Exclude spec files from gem archive, remove deprecated test_files setting ## Code After: require File.expand_path('../lib/rails-timeago/version', __FILE__) Gem::Specification.new do |gem| gem.authors = ['Jan Graichen'] gem.email = ['jan.graichen@altimos.de'] gem.description = 'jQuery Timeago helper for Rails 3' gem.summary = 'A Rails Helper to create time tags usable for jQuery Timeago plugin' gem.homepage = 'https://github.com/jgraichen/rails-timeago' gem.license = 'MIT' # Specify which files should be added to the gem when it is released. # The `git ls-files -z` loads the files in the RubyGem that have been added into git. gem.files = Dir.chdir(File.expand_path('..', __FILE__)) do `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(features|scripts|spec|test)/}) } end gem.executables = gem.files.grep(%r{^bin/}) { |f| File.basename(f) } gem.name = 'rails-timeago' gem.require_paths = ['lib'] gem.version = Rails::Timeago::VERSION gem.add_dependency 'activesupport', '>= 3.1' gem.add_dependency 'actionpack', '>= 3.1' end
require File.expand_path('../lib/rails-timeago/version', __FILE__) Gem::Specification.new do |gem| gem.authors = ['Jan Graichen'] gem.email = ['jan.graichen@altimos.de'] gem.description = 'jQuery Timeago helper for Rails 3' gem.summary = 'A Rails Helper to create time tags usable for jQuery Timeago plugin' gem.homepage = 'https://github.com/jgraichen/rails-timeago' gem.license = 'MIT' - gem.executables = `git ls-files -- bin/*`.split("\n").map {|f| File.basename(f) } - gem.files = `git ls-files`.split("\n").reject {|file| file =~ /^scripts/ } - gem.test_files = `git ls-files -- {test,spec,features}/*`.split("\n") + # Specify which files should be added to the gem when it is released. + # The `git ls-files -z` loads the files in the RubyGem that have been added into git. + gem.files = Dir.chdir(File.expand_path('..', __FILE__)) do + `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(features|scripts|spec|test)/}) } + end + gem.executables = gem.files.grep(%r{^bin/}) { |f| File.basename(f) } gem.name = 'rails-timeago' gem.require_paths = ['lib'] gem.version = Rails::Timeago::VERSION gem.add_dependency 'activesupport', '>= 3.1' gem.add_dependency 'actionpack', '>= 3.1' end
9
0.428571
6
3
e5e87df52568157c44699200c8166f571a19f633
css/character.css
css/character.css
.character .character-img { width: 400px; height: 350px; } .character .character-name { font-size: 20px; font-weight: bold; }
.character { margin-bottom: 25px; } .character .character-img { width: 400px; height: 350px; } .character .character-name { font-size: 20px; font-weight: bold; }
Add a space between each item of the list
Add a space between each item of the list
CSS
mit
adrrian17/excelsior
css
## Code Before: .character .character-img { width: 400px; height: 350px; } .character .character-name { font-size: 20px; font-weight: bold; } ## Instruction: Add a space between each item of the list ## Code After: .character { margin-bottom: 25px; } .character .character-img { width: 400px; height: 350px; } .character .character-name { font-size: 20px; font-weight: bold; }
+ .character { + margin-bottom: 25px; + } + .character .character-img { width: 400px; height: 350px; } .character .character-name { font-size: 20px; font-weight: bold; }
4
0.444444
4
0
2dd3aa5305b66d2905d3d42be7fbf50687d61a90
bundle/package.json
bundle/package.json
{ "name": "jsroot_bundle", "version": "6.99.99", "description": "JSROOT hist painters", "homepage": "https://github.com/root-project/jsroot/", "keywords": [ "jsroot", "ROOT", "visualization", "hist" ], "license": "MIT", "author": { "name": "Sergey Linev", "url": "https://github.com/linev" }, "type": "module", "files": [ "jsroot_bundle.js" ], "module": "jsroot_bundle.js", "main": "jsroot_bundle.js", "devDependencies": { "@rollup/plugin-json": "4", "@rollup/plugin-node-resolve": "13", "eslint": "8", "mocha": "9", "rollup": "2", "rollup-plugin-ascii": "0.0", "rollup-plugin-terser": "7", "rollup-plugin-ignore": "1.0.10" }, "scripts": { "build": "rollup -c && mkdir -p style && cp ../style/JSRoot.painter.css style", "cleanup": "rm -f bundle bundle.min style" }, "engines": { "node": ">=14" } }
{ "name": "jsroot_bundle", "version": "6.99.99", "description": "JSROOT hist painters", "homepage": "https://github.com/root-project/jsroot/", "keywords": [ "jsroot", "ROOT", "visualization", "hist" ], "license": "MIT", "author": { "name": "Sergey Linev", "url": "https://github.com/linev" }, "type": "module", "files": [ "jsroot_bundle.js" ], "module": "jsroot_bundle.js", "main": "jsroot_bundle.js", "devDependencies": { "@rollup/plugin-json": "4", "@rollup/plugin-node-resolve": "13", "eslint": "8", "mocha": "9", "rollup": "2", "rollup-plugin-ascii": "0.0", "rollup-plugin-terser": "7", "rollup-plugin-ignore": "1.0.10" }, "scripts": { "build": "rm -rf bundle/* bundle.min/* && rollup -c && mkdir -p style && cp ../style/JSRoot.painter.css style", "clean": "rm -rf bundle bundle.min style" }, "engines": { "node": ">=14" } }
Update build rules for bundle
Update build rules for bundle
JSON
mit
root-project/jsroot,root-project/jsroot
json
## Code Before: { "name": "jsroot_bundle", "version": "6.99.99", "description": "JSROOT hist painters", "homepage": "https://github.com/root-project/jsroot/", "keywords": [ "jsroot", "ROOT", "visualization", "hist" ], "license": "MIT", "author": { "name": "Sergey Linev", "url": "https://github.com/linev" }, "type": "module", "files": [ "jsroot_bundle.js" ], "module": "jsroot_bundle.js", "main": "jsroot_bundle.js", "devDependencies": { "@rollup/plugin-json": "4", "@rollup/plugin-node-resolve": "13", "eslint": "8", "mocha": "9", "rollup": "2", "rollup-plugin-ascii": "0.0", "rollup-plugin-terser": "7", "rollup-plugin-ignore": "1.0.10" }, "scripts": { "build": "rollup -c && mkdir -p style && cp ../style/JSRoot.painter.css style", "cleanup": "rm -f bundle bundle.min style" }, "engines": { "node": ">=14" } } ## Instruction: Update build rules for bundle ## Code After: { "name": "jsroot_bundle", "version": "6.99.99", "description": "JSROOT hist painters", "homepage": "https://github.com/root-project/jsroot/", "keywords": [ "jsroot", "ROOT", "visualization", "hist" ], "license": "MIT", "author": { "name": "Sergey Linev", "url": "https://github.com/linev" }, "type": "module", "files": [ "jsroot_bundle.js" ], "module": "jsroot_bundle.js", "main": "jsroot_bundle.js", "devDependencies": { "@rollup/plugin-json": "4", "@rollup/plugin-node-resolve": "13", "eslint": "8", "mocha": "9", "rollup": "2", "rollup-plugin-ascii": "0.0", "rollup-plugin-terser": "7", "rollup-plugin-ignore": "1.0.10" }, "scripts": { "build": "rm -rf bundle/* bundle.min/* && rollup -c && mkdir -p style && cp ../style/JSRoot.painter.css style", "clean": "rm -rf bundle bundle.min style" }, "engines": { "node": ">=14" } }
{ "name": "jsroot_bundle", "version": "6.99.99", "description": "JSROOT hist painters", "homepage": "https://github.com/root-project/jsroot/", "keywords": [ "jsroot", "ROOT", "visualization", "hist" ], "license": "MIT", "author": { "name": "Sergey Linev", "url": "https://github.com/linev" }, "type": "module", "files": [ "jsroot_bundle.js" ], "module": "jsroot_bundle.js", "main": "jsroot_bundle.js", "devDependencies": { "@rollup/plugin-json": "4", "@rollup/plugin-node-resolve": "13", "eslint": "8", "mocha": "9", "rollup": "2", "rollup-plugin-ascii": "0.0", "rollup-plugin-terser": "7", "rollup-plugin-ignore": "1.0.10" }, "scripts": { - "build": "rollup -c && mkdir -p style && cp ../style/JSRoot.painter.css style", + "build": "rm -rf bundle/* bundle.min/* && rollup -c && mkdir -p style && cp ../style/JSRoot.painter.css style", ? ++++++++++++++++++++++++++++++++ - "cleanup": "rm -f bundle bundle.min style" ? -- + "clean": "rm -rf bundle bundle.min style" ? + }, "engines": { "node": ">=14" } }
4
0.1
2
2
f03a7b5e659de2387a3f16226443e8390d2da59d
chrome/browser/ui/webui/print_preview_ui.cc
chrome/browser/ui/webui/print_preview_ui.cc
// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/ui/webui/print_preview_ui.h" #include "base/values.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/ui/webui/print_preview_handler.h" #include "chrome/browser/ui/webui/print_preview_ui_html_source.h" #include "content/browser/browser_thread.h" #include "content/browser/tab_contents/tab_contents.h" PrintPreviewUI::PrintPreviewUI(TabContents* contents) : WebUI(contents), html_source_(new PrintPreviewUIHTMLSource()) { // PrintPreviewUI owns |handler|. PrintPreviewHandler* handler = new PrintPreviewHandler(); AddMessageHandler(handler->Attach(this)); // Set up the chrome://print/ source. contents->profile()->GetChromeURLDataManager()->AddDataSource(html_source_); } PrintPreviewUI::~PrintPreviewUI() { } PrintPreviewUIHTMLSource* PrintPreviewUI::html_source() { return html_source_.get(); } void PrintPreviewUI::PreviewDataIsAvailable(int expected_pages_count) { FundamentalValue pages_count(expected_pages_count); CallJavascriptFunction("createPDFPlugin", pages_count); }
// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/ui/webui/print_preview_ui.h" #include "base/values.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/ui/webui/print_preview_handler.h" #include "chrome/browser/ui/webui/print_preview_ui_html_source.h" #include "content/browser/browser_thread.h" #include "content/browser/tab_contents/tab_contents.h" PrintPreviewUI::PrintPreviewUI(TabContents* contents) : WebUI(contents), html_source_(new PrintPreviewUIHTMLSource()) { // PrintPreviewUI owns |handler|. PrintPreviewHandler* handler = new PrintPreviewHandler(); AddMessageHandler(handler->Attach(this)); // Set up the chrome://print/ source. contents->profile()->GetChromeURLDataManager()->AddDataSource(html_source_); } PrintPreviewUI::~PrintPreviewUI() { } PrintPreviewUIHTMLSource* PrintPreviewUI::html_source() { return html_source_.get(); } void PrintPreviewUI::PreviewDataIsAvailable(int expected_pages_count) { FundamentalValue pages_count(expected_pages_count); CallJavascriptFunction("updatePrintPreview", pages_count); }
Print Preview: Fix typo from r78639.
Print Preview: Fix typo from r78639. BUG=76707 TEST=page count initialized correctly in print preview. R=arv@chromium.org Review URL: http://codereview.chromium.org/6688041 git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@78747 0039d316-1c4b-4281-b951-d872f2087c98
C++
bsd-3-clause
mogoweb/chromium-crosswalk,littlstar/chromium.src,hujiajie/pa-chromium,Just-D/chromium-1,Chilledheart/chromium,rogerwang/chromium,Chilledheart/chromium,timopulkkinen/BubbleFish,ChromiumWebApps/chromium,robclark/chromium,littlstar/chromium.src,mohamed--abdel-maksoud/chromium.src,dednal/chromium.src,timopulkkinen/BubbleFish,mogoweb/chromium-crosswalk,axinging/chromium-crosswalk,dednal/chromium.src,jaruba/chromium.src,nacl-webkit/chrome_deps,ChromiumWebApps/chromium,hujiajie/pa-chromium,chuan9/chromium-crosswalk,bright-sparks/chromium-spacewalk,Jonekee/chromium.src,M4sse/chromium.src,ondra-novak/chromium.src,mohamed--abdel-maksoud/chromium.src,dednal/chromium.src,ltilve/chromium,M4sse/chromium.src,ChromiumWebApps/chromium,bright-sparks/chromium-spacewalk,patrickm/chromium.src,markYoungH/chromium.src,PeterWangIntel/chromium-crosswalk,zcbenz/cefode-chromium,markYoungH/chromium.src,mohamed--abdel-maksoud/chromium.src,hgl888/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,hujiajie/pa-chromium,nacl-webkit/chrome_deps,dushu1203/chromium.src,rogerwang/chromium,krieger-od/nwjs_chromium.src,bright-sparks/chromium-spacewalk,crosswalk-project/chromium-crosswalk-efl,ChromiumWebApps/chromium,dednal/chromium.src,ChromiumWebApps/chromium,timopulkkinen/BubbleFish,crosswalk-project/chromium-crosswalk-efl,chuan9/chromium-crosswalk,dednal/chromium.src,jaruba/chromium.src,krieger-od/nwjs_chromium.src,zcbenz/cefode-chromium,Just-D/chromium-1,ltilve/chromium,axinging/chromium-crosswalk,hgl888/chromium-crosswalk-efl,krieger-od/nwjs_chromium.src,markYoungH/chromium.src,markYoungH/chromium.src,ChromiumWebApps/chromium,markYoungH/chromium.src,hujiajie/pa-chromium,anirudhSK/chromium,hgl888/chromium-crosswalk-efl,dushu1203/chromium.src,keishi/chromium,PeterWangIntel/chromium-crosswalk,patrickm/chromium.src,Pluto-tv/chromium-crosswalk,fujunwei/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,dednal/chromium.src,ondra-novak/chromium.src,fujunwei/chromium-crosswalk,rogerwang/chromium,ChromiumWebApps/chromium,Jonekee/chromium.src,keishi/chromium,ondra-novak/chromium.src,pozdnyakov/chromium-crosswalk,nacl-webkit/chrome_deps,pozdnyakov/chromium-crosswalk,Fireblend/chromium-crosswalk,ltilve/chromium,dednal/chromium.src,fujunwei/chromium-crosswalk,Jonekee/chromium.src,krieger-od/nwjs_chromium.src,jaruba/chromium.src,PeterWangIntel/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,M4sse/chromium.src,anirudhSK/chromium,TheTypoMaster/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,patrickm/chromium.src,ChromiumWebApps/chromium,dushu1203/chromium.src,M4sse/chromium.src,krieger-od/nwjs_chromium.src,timopulkkinen/BubbleFish,axinging/chromium-crosswalk,ChromiumWebApps/chromium,TheTypoMaster/chromium-crosswalk,timopulkkinen/BubbleFish,dednal/chromium.src,ltilve/chromium,Just-D/chromium-1,anirudhSK/chromium,fujunwei/chromium-crosswalk,dushu1203/chromium.src,fujunwei/chromium-crosswalk,markYoungH/chromium.src,Just-D/chromium-1,hgl888/chromium-crosswalk-efl,junmin-zhu/chromium-rivertrail,mohamed--abdel-maksoud/chromium.src,junmin-zhu/chromium-rivertrail,hujiajie/pa-chromium,littlstar/chromium.src,timopulkkinen/BubbleFish,bright-sparks/chromium-spacewalk,ondra-novak/chromium.src,M4sse/chromium.src,hgl888/chromium-crosswalk,dushu1203/chromium.src,Chilledheart/chromium,Just-D/chromium-1,axinging/chromium-crosswalk,nacl-webkit/chrome_deps,markYoungH/chromium.src,TheTypoMaster/chromium-crosswalk,Pluto-tv/chromium-crosswalk,ChromiumWebApps/chromium,Chilledheart/chromium,hujiajie/pa-chromium,fujunwei/chromium-crosswalk,Jonekee/chromium.src,krieger-od/nwjs_chromium.src,nacl-webkit/chrome_deps,robclark/chromium,PeterWangIntel/chromium-crosswalk,patrickm/chromium.src,rogerwang/chromium,keishi/chromium,zcbenz/cefode-chromium,keishi/chromium,krieger-od/nwjs_chromium.src,axinging/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,axinging/chromium-crosswalk,hgl888/chromium-crosswalk-efl,junmin-zhu/chromium-rivertrail,junmin-zhu/chromium-rivertrail,anirudhSK/chromium,ChromiumWebApps/chromium,hgl888/chromium-crosswalk,rogerwang/chromium,hujiajie/pa-chromium,patrickm/chromium.src,timopulkkinen/BubbleFish,mogoweb/chromium-crosswalk,krieger-od/nwjs_chromium.src,Pluto-tv/chromium-crosswalk,jaruba/chromium.src,dednal/chromium.src,crosswalk-project/chromium-crosswalk-efl,anirudhSK/chromium,chuan9/chromium-crosswalk,dushu1203/chromium.src,Pluto-tv/chromium-crosswalk,patrickm/chromium.src,crosswalk-project/chromium-crosswalk-efl,Pluto-tv/chromium-crosswalk,krieger-od/nwjs_chromium.src,mohamed--abdel-maksoud/chromium.src,junmin-zhu/chromium-rivertrail,TheTypoMaster/chromium-crosswalk,axinging/chromium-crosswalk,Fireblend/chromium-crosswalk,jaruba/chromium.src,axinging/chromium-crosswalk,chuan9/chromium-crosswalk,Fireblend/chromium-crosswalk,M4sse/chromium.src,jaruba/chromium.src,ondra-novak/chromium.src,ChromiumWebApps/chromium,mohamed--abdel-maksoud/chromium.src,keishi/chromium,jaruba/chromium.src,hgl888/chromium-crosswalk-efl,jaruba/chromium.src,robclark/chromium,dushu1203/chromium.src,fujunwei/chromium-crosswalk,M4sse/chromium.src,bright-sparks/chromium-spacewalk,axinging/chromium-crosswalk,mogoweb/chromium-crosswalk,Just-D/chromium-1,timopulkkinen/BubbleFish,hgl888/chromium-crosswalk,hgl888/chromium-crosswalk,nacl-webkit/chrome_deps,dushu1203/chromium.src,dednal/chromium.src,M4sse/chromium.src,littlstar/chromium.src,rogerwang/chromium,hujiajie/pa-chromium,hgl888/chromium-crosswalk-efl,jaruba/chromium.src,Just-D/chromium-1,Pluto-tv/chromium-crosswalk,pozdnyakov/chromium-crosswalk,nacl-webkit/chrome_deps,TheTypoMaster/chromium-crosswalk,mogoweb/chromium-crosswalk,zcbenz/cefode-chromium,rogerwang/chromium,TheTypoMaster/chromium-crosswalk,M4sse/chromium.src,M4sse/chromium.src,krieger-od/nwjs_chromium.src,mohamed--abdel-maksoud/chromium.src,crosswalk-project/chromium-crosswalk-efl,pozdnyakov/chromium-crosswalk,Chilledheart/chromium,bright-sparks/chromium-spacewalk,hgl888/chromium-crosswalk,ltilve/chromium,rogerwang/chromium,hgl888/chromium-crosswalk-efl,jaruba/chromium.src,crosswalk-project/chromium-crosswalk-efl,hgl888/chromium-crosswalk-efl,junmin-zhu/chromium-rivertrail,mogoweb/chromium-crosswalk,hgl888/chromium-crosswalk-efl,anirudhSK/chromium,chuan9/chromium-crosswalk,chuan9/chromium-crosswalk,hujiajie/pa-chromium,Chilledheart/chromium,junmin-zhu/chromium-rivertrail,patrickm/chromium.src,mogoweb/chromium-crosswalk,dushu1203/chromium.src,rogerwang/chromium,junmin-zhu/chromium-rivertrail,markYoungH/chromium.src,zcbenz/cefode-chromium,zcbenz/cefode-chromium,ondra-novak/chromium.src,timopulkkinen/BubbleFish,ltilve/chromium,littlstar/chromium.src,Fireblend/chromium-crosswalk,keishi/chromium,robclark/chromium,hgl888/chromium-crosswalk,Pluto-tv/chromium-crosswalk,ondra-novak/chromium.src,anirudhSK/chromium,Just-D/chromium-1,junmin-zhu/chromium-rivertrail,ondra-novak/chromium.src,bright-sparks/chromium-spacewalk,hgl888/chromium-crosswalk-efl,Jonekee/chromium.src,robclark/chromium,littlstar/chromium.src,markYoungH/chromium.src,pozdnyakov/chromium-crosswalk,Pluto-tv/chromium-crosswalk,rogerwang/chromium,junmin-zhu/chromium-rivertrail,PeterWangIntel/chromium-crosswalk,jaruba/chromium.src,bright-sparks/chromium-spacewalk,robclark/chromium,chuan9/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,nacl-webkit/chrome_deps,zcbenz/cefode-chromium,hujiajie/pa-chromium,robclark/chromium,bright-sparks/chromium-spacewalk,littlstar/chromium.src,keishi/chromium,anirudhSK/chromium,Chilledheart/chromium,zcbenz/cefode-chromium,mohamed--abdel-maksoud/chromium.src,hgl888/chromium-crosswalk,Just-D/chromium-1,timopulkkinen/BubbleFish,Chilledheart/chromium,mohamed--abdel-maksoud/chromium.src,ondra-novak/chromium.src,pozdnyakov/chromium-crosswalk,keishi/chromium,anirudhSK/chromium,pozdnyakov/chromium-crosswalk,Chilledheart/chromium,PeterWangIntel/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,pozdnyakov/chromium-crosswalk,timopulkkinen/BubbleFish,robclark/chromium,mogoweb/chromium-crosswalk,Fireblend/chromium-crosswalk,hujiajie/pa-chromium,Jonekee/chromium.src,fujunwei/chromium-crosswalk,dednal/chromium.src,robclark/chromium,ltilve/chromium,Jonekee/chromium.src,crosswalk-project/chromium-crosswalk-efl,keishi/chromium,markYoungH/chromium.src,patrickm/chromium.src,zcbenz/cefode-chromium,chuan9/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,markYoungH/chromium.src,hgl888/chromium-crosswalk,nacl-webkit/chrome_deps,mogoweb/chromium-crosswalk,pozdnyakov/chromium-crosswalk,keishi/chromium,Pluto-tv/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,PeterWangIntel/chromium-crosswalk,Jonekee/chromium.src,axinging/chromium-crosswalk,Fireblend/chromium-crosswalk,anirudhSK/chromium,pozdnyakov/chromium-crosswalk,nacl-webkit/chrome_deps,junmin-zhu/chromium-rivertrail,nacl-webkit/chrome_deps,pozdnyakov/chromium-crosswalk,robclark/chromium,chuan9/chromium-crosswalk,anirudhSK/chromium,keishi/chromium,Jonekee/chromium.src,dushu1203/chromium.src,krieger-od/nwjs_chromium.src,Fireblend/chromium-crosswalk,ltilve/chromium,mogoweb/chromium-crosswalk,Jonekee/chromium.src,zcbenz/cefode-chromium,zcbenz/cefode-chromium,littlstar/chromium.src,Fireblend/chromium-crosswalk,dushu1203/chromium.src,Fireblend/chromium-crosswalk,M4sse/chromium.src,fujunwei/chromium-crosswalk,Jonekee/chromium.src,ltilve/chromium,patrickm/chromium.src,anirudhSK/chromium,axinging/chromium-crosswalk
c++
## Code Before: // Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/ui/webui/print_preview_ui.h" #include "base/values.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/ui/webui/print_preview_handler.h" #include "chrome/browser/ui/webui/print_preview_ui_html_source.h" #include "content/browser/browser_thread.h" #include "content/browser/tab_contents/tab_contents.h" PrintPreviewUI::PrintPreviewUI(TabContents* contents) : WebUI(contents), html_source_(new PrintPreviewUIHTMLSource()) { // PrintPreviewUI owns |handler|. PrintPreviewHandler* handler = new PrintPreviewHandler(); AddMessageHandler(handler->Attach(this)); // Set up the chrome://print/ source. contents->profile()->GetChromeURLDataManager()->AddDataSource(html_source_); } PrintPreviewUI::~PrintPreviewUI() { } PrintPreviewUIHTMLSource* PrintPreviewUI::html_source() { return html_source_.get(); } void PrintPreviewUI::PreviewDataIsAvailable(int expected_pages_count) { FundamentalValue pages_count(expected_pages_count); CallJavascriptFunction("createPDFPlugin", pages_count); } ## Instruction: Print Preview: Fix typo from r78639. BUG=76707 TEST=page count initialized correctly in print preview. R=arv@chromium.org Review URL: http://codereview.chromium.org/6688041 git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@78747 0039d316-1c4b-4281-b951-d872f2087c98 ## Code After: // Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/ui/webui/print_preview_ui.h" #include "base/values.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/ui/webui/print_preview_handler.h" #include "chrome/browser/ui/webui/print_preview_ui_html_source.h" #include "content/browser/browser_thread.h" #include "content/browser/tab_contents/tab_contents.h" PrintPreviewUI::PrintPreviewUI(TabContents* contents) : WebUI(contents), html_source_(new PrintPreviewUIHTMLSource()) { // PrintPreviewUI owns |handler|. PrintPreviewHandler* handler = new PrintPreviewHandler(); AddMessageHandler(handler->Attach(this)); // Set up the chrome://print/ source. contents->profile()->GetChromeURLDataManager()->AddDataSource(html_source_); } PrintPreviewUI::~PrintPreviewUI() { } PrintPreviewUIHTMLSource* PrintPreviewUI::html_source() { return html_source_.get(); } void PrintPreviewUI::PreviewDataIsAvailable(int expected_pages_count) { FundamentalValue pages_count(expected_pages_count); CallJavascriptFunction("updatePrintPreview", pages_count); }
// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/ui/webui/print_preview_ui.h" #include "base/values.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/ui/webui/print_preview_handler.h" #include "chrome/browser/ui/webui/print_preview_ui_html_source.h" #include "content/browser/browser_thread.h" #include "content/browser/tab_contents/tab_contents.h" PrintPreviewUI::PrintPreviewUI(TabContents* contents) : WebUI(contents), html_source_(new PrintPreviewUIHTMLSource()) { // PrintPreviewUI owns |handler|. PrintPreviewHandler* handler = new PrintPreviewHandler(); AddMessageHandler(handler->Attach(this)); // Set up the chrome://print/ source. contents->profile()->GetChromeURLDataManager()->AddDataSource(html_source_); } PrintPreviewUI::~PrintPreviewUI() { } PrintPreviewUIHTMLSource* PrintPreviewUI::html_source() { return html_source_.get(); } void PrintPreviewUI::PreviewDataIsAvailable(int expected_pages_count) { FundamentalValue pages_count(expected_pages_count); - CallJavascriptFunction("createPDFPlugin", pages_count); ? ^^^ ^^^^^^ + CallJavascriptFunction("updatePrintPreview", pages_count); ? ^^^ ^ ++++++++ }
2
0.057143
1
1
16bbf0085119c7a2215b0a8a43e78131f46b5231
pkgs/tools/security/munge/default.nix
pkgs/tools/security/munge/default.nix
{ stdenv, fetchurl, gnused, perl, libgcrypt, zlib, bzip2 }: stdenv.mkDerivation rec { name = "munge-0.5.10"; src = fetchurl { url = "http://munge.googlecode.com/files/${name}.tar.bz2"; sha256 = "1imbmpd70vkcpca8d9yd9ajkhf6ik057nr3jb1app1wm51f15q00"; }; buildInputs = [ gnused perl libgcrypt zlib bzip2 ]; preConfigure = '' # Remove the install-data stuff, since it tries to write to /var sed -i '434,465d' src/etc/Makefile.in ''; configureFlags = [ "--localstatedir=/var" ]; meta = { homepage = http://code.google.com/p/munge/; description = '' An authentication service for creating and validating credentials ''; maintainers = [ stdenv.lib.maintainers.rickynils ]; platforms = stdenv.lib.platforms.linux; }; }
{ stdenv, fetchurl, gnused, perl, libgcrypt, zlib, bzip2 }: stdenv.mkDerivation rec { name = "munge-0.5.11"; src = fetchurl { url = "http://munge.googlecode.com/files/${name}.tar.bz2"; sha256 = "19aijdrjij2g0xpqgl198jh131j94p4gvam047gsdc0wz0a5c1wf"; }; buildInputs = [ gnused perl libgcrypt zlib bzip2 ]; preConfigure = '' # Remove the install-data stuff, since it tries to write to /var sed -i '505,511d' src/etc/Makefile.in ''; configureFlags = [ "--localstatedir=/var" ]; meta = { homepage = http://code.google.com/p/munge/; description = '' An authentication service for creating and validating credentials ''; maintainers = [ stdenv.lib.maintainers.rickynils ]; platforms = stdenv.lib.platforms.linux; }; }
Update from 0.5.10 to 0.5.11
munge: Update from 0.5.10 to 0.5.11
Nix
mit
triton/triton,NixOS/nixpkgs,SymbiFlow/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,triton/triton,SymbiFlow/nixpkgs,SymbiFlow/nixpkgs,SymbiFlow/nixpkgs,triton/triton,NixOS/nixpkgs,triton/triton,NixOS/nixpkgs,triton/triton,triton/triton,SymbiFlow/nixpkgs,SymbiFlow/nixpkgs,SymbiFlow/nixpkgs,NixOS/nixpkgs,SymbiFlow/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,SymbiFlow/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,SymbiFlow/nixpkgs,NixOS/nixpkgs,SymbiFlow/nixpkgs,SymbiFlow/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,triton/triton,NixOS/nixpkgs,SymbiFlow/nixpkgs,triton/triton,NixOS/nixpkgs
nix
## Code Before: { stdenv, fetchurl, gnused, perl, libgcrypt, zlib, bzip2 }: stdenv.mkDerivation rec { name = "munge-0.5.10"; src = fetchurl { url = "http://munge.googlecode.com/files/${name}.tar.bz2"; sha256 = "1imbmpd70vkcpca8d9yd9ajkhf6ik057nr3jb1app1wm51f15q00"; }; buildInputs = [ gnused perl libgcrypt zlib bzip2 ]; preConfigure = '' # Remove the install-data stuff, since it tries to write to /var sed -i '434,465d' src/etc/Makefile.in ''; configureFlags = [ "--localstatedir=/var" ]; meta = { homepage = http://code.google.com/p/munge/; description = '' An authentication service for creating and validating credentials ''; maintainers = [ stdenv.lib.maintainers.rickynils ]; platforms = stdenv.lib.platforms.linux; }; } ## Instruction: munge: Update from 0.5.10 to 0.5.11 ## Code After: { stdenv, fetchurl, gnused, perl, libgcrypt, zlib, bzip2 }: stdenv.mkDerivation rec { name = "munge-0.5.11"; src = fetchurl { url = "http://munge.googlecode.com/files/${name}.tar.bz2"; sha256 = "19aijdrjij2g0xpqgl198jh131j94p4gvam047gsdc0wz0a5c1wf"; }; buildInputs = [ gnused perl libgcrypt zlib bzip2 ]; preConfigure = '' # Remove the install-data stuff, since it tries to write to /var sed -i '505,511d' src/etc/Makefile.in ''; configureFlags = [ "--localstatedir=/var" ]; meta = { homepage = http://code.google.com/p/munge/; description = '' An authentication service for creating and validating credentials ''; maintainers = [ stdenv.lib.maintainers.rickynils ]; platforms = stdenv.lib.platforms.linux; }; }
{ stdenv, fetchurl, gnused, perl, libgcrypt, zlib, bzip2 }: stdenv.mkDerivation rec { - name = "munge-0.5.10"; ? ^ + name = "munge-0.5.11"; ? ^ src = fetchurl { url = "http://munge.googlecode.com/files/${name}.tar.bz2"; - sha256 = "1imbmpd70vkcpca8d9yd9ajkhf6ik057nr3jb1app1wm51f15q00"; + sha256 = "19aijdrjij2g0xpqgl198jh131j94p4gvam047gsdc0wz0a5c1wf"; }; buildInputs = [ gnused perl libgcrypt zlib bzip2 ]; preConfigure = '' # Remove the install-data stuff, since it tries to write to /var - sed -i '434,465d' src/etc/Makefile.in ? ^^^ -- + sed -i '505,511d' src/etc/Makefile.in ? ^^^ ++ ''; configureFlags = [ "--localstatedir=/var" ]; meta = { homepage = http://code.google.com/p/munge/; description = '' An authentication service for creating and validating credentials ''; maintainers = [ stdenv.lib.maintainers.rickynils ]; platforms = stdenv.lib.platforms.linux; }; }
6
0.2
3
3
ecd8031486ae5b9648056d6cbf6c5fb61ac0591c
lib/chanko/invoker/function_finder.rb
lib/chanko/invoker/function_finder.rb
module Chanko module Invoker class FunctionFinder def self.find(context, options) new(context, options).find end attr_reader :context, :options delegate :active_if_options, :as, :label, :unit_name, :to => :options def initialize(context, options) @context = context @options = options end def find active? && find_function end def scope as || context.class end def unit Loader.load(unit_name) end def find_function unit.find_function(scope, label) end def active? unit.try(:active?, context, active_if_options) end end end end
module Chanko module Invoker class FunctionFinder def self.find(context, options) new(context, options).find end attr_reader :context, :options delegate :active_if_options, :as, :label, :unit_name, :to => :options def initialize(context, options) @context = context @options = options end def find active? && find_function end def scope as || context.class end def unit Loader.load(unit_name) end def find_function unit.find_function(scope, label) end def active? if unit unit.active?(context, active_if_options) else false end end end end end
Fix problem that the unit may be false
Fix problem that the unit may be false
Ruby
mit
damoguyan8844/chanko,taiki45/chanko,damoguyan8844/chanko,cookpad/chanko,cookpad/chanko,cookpad/chanko,damoguyan8844/chanko,taiki45/chanko,taiki45/chanko
ruby
## Code Before: module Chanko module Invoker class FunctionFinder def self.find(context, options) new(context, options).find end attr_reader :context, :options delegate :active_if_options, :as, :label, :unit_name, :to => :options def initialize(context, options) @context = context @options = options end def find active? && find_function end def scope as || context.class end def unit Loader.load(unit_name) end def find_function unit.find_function(scope, label) end def active? unit.try(:active?, context, active_if_options) end end end end ## Instruction: Fix problem that the unit may be false ## Code After: module Chanko module Invoker class FunctionFinder def self.find(context, options) new(context, options).find end attr_reader :context, :options delegate :active_if_options, :as, :label, :unit_name, :to => :options def initialize(context, options) @context = context @options = options end def find active? && find_function end def scope as || context.class end def unit Loader.load(unit_name) end def find_function unit.find_function(scope, label) end def active? if unit unit.active?(context, active_if_options) else false end end end end end
module Chanko module Invoker class FunctionFinder def self.find(context, options) new(context, options).find end attr_reader :context, :options delegate :active_if_options, :as, :label, :unit_name, :to => :options def initialize(context, options) @context = context @options = options end def find active? && find_function end def scope as || context.class end def unit Loader.load(unit_name) end def find_function unit.find_function(scope, label) end def active? + if unit - unit.try(:active?, context, active_if_options) ? ----- ^^ + unit.active?(context, active_if_options) ? ++ ^ + else + false + end end end end end
6
0.157895
5
1
723e5c2783f5e1a0f4d8c7c3a1593f76e0199e46
worker/lib/redis_queue.rb
worker/lib/redis_queue.rb
require 'redis' RedisMessage = Struct.new(:body) class RedisQueue def initialize @redis = Redis.new end def poll(&block) loop do if queue_size > 0 message = @redis.rpop("smartchat-queue") block.call(RedisMessage.new(message)) end sleep 1 end end def send_message(message_json) @redis.lpush("smartchat-queue", message_json) end private def queue_size @redis.llen("smartchat-queue") end end
require 'redis' RedisMessage = Struct.new(:body) class RedisQueue def initialize @redis = Redis.new end def poll(&block) loop do _, message = @redis.brpop("smartchat-queue") block.call(RedisMessage.new(message)) end end def send_message(message_json) @redis.lpush("smartchat-queue", message_json) end end
Use Redis' BRPOP to block when poping
Use Redis' BRPOP to block when poping Removes the need to sleep
Ruby
mit
smartlogic/smartchat-api
ruby
## Code Before: require 'redis' RedisMessage = Struct.new(:body) class RedisQueue def initialize @redis = Redis.new end def poll(&block) loop do if queue_size > 0 message = @redis.rpop("smartchat-queue") block.call(RedisMessage.new(message)) end sleep 1 end end def send_message(message_json) @redis.lpush("smartchat-queue", message_json) end private def queue_size @redis.llen("smartchat-queue") end end ## Instruction: Use Redis' BRPOP to block when poping Removes the need to sleep ## Code After: require 'redis' RedisMessage = Struct.new(:body) class RedisQueue def initialize @redis = Redis.new end def poll(&block) loop do _, message = @redis.brpop("smartchat-queue") block.call(RedisMessage.new(message)) end end def send_message(message_json) @redis.lpush("smartchat-queue", message_json) end end
require 'redis' RedisMessage = Struct.new(:body) class RedisQueue def initialize @redis = Redis.new end def poll(&block) loop do - if queue_size > 0 - message = @redis.rpop("smartchat-queue") ? ^ + _, message = @redis.brpop("smartchat-queue") ? ^^ + - block.call(RedisMessage.new(message)) ? -- + block.call(RedisMessage.new(message)) - end - - sleep 1 end end def send_message(message_json) @redis.lpush("smartchat-queue", message_json) end - - private - - def queue_size - @redis.llen("smartchat-queue") - end end
14
0.466667
2
12
f6966d8922ab1913153259d343338e58715bd6ba
lib/gitlab/git/rev_list.rb
lib/gitlab/git/rev_list.rb
module Gitlab module Git class RevList include Gitlab::Git::Popen attr_reader :oldrev, :newrev, :path_to_repo def initialize(path_to_repo:, newrev:, oldrev: nil) @oldrev = oldrev @newrev = newrev @path_to_repo = path_to_repo end # This method returns an array of new references def new_refs execute([*base_args, newrev, '--not', '--all']) end # This methods returns an array of missed references # # Should become obsolete after https://gitlab.com/gitlab-org/gitaly/issues/348. def missed_ref execute([*base_args, '--max-count=1', oldrev, "^#{newrev}"]) end private def execute(args) output, status = popen(args, nil, Gitlab::Git::Env.all.stringify_keys) unless status.zero? raise "Got a non-zero exit code while calling out `#{args.join(' ')}`." end output.split("\n") end def base_args [ Gitlab.config.git.bin_path, "--git-dir=#{path_to_repo}", 'rev-list' ] end end end end
module Gitlab module Git class RevList include Gitlab::Git::Popen attr_reader :oldrev, :newrev, :path_to_repo def initialize(path_to_repo:, newrev:, oldrev: nil) @oldrev = oldrev @newrev = newrev @path_to_repo = path_to_repo end # This method returns an array of new references def new_refs execute([*base_args, newrev, '--not', '--all']) end # This methods returns an array of missed references # # Should become obsolete after https://gitlab.com/gitlab-org/gitaly/issues/348. def missed_ref execute([*base_args, '--max-count=1', oldrev, "^#{newrev}"]) end private def execute(args) output, status = popen(args, nil, Gitlab::Git::Env.all.stringify_keys) unless status.zero? raise "Got a non-zero exit code while calling out `#{args.join(' ')}`: #{output}" end output.split("\n") end def base_args [ Gitlab.config.git.bin_path, "--git-dir=#{path_to_repo}", 'rev-list' ] end end end end
Include RevList error messages in exceptions
Include RevList error messages in exceptions
Ruby
mit
mmkassem/gitlabhq,dreampet/gitlab,mmkassem/gitlabhq,jirutka/gitlabhq,axilleas/gitlabhq,axilleas/gitlabhq,stoplightio/gitlabhq,axilleas/gitlabhq,axilleas/gitlabhq,stoplightio/gitlabhq,mmkassem/gitlabhq,jirutka/gitlabhq,jirutka/gitlabhq,stoplightio/gitlabhq,stoplightio/gitlabhq,mmkassem/gitlabhq,jirutka/gitlabhq,dreampet/gitlab,iiet/iiet-git,dreampet/gitlab,iiet/iiet-git,dreampet/gitlab,iiet/iiet-git,iiet/iiet-git
ruby
## Code Before: module Gitlab module Git class RevList include Gitlab::Git::Popen attr_reader :oldrev, :newrev, :path_to_repo def initialize(path_to_repo:, newrev:, oldrev: nil) @oldrev = oldrev @newrev = newrev @path_to_repo = path_to_repo end # This method returns an array of new references def new_refs execute([*base_args, newrev, '--not', '--all']) end # This methods returns an array of missed references # # Should become obsolete after https://gitlab.com/gitlab-org/gitaly/issues/348. def missed_ref execute([*base_args, '--max-count=1', oldrev, "^#{newrev}"]) end private def execute(args) output, status = popen(args, nil, Gitlab::Git::Env.all.stringify_keys) unless status.zero? raise "Got a non-zero exit code while calling out `#{args.join(' ')}`." end output.split("\n") end def base_args [ Gitlab.config.git.bin_path, "--git-dir=#{path_to_repo}", 'rev-list' ] end end end end ## Instruction: Include RevList error messages in exceptions ## Code After: module Gitlab module Git class RevList include Gitlab::Git::Popen attr_reader :oldrev, :newrev, :path_to_repo def initialize(path_to_repo:, newrev:, oldrev: nil) @oldrev = oldrev @newrev = newrev @path_to_repo = path_to_repo end # This method returns an array of new references def new_refs execute([*base_args, newrev, '--not', '--all']) end # This methods returns an array of missed references # # Should become obsolete after https://gitlab.com/gitlab-org/gitaly/issues/348. def missed_ref execute([*base_args, '--max-count=1', oldrev, "^#{newrev}"]) end private def execute(args) output, status = popen(args, nil, Gitlab::Git::Env.all.stringify_keys) unless status.zero? raise "Got a non-zero exit code while calling out `#{args.join(' ')}`: #{output}" end output.split("\n") end def base_args [ Gitlab.config.git.bin_path, "--git-dir=#{path_to_repo}", 'rev-list' ] end end end end
module Gitlab module Git class RevList include Gitlab::Git::Popen attr_reader :oldrev, :newrev, :path_to_repo def initialize(path_to_repo:, newrev:, oldrev: nil) @oldrev = oldrev @newrev = newrev @path_to_repo = path_to_repo end # This method returns an array of new references def new_refs execute([*base_args, newrev, '--not', '--all']) end # This methods returns an array of missed references # # Should become obsolete after https://gitlab.com/gitlab-org/gitaly/issues/348. def missed_ref execute([*base_args, '--max-count=1', oldrev, "^#{newrev}"]) end private def execute(args) output, status = popen(args, nil, Gitlab::Git::Env.all.stringify_keys) unless status.zero? - raise "Got a non-zero exit code while calling out `#{args.join(' ')}`." ? ^ + raise "Got a non-zero exit code while calling out `#{args.join(' ')}`: #{output}" ? ^^^^^^^^^^^ end output.split("\n") end def base_args [ Gitlab.config.git.bin_path, "--git-dir=#{path_to_repo}", 'rev-list' ] end end end end
2
0.041667
1
1
c81ee500ab50df3a1a1ec1b1ad6e3afc4d86014a
src/css/dgu-drupal.less
src/css/dgu-drupal.less
/* LESS file for Drupal styles. If you have shared drupal/ckan styles consider moving them to dgu-shared.less . */
/* LESS file for Drupal styles. If you have shared drupal/ckan styles consider moving them to dgu-shared.less . */ body { padding-top: 0; // Remove the inherited whitespace above the body from style.css in bootstrap theme. }
Remove top whitespace above body in drupal.
Remove top whitespace above body in drupal.
Less
mit
datagovuk/shared_dguk_assets,ratajczak/shared_dguk_assets
less
## Code Before: /* LESS file for Drupal styles. If you have shared drupal/ckan styles consider moving them to dgu-shared.less . */ ## Instruction: Remove top whitespace above body in drupal. ## Code After: /* LESS file for Drupal styles. If you have shared drupal/ckan styles consider moving them to dgu-shared.less . */ body { padding-top: 0; // Remove the inherited whitespace above the body from style.css in bootstrap theme. }
/* LESS file for Drupal styles. If you have shared drupal/ckan styles consider moving them to dgu-shared.less . */ + + + body { + padding-top: 0; // Remove the inherited whitespace above the body from style.css in bootstrap theme. + }
5
1.25
5
0
20827daa0ae19c53da62f8937ee66c2dff78e53b
src/swestcott/MonologExtension/Context/Initializer/MonologInitializer.php
src/swestcott/MonologExtension/Context/Initializer/MonologInitializer.php
<?php namespace swestcott\MonologExtension\Context\Initializer; use Behat\Behat\Context\Initializer\InitializerInterface, Behat\Behat\Context\ContextInterface; class MonologInitializer implements InitializerInterface { private $container; public function __construct($container) { $this->container = $container; } public function initialize(ContextInterface $context) { $loggerName = $this->container->getParameter('behat.monolog.logger_name'); $class = $this->container->getParameter('behat.monolog.service.class'); $def = $this->container->getDefinition('behat.monolog.logger'); $def->addArgument(get_class($context)); $logger = $this->container->get('behat.monolog.logger'); $handlers = $this->container->getParameter('behat.monolog.handlers'); // Register each configured handler with logger foreach($handlers as $name) { $handler = $this->container->get($name); $logger->pushHandler($handler); } $context->$loggerName = $logger; } public function supports(ContextInterface $context) { return get_class($context) === $this->container->getParameter('behat.context.class'); } }
<?php namespace swestcott\MonologExtension\Context\Initializer; use Behat\Behat\Context\Initializer\InitializerInterface, Behat\Behat\Context\ContextInterface; class MonologInitializer implements InitializerInterface { private $container; public function __construct($container) { $this->container = $container; } public function initialize(ContextInterface $context) { $loggerName = $this->container->getParameter('behat.monolog.logger_name'); $class = $this->container->getParameter('behat.monolog.service.class'); $def = $this->container->getDefinition('behat.monolog.logger'); $def->addArgument(get_class($context)); $logger = $this->container->get('behat.monolog.logger'); $handlers = $this->container->getParameter('behat.monolog.handlers'); // Register each configured handler with logger foreach($handlers as $name) { $handler = $this->container->get($name); $logger->pushHandler($handler); } $context->$loggerName = $logger; } public function supports(ContextInterface $context) { return ($context instanceof BehatContext); } }
Add support for subcontexts too
Add support for subcontexts too
PHP
bsd-3-clause
swestcott/MonologExtension
php
## Code Before: <?php namespace swestcott\MonologExtension\Context\Initializer; use Behat\Behat\Context\Initializer\InitializerInterface, Behat\Behat\Context\ContextInterface; class MonologInitializer implements InitializerInterface { private $container; public function __construct($container) { $this->container = $container; } public function initialize(ContextInterface $context) { $loggerName = $this->container->getParameter('behat.monolog.logger_name'); $class = $this->container->getParameter('behat.monolog.service.class'); $def = $this->container->getDefinition('behat.monolog.logger'); $def->addArgument(get_class($context)); $logger = $this->container->get('behat.monolog.logger'); $handlers = $this->container->getParameter('behat.monolog.handlers'); // Register each configured handler with logger foreach($handlers as $name) { $handler = $this->container->get($name); $logger->pushHandler($handler); } $context->$loggerName = $logger; } public function supports(ContextInterface $context) { return get_class($context) === $this->container->getParameter('behat.context.class'); } } ## Instruction: Add support for subcontexts too ## Code After: <?php namespace swestcott\MonologExtension\Context\Initializer; use Behat\Behat\Context\Initializer\InitializerInterface, Behat\Behat\Context\ContextInterface; class MonologInitializer implements InitializerInterface { private $container; public function __construct($container) { $this->container = $container; } public function initialize(ContextInterface $context) { $loggerName = $this->container->getParameter('behat.monolog.logger_name'); $class = $this->container->getParameter('behat.monolog.service.class'); $def = $this->container->getDefinition('behat.monolog.logger'); $def->addArgument(get_class($context)); $logger = $this->container->get('behat.monolog.logger'); $handlers = $this->container->getParameter('behat.monolog.handlers'); // Register each configured handler with logger foreach($handlers as $name) { $handler = $this->container->get($name); $logger->pushHandler($handler); } $context->$loggerName = $logger; } public function supports(ContextInterface $context) { return ($context instanceof BehatContext); } }
<?php namespace swestcott\MonologExtension\Context\Initializer; use Behat\Behat\Context\Initializer\InitializerInterface, Behat\Behat\Context\ContextInterface; class MonologInitializer implements InitializerInterface { private $container; public function __construct($container) { $this->container = $container; } public function initialize(ContextInterface $context) { $loggerName = $this->container->getParameter('behat.monolog.logger_name'); $class = $this->container->getParameter('behat.monolog.service.class'); $def = $this->container->getDefinition('behat.monolog.logger'); $def->addArgument(get_class($context)); $logger = $this->container->get('behat.monolog.logger'); $handlers = $this->container->getParameter('behat.monolog.handlers'); // Register each configured handler with logger foreach($handlers as $name) { $handler = $this->container->get($name); $logger->pushHandler($handler); } $context->$loggerName = $logger; } public function supports(ContextInterface $context) { - return get_class($context) === $this->container->getParameter('behat.context.class'); + return ($context instanceof BehatContext); } }
2
0.04878
1
1
c53e4d751470c9bb881d9b1df420a9ae1f248381
config/routes.rb
config/routes.rb
require 'guides_front_end' Guides::Application.routes.draw do authenticate :user do match '/preview/:edition_id' => GuidesFrontEnd::Preview, :anchor => false, :as => :preview_edition_prefix end namespace :admin do resources :transactions do post :progress, :on => :member resources :editions end resources :answers do post :progress, :on => :member resources :editions end resources :guides do post :progress, :on => :member resources :editions end root :to => 'guides#index' end resources :audiences resources :guides, :only => [:show] match '/:path(/:part)', :to => GuidesFrontEnd::App end
require 'guides_front_end' Guides::Application.routes.draw do authenticate :user do match '/preview/:edition_id' => GuidesFrontEnd::Preview, :anchor => false, :as => :preview_edition_prefix end namespace :admin do resources :transactions do post :progress, :on => :member resources :editions end resources :answers do post :progress, :on => :member resources :editions end resources :guides do post :progress, :on => :member resources :editions end root :to => 'guides#index' end resources :audiences resources :guides, :only => [:show] match '/:path(/:part)', :to => GuidesFrontEnd::App, :constraints => {:path => /[^(auth)]/} end
Fix login bug that was introduced when we added the public front end
Fix login bug that was introduced when we added the public front end
Ruby
mit
alphagov/publisher,leftees/publisher,theodi/publisher,leftees/publisher,telekomatrix/publisher,telekomatrix/publisher,telekomatrix/publisher,theodi/publisher,leftees/publisher,leftees/publisher,theodi/publisher,theodi/publisher,alphagov/publisher,alphagov/publisher,telekomatrix/publisher
ruby
## Code Before: require 'guides_front_end' Guides::Application.routes.draw do authenticate :user do match '/preview/:edition_id' => GuidesFrontEnd::Preview, :anchor => false, :as => :preview_edition_prefix end namespace :admin do resources :transactions do post :progress, :on => :member resources :editions end resources :answers do post :progress, :on => :member resources :editions end resources :guides do post :progress, :on => :member resources :editions end root :to => 'guides#index' end resources :audiences resources :guides, :only => [:show] match '/:path(/:part)', :to => GuidesFrontEnd::App end ## Instruction: Fix login bug that was introduced when we added the public front end ## Code After: require 'guides_front_end' Guides::Application.routes.draw do authenticate :user do match '/preview/:edition_id' => GuidesFrontEnd::Preview, :anchor => false, :as => :preview_edition_prefix end namespace :admin do resources :transactions do post :progress, :on => :member resources :editions end resources :answers do post :progress, :on => :member resources :editions end resources :guides do post :progress, :on => :member resources :editions end root :to => 'guides#index' end resources :audiences resources :guides, :only => [:show] match '/:path(/:part)', :to => GuidesFrontEnd::App, :constraints => {:path => /[^(auth)]/} end
require 'guides_front_end' Guides::Application.routes.draw do authenticate :user do match '/preview/:edition_id' => GuidesFrontEnd::Preview, :anchor => false, :as => :preview_edition_prefix end namespace :admin do resources :transactions do post :progress, :on => :member resources :editions end resources :answers do post :progress, :on => :member resources :editions end resources :guides do post :progress, :on => :member resources :editions end root :to => 'guides#index' end resources :audiences resources :guides, :only => [:show] - - match '/:path(/:part)', :to => GuidesFrontEnd::App + + match '/:path(/:part)', :to => GuidesFrontEnd::App, :constraints => {:path => /[^(auth)]/} end
4
0.129032
2
2
f2352271c64797931d646a9dd0dd03db8a7651c8
src/Field/Auth/LoginField.php
src/Field/Auth/LoginField.php
<?php namespace ProcessWire\GraphQL\Field\Auth; use Youshido\GraphQL\Field\AbstractField; use Youshido\GraphQL\Config\Field\FieldConfig; use Youshido\GraphQL\Type\Scalar\StringType; use Youshido\GraphQL\Type\NonNullType; use Youshido\GraphQL\Execution\ResolveInfo; use ProcessWire\GraphQL\Type\Object\AuthResponseType; use ProcessWire\WireData; class LoginField extends AbstractField { public function getType() { return new NonNullType(new AuthResponseType()); } public function getName() { return 'login'; } public function getDescription() { return 'Allows you to authenticate into the app.'; } public function build(FieldConfig $config) { $config->addArgument('username', new NonNullType(new StringType())); $config->addArgument('password', new NonNullType(new StringType())); } public function resolve($value, array $args, ResolveInfo $info) { $session = \ProcessWire\wire('session'); $username = $args['username']; $password = $args['password']; $user = $session->login($username, $password); $response = new WireData(); if (is_null($user)) { $response->statusCode = 401; $response->message = 'Wrong username and/or password.'; } else { $response->statusCode = 200; $response->message = 'Successful login!'; } return $response; } }
<?php namespace ProcessWire\GraphQL\Field\Auth; use Youshido\GraphQL\Field\AbstractField; use Youshido\GraphQL\Config\Field\FieldConfig; use Youshido\GraphQL\Type\Scalar\StringType; use Youshido\GraphQL\Type\NonNullType; use Youshido\GraphQL\Execution\ResolveInfo; use ProcessWire\GraphQL\Type\Object\AuthResponseType; use ProcessWire\WireData; class LoginField extends AbstractField { public function getType() { return new NonNullType(new AuthResponseType()); } public function getName() { return 'login'; } public function getDescription() { return 'Allows you to authenticate into the app.'; } public function build(FieldConfig $config) { $config->addArgument('name', new NonNullType(new StringType())); $config->addArgument('pass', new NonNullType(new StringType())); } public function resolve($value, array $args, ResolveInfo $info) { $session = \ProcessWire\wire('session'); $username = $args['name']; $password = $args['pass']; $user = $session->login($username, $password); $response = new WireData(); if (is_null($user)) { $response->statusCode = 401; $response->message = 'Wrong username and/or password.'; } else { $response->statusCode = 200; $response->message = 'Successful login!'; } return $response; } }
Rename the login arguments to correspong ProcessWire api.
Rename the login arguments to correspong ProcessWire api.
PHP
mit
dadish/ProcessGraphQL,dadish/ProcessGraphQL
php
## Code Before: <?php namespace ProcessWire\GraphQL\Field\Auth; use Youshido\GraphQL\Field\AbstractField; use Youshido\GraphQL\Config\Field\FieldConfig; use Youshido\GraphQL\Type\Scalar\StringType; use Youshido\GraphQL\Type\NonNullType; use Youshido\GraphQL\Execution\ResolveInfo; use ProcessWire\GraphQL\Type\Object\AuthResponseType; use ProcessWire\WireData; class LoginField extends AbstractField { public function getType() { return new NonNullType(new AuthResponseType()); } public function getName() { return 'login'; } public function getDescription() { return 'Allows you to authenticate into the app.'; } public function build(FieldConfig $config) { $config->addArgument('username', new NonNullType(new StringType())); $config->addArgument('password', new NonNullType(new StringType())); } public function resolve($value, array $args, ResolveInfo $info) { $session = \ProcessWire\wire('session'); $username = $args['username']; $password = $args['password']; $user = $session->login($username, $password); $response = new WireData(); if (is_null($user)) { $response->statusCode = 401; $response->message = 'Wrong username and/or password.'; } else { $response->statusCode = 200; $response->message = 'Successful login!'; } return $response; } } ## Instruction: Rename the login arguments to correspong ProcessWire api. ## Code After: <?php namespace ProcessWire\GraphQL\Field\Auth; use Youshido\GraphQL\Field\AbstractField; use Youshido\GraphQL\Config\Field\FieldConfig; use Youshido\GraphQL\Type\Scalar\StringType; use Youshido\GraphQL\Type\NonNullType; use Youshido\GraphQL\Execution\ResolveInfo; use ProcessWire\GraphQL\Type\Object\AuthResponseType; use ProcessWire\WireData; class LoginField extends AbstractField { public function getType() { return new NonNullType(new AuthResponseType()); } public function getName() { return 'login'; } public function getDescription() { return 'Allows you to authenticate into the app.'; } public function build(FieldConfig $config) { $config->addArgument('name', new NonNullType(new StringType())); $config->addArgument('pass', new NonNullType(new StringType())); } public function resolve($value, array $args, ResolveInfo $info) { $session = \ProcessWire\wire('session'); $username = $args['name']; $password = $args['pass']; $user = $session->login($username, $password); $response = new WireData(); if (is_null($user)) { $response->statusCode = 401; $response->message = 'Wrong username and/or password.'; } else { $response->statusCode = 200; $response->message = 'Successful login!'; } return $response; } }
<?php namespace ProcessWire\GraphQL\Field\Auth; use Youshido\GraphQL\Field\AbstractField; use Youshido\GraphQL\Config\Field\FieldConfig; use Youshido\GraphQL\Type\Scalar\StringType; use Youshido\GraphQL\Type\NonNullType; use Youshido\GraphQL\Execution\ResolveInfo; use ProcessWire\GraphQL\Type\Object\AuthResponseType; use ProcessWire\WireData; class LoginField extends AbstractField { public function getType() { return new NonNullType(new AuthResponseType()); } public function getName() { return 'login'; } public function getDescription() { return 'Allows you to authenticate into the app.'; } public function build(FieldConfig $config) { - $config->addArgument('username', new NonNullType(new StringType())); ? ---- + $config->addArgument('name', new NonNullType(new StringType())); - $config->addArgument('password', new NonNullType(new StringType())); ? ---- + $config->addArgument('pass', new NonNullType(new StringType())); } public function resolve($value, array $args, ResolveInfo $info) { $session = \ProcessWire\wire('session'); - $username = $args['username']; ? ---- + $username = $args['name']; - $password = $args['password']; ? ---- + $password = $args['pass']; $user = $session->login($username, $password); $response = new WireData(); if (is_null($user)) { $response->statusCode = 401; $response->message = 'Wrong username and/or password.'; } else { $response->statusCode = 200; $response->message = 'Successful login!'; } return $response; } }
8
0.150943
4
4
cda76a556d5b408cbc3c434260f2b550aee4e754
packages/react-day-picker/src/hooks/useSelection/useSelectRange.ts
packages/react-day-picker/src/hooks/useSelection/useSelectRange.ts
import { useState } from 'react'; import { DayClickEventHandler, ModifierStatus, SelectMode } from '../../types'; import { DateRange } from '../../types/DateRange'; import { addToRange } from './utils/addToRange'; export type RangeSelectionHandler = (day: Date) => void; export type UseRangeSelect = { selected: DateRange | undefined; onDayClick: DayClickEventHandler; reset: () => void; }; export type UseRangeCallback = ( range: DateRange | undefined, day: Date, modifiers: ModifierStatus, e: React.MouseEvent ) => void; /** Hook to handle range selections. */ export function useRangeSelect( mode: SelectMode, defaultValue?: unknown, required = false, callback?: UseRangeCallback ): UseRangeSelect { const initialValue = mode === 'range' && defaultValue ? (defaultValue as DateRange) : undefined; const [selected, setSelected] = useState(initialValue); const onDayClick: DayClickEventHandler = (day, modifiers, e) => { setSelected((currentValue) => { const newValue = addToRange(day, currentValue, required); callback?.(newValue, day, modifiers, e); setSelected(newValue); return newValue; }); return; }; const reset = () => { setSelected(initialValue || undefined); }; return { selected, onDayClick, reset }; }
import { useState } from 'react'; import { DayClickEventHandler, ModifierStatus, SelectMode } from '../../types'; import { DateRange } from '../../types/DateRange'; import { addToRange } from './utils/addToRange'; export type UseRangeSelect = { selected: DateRange | undefined; onDayClick: DayClickEventHandler; reset: () => void; }; export type RangeSelectionHandler = ( range: DateRange | undefined, day: Date, modifiers: ModifierStatus, e: React.MouseEvent ) => void; /** Hook to handle range selections. */ export function useRangeSelect( mode: SelectMode, defaultValue?: unknown, required = false, callback?: RangeSelectionHandler ): UseRangeSelect { const initialValue = mode === 'range' && defaultValue ? (defaultValue as DateRange) : undefined; const [selected, setSelected] = useState(initialValue); const onDayClick: DayClickEventHandler = (day, modifiers, e) => { setSelected((currentValue) => { const newValue = addToRange(day, currentValue, required); callback?.(newValue, day, modifiers, e); setSelected(newValue); return newValue; }); return; }; const reset = () => { setSelected(initialValue || undefined); }; return { selected, onDayClick, reset }; }
Fix wrong type in callback
Fix wrong type in callback
TypeScript
mit
gpbl/react-day-picker,gpbl/react-day-picker,gpbl/react-day-picker
typescript
## Code Before: import { useState } from 'react'; import { DayClickEventHandler, ModifierStatus, SelectMode } from '../../types'; import { DateRange } from '../../types/DateRange'; import { addToRange } from './utils/addToRange'; export type RangeSelectionHandler = (day: Date) => void; export type UseRangeSelect = { selected: DateRange | undefined; onDayClick: DayClickEventHandler; reset: () => void; }; export type UseRangeCallback = ( range: DateRange | undefined, day: Date, modifiers: ModifierStatus, e: React.MouseEvent ) => void; /** Hook to handle range selections. */ export function useRangeSelect( mode: SelectMode, defaultValue?: unknown, required = false, callback?: UseRangeCallback ): UseRangeSelect { const initialValue = mode === 'range' && defaultValue ? (defaultValue as DateRange) : undefined; const [selected, setSelected] = useState(initialValue); const onDayClick: DayClickEventHandler = (day, modifiers, e) => { setSelected((currentValue) => { const newValue = addToRange(day, currentValue, required); callback?.(newValue, day, modifiers, e); setSelected(newValue); return newValue; }); return; }; const reset = () => { setSelected(initialValue || undefined); }; return { selected, onDayClick, reset }; } ## Instruction: Fix wrong type in callback ## Code After: import { useState } from 'react'; import { DayClickEventHandler, ModifierStatus, SelectMode } from '../../types'; import { DateRange } from '../../types/DateRange'; import { addToRange } from './utils/addToRange'; export type UseRangeSelect = { selected: DateRange | undefined; onDayClick: DayClickEventHandler; reset: () => void; }; export type RangeSelectionHandler = ( range: DateRange | undefined, day: Date, modifiers: ModifierStatus, e: React.MouseEvent ) => void; /** Hook to handle range selections. */ export function useRangeSelect( mode: SelectMode, defaultValue?: unknown, required = false, callback?: RangeSelectionHandler ): UseRangeSelect { const initialValue = mode === 'range' && defaultValue ? (defaultValue as DateRange) : undefined; const [selected, setSelected] = useState(initialValue); const onDayClick: DayClickEventHandler = (day, modifiers, e) => { setSelected((currentValue) => { const newValue = addToRange(day, currentValue, required); callback?.(newValue, day, modifiers, e); setSelected(newValue); return newValue; }); return; }; const reset = () => { setSelected(initialValue || undefined); }; return { selected, onDayClick, reset }; }
import { useState } from 'react'; import { DayClickEventHandler, ModifierStatus, SelectMode } from '../../types'; import { DateRange } from '../../types/DateRange'; import { addToRange } from './utils/addToRange'; - - export type RangeSelectionHandler = (day: Date) => void; export type UseRangeSelect = { selected: DateRange | undefined; onDayClick: DayClickEventHandler; reset: () => void; }; - export type UseRangeCallback = ( + export type RangeSelectionHandler = ( range: DateRange | undefined, day: Date, modifiers: ModifierStatus, e: React.MouseEvent ) => void; /** Hook to handle range selections. */ export function useRangeSelect( mode: SelectMode, defaultValue?: unknown, required = false, - callback?: UseRangeCallback + callback?: RangeSelectionHandler ): UseRangeSelect { const initialValue = mode === 'range' && defaultValue ? (defaultValue as DateRange) : undefined; const [selected, setSelected] = useState(initialValue); const onDayClick: DayClickEventHandler = (day, modifiers, e) => { setSelected((currentValue) => { const newValue = addToRange(day, currentValue, required); callback?.(newValue, day, modifiers, e); setSelected(newValue); return newValue; }); return; }; const reset = () => { setSelected(initialValue || undefined); }; return { selected, onDayClick, reset }; }
6
0.122449
2
4
7dd4490e47a5348d3f5c6e05946f84666eceaec7
test/CodeGenCXX/value-init.cpp
test/CodeGenCXX/value-init.cpp
// RUN: %clang_cc1 %s -triple x86_64-apple-darwin10 -emit-llvm -o - | FileCheck %s struct A { virtual ~A(); }; struct B : A { }; struct C { int i; B b; }; // CHECK: _Z15test_value_initv void test_value_init() { // This value initialization requires zero initialization of the 'B' // subobject followed by a call to its constructor. // PR5800 // CHECK: store i32 17 // CHECK: call void @llvm.memset.i64 // CHECK: call void @_ZN1BC1Ev(%struct.A* %tmp1) C c = { 17 } ; // CHECK: call void @_ZN1CD1Ev(%struct.C* %c) }
// RUN: %clang_cc1 %s -triple x86_64-apple-darwin10 -emit-llvm -o - | FileCheck %s struct A { virtual ~A(); }; struct B : A { }; struct C { int i; B b; }; // CHECK: _Z15test_value_initv void test_value_init() { // This value initialization requires zero initialization of the 'B' // subobject followed by a call to its constructor. // PR5800 // CHECK: store i32 17 // CHECK: call void @llvm.memset.i64 // CHECK: call void @_ZN1BC1Ev C c = { 17 } ; // CHECK: call void @_ZN1CD1Ev }
Fix test case to unbreak testing
Fix test case to unbreak testing git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@91551 91177308-0d34-0410-b5e6-96231b3b80d8
C++
apache-2.0
apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang
c++
## Code Before: // RUN: %clang_cc1 %s -triple x86_64-apple-darwin10 -emit-llvm -o - | FileCheck %s struct A { virtual ~A(); }; struct B : A { }; struct C { int i; B b; }; // CHECK: _Z15test_value_initv void test_value_init() { // This value initialization requires zero initialization of the 'B' // subobject followed by a call to its constructor. // PR5800 // CHECK: store i32 17 // CHECK: call void @llvm.memset.i64 // CHECK: call void @_ZN1BC1Ev(%struct.A* %tmp1) C c = { 17 } ; // CHECK: call void @_ZN1CD1Ev(%struct.C* %c) } ## Instruction: Fix test case to unbreak testing git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@91551 91177308-0d34-0410-b5e6-96231b3b80d8 ## Code After: // RUN: %clang_cc1 %s -triple x86_64-apple-darwin10 -emit-llvm -o - | FileCheck %s struct A { virtual ~A(); }; struct B : A { }; struct C { int i; B b; }; // CHECK: _Z15test_value_initv void test_value_init() { // This value initialization requires zero initialization of the 'B' // subobject followed by a call to its constructor. // PR5800 // CHECK: store i32 17 // CHECK: call void @llvm.memset.i64 // CHECK: call void @_ZN1BC1Ev C c = { 17 } ; // CHECK: call void @_ZN1CD1Ev }
// RUN: %clang_cc1 %s -triple x86_64-apple-darwin10 -emit-llvm -o - | FileCheck %s struct A { virtual ~A(); }; struct B : A { }; struct C { int i; B b; }; // CHECK: _Z15test_value_initv void test_value_init() { // This value initialization requires zero initialization of the 'B' // subobject followed by a call to its constructor. // PR5800 // CHECK: store i32 17 // CHECK: call void @llvm.memset.i64 - // CHECK: call void @_ZN1BC1Ev(%struct.A* %tmp1) ? ------------------ + // CHECK: call void @_ZN1BC1Ev C c = { 17 } ; - // CHECK: call void @_ZN1CD1Ev(%struct.C* %c) ? --------------- + // CHECK: call void @_ZN1CD1Ev }
4
0.16
2
2
3171ecc4ced3794fdb1429b8d9103563d9982c21
app/views/api_keys/index.html.erb
app/views/api_keys/index.html.erb
<h3>Registered API Keys</h3> <table class="table table-striped"> <thead> <tr> <th>Key String</th> <th>App Name</th> <th>GitHub</th> <th>Owner</th> <th>Created</th> <th colspan="2"></th> </tr> </thead> <tbody> <% @keys.each do |key| %> <tr> <td><%= key.key %></td> <td><%= key.app_name %></td> <td><%= link_to "Repo", key.github_link %></td> <td> <% if key.user %> <%= key.user.username %> <% else %> <em>(No owner)</em> <% end %> </td> <td><%= time_ago_in_words(key.created_at) %> ago</td> <td><%= link_to "Edit", url_for(:controller => :api_keys, :action => :edit, :id => key.id) %></td> <td><%= link_to "Revoke write tokens", url_for(:controller => :api_keys, :action => :revoke_write_tokens, :id => key.id), :method => :delete, :class => "text text-danger", data: { confirm: 'Are you sure?' } %></td> </tr> <% end %> </tbody> </table>
<h3>Registered API Keys</h3> <table class="table table-striped"> <thead> <tr> <th>Key String</th> <th>App Name</th> <th>GitHub</th> <th>Owner</th> <th>Created</th> <th colspan="2"></th> </tr> </thead> <tbody> <% @keys.each do |key| %> <tr> <td><%= key.key %></td> <td><%= key.app_name %></td> <td><%= link_to "Repo", key.github_link %></td> <td> <% if key.user %> <%= key.user.username %> <% else %> <em>(No owner)</em> <% end %> </td> <td><%= time_ago_in_words(key.created_at) %> ago</td> <td><%= link_to "Edit", url_for(:controller => :api_keys, :action => :edit, :id => key.id) %></td> <td><%= link_to "Revoke write tokens", url_for(:controller => :api_keys, :action => :revoke_write_tokens, :id => key.id), :method => :delete, :class => "text text-danger", data: { confirm: 'Are you sure?' } %></td> </tr> <% end %> </tbody> </table> <%= link_to "New API key", admin_new_key_url %>
Add link to new API key
Add link to new API key
HTML+ERB
cc0-1.0
angussidney/metasmoke,j-f1/forked-metasmoke,j-f1/forked-metasmoke,angussidney/metasmoke,Charcoal-SE/metasmoke,SulphurDioxide/metasmoke,Charcoal-SE/metasmoke,j-f1/forked-metasmoke,j-f1/forked-metasmoke,angussidney/metasmoke,angussidney/metasmoke,Charcoal-SE/metasmoke,Charcoal-SE/metasmoke,SulphurDioxide/metasmoke,SulphurDioxide/metasmoke
html+erb
## Code Before: <h3>Registered API Keys</h3> <table class="table table-striped"> <thead> <tr> <th>Key String</th> <th>App Name</th> <th>GitHub</th> <th>Owner</th> <th>Created</th> <th colspan="2"></th> </tr> </thead> <tbody> <% @keys.each do |key| %> <tr> <td><%= key.key %></td> <td><%= key.app_name %></td> <td><%= link_to "Repo", key.github_link %></td> <td> <% if key.user %> <%= key.user.username %> <% else %> <em>(No owner)</em> <% end %> </td> <td><%= time_ago_in_words(key.created_at) %> ago</td> <td><%= link_to "Edit", url_for(:controller => :api_keys, :action => :edit, :id => key.id) %></td> <td><%= link_to "Revoke write tokens", url_for(:controller => :api_keys, :action => :revoke_write_tokens, :id => key.id), :method => :delete, :class => "text text-danger", data: { confirm: 'Are you sure?' } %></td> </tr> <% end %> </tbody> </table> ## Instruction: Add link to new API key ## Code After: <h3>Registered API Keys</h3> <table class="table table-striped"> <thead> <tr> <th>Key String</th> <th>App Name</th> <th>GitHub</th> <th>Owner</th> <th>Created</th> <th colspan="2"></th> </tr> </thead> <tbody> <% @keys.each do |key| %> <tr> <td><%= key.key %></td> <td><%= key.app_name %></td> <td><%= link_to "Repo", key.github_link %></td> <td> <% if key.user %> <%= key.user.username %> <% else %> <em>(No owner)</em> <% end %> </td> <td><%= time_ago_in_words(key.created_at) %> ago</td> <td><%= link_to "Edit", url_for(:controller => :api_keys, :action => :edit, :id => key.id) %></td> <td><%= link_to "Revoke write tokens", url_for(:controller => :api_keys, :action => :revoke_write_tokens, :id => key.id), :method => :delete, :class => "text text-danger", data: { confirm: 'Are you sure?' } %></td> </tr> <% end %> </tbody> </table> <%= link_to "New API key", admin_new_key_url %>
<h3>Registered API Keys</h3> <table class="table table-striped"> <thead> <tr> <th>Key String</th> <th>App Name</th> <th>GitHub</th> <th>Owner</th> <th>Created</th> <th colspan="2"></th> </tr> </thead> <tbody> <% @keys.each do |key| %> <tr> <td><%= key.key %></td> <td><%= key.app_name %></td> <td><%= link_to "Repo", key.github_link %></td> <td> <% if key.user %> <%= key.user.username %> <% else %> <em>(No owner)</em> <% end %> </td> <td><%= time_ago_in_words(key.created_at) %> ago</td> <td><%= link_to "Edit", url_for(:controller => :api_keys, :action => :edit, :id => key.id) %></td> <td><%= link_to "Revoke write tokens", url_for(:controller => :api_keys, :action => :revoke_write_tokens, :id => key.id), :method => :delete, :class => "text text-danger", data: { confirm: 'Are you sure?' } %></td> </tr> <% end %> </tbody> </table> + + <%= link_to "New API key", admin_new_key_url %>
2
0.060606
2
0
960933d2e1c14924c98741c5edbcc4c7a6417a2c
README.md
README.md
Mac Provision ================ My Mac provisioner made by Ansible. ## Usage (For my information) Mainly Ansible usage. ### Ping ``` $ ansible localhost -m ping -i hosts ``` If appropriately configured in ansible.cfg: ``` $ ansible localhost -m ping ``` ### Run playbook ``` $ ansible-playbook base.yml ``` ### GATHERING FACTS... ``` $ ansible -m setup localhost ``` Output variables can be used in playbooks. ## Notes .plist of Application settings are created only after first up! So we have to up iTerm2 etc. by hand before configure.... ## Safari Extension Unfortunately, there's no way to install safari extensions by script. Please install by your hand. * Adblock Plus * Save to Pocket * Evernote Web Clipper * Hatena Bookmark * Pin It button * FormatLink * Retab
Mac Provision ================ My Mac provisioner made by Ansible. ## Usage (For my information) Mainly Ansible usage. ### Ping ``` $ ansible localhost -m ping -i hosts ``` If appropriately configured in ansible.cfg: ``` $ ansible localhost -m ping ``` ### Run playbook ``` $ ansible-playbook base.yml ``` ### GATHERING FACTS... ``` $ ansible -m setup localhost ``` Output variables can be used in playbooks. ## Manual Configuration ### Use bash4 as login shell ``` sudo bash -c 'echo /usr/local/bin/bash >> /etc/shells' chsh -s /usr/local/bin/bash ``` ## Notes .plist of Application settings are created only after first up! So we have to up iTerm2 etc. by hand before configure.... ## Safari Extension Unfortunately, there's no way to install safari extensions by script. Please install by your hand. * Adblock Plus * Save to Pocket * Evernote Web Clipper * Hatena Bookmark * Pin It button * FormatLink * Retab
Add manual configuration of default shell
Add manual configuration of default shell
Markdown
mit
ikuwow/mac-provision
markdown
## Code Before: Mac Provision ================ My Mac provisioner made by Ansible. ## Usage (For my information) Mainly Ansible usage. ### Ping ``` $ ansible localhost -m ping -i hosts ``` If appropriately configured in ansible.cfg: ``` $ ansible localhost -m ping ``` ### Run playbook ``` $ ansible-playbook base.yml ``` ### GATHERING FACTS... ``` $ ansible -m setup localhost ``` Output variables can be used in playbooks. ## Notes .plist of Application settings are created only after first up! So we have to up iTerm2 etc. by hand before configure.... ## Safari Extension Unfortunately, there's no way to install safari extensions by script. Please install by your hand. * Adblock Plus * Save to Pocket * Evernote Web Clipper * Hatena Bookmark * Pin It button * FormatLink * Retab ## Instruction: Add manual configuration of default shell ## Code After: Mac Provision ================ My Mac provisioner made by Ansible. ## Usage (For my information) Mainly Ansible usage. ### Ping ``` $ ansible localhost -m ping -i hosts ``` If appropriately configured in ansible.cfg: ``` $ ansible localhost -m ping ``` ### Run playbook ``` $ ansible-playbook base.yml ``` ### GATHERING FACTS... ``` $ ansible -m setup localhost ``` Output variables can be used in playbooks. ## Manual Configuration ### Use bash4 as login shell ``` sudo bash -c 'echo /usr/local/bin/bash >> /etc/shells' chsh -s /usr/local/bin/bash ``` ## Notes .plist of Application settings are created only after first up! So we have to up iTerm2 etc. by hand before configure.... ## Safari Extension Unfortunately, there's no way to install safari extensions by script. Please install by your hand. * Adblock Plus * Save to Pocket * Evernote Web Clipper * Hatena Bookmark * Pin It button * FormatLink * Retab
Mac Provision ================ My Mac provisioner made by Ansible. ## Usage (For my information) Mainly Ansible usage. ### Ping ``` $ ansible localhost -m ping -i hosts ``` If appropriately configured in ansible.cfg: ``` $ ansible localhost -m ping ``` ### Run playbook ``` $ ansible-playbook base.yml ``` ### GATHERING FACTS... ``` $ ansible -m setup localhost ``` Output variables can be used in playbooks. + ## Manual Configuration + + ### Use bash4 as login shell + + ``` + sudo bash -c 'echo /usr/local/bin/bash >> /etc/shells' + chsh -s /usr/local/bin/bash + ``` + ## Notes .plist of Application settings are created only after first up! So we have to up iTerm2 etc. by hand before configure.... ## Safari Extension Unfortunately, there's no way to install safari extensions by script. Please install by your hand. * Adblock Plus * Save to Pocket * Evernote Web Clipper * Hatena Bookmark * Pin It button * FormatLink * Retab
9
0.160714
9
0
93edf7069453365001ade669aa76b5b429f28484
docs/usage/rest/conferences.rst
docs/usage/rest/conferences.rst
============= Conferences ============= List All Conferences ==================== .. code-block:: php $client = new Services_Twilio('AC123', '123'); foreach ($client->account->conferences as $conference) { print $conference->friendly_name; } For a full list of properties available on a conference, as well as a full list of ways to filter a conference, please see the `Conference API Documentation <http://www.twilio.com/docs/api/rest/conference>`_ on our website. Filter Conferences by Status ============================ .. code-block:: php $client = new Services_Twilio('AC123', '123'); foreach ($client->account->conferences->getIterator(0, 50, array( 'Status' => 'in-progress' )) as $conf) { print $conf->sid; } Mute all participants ===================== .. code-block:: php $sid = "CO119231312"; $client = new Services_Twilio('AC123', '123'); $conference = $client->account->conferences->get($sid); $participants = $conference->getPage(0, 50); foreach ($participants as $p) { $p->mute(); }
============= Conferences ============= List All Conferences ==================== .. code-block:: php $client = new Services_Twilio('AC123', '123'); foreach ($client->account->conferences as $conference) { print $conference->friendly_name; } For a full list of properties available on a conference, as well as a full list of ways to filter a conference, please see the `Conference API Documentation <http://www.twilio.com/docs/api/rest/conference>`_ on our website. Filter Conferences by Status ============================ .. code-block:: php $client = new Services_Twilio('AC123', '123'); foreach ($client->account->conferences->getIterator(0, 50, array( 'Status' => 'in-progress' )) as $conf) { print $conf->sid; } Mute all participants ===================== At the moment, using an iterator directly will cause this method to infinitely loop. Instead, use the getPage function. As conferences are limited to 40 participants, getPage(0, 50) should return a list of every participant in a conference. .. code-block:: php $sid = "CO119231312"; $client = new Services_Twilio('AC123', '123'); $conference = $client->account->conferences->get($sid); $page = $conference->getPage(0, 50); $participants = $page->participants; foreach ($participants as $p) { $p->mute(); }
Add working conference participants example
Add working conference participants example
reStructuredText
mit
Git-Host/twilio-php,javierwilson/twilio-php,twilio/twilio-php,FTrubitz/twilio-php,pablophg/twilio-php,sayan801/twilio-php,beachboysapp/urgentMe,MartinAmps/twilio-php,achoe/twilio-php,beachboysapp/urgentMe
restructuredtext
## Code Before: ============= Conferences ============= List All Conferences ==================== .. code-block:: php $client = new Services_Twilio('AC123', '123'); foreach ($client->account->conferences as $conference) { print $conference->friendly_name; } For a full list of properties available on a conference, as well as a full list of ways to filter a conference, please see the `Conference API Documentation <http://www.twilio.com/docs/api/rest/conference>`_ on our website. Filter Conferences by Status ============================ .. code-block:: php $client = new Services_Twilio('AC123', '123'); foreach ($client->account->conferences->getIterator(0, 50, array( 'Status' => 'in-progress' )) as $conf) { print $conf->sid; } Mute all participants ===================== .. code-block:: php $sid = "CO119231312"; $client = new Services_Twilio('AC123', '123'); $conference = $client->account->conferences->get($sid); $participants = $conference->getPage(0, 50); foreach ($participants as $p) { $p->mute(); } ## Instruction: Add working conference participants example ## Code After: ============= Conferences ============= List All Conferences ==================== .. code-block:: php $client = new Services_Twilio('AC123', '123'); foreach ($client->account->conferences as $conference) { print $conference->friendly_name; } For a full list of properties available on a conference, as well as a full list of ways to filter a conference, please see the `Conference API Documentation <http://www.twilio.com/docs/api/rest/conference>`_ on our website. Filter Conferences by Status ============================ .. code-block:: php $client = new Services_Twilio('AC123', '123'); foreach ($client->account->conferences->getIterator(0, 50, array( 'Status' => 'in-progress' )) as $conf) { print $conf->sid; } Mute all participants ===================== At the moment, using an iterator directly will cause this method to infinitely loop. Instead, use the getPage function. As conferences are limited to 40 participants, getPage(0, 50) should return a list of every participant in a conference. .. code-block:: php $sid = "CO119231312"; $client = new Services_Twilio('AC123', '123'); $conference = $client->account->conferences->get($sid); $page = $conference->getPage(0, 50); $participants = $page->participants; foreach ($participants as $p) { $p->mute(); }
============= Conferences ============= List All Conferences ==================== .. code-block:: php $client = new Services_Twilio('AC123', '123'); foreach ($client->account->conferences as $conference) { print $conference->friendly_name; } For a full list of properties available on a conference, as well as a full list of ways to filter a conference, please see the `Conference API Documentation <http://www.twilio.com/docs/api/rest/conference>`_ on our website. Filter Conferences by Status ============================ .. code-block:: php $client = new Services_Twilio('AC123', '123'); foreach ($client->account->conferences->getIterator(0, 50, array( 'Status' => 'in-progress' )) as $conf) { print $conf->sid; } Mute all participants ===================== + At the moment, using an iterator directly will cause this method to infinitely + loop. Instead, use the getPage function. As conferences are limited to 40 + participants, getPage(0, 50) should return a list of every participant in + a conference. + .. code-block:: php $sid = "CO119231312"; $client = new Services_Twilio('AC123', '123'); $conference = $client->account->conferences->get($sid); - $participants = $conference->getPage(0, 50); ? ^^^^^^^^^^ + $page = $conference->getPage(0, 50); ? ^^ + $participants = $page->participants; foreach ($participants as $p) { $p->mute(); }
8
0.190476
7
1
6c1dc3fcfbb00818f1ea0c2c3381b9bc27c2a8fe
features/modulus11.feature
features/modulus11.feature
Feature: Modulus 11 Checking Background: Given I create a new checker Scenario: 2) Pass modulus 11 check Given I have a sort code 107999 And I have an account number 88837491 Then the modulus is MOD11 And the combination is valid Scenario: 30) Fail modulus 11 check Given I have a sort code 107999 And I have an account number 88837493
Feature: Modulus 11 Checking Background: Given I create a new checker Scenario: 2) Pass modulus 11 check Given I have a sort code 107999 And I have an account number 88837491 Then the modulus is MOD11 And the combination is valid Scenario: 30) Fail modulus 11 check Given I have a sort code 107999 And I have an account number 88837493 Then the modulus is MOD11 And the combination is invalid
Update test to check that invalid combinations are detected
Update test to check that invalid combinations are detected
Cucumber
bsd-2-clause
ball-hayden/uk_account_validator
cucumber
## Code Before: Feature: Modulus 11 Checking Background: Given I create a new checker Scenario: 2) Pass modulus 11 check Given I have a sort code 107999 And I have an account number 88837491 Then the modulus is MOD11 And the combination is valid Scenario: 30) Fail modulus 11 check Given I have a sort code 107999 And I have an account number 88837493 ## Instruction: Update test to check that invalid combinations are detected ## Code After: Feature: Modulus 11 Checking Background: Given I create a new checker Scenario: 2) Pass modulus 11 check Given I have a sort code 107999 And I have an account number 88837491 Then the modulus is MOD11 And the combination is valid Scenario: 30) Fail modulus 11 check Given I have a sort code 107999 And I have an account number 88837493 Then the modulus is MOD11 And the combination is invalid
Feature: Modulus 11 Checking Background: Given I create a new checker Scenario: 2) Pass modulus 11 check Given I have a sort code 107999 And I have an account number 88837491 Then the modulus is MOD11 And the combination is valid Scenario: 30) Fail modulus 11 check Given I have a sort code 107999 And I have an account number 88837493 + + Then the modulus is MOD11 + And the combination is invalid
3
0.2
3
0
3bb25ff6053f6ea0ce124a7fdfa804f15631ede9
grunt/config/copy.js
grunt/config/copy.js
module.exports = { docs: { files: [ { src: ['css/**/*'], dest: 'docs/public/' }, { src: ['img/**/*'], dest: 'docs/public/' } ] } };
module.exports = { docs: { files: [ { src: ['css/**/*'], dest: 'docs/public/' }, { src: ['img/**/*'], dest: 'docs/public/' }, { src: ['js/**/*'], dest: 'docs/public/' } ] } };
Copy the JS to the docs dir
Copy the JS to the docs dir
JavaScript
agpl-3.0
FiviumAustralia/OpenEyes,FiviumAustralia/OpenEyes,FiviumAustralia/OpenEyes,FiviumAustralia/OpenEyes,FiviumAustralia/OpenEyes
javascript
## Code Before: module.exports = { docs: { files: [ { src: ['css/**/*'], dest: 'docs/public/' }, { src: ['img/**/*'], dest: 'docs/public/' } ] } }; ## Instruction: Copy the JS to the docs dir ## Code After: module.exports = { docs: { files: [ { src: ['css/**/*'], dest: 'docs/public/' }, { src: ['img/**/*'], dest: 'docs/public/' }, { src: ['js/**/*'], dest: 'docs/public/' } ] } };
module.exports = { docs: { files: [ { src: ['css/**/*'], dest: 'docs/public/' }, { src: ['img/**/*'], dest: 'docs/public/' + }, + { + src: ['js/**/*'], + dest: 'docs/public/' } ] } };
4
0.285714
4
0
1f1270349460047ca5a53c89328d081b97017c44
test/helpers/xhr_stubbing/xhr_stubbing.js
test/helpers/xhr_stubbing/xhr_stubbing.js
var installAjax = function () { if (!stubAjax) return; jasmine.Ajax.install(); }; var uninstallAjax = function () { if (!stubAjax) return; jasmine.Ajax.uninstall(); }; var expectResponse = function (response) { if (!stubAjax) return; jasmine.Ajax.requests.mostRecent().respondWith(response); }; window.responses = {};
var installAjax = function () { if (!stubAjax) return; jasmine.Ajax.install(); }; var uninstallAjax = function () { if (!stubAjax) return; jasmine.Ajax.uninstall(); }; var expectResponse = function (response) { if (!stubAjax) return; jasmine.Ajax.requests.mostRecent().respondWith(response); }; var urlRegex = /^(?:([A-Za-z]+):)?(\/{0,3})([0-9.\-A-Za-z]+)(?::(\d+))?(?:\/([^?#]*))?(?:\?([^#]*))?(?:#(.*))?$/; var parseUrl = function (url) { var result = urlRegex.exec(url); var names = ['url', 'scheme', 'slash', 'host', 'port', 'path', 'query', 'hash']; var output = {}; names.forEach(function (name, i) { if (name === "query") { output[name] = parseQueryString(result[i]); } else { output[name] = result[i]; } }); return output; }; var parseQueryString = function (queryString) { var output = { _originalQueryString: queryString }; if (!queryString) return output; queryString .split("&") .map(function (queryPortion) { return queryPortion.split("="); }) .forEach(function (queryPortion) { var attr = unescape(queryPortion[0]); var val = unescape(queryPortion[1]); if (!attr || !val) return; output[attr] = val; }); return output; }; window.responses = {};
Add xhr parsing helper methods
Add xhr parsing helper methods
JavaScript
mit
ideal-postcodes/ideal-postcodes-core,ideal-postcodes/ideal-postcodes-core,ideal-postcodes/ideal-postcodes-core
javascript
## Code Before: var installAjax = function () { if (!stubAjax) return; jasmine.Ajax.install(); }; var uninstallAjax = function () { if (!stubAjax) return; jasmine.Ajax.uninstall(); }; var expectResponse = function (response) { if (!stubAjax) return; jasmine.Ajax.requests.mostRecent().respondWith(response); }; window.responses = {}; ## Instruction: Add xhr parsing helper methods ## Code After: var installAjax = function () { if (!stubAjax) return; jasmine.Ajax.install(); }; var uninstallAjax = function () { if (!stubAjax) return; jasmine.Ajax.uninstall(); }; var expectResponse = function (response) { if (!stubAjax) return; jasmine.Ajax.requests.mostRecent().respondWith(response); }; var urlRegex = /^(?:([A-Za-z]+):)?(\/{0,3})([0-9.\-A-Za-z]+)(?::(\d+))?(?:\/([^?#]*))?(?:\?([^#]*))?(?:#(.*))?$/; var parseUrl = function (url) { var result = urlRegex.exec(url); var names = ['url', 'scheme', 'slash', 'host', 'port', 'path', 'query', 'hash']; var output = {}; names.forEach(function (name, i) { if (name === "query") { output[name] = parseQueryString(result[i]); } else { output[name] = result[i]; } }); return output; }; var parseQueryString = function (queryString) { var output = { _originalQueryString: queryString }; if (!queryString) return output; queryString .split("&") .map(function (queryPortion) { return queryPortion.split("="); }) .forEach(function (queryPortion) { var attr = unescape(queryPortion[0]); var val = unescape(queryPortion[1]); if (!attr || !val) return; output[attr] = val; }); return output; }; window.responses = {};
var installAjax = function () { if (!stubAjax) return; jasmine.Ajax.install(); }; var uninstallAjax = function () { if (!stubAjax) return; jasmine.Ajax.uninstall(); }; var expectResponse = function (response) { if (!stubAjax) return; jasmine.Ajax.requests.mostRecent().respondWith(response); }; + var urlRegex = /^(?:([A-Za-z]+):)?(\/{0,3})([0-9.\-A-Za-z]+)(?::(\d+))?(?:\/([^?#]*))?(?:\?([^#]*))?(?:#(.*))?$/; + + var parseUrl = function (url) { + var result = urlRegex.exec(url); + var names = ['url', 'scheme', 'slash', 'host', 'port', 'path', 'query', 'hash']; + var output = {}; + names.forEach(function (name, i) { + if (name === "query") { + output[name] = parseQueryString(result[i]); + } else { + output[name] = result[i]; + } + }); + return output; + }; + + var parseQueryString = function (queryString) { + var output = { + _originalQueryString: queryString + }; + if (!queryString) return output; + queryString + .split("&") + .map(function (queryPortion) { + return queryPortion.split("="); + }) + .forEach(function (queryPortion) { + var attr = unescape(queryPortion[0]); + var val = unescape(queryPortion[1]); + if (!attr || !val) return; + output[attr] = val; + }); + return output; + }; + window.responses = {};
35
2.1875
35
0
2b933faaf2f9aba9158d56c49367e423ea1a2ea3
pelican/plugins/related_posts.py
pelican/plugins/related_posts.py
from pelican import signals """ Related posts plugin for Pelican ================================ Adds related_posts variable to article's context """ related_posts = [] def add_related_posts(generator, metadata): if 'tags' in metadata: for tag in metadata['tags']: #print tag for related_article in generator.tags[tag]: related_posts.append(related_article) if len(related_posts) < 1: return relation_score = dict( \ zip(set(related_posts), \ map(related_posts.count, \ set(related_posts)))) ranked_related = sorted(relation_score, key=relation_score.get) metadata["related_posts"] = ranked_related[:5] else: return def register(): signals.article_generate_context.connect(add_related_posts)
from pelican import signals """ Related posts plugin for Pelican ================================ Adds related_posts variable to article's context Settings -------- To enable, add from pelican.plugins import related_posts PLUGINS = [related_posts] to your settings.py. Usage ----- {% if article.related_posts %} <ul> {% for related_post in article.related_posts %} <li>{{ related_post }}</li> {% endfor %} </ul> {% endif %} """ related_posts = [] def add_related_posts(generator, metadata): if 'tags' in metadata: for tag in metadata['tags']: #print tag for related_article in generator.tags[tag]: related_posts.append(related_article) if len(related_posts) < 1: return relation_score = dict( \ zip(set(related_posts), \ map(related_posts.count, \ set(related_posts)))) ranked_related = sorted(relation_score, key=relation_score.get) metadata["related_posts"] = ranked_related[:5] else: return def register(): signals.article_generate_context.connect(add_related_posts)
Add usage and intallation instructions
Add usage and intallation instructions
Python
agpl-3.0
alexras/pelican,HyperGroups/pelican,jvehent/pelican,11craft/pelican,51itclub/pelican,number5/pelican,avaris/pelican,treyhunner/pelican,number5/pelican,deved69/pelican-1,lazycoder-ru/pelican,Polyconseil/pelican,simonjj/pelican,ehashman/pelican,koobs/pelican,florianjacob/pelican,joetboole/pelican,sunzhongwei/pelican,GiovanniMoretti/pelican,Summonee/pelican,Scheirle/pelican,rbarraud/pelican,jimperio/pelican,karlcow/pelican,ls2uper/pelican,lazycoder-ru/pelican,janaurka/git-debug-presentiation,catdog2/pelican,GiovanniMoretti/pelican,JeremyMorgan/pelican,zackw/pelican,levanhien8/pelican,levanhien8/pelican,jimperio/pelican,ehashman/pelican,liyonghelpme/myBlog,liyonghelpme/myBlog,goerz/pelican,btnpushnmunky/pelican,abrahamvarricatt/pelican,crmackay/pelican,iurisilvio/pelican,arty-name/pelican,deanishe/pelican,TC01/pelican,goerz/pelican,UdeskDeveloper/pelican,Scheirle/pelican,alexras/pelican,janaurka/git-debug-presentiation,justinmayer/pelican,farseerfc/pelican,iKevinY/pelican,jimperio/pelican,treyhunner/pelican,JeremyMorgan/pelican,karlcow/pelican,abrahamvarricatt/pelican,51itclub/pelican,11craft/pelican,talha131/pelican,Rogdham/pelican,eevee/pelican,joetboole/pelican,number5/pelican,catdog2/pelican,btnpushnmunky/pelican,lucasplus/pelican,farseerfc/pelican,HyperGroups/pelican,gymglish/pelican,11craft/pelican,deved69/pelican-1,simonjj/pelican,florianjacob/pelican,jvehent/pelican,Scheirle/pelican,getpelican/pelican,Polyconseil/pelican,kennethlyn/pelican,karlcow/pelican,eevee/pelican,douglaskastle/pelican,ls2uper/pelican,eevee/pelican,lucasplus/pelican,jo-tham/pelican,garbas/pelican,Rogdham/pelican,levanhien8/pelican,joetboole/pelican,iurisilvio/pelican,0xMF/pelican,garbas/pelican,Rogdham/pelican,florianjacob/pelican,koobs/pelican,GiovanniMoretti/pelican,simonjj/pelican,ls2uper/pelican,kernc/pelican,kernc/pelican,treyhunner/pelican,ionelmc/pelican,iKevinY/pelican,rbarraud/pelican,JeremyMorgan/pelican,HyperGroups/pelican,douglaskastle/pelican,abrahamvarricatt/pelican,crmackay/pelican,crmackay/pelican,kernc/pelican,deanishe/pelican,zackw/pelican,ehashman/pelican,lazycoder-ru/pelican,sunzhongwei/pelican,janaurka/git-debug-presentiation,talha131/pelican,rbarraud/pelican,UdeskDeveloper/pelican,deved69/pelican-1,kennethlyn/pelican,51itclub/pelican,avaris/pelican,alexras/pelican,fbs/pelican,iurisilvio/pelican,TC01/pelican,douglaskastle/pelican,TC01/pelican,kennethlyn/pelican,Summonee/pelican,ingwinlu/pelican,Summonee/pelican,sunzhongwei/pelican,jo-tham/pelican,sunzhongwei/pelican,gymglish/pelican,koobs/pelican,zackw/pelican,deanishe/pelican,liyonghelpme/myBlog,catdog2/pelican,liyonghelpme/myBlog,getpelican/pelican,garbas/pelican,UdeskDeveloper/pelican,ingwinlu/pelican,btnpushnmunky/pelican,lucasplus/pelican,Natim/pelican,gymglish/pelican,liyonghelpme/myBlog,jvehent/pelican,goerz/pelican
python
## Code Before: from pelican import signals """ Related posts plugin for Pelican ================================ Adds related_posts variable to article's context """ related_posts = [] def add_related_posts(generator, metadata): if 'tags' in metadata: for tag in metadata['tags']: #print tag for related_article in generator.tags[tag]: related_posts.append(related_article) if len(related_posts) < 1: return relation_score = dict( \ zip(set(related_posts), \ map(related_posts.count, \ set(related_posts)))) ranked_related = sorted(relation_score, key=relation_score.get) metadata["related_posts"] = ranked_related[:5] else: return def register(): signals.article_generate_context.connect(add_related_posts) ## Instruction: Add usage and intallation instructions ## Code After: from pelican import signals """ Related posts plugin for Pelican ================================ Adds related_posts variable to article's context Settings -------- To enable, add from pelican.plugins import related_posts PLUGINS = [related_posts] to your settings.py. Usage ----- {% if article.related_posts %} <ul> {% for related_post in article.related_posts %} <li>{{ related_post }}</li> {% endfor %} </ul> {% endif %} """ related_posts = [] def add_related_posts(generator, metadata): if 'tags' in metadata: for tag in metadata['tags']: #print tag for related_article in generator.tags[tag]: related_posts.append(related_article) if len(related_posts) < 1: return relation_score = dict( \ zip(set(related_posts), \ map(related_posts.count, \ set(related_posts)))) ranked_related = sorted(relation_score, key=relation_score.get) metadata["related_posts"] = ranked_related[:5] else: return def register(): signals.article_generate_context.connect(add_related_posts)
from pelican import signals """ Related posts plugin for Pelican ================================ Adds related_posts variable to article's context + + Settings + -------- + To enable, add + + from pelican.plugins import related_posts + PLUGINS = [related_posts] + + to your settings.py. + + Usage + ----- + {% if article.related_posts %} + <ul> + {% for related_post in article.related_posts %} + <li>{{ related_post }}</li> + {% endfor %} + </ul> + {% endif %} + + """ + related_posts = [] def add_related_posts(generator, metadata): if 'tags' in metadata: for tag in metadata['tags']: #print tag for related_article in generator.tags[tag]: related_posts.append(related_article) if len(related_posts) < 1: return relation_score = dict( \ zip(set(related_posts), \ map(related_posts.count, \ set(related_posts)))) ranked_related = sorted(relation_score, key=relation_score.get) metadata["related_posts"] = ranked_related[:5] else: return def register(): signals.article_generate_context.connect(add_related_posts)
22
0.6875
22
0
e59154121499963efd9bbe7ef6a2fcb6640a26d6
templates/index.twig
templates/index.twig
{% extends "base.twig" %} {% block content %} <div class="col-md-12"> {% include "article-list.twig" with {"wordCount": 100} %} </div> {% endblock %}
{% extends "base.twig" %} {% block content %} <div class="col-md-12"> {% include "article-list.twig" with {"wordCount": 100} %} <div class="pagination-buttons"> {% if pagination.prev %} <a href="{{pagination.prev.link}}" class="prev {{pagination.prev.link|length ? '' : 'invisible'}} pull-left"><button class="btn btn-default">Previous</button></a> {% endif %} {% if pagination.next %} <a href="{{pagination.next.link}}" class="next {{pagination.next.link|length ? '' : 'invisible'}} pull-right"><button class="btn btn-default">Next</button></a> {% endif %} </div> </div> {% endblock %}
Add missing pagination buttons to search results
Add missing pagination buttons to search results
Twig
mit
CoderDojo/cd-theme,CoderDojo/cd-theme,CoderDojo/cd-theme,CoderDojo/cd-theme
twig
## Code Before: {% extends "base.twig" %} {% block content %} <div class="col-md-12"> {% include "article-list.twig" with {"wordCount": 100} %} </div> {% endblock %} ## Instruction: Add missing pagination buttons to search results ## Code After: {% extends "base.twig" %} {% block content %} <div class="col-md-12"> {% include "article-list.twig" with {"wordCount": 100} %} <div class="pagination-buttons"> {% if pagination.prev %} <a href="{{pagination.prev.link}}" class="prev {{pagination.prev.link|length ? '' : 'invisible'}} pull-left"><button class="btn btn-default">Previous</button></a> {% endif %} {% if pagination.next %} <a href="{{pagination.next.link}}" class="next {{pagination.next.link|length ? '' : 'invisible'}} pull-right"><button class="btn btn-default">Next</button></a> {% endif %} </div> </div> {% endblock %}
{% extends "base.twig" %} {% block content %} <div class="col-md-12"> {% include "article-list.twig" with {"wordCount": 100} %} + <div class="pagination-buttons"> + {% if pagination.prev %} + <a href="{{pagination.prev.link}}" class="prev {{pagination.prev.link|length ? '' : 'invisible'}} pull-left"><button class="btn btn-default">Previous</button></a> + {% endif %} + {% if pagination.next %} + <a href="{{pagination.next.link}}" class="next {{pagination.next.link|length ? '' : 'invisible'}} pull-right"><button class="btn btn-default">Next</button></a> + {% endif %} + </div> </div> {% endblock %}
8
1.142857
8
0
3e66c6546eda367bfef4038a4bb512862a9dd01f
config.py
config.py
DOMAIN = 'studyindenmark-newscontrol.appspot.com' MAIL_SENDER = "Per Thulin <per@youtify.com>"
DOMAIN = 'studyindenmark-newscontrol.appspot.com' MAIL_SENDER = "Study in Denmark <studyindenmark@gmail.com>"
Change email sender to studyindenmark@gmail.com
Change email sender to studyindenmark@gmail.com
Python
mit
studyindenmark/newscontrol,youtify/newscontrol,studyindenmark/newscontrol,youtify/newscontrol
python
## Code Before: DOMAIN = 'studyindenmark-newscontrol.appspot.com' MAIL_SENDER = "Per Thulin <per@youtify.com>" ## Instruction: Change email sender to studyindenmark@gmail.com ## Code After: DOMAIN = 'studyindenmark-newscontrol.appspot.com' MAIL_SENDER = "Study in Denmark <studyindenmark@gmail.com>"
DOMAIN = 'studyindenmark-newscontrol.appspot.com' - MAIL_SENDER = "Per Thulin <per@youtify.com>" + MAIL_SENDER = "Study in Denmark <studyindenmark@gmail.com>"
2
0.666667
1
1
e29236ffa40ae314fa3c5153959cd775b4cae009
main/css/generate_css.php
main/css/generate_css.php
<?php require_once( '../couch/cms.php' ); ?> <cms:embed '../../css/normalize.css' /> <cms:embed '../../css/defaults.css' /> <cms:embed '../../css/fonts.css' /> <cms:embed '../../css/menu.css' /> <cms:embed '../../css/form.css' /> <cms:embed '../../css/styles.css' /> <cms:embed '../../css/responsive.css' /> <?php COUCH::invoke(); ?>
<?php require_once( '../edit/cms.php' ); ?> <cms:template title="CSS Generator" hidden='1' /> <cms:embed '../../css/normalize.css' /> <cms:embed '../../css/defaults.css' /> <cms:embed '../../css/fonts.css' /> <cms:embed '../../css/menu.css' /> <cms:embed '../../css/form.css' /> <cms:embed '../../css/styles.css' /> <cms:embed '../../css/responsive.css' /> <?php COUCH::invoke(); ?>
Make CSS Generator template hidden
Make CSS Generator template hidden
PHP
mit
Mako88/thatguy-boilerplate,Mako88/thatguy-boilerplate,Mako88/thatguy-boilerplate,Mako88/thatguy-boilerplate
php
## Code Before: <?php require_once( '../couch/cms.php' ); ?> <cms:embed '../../css/normalize.css' /> <cms:embed '../../css/defaults.css' /> <cms:embed '../../css/fonts.css' /> <cms:embed '../../css/menu.css' /> <cms:embed '../../css/form.css' /> <cms:embed '../../css/styles.css' /> <cms:embed '../../css/responsive.css' /> <?php COUCH::invoke(); ?> ## Instruction: Make CSS Generator template hidden ## Code After: <?php require_once( '../edit/cms.php' ); ?> <cms:template title="CSS Generator" hidden='1' /> <cms:embed '../../css/normalize.css' /> <cms:embed '../../css/defaults.css' /> <cms:embed '../../css/fonts.css' /> <cms:embed '../../css/menu.css' /> <cms:embed '../../css/form.css' /> <cms:embed '../../css/styles.css' /> <cms:embed '../../css/responsive.css' /> <?php COUCH::invoke(); ?>
- <?php require_once( '../couch/cms.php' ); ?> ? ^^^^^ + <?php require_once( '../edit/cms.php' ); ?> ? ^^^^ + <cms:template title="CSS Generator" hidden='1' /> <cms:embed '../../css/normalize.css' /> <cms:embed '../../css/defaults.css' /> <cms:embed '../../css/fonts.css' /> <cms:embed '../../css/menu.css' /> <cms:embed '../../css/form.css' /> <cms:embed '../../css/styles.css' /> <cms:embed '../../css/responsive.css' /> <?php COUCH::invoke(); ?>
3
0.272727
2
1
ac3c1104dd9711172d4ca73e4db28711bd4f98c6
src/partials/messenger.receiver/me.edit.html
src/partials/messenger.receiver/me.edit.html
<div layout="column" layout-wrap layout-margin layout-align="center center"> <h3 class="md-headline" translate>messenger.RECEIVER_AVATAR</h3> <avatar-area load-avatar="ctrl.controllerModel.avatarController.loadAvatar" on-change="ctrl.controllerModel.avatarController.onChangeAvatar" color="ctrl.controllerModel.me.color" enable-clear="true"> </avatar-area> </div> <md-card> <md-card-content> <md-input-container class="md-block"> <label translate>messenger.MY_PUBLIC_NICKNAME</label> <input ng-disabled="ctrl.isSaving()" ng-model="ctrl.controllerModel.nickname"> </md-input-container> </md-card-content> </md-card>
<div layout="column" layout-wrap layout-margin layout-align="center center"> <h3 class="md-headline" translate>messenger.RECEIVER_AVATAR</h3> <avatar-area load-avatar="ctrl.controllerModel.avatarController.loadAvatar" on-change="ctrl.controllerModel.avatarController.onChangeAvatar" color="ctrl.controllerModel.me.color" enable-clear="true"> </avatar-area> </div> <md-card> <md-card-content> <md-input-container class="md-block"> <label translate>messenger.MY_PUBLIC_NICKNAME</label> <input ng-disabled="ctrl.isSaving()" ng-model="ctrl.controllerModel.nickname" ng-keypress="ctrl.keypress($event)"> </md-input-container> </md-card-content> </md-card>
Allow saving profile with enter key
Allow saving profile with enter key
HTML
agpl-3.0
threema-ch/threema-web,threema-ch/threema-web,threema-ch/threema-web,threema-ch/threema-web,threema-ch/threema-web
html
## Code Before: <div layout="column" layout-wrap layout-margin layout-align="center center"> <h3 class="md-headline" translate>messenger.RECEIVER_AVATAR</h3> <avatar-area load-avatar="ctrl.controllerModel.avatarController.loadAvatar" on-change="ctrl.controllerModel.avatarController.onChangeAvatar" color="ctrl.controllerModel.me.color" enable-clear="true"> </avatar-area> </div> <md-card> <md-card-content> <md-input-container class="md-block"> <label translate>messenger.MY_PUBLIC_NICKNAME</label> <input ng-disabled="ctrl.isSaving()" ng-model="ctrl.controllerModel.nickname"> </md-input-container> </md-card-content> </md-card> ## Instruction: Allow saving profile with enter key ## Code After: <div layout="column" layout-wrap layout-margin layout-align="center center"> <h3 class="md-headline" translate>messenger.RECEIVER_AVATAR</h3> <avatar-area load-avatar="ctrl.controllerModel.avatarController.loadAvatar" on-change="ctrl.controllerModel.avatarController.onChangeAvatar" color="ctrl.controllerModel.me.color" enable-clear="true"> </avatar-area> </div> <md-card> <md-card-content> <md-input-container class="md-block"> <label translate>messenger.MY_PUBLIC_NICKNAME</label> <input ng-disabled="ctrl.isSaving()" ng-model="ctrl.controllerModel.nickname" ng-keypress="ctrl.keypress($event)"> </md-input-container> </md-card-content> </md-card>
<div layout="column" layout-wrap layout-margin layout-align="center center"> <h3 class="md-headline" translate>messenger.RECEIVER_AVATAR</h3> <avatar-area load-avatar="ctrl.controllerModel.avatarController.loadAvatar" on-change="ctrl.controllerModel.avatarController.onChangeAvatar" color="ctrl.controllerModel.me.color" enable-clear="true"> </avatar-area> </div> <md-card> <md-card-content> <md-input-container class="md-block"> <label translate>messenger.MY_PUBLIC_NICKNAME</label> - <input ng-disabled="ctrl.isSaving()" ng-model="ctrl.controllerModel.nickname"> + <input ng-disabled="ctrl.isSaving()" ng-model="ctrl.controllerModel.nickname" ng-keypress="ctrl.keypress($event)"> ? ++++++++++++++++++++++++++++++++++++ </md-input-container> </md-card-content> </md-card>
2
0.1
1
1
b86f4cdcb17b21eb23c09094c790f07d6bc31b01
requirements.txt
requirements.txt
flask flask_restful waitress httplib2 pyBigWig git+git://github.com/Multiscale-Genomics/mg-dm-api.git
flask flask_restful waitress httplib2 pyBigWig git+git://github.com/Multiscale-Genomics/mg-dm-api.git git+git://github.com/Multiscale-Genomics/mg-rest-util.git
Include the installation of the mg-rest-util repo
Include the installation of the mg-rest-util repo
Text
apache-2.0
Multiscale-Genomics/mg-rest-dm
text
## Code Before: flask flask_restful waitress httplib2 pyBigWig git+git://github.com/Multiscale-Genomics/mg-dm-api.git ## Instruction: Include the installation of the mg-rest-util repo ## Code After: flask flask_restful waitress httplib2 pyBigWig git+git://github.com/Multiscale-Genomics/mg-dm-api.git git+git://github.com/Multiscale-Genomics/mg-rest-util.git
flask flask_restful waitress httplib2 pyBigWig git+git://github.com/Multiscale-Genomics/mg-dm-api.git + git+git://github.com/Multiscale-Genomics/mg-rest-util.git
1
0.166667
1
0
4598d86fad56c1ccfb27fb3ba23b5949016dd053
README.md
README.md
This is an integration I build for Slack. When somebody types ```/shuffle```, it returns a list of team members shuffled for our stand up meeting order. ## Adding it to your team's Slack 1. Clone this repository 2. Copy and rename the ```data.yml.example``` file to ```data.yml ```. 3. Add your own team members as the value of the ```team_members``` key. 4. [Create an Incoming WebHook](https://my.slack.com/services/new/incoming-webhook) (You'll have to choose a channel but the list will be posted to whatever channel the command was ran) 5. Copy the ```Webhook URL``` provided under ```Setup Instructions``` and add it to ```data.yml``` as the value of the key ```url```. ![Copy the URL provided](http://i.imgur.com/hc04yl0.png) 6. Create a [Heroku](heroku.com) app and upload the code. 7. [Create a Slash Command](https://my.slack.com/services/new/slash-commands) (we use ```/shuffle```, use whatever works better for you) 8. Add the Heroku URL for your app to ```URL``` under ```Integration Settings``` and click on ```Save Integration``` ![Add your heroku URL](http://i.imgur.com/niAEpRf.png) 9. You can now use the command you added on step 7 on any Slack channel. ## License [MIT](LICENSE)
This is an integration I build for Slack. When somebody types ```/shuffle```, it returns a list of team members shuffled for our stand up meeting order. ![how it works](http://i.imgur.com/qt5z59C.gif) ## Adding it to your team's Slack 1. Clone this repository 2. Copy and rename the ```data.yml.example``` file to ```data.yml ```. 3. Add your own team members as the value of the ```team_members``` key. 4. [Create an Incoming WebHook](https://my.slack.com/services/new/incoming-webhook) (You'll have to choose a channel but the list will be posted to whatever channel the command was ran) 5. Copy the ```Webhook URL``` provided under ```Setup Instructions``` and add it to ```data.yml``` as the value of the key ```url```. ![Copy the URL provided](http://i.imgur.com/hc04yl0.png) 6. Create a [Heroku](heroku.com) app and upload the code. 7. [Create a Slash Command](https://my.slack.com/services/new/slash-commands) (we use ```/shuffle```, use whatever works better for you) 8. Add the Heroku URL for your app to ```URL``` under ```Integration Settings``` and click on ```Save Integration``` ![Add your heroku URL](http://i.imgur.com/niAEpRf.png) 9. You can now use the command you added on step 7 on any Slack channel. ## License [MIT](LICENSE)
Add "How it works" gif
Add "How it works" gif
Markdown
mit
romulomachado/slack-shuffle
markdown
## Code Before: This is an integration I build for Slack. When somebody types ```/shuffle```, it returns a list of team members shuffled for our stand up meeting order. ## Adding it to your team's Slack 1. Clone this repository 2. Copy and rename the ```data.yml.example``` file to ```data.yml ```. 3. Add your own team members as the value of the ```team_members``` key. 4. [Create an Incoming WebHook](https://my.slack.com/services/new/incoming-webhook) (You'll have to choose a channel but the list will be posted to whatever channel the command was ran) 5. Copy the ```Webhook URL``` provided under ```Setup Instructions``` and add it to ```data.yml``` as the value of the key ```url```. ![Copy the URL provided](http://i.imgur.com/hc04yl0.png) 6. Create a [Heroku](heroku.com) app and upload the code. 7. [Create a Slash Command](https://my.slack.com/services/new/slash-commands) (we use ```/shuffle```, use whatever works better for you) 8. Add the Heroku URL for your app to ```URL``` under ```Integration Settings``` and click on ```Save Integration``` ![Add your heroku URL](http://i.imgur.com/niAEpRf.png) 9. You can now use the command you added on step 7 on any Slack channel. ## License [MIT](LICENSE) ## Instruction: Add "How it works" gif ## Code After: This is an integration I build for Slack. When somebody types ```/shuffle```, it returns a list of team members shuffled for our stand up meeting order. ![how it works](http://i.imgur.com/qt5z59C.gif) ## Adding it to your team's Slack 1. Clone this repository 2. Copy and rename the ```data.yml.example``` file to ```data.yml ```. 3. Add your own team members as the value of the ```team_members``` key. 4. [Create an Incoming WebHook](https://my.slack.com/services/new/incoming-webhook) (You'll have to choose a channel but the list will be posted to whatever channel the command was ran) 5. Copy the ```Webhook URL``` provided under ```Setup Instructions``` and add it to ```data.yml``` as the value of the key ```url```. ![Copy the URL provided](http://i.imgur.com/hc04yl0.png) 6. Create a [Heroku](heroku.com) app and upload the code. 7. [Create a Slash Command](https://my.slack.com/services/new/slash-commands) (we use ```/shuffle```, use whatever works better for you) 8. Add the Heroku URL for your app to ```URL``` under ```Integration Settings``` and click on ```Save Integration``` ![Add your heroku URL](http://i.imgur.com/niAEpRf.png) 9. You can now use the command you added on step 7 on any Slack channel. ## License [MIT](LICENSE)
This is an integration I build for Slack. When somebody types ```/shuffle```, it returns a list of team members shuffled for our stand up meeting order. + + ![how it works](http://i.imgur.com/qt5z59C.gif) ## Adding it to your team's Slack 1. Clone this repository 2. Copy and rename the ```data.yml.example``` file to ```data.yml ```. 3. Add your own team members as the value of the ```team_members``` key. 4. [Create an Incoming WebHook](https://my.slack.com/services/new/incoming-webhook) (You'll have to choose a channel but the list will be posted to whatever channel the command was ran) 5. Copy the ```Webhook URL``` provided under ```Setup Instructions``` and add it to ```data.yml``` as the value of the key ```url```. ![Copy the URL provided](http://i.imgur.com/hc04yl0.png) 6. Create a [Heroku](heroku.com) app and upload the code. 7. [Create a Slash Command](https://my.slack.com/services/new/slash-commands) (we use ```/shuffle```, use whatever works better for you) 8. Add the Heroku URL for your app to ```URL``` under ```Integration Settings``` and click on ```Save Integration``` ![Add your heroku URL](http://i.imgur.com/niAEpRf.png) 9. You can now use the command you added on step 7 on any Slack channel. ## License [MIT](LICENSE)
2
0.066667
2
0
d70d37495db4f4b06d0b7d66bb289534027b1f50
scripts/dump_logs.sh
scripts/dump_logs.sh
MAINLOG=get_logs.log # get docker logs docker ps -q | while read -r container_id ; do # get keys LOGPATH=$(docker inspect $container_id | jq .[0].LogPath) NAME=$(docker inspect $container_id | jq .[0].Name) LOGFILE=$(echo "$LOGPATH" | tr -d '"') # concat to log echo "#######################################################################################" >> $MAINLOG echo $NAME >> $MAINLOG echo "#######################################################################################" >> $MAINLOG echo "#######################################################################################" >> $MAINLOG cat $LOGFILE | while read -r log_line ; do # echo $log_line log_text=$(echo $log_line | jq .log | tr -d '"') log_time=$(echo $log_line | jq .time | tr -d '"') IFS='.' read -a myarray <<< "$log_time" pretty_log_time=${myarray[0]} # echo $log_text echo $pretty_log_time "| " $log_text >> $MAINLOG done # cat $LOGFILE >> $MAINLOG echo $'\n\n\n\n\n\n\n\n\n\n' >> $MAINLOG done # open, remove rsub $MAINLOG rm $MAINLOG
MAINLOG=sytemapic-logs-`date +"%Y%m%d%H%M%S"`.txt # get docker logs docker ps -q | while read -r container_id ; do # get keys LOGPATH=$(docker inspect $container_id | jq .[0].LogPath) NAME=$(docker inspect $container_id | jq .[0].Name) LOGFILE=$(echo "$LOGPATH" | tr -d '"') # concat to log echo "#######################################################################################" >> $MAINLOG echo $NAME >> $MAINLOG echo "#######################################################################################" >> $MAINLOG echo "#######################################################################################" >> $MAINLOG cat $LOGFILE | while read -r log_line ; do # echo $log_line log_text=$(echo $log_line | jq .log | tr -d '"') log_time=$(echo $log_line | jq .time | tr -d '"') IFS='.' read -a myarray <<< "$log_time" pretty_log_time=${myarray[0]} # echo $log_text echo $pretty_log_time "| " $log_text >> $MAINLOG done # cat $LOGFILE >> $MAINLOG echo $'\n\n\n\n\n\n\n\n\n\n' >> $MAINLOG done # Print filename echo $MAINLOG
Create timestamped log file, print filename
Create timestamped log file, print filename Useful to further process the file
Shell
agpl-3.0
mapic/mapic,mapic/mapic
shell
## Code Before: MAINLOG=get_logs.log # get docker logs docker ps -q | while read -r container_id ; do # get keys LOGPATH=$(docker inspect $container_id | jq .[0].LogPath) NAME=$(docker inspect $container_id | jq .[0].Name) LOGFILE=$(echo "$LOGPATH" | tr -d '"') # concat to log echo "#######################################################################################" >> $MAINLOG echo $NAME >> $MAINLOG echo "#######################################################################################" >> $MAINLOG echo "#######################################################################################" >> $MAINLOG cat $LOGFILE | while read -r log_line ; do # echo $log_line log_text=$(echo $log_line | jq .log | tr -d '"') log_time=$(echo $log_line | jq .time | tr -d '"') IFS='.' read -a myarray <<< "$log_time" pretty_log_time=${myarray[0]} # echo $log_text echo $pretty_log_time "| " $log_text >> $MAINLOG done # cat $LOGFILE >> $MAINLOG echo $'\n\n\n\n\n\n\n\n\n\n' >> $MAINLOG done # open, remove rsub $MAINLOG rm $MAINLOG ## Instruction: Create timestamped log file, print filename Useful to further process the file ## Code After: MAINLOG=sytemapic-logs-`date +"%Y%m%d%H%M%S"`.txt # get docker logs docker ps -q | while read -r container_id ; do # get keys LOGPATH=$(docker inspect $container_id | jq .[0].LogPath) NAME=$(docker inspect $container_id | jq .[0].Name) LOGFILE=$(echo "$LOGPATH" | tr -d '"') # concat to log echo "#######################################################################################" >> $MAINLOG echo $NAME >> $MAINLOG echo "#######################################################################################" >> $MAINLOG echo "#######################################################################################" >> $MAINLOG cat $LOGFILE | while read -r log_line ; do # echo $log_line log_text=$(echo $log_line | jq .log | tr -d '"') log_time=$(echo $log_line | jq .time | tr -d '"') IFS='.' read -a myarray <<< "$log_time" pretty_log_time=${myarray[0]} # echo $log_text echo $pretty_log_time "| " $log_text >> $MAINLOG done # cat $LOGFILE >> $MAINLOG echo $'\n\n\n\n\n\n\n\n\n\n' >> $MAINLOG done # Print filename echo $MAINLOG
- MAINLOG=get_logs.log + MAINLOG=sytemapic-logs-`date +"%Y%m%d%H%M%S"`.txt # get docker logs docker ps -q | while read -r container_id ; do # get keys LOGPATH=$(docker inspect $container_id | jq .[0].LogPath) NAME=$(docker inspect $container_id | jq .[0].Name) LOGFILE=$(echo "$LOGPATH" | tr -d '"') # concat to log echo "#######################################################################################" >> $MAINLOG echo $NAME >> $MAINLOG echo "#######################################################################################" >> $MAINLOG echo "#######################################################################################" >> $MAINLOG cat $LOGFILE | while read -r log_line ; do # echo $log_line log_text=$(echo $log_line | jq .log | tr -d '"') log_time=$(echo $log_line | jq .time | tr -d '"') IFS='.' read -a myarray <<< "$log_time" pretty_log_time=${myarray[0]} # echo $log_text echo $pretty_log_time "| " $log_text >> $MAINLOG done # cat $LOGFILE >> $MAINLOG echo $'\n\n\n\n\n\n\n\n\n\n' >> $MAINLOG done + # Print filename - # open, remove - rsub $MAINLOG - rm $MAINLOG ? ^^ + echo $MAINLOG ? ^^^^
7
0.166667
3
4
a81d717b36d3768d37ea18a3864b1c76cad28402
.travis.yml
.travis.yml
os: - linux services: - docker language: node_js node_js: - "8.11.1" jdk: - oraclejdk8 cache: directories: - $HOME/.m2 - $HOME/.gradle - $HOME/.yarn-cache env: global: - SPRING_OUTPUT_ANSI_ENABLED=ALWAYS before_install: - java -version - sudo /etc/init.d/mysql stop - sudo /etc/init.d/postgresql stop - export DISPLAY=:99.0 - sh -e /etc/init.d/xvfb start - npm install -g npm - npm install -g yarn - yarn global add yo install: - yarn install - yarn link - gulp eslint - gulp test script: # - git clone https://github.com/jhipster/jhipster-sample-app-ng2.git # - cd jhipster-sample-app-ng2 - git clone https://github.com/pascalgrimaud/jhipster-5-sample-app.git - cd jhipster-5-sample-app - yarn install - yarn link generator-jhipster-primeng-charts - yo jhipster-primeng-charts --default --force # need to re-activate for next version of JHipster # - yarn lint - ./mvnw & - sleep 40 - yarn e2e
os: - linux services: - docker language: node_js node_js: - "8.11.1" jdk: - oraclejdk8 addons: apt: sources: - google-chrome packages: - google-chrome-stable cache: directories: - $HOME/.m2 - $HOME/.gradle env: global: - SPRING_OUTPUT_ANSI_ENABLED=ALWAYS before_install: - java -version - sudo /etc/init.d/mysql stop - sudo /etc/init.d/postgresql stop # Use this for Protractor - export DISPLAY=:99.0 - sh -e /etc/init.d/xvfb start # Install Yarn - curl -o- -L https://yarnpkg.com/install.sh | bash - export PATH=$HOME/.yarn/bin:$PATH - yarn -v - yarn global add yo install: - yarn install - yarn link - gulp eslint - gulp test script: # - git clone https://github.com/jhipster/jhipster-sample-app-ng2.git # - cd jhipster-sample-app-ng2 - git clone https://github.com/pascalgrimaud/jhipster-5-sample-app.git - cd jhipster-5-sample-app - yarn install - yarn link generator-jhipster-primeng-charts - yo jhipster-primeng-charts --default --force # need to re-activate for next version of JHipster # - yarn lint - ./mvnw package - ./mvnw & - sleep 60 - yarn e2e
Fix Travis by installing Google Chrome and compile the project before e2e
Fix Travis by installing Google Chrome and compile the project before e2e
YAML
apache-2.0
pascalgrimaud/generator-jhipster-primeng-charts,pascalgrimaud/generator-jhipster-primeng-charts,pascalgrimaud/generator-jhipster-primeng-charts
yaml
## Code Before: os: - linux services: - docker language: node_js node_js: - "8.11.1" jdk: - oraclejdk8 cache: directories: - $HOME/.m2 - $HOME/.gradle - $HOME/.yarn-cache env: global: - SPRING_OUTPUT_ANSI_ENABLED=ALWAYS before_install: - java -version - sudo /etc/init.d/mysql stop - sudo /etc/init.d/postgresql stop - export DISPLAY=:99.0 - sh -e /etc/init.d/xvfb start - npm install -g npm - npm install -g yarn - yarn global add yo install: - yarn install - yarn link - gulp eslint - gulp test script: # - git clone https://github.com/jhipster/jhipster-sample-app-ng2.git # - cd jhipster-sample-app-ng2 - git clone https://github.com/pascalgrimaud/jhipster-5-sample-app.git - cd jhipster-5-sample-app - yarn install - yarn link generator-jhipster-primeng-charts - yo jhipster-primeng-charts --default --force # need to re-activate for next version of JHipster # - yarn lint - ./mvnw & - sleep 40 - yarn e2e ## Instruction: Fix Travis by installing Google Chrome and compile the project before e2e ## Code After: os: - linux services: - docker language: node_js node_js: - "8.11.1" jdk: - oraclejdk8 addons: apt: sources: - google-chrome packages: - google-chrome-stable cache: directories: - $HOME/.m2 - $HOME/.gradle env: global: - SPRING_OUTPUT_ANSI_ENABLED=ALWAYS before_install: - java -version - sudo /etc/init.d/mysql stop - sudo /etc/init.d/postgresql stop # Use this for Protractor - export DISPLAY=:99.0 - sh -e /etc/init.d/xvfb start # Install Yarn - curl -o- -L https://yarnpkg.com/install.sh | bash - export PATH=$HOME/.yarn/bin:$PATH - yarn -v - yarn global add yo install: - yarn install - yarn link - gulp eslint - gulp test script: # - git clone https://github.com/jhipster/jhipster-sample-app-ng2.git # - cd jhipster-sample-app-ng2 - git clone https://github.com/pascalgrimaud/jhipster-5-sample-app.git - cd jhipster-5-sample-app - yarn install - yarn link generator-jhipster-primeng-charts - yo jhipster-primeng-charts --default --force # need to re-activate for next version of JHipster # - yarn lint - ./mvnw package - ./mvnw & - sleep 60 - yarn e2e
os: - linux services: - docker language: node_js node_js: - "8.11.1" jdk: - oraclejdk8 + addons: + apt: + sources: + - google-chrome + packages: + - google-chrome-stable cache: directories: - $HOME/.m2 - $HOME/.gradle - - $HOME/.yarn-cache env: global: - SPRING_OUTPUT_ANSI_ENABLED=ALWAYS before_install: - java -version - sudo /etc/init.d/mysql stop - sudo /etc/init.d/postgresql stop + # Use this for Protractor - export DISPLAY=:99.0 - sh -e /etc/init.d/xvfb start - - npm install -g npm - - npm install -g yarn + # Install Yarn + - curl -o- -L https://yarnpkg.com/install.sh | bash + - export PATH=$HOME/.yarn/bin:$PATH + - yarn -v - yarn global add yo install: - yarn install - yarn link - gulp eslint - gulp test script: # - git clone https://github.com/jhipster/jhipster-sample-app-ng2.git # - cd jhipster-sample-app-ng2 - git clone https://github.com/pascalgrimaud/jhipster-5-sample-app.git - cd jhipster-5-sample-app - yarn install - yarn link generator-jhipster-primeng-charts - yo jhipster-primeng-charts --default --force # need to re-activate for next version of JHipster # - yarn lint + - ./mvnw package - ./mvnw & - - sleep 40 ? ^ + - sleep 60 ? ^ - yarn e2e
17
0.386364
13
4
341751deebd2051ff40f27ea6c478c03a3e284b4
_posts/2017-11-26-devoweek.md
_posts/2017-11-26-devoweek.md
--- layout: post title: "DevoWeek - 2017/11/26" date: 2017-11-26 categories: [devoweek] --- This week: * [**Why calling 'man' at 0:30 throws with error 'gimmie gimmie gimmie'?**](https://unix.stackexchange.com/questions/405783/why-does-man-print-gimme-gimme-gimme-at-0030) - Funny easter egg found in some testing library. * **Balbla** - Some content * **Balbla** - Some content
--- layout: post title: "DevoWeek - 2017/11/26" date: 2017-11-26 categories: [devoweek] --- This week: * [**Why calling 'man' at 0:30 throws with error 'gimmie gimmie gimmie'?**](https://unix.stackexchange.com/questions/405783/why-does-man-print-gimme-gimme-gimme-at-0030) - Funny easter egg found in some testing library. * **Select all MSSQL objects *touched* in last N days** - Short script taken from MSDN. I had an issue while creating new database table. When running a script, I was getting an error `There is already an object named 'TABLE_NAME' in the database.`. [Apex SQL Search](https://www.apexsql.com/sql_tools_search.aspx) failed finding anything with that name, but this script saved my sanity. ```sql SELECT name AS object_name ,SCHEMA_NAME(schema_id) AS schema_name ,type_desc ,create_date ,modify_date FROM sys.objects WHERE modify_date > GETDATE() - 1 -- N := 1 ORDER BY modify_date; GO ``` * **Balbla** - Some content
Select all MSSQL objects *touched* in last N days
Select all MSSQL objects *touched* in last N days
Markdown
mit
pizycki/pizycki.github.io,pizycki/pizycki.github.io,pizycki/pizycki.github.io,pizycki/pizycki.github.io,pizycki/pizycki.github.io
markdown
## Code Before: --- layout: post title: "DevoWeek - 2017/11/26" date: 2017-11-26 categories: [devoweek] --- This week: * [**Why calling 'man' at 0:30 throws with error 'gimmie gimmie gimmie'?**](https://unix.stackexchange.com/questions/405783/why-does-man-print-gimme-gimme-gimme-at-0030) - Funny easter egg found in some testing library. * **Balbla** - Some content * **Balbla** - Some content ## Instruction: Select all MSSQL objects *touched* in last N days ## Code After: --- layout: post title: "DevoWeek - 2017/11/26" date: 2017-11-26 categories: [devoweek] --- This week: * [**Why calling 'man' at 0:30 throws with error 'gimmie gimmie gimmie'?**](https://unix.stackexchange.com/questions/405783/why-does-man-print-gimme-gimme-gimme-at-0030) - Funny easter egg found in some testing library. * **Select all MSSQL objects *touched* in last N days** - Short script taken from MSDN. I had an issue while creating new database table. When running a script, I was getting an error `There is already an object named 'TABLE_NAME' in the database.`. [Apex SQL Search](https://www.apexsql.com/sql_tools_search.aspx) failed finding anything with that name, but this script saved my sanity. ```sql SELECT name AS object_name ,SCHEMA_NAME(schema_id) AS schema_name ,type_desc ,create_date ,modify_date FROM sys.objects WHERE modify_date > GETDATE() - 1 -- N := 1 ORDER BY modify_date; GO ``` * **Balbla** - Some content
--- layout: post title: "DevoWeek - 2017/11/26" date: 2017-11-26 categories: [devoweek] --- This week: * [**Why calling 'man' at 0:30 throws with error 'gimmie gimmie gimmie'?**](https://unix.stackexchange.com/questions/405783/why-does-man-print-gimme-gimme-gimme-at-0030) - Funny easter egg found in some testing library. + * **Select all MSSQL objects *touched* in last N days** - Short script taken from MSDN. + I had an issue while creating new database table. When running a script, I was getting an error `There is already an object named 'TABLE_NAME' in the database.`. [Apex SQL Search](https://www.apexsql.com/sql_tools_search.aspx) failed finding anything with that name, but this script saved my sanity. + + ```sql + SELECT name AS object_name + ,SCHEMA_NAME(schema_id) AS schema_name + ,type_desc + ,create_date + ,modify_date + FROM sys.objects + WHERE modify_date > GETDATE() - 1 -- N := 1 + ORDER BY modify_date; + GO + ``` + * **Balbla** - Some content - * **Balbla** - Some content
16
1.454545
15
1
800dc7a6a19fa73b95968afb6d54f73007cafd36
src/drive/web/modules/drive/Toolbar/components/MoreMenu.spec.jsx
src/drive/web/modules/drive/Toolbar/components/MoreMenu.spec.jsx
import React from 'react' import { mount } from 'enzyme' import { act } from 'react-dom/test-utils' import { ActionMenuItem } from 'cozy-ui/transpiled/react/ActionMenu' import { setupFolderContent, mockCozyClientRequestQuery } from 'test/setup' import { downloadFiles } from 'drive/web/modules/actions/utils' import MoreMenu from 'drive/web/modules/drive/Toolbar/components/MoreMenu' import AppLike from 'test/components/AppLike' import { MoreButton } from 'components/Button' jest.mock('drive/web/modules/actions/utils', () => ({ downloadFiles: jest.fn().mockResolvedValue() })) const sleep = duration => new Promise(resolve => setTimeout(resolve, duration)) mockCozyClientRequestQuery() describe('MoreMenu', () => { const setup = async () => { const folderId = 'directory-foobar0' const { client, store } = await setupFolderContent({ folderId }) const root = mount( <AppLike client={client} store={store}> <MoreMenu isDisabled={false} canCreateFolder={false} canUpload={false} /> </AppLike> ) await sleep(1) // Open the menu act(() => { root .find(MoreButton) .props() .onClick() }) root.update() return { root, store, client } } describe('DownloadButton', () => { it('should work', async () => { const { root } = await setup() const actionMenuItem = root.findWhere(node => { return ( node.type() === ActionMenuItem && node.text() == 'Download folder' ) }) actionMenuItem.props().onClick() await sleep(0) expect(downloadFiles).toHaveBeenCalled() }) }) })
import React from 'react' import { render, fireEvent, configure } from '@testing-library/react' import { setupFolderContent, mockCozyClientRequestQuery } from 'test/setup' import { downloadFiles } from 'drive/web/modules/actions/utils' import MoreMenu from './MoreMenu' import AppLike from 'test/components/AppLike' jest.mock('drive/web/modules/actions/utils', () => ({ downloadFiles: jest.fn().mockResolvedValue() })) mockCozyClientRequestQuery() configure({ testIdAttribute: 'data-test-id' }) describe('MoreMenu', () => { const setup = async () => { const folderId = 'directory-foobar0' const { client, store } = await setupFolderContent({ folderId }) const result = render( <AppLike client={client} store={store}> <MoreMenu isDisabled={false} canCreateFolder={false} canUpload={false} /> </AppLike> ) const { getByTestId } = result fireEvent.click(getByTestId('more-button')) return { ...result, store, client } } describe('DownloadButton', () => { it('should work', async () => { const { getByText } = await setup() fireEvent.click(getByText('Download folder')) expect(downloadFiles).toHaveBeenCalled() }) }) })
Switch test to react testing lib
test: Switch test to react testing lib
JSX
agpl-3.0
nono/cozy-files-v3,nono/cozy-files-v3,nono/cozy-files-v3,nono/cozy-files-v3
jsx
## Code Before: import React from 'react' import { mount } from 'enzyme' import { act } from 'react-dom/test-utils' import { ActionMenuItem } from 'cozy-ui/transpiled/react/ActionMenu' import { setupFolderContent, mockCozyClientRequestQuery } from 'test/setup' import { downloadFiles } from 'drive/web/modules/actions/utils' import MoreMenu from 'drive/web/modules/drive/Toolbar/components/MoreMenu' import AppLike from 'test/components/AppLike' import { MoreButton } from 'components/Button' jest.mock('drive/web/modules/actions/utils', () => ({ downloadFiles: jest.fn().mockResolvedValue() })) const sleep = duration => new Promise(resolve => setTimeout(resolve, duration)) mockCozyClientRequestQuery() describe('MoreMenu', () => { const setup = async () => { const folderId = 'directory-foobar0' const { client, store } = await setupFolderContent({ folderId }) const root = mount( <AppLike client={client} store={store}> <MoreMenu isDisabled={false} canCreateFolder={false} canUpload={false} /> </AppLike> ) await sleep(1) // Open the menu act(() => { root .find(MoreButton) .props() .onClick() }) root.update() return { root, store, client } } describe('DownloadButton', () => { it('should work', async () => { const { root } = await setup() const actionMenuItem = root.findWhere(node => { return ( node.type() === ActionMenuItem && node.text() == 'Download folder' ) }) actionMenuItem.props().onClick() await sleep(0) expect(downloadFiles).toHaveBeenCalled() }) }) }) ## Instruction: test: Switch test to react testing lib ## Code After: import React from 'react' import { render, fireEvent, configure } from '@testing-library/react' import { setupFolderContent, mockCozyClientRequestQuery } from 'test/setup' import { downloadFiles } from 'drive/web/modules/actions/utils' import MoreMenu from './MoreMenu' import AppLike from 'test/components/AppLike' jest.mock('drive/web/modules/actions/utils', () => ({ downloadFiles: jest.fn().mockResolvedValue() })) mockCozyClientRequestQuery() configure({ testIdAttribute: 'data-test-id' }) describe('MoreMenu', () => { const setup = async () => { const folderId = 'directory-foobar0' const { client, store } = await setupFolderContent({ folderId }) const result = render( <AppLike client={client} store={store}> <MoreMenu isDisabled={false} canCreateFolder={false} canUpload={false} /> </AppLike> ) const { getByTestId } = result fireEvent.click(getByTestId('more-button')) return { ...result, store, client } } describe('DownloadButton', () => { it('should work', async () => { const { getByText } = await setup() fireEvent.click(getByText('Download folder')) expect(downloadFiles).toHaveBeenCalled() }) }) })
import React from 'react' + import { render, fireEvent, configure } from '@testing-library/react' - import { mount } from 'enzyme' - import { act } from 'react-dom/test-utils' - import { ActionMenuItem } from 'cozy-ui/transpiled/react/ActionMenu' import { setupFolderContent, mockCozyClientRequestQuery } from 'test/setup' import { downloadFiles } from 'drive/web/modules/actions/utils' - import MoreMenu from 'drive/web/modules/drive/Toolbar/components/MoreMenu' + import MoreMenu from './MoreMenu' import AppLike from 'test/components/AppLike' - import { MoreButton } from 'components/Button' jest.mock('drive/web/modules/actions/utils', () => ({ downloadFiles: jest.fn().mockResolvedValue() })) - const sleep = duration => new Promise(resolve => setTimeout(resolve, duration)) + mockCozyClientRequestQuery() - mockCozyClientRequestQuery() + configure({ testIdAttribute: 'data-test-id' }) describe('MoreMenu', () => { const setup = async () => { const folderId = 'directory-foobar0' const { client, store } = await setupFolderContent({ folderId }) - const root = mount( + const result = render( <AppLike client={client} store={store}> <MoreMenu isDisabled={false} canCreateFolder={false} canUpload={false} /> </AppLike> ) - await sleep(1) + const { getByTestId } = result + fireEvent.click(getByTestId('more-button')) - // Open the menu - act(() => { - root - .find(MoreButton) - .props() - .onClick() - }) - root.update() - - return { root, store, client } ? ^^ + return { ...result, store, client } ? +++ ^^^^ } describe('DownloadButton', () => { it('should work', async () => { - const { root } = await setup() ? ^^^ + const { getByText } = await setup() ? ^^^^^^^^ + fireEvent.click(getByText('Download folder')) - const actionMenuItem = root.findWhere(node => { - return ( - node.type() === ActionMenuItem && node.text() == 'Download folder' - ) - }) - actionMenuItem.props().onClick() - await sleep(0) expect(downloadFiles).toHaveBeenCalled() }) }) })
37
0.578125
10
27
e59ce64872c30c283289db332a9d284626a96eee
src/lib.rs
src/lib.rs
extern crate nom; extern crate ansi_term; pub mod parser; pub mod ast; pub mod error;
extern crate pest; #[macro_use] extern crate pest_derive; extern crate ansi_term; pub mod ast; pub mod error; /// For some reason, Pest cannot find the grammar file if listed in parser/mod.rs, so I listed it here pub mod parser { const _GRAMMAR: &'static str = include_str!("grammar/grammar.pest"); #[derive(Parser)] #[grammar = "grammar/grammar.pest"] pub struct ExpressionParser; }
Remove old crates and add inline parser module
Remove old crates and add inline parser module
Rust
apache-2.0
Willifme/robin_core,Willifme/robin_core,Willifme/robin_core
rust
## Code Before: extern crate nom; extern crate ansi_term; pub mod parser; pub mod ast; pub mod error; ## Instruction: Remove old crates and add inline parser module ## Code After: extern crate pest; #[macro_use] extern crate pest_derive; extern crate ansi_term; pub mod ast; pub mod error; /// For some reason, Pest cannot find the grammar file if listed in parser/mod.rs, so I listed it here pub mod parser { const _GRAMMAR: &'static str = include_str!("grammar/grammar.pest"); #[derive(Parser)] #[grammar = "grammar/grammar.pest"] pub struct ExpressionParser; }
- extern crate nom; ? ^^^ + extern crate pest; ? ^^^^ + + #[macro_use] + extern crate pest_derive; extern crate ansi_term; - pub mod parser; pub mod ast; pub mod error; + + /// For some reason, Pest cannot find the grammar file if listed in parser/mod.rs, so I listed it here + pub mod parser { + const _GRAMMAR: &'static str = include_str!("grammar/grammar.pest"); + + #[derive(Parser)] + #[grammar = "grammar/grammar.pest"] + pub struct ExpressionParser; + }
15
2.142857
13
2
1ea8a635d34c803f2a02a5ebf4acc2b2361e0129
app/assets/stylesheets/sessions.scss
app/assets/stylesheets/sessions.scss
.login-form { padding: 3rem; input { display: block; width: 20rem; height: 2.5rem; margin: .25rem auto; padding: .375rem .75rem; font-size: .9rem; background-color: $color_pale; border: 1px solid $color_light_blue; border-radius: 4px; box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); @media (max-width: $extra_small_width) { width: 100%; } } input[type=submit] { color: white; background-color: $color_blue; border: none; cursor: pointer; font-size: 1.1rem; letter-spacing: .15rem; } }
.login-form { padding: 3rem 0; input { display: block; width: 100%; height: 2.5rem; margin: .25rem auto; padding: .375rem .75rem; font-size: .9rem; background-color: $color_pale; border: 1px solid $color_light_blue; border-radius: 4px; box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); @media (min-width: $extra_small_width) { width: 20rem; } } input[type=submit] { color: white; background-color: $color_blue; border: none; cursor: pointer; font-size: 1.1rem; letter-spacing: .15rem; } }
Improve on login form responsiveness
Improve on login form responsiveness
SCSS
mit
ralinc/ralin.net,ralinc/ralin.net,ralinc/ralin.net
scss
## Code Before: .login-form { padding: 3rem; input { display: block; width: 20rem; height: 2.5rem; margin: .25rem auto; padding: .375rem .75rem; font-size: .9rem; background-color: $color_pale; border: 1px solid $color_light_blue; border-radius: 4px; box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); @media (max-width: $extra_small_width) { width: 100%; } } input[type=submit] { color: white; background-color: $color_blue; border: none; cursor: pointer; font-size: 1.1rem; letter-spacing: .15rem; } } ## Instruction: Improve on login form responsiveness ## Code After: .login-form { padding: 3rem 0; input { display: block; width: 100%; height: 2.5rem; margin: .25rem auto; padding: .375rem .75rem; font-size: .9rem; background-color: $color_pale; border: 1px solid $color_light_blue; border-radius: 4px; box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); @media (min-width: $extra_small_width) { width: 20rem; } } input[type=submit] { color: white; background-color: $color_blue; border: none; cursor: pointer; font-size: 1.1rem; letter-spacing: .15rem; } }
.login-form { - padding: 3rem; + padding: 3rem 0; ? ++ input { display: block; - width: 20rem; ? ^ ^^^ + width: 100%; ? ^ ^^ height: 2.5rem; margin: .25rem auto; padding: .375rem .75rem; font-size: .9rem; background-color: $color_pale; border: 1px solid $color_light_blue; border-radius: 4px; box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); - @media (max-width: $extra_small_width) { ? ^^ + @media (min-width: $extra_small_width) { ? ^^ - width: 100%; ? ^ ^^ + width: 20rem; ? ^ ^^^ } } input[type=submit] { color: white; background-color: $color_blue; border: none; cursor: pointer; font-size: 1.1rem; letter-spacing: .15rem; } }
8
0.275862
4
4
4367f97d783bcacf1e9b3693253f6dd38cd5e233
README.md
README.md
PHP API for mydnshost.co.uk At the moment this is a very simple library, will composerise this in future and add some kind of cli client wrapper around it. This implements version 1.0 of the API as documented at https://api.mydnshost.co.uk/1.0/docs/ Example usage, listing domains: ```php require_once(dirname(__FILE__) . '/MyDNSHostAPI.php'); $api = new MyDNSHostAPI('https://api.mydnshost.co.uk/'); $api->setAuthUserKey('admin@example.org', 'AAAAAAAA-BBBB-CCCC-DDDD-EEEEEEEEEEEE'); $domains = $api->getDomains(); var_dump($domains); ``` Example usage, importing zone files: ```php $domain = 'test.com'; $zonedata = file_get_contents('test.com.db'); echo 'Importing Domain: ', $domain, "\n"; $result = $api->importZone($domain, $zonedata); if (isset($result['error'])) { echo 'Unable to import: ', $result['error']; if (isset($result['errorData'])) { echo ' :: ', $result['errorData']; } echo "\n" continue; } else { echo 'Success!', "\n"; } ```
PHP API for mydnshost.co.uk At the moment this is a very simple library, will composerise this in future and add some kind of cli client wrapper around it. This implements version 1.0 of the API as documented at https://api.mydnshost.co.uk/1.0/docs/ Installation is via `composer require mydnshost/mydnshost-php-api` Example usage, listing domains: ```php require_once(__DIR__ . '/vendor/autoload.php'); $api = new MyDNSHostAPI($config['api']); $api->setAuthUserKey('admin@example.org', 'AAAAAAAA-BBBB-CCCC-DDDD-EEEEEEEEEEEE'); $domains = $api->getDomains(); var_dump($domains); ``` Example usage, importing zone files: ```php require_once(__DIR__ . '/vendor/autoload.php'); $api = new MyDNSHostAPI($config['api']); $api->setAuthUserKey('admin@example.org', 'AAAAAAAA-BBBB-CCCC-DDDD-EEEEEEEEEEEE'); $domain = 'test.com'; $zonedata = file_get_contents('test.com.db'); echo 'Importing Domain: ', $domain, "\n"; $result = $api->importZone($domain, $zonedata); if (isset($result['error'])) { echo 'Unable to import: ', $result['error']; if (isset($result['errorData'])) { echo ' :: ', $result['errorData']; } echo "\n" continue; } else { echo 'Success!', "\n"; } ```
Update readme to reflect composer package.
Update readme to reflect composer package.
Markdown
mit
mydnshost/mydnshost-php-api
markdown
## Code Before: PHP API for mydnshost.co.uk At the moment this is a very simple library, will composerise this in future and add some kind of cli client wrapper around it. This implements version 1.0 of the API as documented at https://api.mydnshost.co.uk/1.0/docs/ Example usage, listing domains: ```php require_once(dirname(__FILE__) . '/MyDNSHostAPI.php'); $api = new MyDNSHostAPI('https://api.mydnshost.co.uk/'); $api->setAuthUserKey('admin@example.org', 'AAAAAAAA-BBBB-CCCC-DDDD-EEEEEEEEEEEE'); $domains = $api->getDomains(); var_dump($domains); ``` Example usage, importing zone files: ```php $domain = 'test.com'; $zonedata = file_get_contents('test.com.db'); echo 'Importing Domain: ', $domain, "\n"; $result = $api->importZone($domain, $zonedata); if (isset($result['error'])) { echo 'Unable to import: ', $result['error']; if (isset($result['errorData'])) { echo ' :: ', $result['errorData']; } echo "\n" continue; } else { echo 'Success!', "\n"; } ``` ## Instruction: Update readme to reflect composer package. ## Code After: PHP API for mydnshost.co.uk At the moment this is a very simple library, will composerise this in future and add some kind of cli client wrapper around it. This implements version 1.0 of the API as documented at https://api.mydnshost.co.uk/1.0/docs/ Installation is via `composer require mydnshost/mydnshost-php-api` Example usage, listing domains: ```php require_once(__DIR__ . '/vendor/autoload.php'); $api = new MyDNSHostAPI($config['api']); $api->setAuthUserKey('admin@example.org', 'AAAAAAAA-BBBB-CCCC-DDDD-EEEEEEEEEEEE'); $domains = $api->getDomains(); var_dump($domains); ``` Example usage, importing zone files: ```php require_once(__DIR__ . '/vendor/autoload.php'); $api = new MyDNSHostAPI($config['api']); $api->setAuthUserKey('admin@example.org', 'AAAAAAAA-BBBB-CCCC-DDDD-EEEEEEEEEEEE'); $domain = 'test.com'; $zonedata = file_get_contents('test.com.db'); echo 'Importing Domain: ', $domain, "\n"; $result = $api->importZone($domain, $zonedata); if (isset($result['error'])) { echo 'Unable to import: ', $result['error']; if (isset($result['errorData'])) { echo ' :: ', $result['errorData']; } echo "\n" continue; } else { echo 'Success!', "\n"; } ```
PHP API for mydnshost.co.uk At the moment this is a very simple library, will composerise this in future and add some kind of cli client wrapper around it. This implements version 1.0 of the API as documented at https://api.mydnshost.co.uk/1.0/docs/ + Installation is via `composer require mydnshost/mydnshost-php-api` + Example usage, listing domains: ```php - require_once(dirname(__FILE__) . '/MyDNSHostAPI.php'); - $api = new MyDNSHostAPI('https://api.mydnshost.co.uk/'); + require_once(__DIR__ . '/vendor/autoload.php'); + $api = new MyDNSHostAPI($config['api']); $api->setAuthUserKey('admin@example.org', 'AAAAAAAA-BBBB-CCCC-DDDD-EEEEEEEEEEEE'); $domains = $api->getDomains(); var_dump($domains); ``` Example usage, importing zone files: ```php + require_once(__DIR__ . '/vendor/autoload.php'); + $api = new MyDNSHostAPI($config['api']); + $api->setAuthUserKey('admin@example.org', 'AAAAAAAA-BBBB-CCCC-DDDD-EEEEEEEEEEEE'); + $domain = 'test.com'; $zonedata = file_get_contents('test.com.db'); echo 'Importing Domain: ', $domain, "\n"; $result = $api->importZone($domain, $zonedata); if (isset($result['error'])) { echo 'Unable to import: ', $result['error']; if (isset($result['errorData'])) { echo ' :: ', $result['errorData']; } echo "\n" continue; } else { echo 'Success!', "\n"; } ```
10
0.277778
8
2
03d6d5ac436b47f18c0de6c2cfccebf871421515
scripts/roles/cikit-misc/defaults/main.yml
scripts/roles/cikit-misc/defaults/main.yml
--- apt_repos: - ppa:chris-lea/node.js - ppa:nginx/stable apt_packages: - imagemagick - libmagickcore-dev - libmagickwand-dev - htop - vim - time - tree - make - apparmor-utils - python-software-properties - software-properties-common - rsync - libssl-dev - zlib1g-dev - rng-tools - python-passlib - cgroup-bin - git - build-essential - libssl-dev - zlib1g-dev # Needed for "rbenv". - libreadline-dev
--- apt_repos: - ppa:nginx/stable apt_packages: - imagemagick - libmagickcore-dev - libmagickwand-dev - htop - vim - time - tree - make - apparmor-utils - python-software-properties - software-properties-common - rsync - libssl-dev - zlib1g-dev - rng-tools - python-passlib - cgroup-bin - git - build-essential - libssl-dev - zlib1g-dev # Needed for "rbenv". - libreadline-dev
Remove PPA in favor of "cikit-nodejs" role
[CIKit][NodeJS] Remove PPA in favor of "cikit-nodejs" role
YAML
apache-2.0
BR0kEN-/cikit,BR0kEN-/cikit,BR0kEN-/cikit,BR0kEN-/cikit,BR0kEN-/cikit
yaml
## Code Before: --- apt_repos: - ppa:chris-lea/node.js - ppa:nginx/stable apt_packages: - imagemagick - libmagickcore-dev - libmagickwand-dev - htop - vim - time - tree - make - apparmor-utils - python-software-properties - software-properties-common - rsync - libssl-dev - zlib1g-dev - rng-tools - python-passlib - cgroup-bin - git - build-essential - libssl-dev - zlib1g-dev # Needed for "rbenv". - libreadline-dev ## Instruction: [CIKit][NodeJS] Remove PPA in favor of "cikit-nodejs" role ## Code After: --- apt_repos: - ppa:nginx/stable apt_packages: - imagemagick - libmagickcore-dev - libmagickwand-dev - htop - vim - time - tree - make - apparmor-utils - python-software-properties - software-properties-common - rsync - libssl-dev - zlib1g-dev - rng-tools - python-passlib - cgroup-bin - git - build-essential - libssl-dev - zlib1g-dev # Needed for "rbenv". - libreadline-dev
--- apt_repos: - - ppa:chris-lea/node.js - ppa:nginx/stable apt_packages: - imagemagick - libmagickcore-dev - libmagickwand-dev - htop - vim - time - tree - make - apparmor-utils - python-software-properties - software-properties-common - rsync - libssl-dev - zlib1g-dev - rng-tools - python-passlib - cgroup-bin - git - build-essential - libssl-dev - zlib1g-dev # Needed for "rbenv". - libreadline-dev
1
0.034483
0
1
7ef0d08d1eaf515a8b48a4d963b1f841e8b84355
lib/src/index.ts
lib/src/index.ts
// Packages import webpack = require('webpack') // Ours import { CompilerOptions } from './types/options' import { merge } from './config' const core = (options: CompilerOptions): webpack.Compiler => { return webpack(merge(options)) } export { core }
// Packages import webpack = require('webpack') // Ours import { CompilerOptions } from './types/options' import { merge } from './config' const prepare = (options: CompilerOptions): webpack.Compiler => { return webpack(merge(options)) } export { prepare }
Rename exported function 'core' to 'prepare'
refactor(lib): Rename exported function 'core' to 'prepare' BREAKING CHANGE: Rename exported function `core` to `prepare`
TypeScript
mit
glitchapp/glitch,glitchapp/glitch,glitchapp/glitch
typescript
## Code Before: // Packages import webpack = require('webpack') // Ours import { CompilerOptions } from './types/options' import { merge } from './config' const core = (options: CompilerOptions): webpack.Compiler => { return webpack(merge(options)) } export { core } ## Instruction: refactor(lib): Rename exported function 'core' to 'prepare' BREAKING CHANGE: Rename exported function `core` to `prepare` ## Code After: // Packages import webpack = require('webpack') // Ours import { CompilerOptions } from './types/options' import { merge } from './config' const prepare = (options: CompilerOptions): webpack.Compiler => { return webpack(merge(options)) } export { prepare }
// Packages import webpack = require('webpack') // Ours import { CompilerOptions } from './types/options' import { merge } from './config' - const core = (options: CompilerOptions): webpack.Compiler => { ? ^^ + const prepare = (options: CompilerOptions): webpack.Compiler => { ? ^^^^^ return webpack(merge(options)) } - export { core } ? ^^ + export { prepare } ? ^^^^^
4
0.333333
2
2
56946dbddb5b853628761512839ad740e4b4e478
static/templates/me_message.hbs
static/templates/me_message.hbs
<span class="message_sender no-select"> <span class="sender_info_hover"> {{> message_avatar}} </span> <span class="sender-status"> <span class="sender_info_hover sender_name-in-status auto-select" role="button" tabindex="0">{{msg/sender_full_name}}</span> {{#if sender_is_bot}} <i class="zulip-icon bot" aria-label="{{t 'Bot' }}"></i> {{/if}} <span class="status-message auto-select"> {{{ status_message }}} </span> {{#if edited_status_msg}} {{> edited_notice}} {{/if}} </span> </span>
<span class="message_sender no-select"> <span class="sender_info_hover"> {{> message_avatar}} </span> <span class="sender-status"> <span class="sender_info_hover sender_name-in-status auto-select" role="button" tabindex="0">{{msg/sender_full_name}}</span> {{#if sender_is_bot}} <i class="zulip-icon bot" aria-label="{{t 'Bot' }}"></i> {{/if}} <span class="rendered_markdown status-message auto-select"> {{{ status_message }}} </span> {{#if edited_status_msg}} {{> edited_notice}} {{/if}} </span> </span>
Fix missing rendered_markdown class on /me content.
design: Fix missing rendered_markdown class on /me content. There may be a deeper issue that various JavaScript logic expects every message to have a `.message_content` element, but we definitely should have the `.rendered_markdown` class on any markdown content. Fixes #13634.
Handlebars
apache-2.0
kou/zulip,brainwane/zulip,rht/zulip,rht/zulip,zulip/zulip,showell/zulip,brainwane/zulip,showell/zulip,andersk/zulip,timabbott/zulip,brainwane/zulip,punchagan/zulip,shubhamdhama/zulip,eeshangarg/zulip,synicalsyntax/zulip,brainwane/zulip,shubhamdhama/zulip,hackerkid/zulip,kou/zulip,hackerkid/zulip,kou/zulip,kou/zulip,punchagan/zulip,zulip/zulip,eeshangarg/zulip,timabbott/zulip,hackerkid/zulip,synicalsyntax/zulip,shubhamdhama/zulip,hackerkid/zulip,zulip/zulip,andersk/zulip,punchagan/zulip,shubhamdhama/zulip,synicalsyntax/zulip,rht/zulip,punchagan/zulip,rht/zulip,hackerkid/zulip,synicalsyntax/zulip,andersk/zulip,andersk/zulip,shubhamdhama/zulip,synicalsyntax/zulip,eeshangarg/zulip,andersk/zulip,eeshangarg/zulip,showell/zulip,hackerkid/zulip,timabbott/zulip,punchagan/zulip,synicalsyntax/zulip,synicalsyntax/zulip,punchagan/zulip,rht/zulip,brainwane/zulip,kou/zulip,timabbott/zulip,eeshangarg/zulip,shubhamdhama/zulip,rht/zulip,andersk/zulip,shubhamdhama/zulip,timabbott/zulip,zulip/zulip,showell/zulip,brainwane/zulip,showell/zulip,eeshangarg/zulip,andersk/zulip,timabbott/zulip,hackerkid/zulip,showell/zulip,zulip/zulip,brainwane/zulip,zulip/zulip,rht/zulip,zulip/zulip,punchagan/zulip,showell/zulip,kou/zulip,timabbott/zulip,kou/zulip,eeshangarg/zulip
handlebars
## Code Before: <span class="message_sender no-select"> <span class="sender_info_hover"> {{> message_avatar}} </span> <span class="sender-status"> <span class="sender_info_hover sender_name-in-status auto-select" role="button" tabindex="0">{{msg/sender_full_name}}</span> {{#if sender_is_bot}} <i class="zulip-icon bot" aria-label="{{t 'Bot' }}"></i> {{/if}} <span class="status-message auto-select"> {{{ status_message }}} </span> {{#if edited_status_msg}} {{> edited_notice}} {{/if}} </span> </span> ## Instruction: design: Fix missing rendered_markdown class on /me content. There may be a deeper issue that various JavaScript logic expects every message to have a `.message_content` element, but we definitely should have the `.rendered_markdown` class on any markdown content. Fixes #13634. ## Code After: <span class="message_sender no-select"> <span class="sender_info_hover"> {{> message_avatar}} </span> <span class="sender-status"> <span class="sender_info_hover sender_name-in-status auto-select" role="button" tabindex="0">{{msg/sender_full_name}}</span> {{#if sender_is_bot}} <i class="zulip-icon bot" aria-label="{{t 'Bot' }}"></i> {{/if}} <span class="rendered_markdown status-message auto-select"> {{{ status_message }}} </span> {{#if edited_status_msg}} {{> edited_notice}} {{/if}} </span> </span>
<span class="message_sender no-select"> <span class="sender_info_hover"> {{> message_avatar}} </span> <span class="sender-status"> <span class="sender_info_hover sender_name-in-status auto-select" role="button" tabindex="0">{{msg/sender_full_name}}</span> {{#if sender_is_bot}} <i class="zulip-icon bot" aria-label="{{t 'Bot' }}"></i> {{/if}} - <span class="status-message auto-select"> + <span class="rendered_markdown status-message auto-select"> ? ++++++++++++++++++ {{{ status_message }}} </span> {{#if edited_status_msg}} {{> edited_notice}} {{/if}} </span> </span>
2
0.1
1
1
969aed7046e4965962e8ed5daa9c557baffc48bc
glue_h5part/io.py
glue_h5part/io.py
import os import h5py from glue.core import Data def read_step_to_data(filename, step_id=0): """ Given a filename and a step ID, read in the data into a new Data object. """ f = h5py.File(filename, 'r') try: group = f['Step#{0}'.format(step_id)] except KeyError: raise ValueError("Step ID {0} not found in file: {1}".format(step_id, filename)) data = Data() for attribute in group: data[attribute] = group[attribute].value data.label = os.path.basename(filename.rsplit('.', 1)[0]) return data def find_n_steps(filename): """ Given a filename, find how many steps exist in the file. """ f = h5py.File(filename, 'r') if 'Step#0' not in f: raise ValueError("File does not contain Step#n entries") # Some groups may not be 'Step' groups so we have to work backwards. The # absolute maximum number of steps is the number of groups at the root level. n_max = len(f) for n_max in range(n_max - 1, -1, -1): if 'Step#{0}'.format(n_max) in f: return n_max
import os import h5py from glue.core import Data def read_step_to_data(filename, step_id=0): """ Given a filename and a step ID, read in the data into a new Data object. """ f = h5py.File(filename, 'r') try: group = f['Step#{0}'.format(step_id)] except KeyError: raise ValueError("Step ID {0} not found in file: {1}".format(step_id, filename)) data = Data() for attribute in group: try: data[attribute] = group[attribute].value except AttributeError: pass data.label = os.path.basename(filename.rsplit('.', 1)[0]) return data def find_n_steps(filename): """ Given a filename, find how many steps exist in the file. """ f = h5py.File(filename, 'r') if 'Step#0' not in f: raise ValueError("File does not contain Step#n entries") # Some groups may not be 'Step' groups so we have to work backwards. The # absolute maximum number of steps is the number of groups at the root level. n_max = len(f) for n_max in range(n_max - 1, -1, -1): if 'Step#{0}'.format(n_max) in f: return n_max
Fix issue with HDF5 objects that don't have a value
Fix issue with HDF5 objects that don't have a value
Python
bsd-2-clause
glue-viz/glue-h5part
python
## Code Before: import os import h5py from glue.core import Data def read_step_to_data(filename, step_id=0): """ Given a filename and a step ID, read in the data into a new Data object. """ f = h5py.File(filename, 'r') try: group = f['Step#{0}'.format(step_id)] except KeyError: raise ValueError("Step ID {0} not found in file: {1}".format(step_id, filename)) data = Data() for attribute in group: data[attribute] = group[attribute].value data.label = os.path.basename(filename.rsplit('.', 1)[0]) return data def find_n_steps(filename): """ Given a filename, find how many steps exist in the file. """ f = h5py.File(filename, 'r') if 'Step#0' not in f: raise ValueError("File does not contain Step#n entries") # Some groups may not be 'Step' groups so we have to work backwards. The # absolute maximum number of steps is the number of groups at the root level. n_max = len(f) for n_max in range(n_max - 1, -1, -1): if 'Step#{0}'.format(n_max) in f: return n_max ## Instruction: Fix issue with HDF5 objects that don't have a value ## Code After: import os import h5py from glue.core import Data def read_step_to_data(filename, step_id=0): """ Given a filename and a step ID, read in the data into a new Data object. """ f = h5py.File(filename, 'r') try: group = f['Step#{0}'.format(step_id)] except KeyError: raise ValueError("Step ID {0} not found in file: {1}".format(step_id, filename)) data = Data() for attribute in group: try: data[attribute] = group[attribute].value except AttributeError: pass data.label = os.path.basename(filename.rsplit('.', 1)[0]) return data def find_n_steps(filename): """ Given a filename, find how many steps exist in the file. """ f = h5py.File(filename, 'r') if 'Step#0' not in f: raise ValueError("File does not contain Step#n entries") # Some groups may not be 'Step' groups so we have to work backwards. The # absolute maximum number of steps is the number of groups at the root level. n_max = len(f) for n_max in range(n_max - 1, -1, -1): if 'Step#{0}'.format(n_max) in f: return n_max
import os import h5py from glue.core import Data def read_step_to_data(filename, step_id=0): """ Given a filename and a step ID, read in the data into a new Data object. """ f = h5py.File(filename, 'r') try: group = f['Step#{0}'.format(step_id)] except KeyError: raise ValueError("Step ID {0} not found in file: {1}".format(step_id, filename)) data = Data() for attribute in group: + try: - data[attribute] = group[attribute].value + data[attribute] = group[attribute].value ? ++++ + except AttributeError: + pass data.label = os.path.basename(filename.rsplit('.', 1)[0]) return data def find_n_steps(filename): """ Given a filename, find how many steps exist in the file. """ f = h5py.File(filename, 'r') if 'Step#0' not in f: raise ValueError("File does not contain Step#n entries") # Some groups may not be 'Step' groups so we have to work backwards. The # absolute maximum number of steps is the number of groups at the root level. n_max = len(f) for n_max in range(n_max - 1, -1, -1): if 'Step#{0}'.format(n_max) in f: return n_max
5
0.116279
4
1
8a39850ab656af45c16e11d838ac4c14b1f199bb
src/Filter/AssociationToOneFilter.php
src/Filter/AssociationToOneFilter.php
<?php namespace Tenet\Filter; use Tenet\FilterInterface; use Tenet\Accessor; class AssociationToOneFilter extends AbstractAssociationFilter implements FilterInterface { public function convertToSetterValue(Accessor $accessor, $object, $field, $value) { $manager = $accessor->getObjectManager(); $objectMetadata = $manager->getClassMetadata(get_class($object)); $mappedField = $objectMetadata->getAssociationMappedByTargetField($field); $mappedClass = $objectMetadata->getAssociationTargetClass($field); $relatedObject = $this->makeObject($accessor, $object, $field, $value); if ($relatedObject && ($mappedField != $field || $mappledClass != get_class($object))) { $accessor->set($relatedObject, $mappedField, $object); } return $relatedObject; } public function convertToGetterValue(Accessor $accessor, $object, $field, $value) { return $value; } }
<?php namespace Tenet\Filter; use Tenet\FilterInterface; use Tenet\Accessor; class AssociationToOneFilter extends AbstractAssociationFilter implements FilterInterface { public function convertToSetterValue(Accessor $accessor, $object, $field, $value) { $manager = $accessor->getObjectManager(); $objectMetadata = $manager->getClassMetadata(get_class($object)); $mappedField = $objectMetadata->getAssociationMappedByTargetField($field); $mappedClass = $objectMetadata->getAssociationTargetClass($field); $relatedObject = $this->makeObject($accessor, $object, $field, $value); if ($relatedObject && $mappedField && ($mappedField != $field || $mappledClass != get_class($object))) { $accessor->set($relatedObject, $mappedField, $object); } return $relatedObject; } public function convertToGetterValue(Accessor $accessor, $object, $field, $value) { return $value; } }
Fix when no mapped field is available
Fix when no mapped field is available
PHP
mit
imarc/tenet
php
## Code Before: <?php namespace Tenet\Filter; use Tenet\FilterInterface; use Tenet\Accessor; class AssociationToOneFilter extends AbstractAssociationFilter implements FilterInterface { public function convertToSetterValue(Accessor $accessor, $object, $field, $value) { $manager = $accessor->getObjectManager(); $objectMetadata = $manager->getClassMetadata(get_class($object)); $mappedField = $objectMetadata->getAssociationMappedByTargetField($field); $mappedClass = $objectMetadata->getAssociationTargetClass($field); $relatedObject = $this->makeObject($accessor, $object, $field, $value); if ($relatedObject && ($mappedField != $field || $mappledClass != get_class($object))) { $accessor->set($relatedObject, $mappedField, $object); } return $relatedObject; } public function convertToGetterValue(Accessor $accessor, $object, $field, $value) { return $value; } } ## Instruction: Fix when no mapped field is available ## Code After: <?php namespace Tenet\Filter; use Tenet\FilterInterface; use Tenet\Accessor; class AssociationToOneFilter extends AbstractAssociationFilter implements FilterInterface { public function convertToSetterValue(Accessor $accessor, $object, $field, $value) { $manager = $accessor->getObjectManager(); $objectMetadata = $manager->getClassMetadata(get_class($object)); $mappedField = $objectMetadata->getAssociationMappedByTargetField($field); $mappedClass = $objectMetadata->getAssociationTargetClass($field); $relatedObject = $this->makeObject($accessor, $object, $field, $value); if ($relatedObject && $mappedField && ($mappedField != $field || $mappledClass != get_class($object))) { $accessor->set($relatedObject, $mappedField, $object); } return $relatedObject; } public function convertToGetterValue(Accessor $accessor, $object, $field, $value) { return $value; } }
<?php namespace Tenet\Filter; use Tenet\FilterInterface; use Tenet\Accessor; class AssociationToOneFilter extends AbstractAssociationFilter implements FilterInterface { public function convertToSetterValue(Accessor $accessor, $object, $field, $value) { $manager = $accessor->getObjectManager(); $objectMetadata = $manager->getClassMetadata(get_class($object)); $mappedField = $objectMetadata->getAssociationMappedByTargetField($field); $mappedClass = $objectMetadata->getAssociationTargetClass($field); $relatedObject = $this->makeObject($accessor, $object, $field, $value); - if ($relatedObject && ($mappedField != $field || $mappledClass != get_class($object))) { + if ($relatedObject && $mappedField && ($mappedField != $field || $mappledClass != get_class($object))) { ? ++++++++++++++++ $accessor->set($relatedObject, $mappedField, $object); } return $relatedObject; } public function convertToGetterValue(Accessor $accessor, $object, $field, $value) { return $value; } }
2
0.071429
1
1
c614cbc303cdbc21fc492f9c262df596ecbb1bcf
app/js/translations.js
app/js/translations.js
const i18n = require('i18next') const _ = require('underscore') const path = require('path') module.exports = { setup(options = {}) { const subdomainLang = options.subdomainLang || {} const availableLngs = _.pluck(_.values(subdomainLang), 'lngCode') i18n.init({ resGetPath: path.resolve(__dirname, '../../', 'locales/__lng__.json'), saveMissing: true, resSetPath: path.resolve( __dirname, '../../', 'locales/missing-__lng__.json' ), sendMissingTo: 'fallback', fallbackLng: options.defaultLng || 'en', detectLngFromHeaders: true, useCookie: false, preload: availableLngs, supportedLngs: availableLngs }) const setLangBasedOnDomainMiddlewear = function(req, res, next) { const { host } = req.headers if (host == null) { return next() } const parts = host.split(/[.-]/) const subdomain = parts[0] const lang = subdomainLang[subdomainLang] ? subdomainLang[subdomain].lngCode : null if (req.originalUrl.indexOf('setLng') === -1 && lang != null) { req.i18n.setLng(lang) } if (req.language !== req.lng) { req.showUserOtherLng = req.language } next() } return { expressMiddlewear: i18n.handle, setLangBasedOnDomainMiddlewear, i18n } } }
const i18n = require('i18next') const _ = require('underscore') const path = require('path') module.exports = { setup(options = {}) { const subdomainLang = options.subdomainLang || {} const availableLngs = _.pluck(_.values(subdomainLang), 'lngCode') i18n.init({ resGetPath: path.resolve(__dirname, '../../', 'locales/__lng__.json'), saveMissing: true, resSetPath: path.resolve( __dirname, '../../', 'locales/missing-__lng__.json' ), sendMissingTo: 'fallback', fallbackLng: options.defaultLng || 'en', detectLngFromHeaders: true, useCookie: false, preload: availableLngs, supportedLngs: availableLngs }) const setLangBasedOnDomainMiddlewear = function(req, res, next) { // Determine language from subdomain const { host } = req.headers if (host == null) { return next() } const [subdomain] = host.split(/[.-]/) const lang = subdomainLang[subdomain] ? subdomainLang[subdomain].lngCode : null // Unless setLng query param is set, use subdomain lang if (!req.originalUrl.includes('setLng') && lang != null) { req.i18n.setLng(lang) } if (req.language !== req.lng) { req.showUserOtherLng = req.language } next() } return { expressMiddlewear: i18n.handle, setLangBasedOnDomainMiddlewear, i18n } } }
Clean up & comment language determination
Clean up & comment language determination
JavaScript
mit
sharelatex/translations-sharelatex
javascript
## Code Before: const i18n = require('i18next') const _ = require('underscore') const path = require('path') module.exports = { setup(options = {}) { const subdomainLang = options.subdomainLang || {} const availableLngs = _.pluck(_.values(subdomainLang), 'lngCode') i18n.init({ resGetPath: path.resolve(__dirname, '../../', 'locales/__lng__.json'), saveMissing: true, resSetPath: path.resolve( __dirname, '../../', 'locales/missing-__lng__.json' ), sendMissingTo: 'fallback', fallbackLng: options.defaultLng || 'en', detectLngFromHeaders: true, useCookie: false, preload: availableLngs, supportedLngs: availableLngs }) const setLangBasedOnDomainMiddlewear = function(req, res, next) { const { host } = req.headers if (host == null) { return next() } const parts = host.split(/[.-]/) const subdomain = parts[0] const lang = subdomainLang[subdomainLang] ? subdomainLang[subdomain].lngCode : null if (req.originalUrl.indexOf('setLng') === -1 && lang != null) { req.i18n.setLng(lang) } if (req.language !== req.lng) { req.showUserOtherLng = req.language } next() } return { expressMiddlewear: i18n.handle, setLangBasedOnDomainMiddlewear, i18n } } } ## Instruction: Clean up & comment language determination ## Code After: const i18n = require('i18next') const _ = require('underscore') const path = require('path') module.exports = { setup(options = {}) { const subdomainLang = options.subdomainLang || {} const availableLngs = _.pluck(_.values(subdomainLang), 'lngCode') i18n.init({ resGetPath: path.resolve(__dirname, '../../', 'locales/__lng__.json'), saveMissing: true, resSetPath: path.resolve( __dirname, '../../', 'locales/missing-__lng__.json' ), sendMissingTo: 'fallback', fallbackLng: options.defaultLng || 'en', detectLngFromHeaders: true, useCookie: false, preload: availableLngs, supportedLngs: availableLngs }) const setLangBasedOnDomainMiddlewear = function(req, res, next) { // Determine language from subdomain const { host } = req.headers if (host == null) { return next() } const [subdomain] = host.split(/[.-]/) const lang = subdomainLang[subdomain] ? subdomainLang[subdomain].lngCode : null // Unless setLng query param is set, use subdomain lang if (!req.originalUrl.includes('setLng') && lang != null) { req.i18n.setLng(lang) } if (req.language !== req.lng) { req.showUserOtherLng = req.language } next() } return { expressMiddlewear: i18n.handle, setLangBasedOnDomainMiddlewear, i18n } } }
const i18n = require('i18next') const _ = require('underscore') const path = require('path') module.exports = { setup(options = {}) { const subdomainLang = options.subdomainLang || {} const availableLngs = _.pluck(_.values(subdomainLang), 'lngCode') + i18n.init({ resGetPath: path.resolve(__dirname, '../../', 'locales/__lng__.json'), saveMissing: true, resSetPath: path.resolve( __dirname, '../../', 'locales/missing-__lng__.json' ), sendMissingTo: 'fallback', fallbackLng: options.defaultLng || 'en', detectLngFromHeaders: true, useCookie: false, preload: availableLngs, supportedLngs: availableLngs }) + const setLangBasedOnDomainMiddlewear = function(req, res, next) { + // Determine language from subdomain const { host } = req.headers if (host == null) { return next() } - const parts = host.split(/[.-]/) ? ^ ^^^ + const [subdomain] = host.split(/[.-]/) ? ^^^^^^^ ^^^ - const subdomain = parts[0] - - const lang = subdomainLang[subdomainLang] ? ---- + const lang = subdomainLang[subdomain] ? subdomainLang[subdomain].lngCode : null + // Unless setLng query param is set, use subdomain lang - if (req.originalUrl.indexOf('setLng') === -1 && lang != null) { ? ^^^ ------- + if (!req.originalUrl.includes('setLng') && lang != null) { ? + +++ ^ req.i18n.setLng(lang) } + if (req.language !== req.lng) { req.showUserOtherLng = req.language } + next() } return { expressMiddlewear: i18n.handle, setLangBasedOnDomainMiddlewear, i18n } } }
14
0.27451
9
5
3a8d7ff5f047c7b3476b8dcffa0e6850e952a645
docs/examples/http_proxy/set_http_proxy_method.py
docs/examples/http_proxy/set_http_proxy_method.py
from pprint import pprint from libcloud.compute.types import Provider from libcloud.compute.providers import get_driver PROXY_URL = 'http://<proxy hostname>:<proxy port>' cls = get_driver(Provider.RACKSPACE) driver = cls('username', 'api key', region='ord') driver.set_http_proxy(proxy_url=PROXY_URL) pprint(driver.list_nodes())
from pprint import pprint from libcloud.compute.types import Provider from libcloud.compute.providers import get_driver PROXY_URL = 'http://<proxy hostname>:<proxy port>' cls = get_driver(Provider.RACKSPACE) driver = cls('username', 'api key', region='ord') driver.connection.set_http_proxy(proxy_url=PROXY_URL) pprint(driver.list_nodes())
Fix a typo in the example.
Fix a typo in the example.
Python
apache-2.0
kater169/libcloud,DimensionDataCBUSydney/libcloud,t-tran/libcloud,Scalr/libcloud,MrBasset/libcloud,watermelo/libcloud,curoverse/libcloud,Kami/libcloud,SecurityCompass/libcloud,Kami/libcloud,pantheon-systems/libcloud,andrewsomething/libcloud,schaubl/libcloud,pantheon-systems/libcloud,jimbobhickville/libcloud,munkiat/libcloud,iPlantCollaborativeOpenSource/libcloud,schaubl/libcloud,Kami/libcloud,JamesGuthrie/libcloud,sahildua2305/libcloud,jimbobhickville/libcloud,iPlantCollaborativeOpenSource/libcloud,aleGpereira/libcloud,mgogoulos/libcloud,SecurityCompass/libcloud,curoverse/libcloud,munkiat/libcloud,sfriesel/libcloud,mbrukman/libcloud,smaffulli/libcloud,mistio/libcloud,niteoweb/libcloud,briancurtin/libcloud,supertom/libcloud,sergiorua/libcloud,cryptickp/libcloud,watermelo/libcloud,vongazman/libcloud,sergiorua/libcloud,samuelchong/libcloud,sfriesel/libcloud,StackPointCloud/libcloud,JamesGuthrie/libcloud,thesquelched/libcloud,cloudControl/libcloud,lochiiconnectivity/libcloud,DimensionDataCBUSydney/libcloud,aviweit/libcloud,t-tran/libcloud,thesquelched/libcloud,jerryblakley/libcloud,techhat/libcloud,cryptickp/libcloud,MrBasset/libcloud,ZuluPro/libcloud,ByteInternet/libcloud,Verizon/libcloud,mbrukman/libcloud,wrigri/libcloud,jimbobhickville/libcloud,Verizon/libcloud,cloudControl/libcloud,wuyuewen/libcloud,iPlantCollaborativeOpenSource/libcloud,mbrukman/libcloud,sahildua2305/libcloud,niteoweb/libcloud,kater169/libcloud,lochiiconnectivity/libcloud,atsaki/libcloud,curoverse/libcloud,smaffulli/libcloud,apache/libcloud,erjohnso/libcloud,mistio/libcloud,apache/libcloud,marcinzaremba/libcloud,ZuluPro/libcloud,ByteInternet/libcloud,mathspace/libcloud,dcorbacho/libcloud,marcinzaremba/libcloud,wido/libcloud,pantheon-systems/libcloud,Itxaka/libcloud,dcorbacho/libcloud,mtekel/libcloud,schaubl/libcloud,munkiat/libcloud,Itxaka/libcloud,mathspace/libcloud,Scalr/libcloud,DimensionDataCBUSydney/libcloud,jerryblakley/libcloud,Cloud-Elasticity-Services/as-libcloud,andrewsomething/libcloud,Itxaka/libcloud,NexusIS/libcloud,atsaki/libcloud,Cloud-Elasticity-Services/as-libcloud,jerryblakley/libcloud,techhat/libcloud,aleGpereira/libcloud,techhat/libcloud,samuelchong/libcloud,supertom/libcloud,cloudControl/libcloud,niteoweb/libcloud,sfriesel/libcloud,mgogoulos/libcloud,t-tran/libcloud,Verizon/libcloud,marcinzaremba/libcloud,carletes/libcloud,wuyuewen/libcloud,samuelchong/libcloud,cryptickp/libcloud,mathspace/libcloud,thesquelched/libcloud,mtekel/libcloud,wrigri/libcloud,sergiorua/libcloud,vongazman/libcloud,carletes/libcloud,smaffulli/libcloud,vongazman/libcloud,mistio/libcloud,sahildua2305/libcloud,wuyuewen/libcloud,dcorbacho/libcloud,illfelder/libcloud,lochiiconnectivity/libcloud,atsaki/libcloud,aviweit/libcloud,pquentin/libcloud,carletes/libcloud,ZuluPro/libcloud,wido/libcloud,ByteInternet/libcloud,briancurtin/libcloud,pquentin/libcloud,mgogoulos/libcloud,illfelder/libcloud,apache/libcloud,aviweit/libcloud,erjohnso/libcloud,andrewsomething/libcloud,Scalr/libcloud,aleGpereira/libcloud,MrBasset/libcloud,mtekel/libcloud,pquentin/libcloud,watermelo/libcloud,supertom/libcloud,StackPointCloud/libcloud,Cloud-Elasticity-Services/as-libcloud,NexusIS/libcloud,briancurtin/libcloud,erjohnso/libcloud,JamesGuthrie/libcloud,SecurityCompass/libcloud,wrigri/libcloud,StackPointCloud/libcloud,kater169/libcloud,NexusIS/libcloud,wido/libcloud,illfelder/libcloud
python
## Code Before: from pprint import pprint from libcloud.compute.types import Provider from libcloud.compute.providers import get_driver PROXY_URL = 'http://<proxy hostname>:<proxy port>' cls = get_driver(Provider.RACKSPACE) driver = cls('username', 'api key', region='ord') driver.set_http_proxy(proxy_url=PROXY_URL) pprint(driver.list_nodes()) ## Instruction: Fix a typo in the example. ## Code After: from pprint import pprint from libcloud.compute.types import Provider from libcloud.compute.providers import get_driver PROXY_URL = 'http://<proxy hostname>:<proxy port>' cls = get_driver(Provider.RACKSPACE) driver = cls('username', 'api key', region='ord') driver.connection.set_http_proxy(proxy_url=PROXY_URL) pprint(driver.list_nodes())
from pprint import pprint from libcloud.compute.types import Provider from libcloud.compute.providers import get_driver PROXY_URL = 'http://<proxy hostname>:<proxy port>' cls = get_driver(Provider.RACKSPACE) driver = cls('username', 'api key', region='ord') - driver.set_http_proxy(proxy_url=PROXY_URL) + driver.connection.set_http_proxy(proxy_url=PROXY_URL) ? +++++++++++ pprint(driver.list_nodes())
2
0.166667
1
1
2fecb53023312264ef8d188512293792890343c4
site/layouts/partials/getting-started/components-requiring-javascript.html
site/layouts/partials/getting-started/components-requiring-javascript.html
<details> <summary class="text-primary mb-3">Show components requiring JavaScript</summary> <ul> <li>Alerts for dismissing</li> <li>Buttons for toggling states and checkbox/radio functionality</li> <li>Carousel for all slide behaviors, controls, and indicators</li> <li>Collapse for toggling visibility of content</li> <li>Dropdowns for displaying and positioning (also requires <a href="https://popper.js.org/">Popper.js</a>)</li> <li>Modals for displaying, positioning, and scroll behavior</li> <li>Navbar for extending our Collapse plugin to implement responsive behavior</li> <li>Tooltips and popovers for displaying and positioning (also requires <a href="https://popper.js.org/">Popper.js</a>)</li> <li>Scrollspy for scroll behavior and navigation updates</li> </ul> </details>
<details> <summary class="text-primary mb-3">Show components requiring JavaScript</summary> <ul> <li>Alerts for dismissing</li> <li>Buttons for toggling states and checkbox/radio functionality</li> <li>Carousel for all slide behaviors, controls, and indicators</li> <li>Collapse for toggling visibility of content</li> <li>Dropdowns for displaying and positioning (also requires <a href="https://popper.js.org/">Popper.js</a>)</li> <li>Modals for displaying, positioning, and scroll behavior</li> <li>Navbar for extending our Collapse plugin to implement responsive behavior</li> <li>Toasts for displaying and dismissing</li> <li>Tooltips and popovers for displaying and positioning (also requires <a href="https://popper.js.org/">Popper.js</a>)</li> <li>Scrollspy for scroll behavior and navigation updates</li> </ul> </details>
Add toasts to the components requiring JavaScript
Add toasts to the components requiring JavaScript BS5 commits: 2ec2e138c97ff58c98e4f6fbdb78e4e4dec6914f
HTML
mit
todc/todc-bootstrap,todc/todc-bootstrap,todc/todc-bootstrap
html
## Code Before: <details> <summary class="text-primary mb-3">Show components requiring JavaScript</summary> <ul> <li>Alerts for dismissing</li> <li>Buttons for toggling states and checkbox/radio functionality</li> <li>Carousel for all slide behaviors, controls, and indicators</li> <li>Collapse for toggling visibility of content</li> <li>Dropdowns for displaying and positioning (also requires <a href="https://popper.js.org/">Popper.js</a>)</li> <li>Modals for displaying, positioning, and scroll behavior</li> <li>Navbar for extending our Collapse plugin to implement responsive behavior</li> <li>Tooltips and popovers for displaying and positioning (also requires <a href="https://popper.js.org/">Popper.js</a>)</li> <li>Scrollspy for scroll behavior and navigation updates</li> </ul> </details> ## Instruction: Add toasts to the components requiring JavaScript BS5 commits: 2ec2e138c97ff58c98e4f6fbdb78e4e4dec6914f ## Code After: <details> <summary class="text-primary mb-3">Show components requiring JavaScript</summary> <ul> <li>Alerts for dismissing</li> <li>Buttons for toggling states and checkbox/radio functionality</li> <li>Carousel for all slide behaviors, controls, and indicators</li> <li>Collapse for toggling visibility of content</li> <li>Dropdowns for displaying and positioning (also requires <a href="https://popper.js.org/">Popper.js</a>)</li> <li>Modals for displaying, positioning, and scroll behavior</li> <li>Navbar for extending our Collapse plugin to implement responsive behavior</li> <li>Toasts for displaying and dismissing</li> <li>Tooltips and popovers for displaying and positioning (also requires <a href="https://popper.js.org/">Popper.js</a>)</li> <li>Scrollspy for scroll behavior and navigation updates</li> </ul> </details>
<details> <summary class="text-primary mb-3">Show components requiring JavaScript</summary> <ul> <li>Alerts for dismissing</li> <li>Buttons for toggling states and checkbox/radio functionality</li> <li>Carousel for all slide behaviors, controls, and indicators</li> <li>Collapse for toggling visibility of content</li> <li>Dropdowns for displaying and positioning (also requires <a href="https://popper.js.org/">Popper.js</a>)</li> <li>Modals for displaying, positioning, and scroll behavior</li> <li>Navbar for extending our Collapse plugin to implement responsive behavior</li> + <li>Toasts for displaying and dismissing</li> <li>Tooltips and popovers for displaying and positioning (also requires <a href="https://popper.js.org/">Popper.js</a>)</li> <li>Scrollspy for scroll behavior and navigation updates</li> </ul> </details>
1
0.071429
1
0
b6b9a1a3645d6d23faaa4b3b667ab740961318de
top1m/testtop1m.sh
top1m/testtop1m.sh
parallel=50 [ ! -e "results" ] && mkdir results i=1 while [ $i -lt 1000000 ] do echo processings sites $i to $((i + parallel)) for t in $(tail -$((1000000 - $i)) top-1m.csv | head -$parallel |cut -d ',' -f 2) do (tcping -u 10000000 $t 443; if [ $? -gt 0 ];then continue;fi;../cipherscan $t:443 -json > results/$t )& done sleep 7 i=$(( i + parallel)) done
parallel=50 max_bg=400 [ ! -e "results" ] && mkdir results function wait_for_jobs() { local no_jobs no_jobs=$(jobs | wc -l) while [ $no_jobs -gt $1 ]; do sleep 1 no_jobs=$(jobs | wc -l) done } i=0 count=$(wc -l top-1m.csv | awk '{print $1}') while [ $i -lt $count ] do echo processings sites $i to $((i + parallel)) for t in $(tail -$(($count - $i)) top-1m.csv | head -$parallel |cut -d ',' -f 2) do (tcping -u 10000000 $t 443; if [ $? -gt 0 ];then tcping -u 10000000 www.$t 443; if [ $? -gt 0 ]; then continue; else ../cipherscan -json www.$t:443 > results/www.$t continue; fi; fi;../cipherscan -json $t:443 > results/$t )& done i=$(( i + parallel)) wait_for_jobs $max_bg done wait
Improve scanning performance and reduce false negatives
Improve scanning performance and reduce false negatives scan all the machines from top-1m.csv file, wait for completion of all jobs i=1 is an off-by-one-error support top-1m.csv files with arbitrary number of sites run scans for many hosts at a time, but don't run more than specified amount in case where default domain name doesn't resolve or doesn't have port 443 open, retry with www. prefix
Shell
mpl-2.0
PeterMosmans/cipherscan,jvehent/cipherscan,jvehent/cipherscan,MikeDawg/cipherscan,MikeDawg/cipherscan,PeterMosmans/cipherscan,MikeDawg/cipherscan,PeterMosmans/cipherscan,jvehent/cipherscan
shell
## Code Before: parallel=50 [ ! -e "results" ] && mkdir results i=1 while [ $i -lt 1000000 ] do echo processings sites $i to $((i + parallel)) for t in $(tail -$((1000000 - $i)) top-1m.csv | head -$parallel |cut -d ',' -f 2) do (tcping -u 10000000 $t 443; if [ $? -gt 0 ];then continue;fi;../cipherscan $t:443 -json > results/$t )& done sleep 7 i=$(( i + parallel)) done ## Instruction: Improve scanning performance and reduce false negatives scan all the machines from top-1m.csv file, wait for completion of all jobs i=1 is an off-by-one-error support top-1m.csv files with arbitrary number of sites run scans for many hosts at a time, but don't run more than specified amount in case where default domain name doesn't resolve or doesn't have port 443 open, retry with www. prefix ## Code After: parallel=50 max_bg=400 [ ! -e "results" ] && mkdir results function wait_for_jobs() { local no_jobs no_jobs=$(jobs | wc -l) while [ $no_jobs -gt $1 ]; do sleep 1 no_jobs=$(jobs | wc -l) done } i=0 count=$(wc -l top-1m.csv | awk '{print $1}') while [ $i -lt $count ] do echo processings sites $i to $((i + parallel)) for t in $(tail -$(($count - $i)) top-1m.csv | head -$parallel |cut -d ',' -f 2) do (tcping -u 10000000 $t 443; if [ $? -gt 0 ];then tcping -u 10000000 www.$t 443; if [ $? -gt 0 ]; then continue; else ../cipherscan -json www.$t:443 > results/www.$t continue; fi; fi;../cipherscan -json $t:443 > results/$t )& done i=$(( i + parallel)) wait_for_jobs $max_bg done wait
parallel=50 + max_bg=400 [ ! -e "results" ] && mkdir results - i=1 - while [ $i -lt 1000000 ] + + function wait_for_jobs() { + local no_jobs + no_jobs=$(jobs | wc -l) + + while [ $no_jobs -gt $1 ]; do + sleep 1 + no_jobs=$(jobs | wc -l) + done + } + + i=0 + count=$(wc -l top-1m.csv | awk '{print $1}') + while [ $i -lt $count ] do echo processings sites $i to $((i + parallel)) - for t in $(tail -$((1000000 - $i)) top-1m.csv | head -$parallel |cut -d ',' -f 2) ? ^^^^^^^ + for t in $(tail -$(($count - $i)) top-1m.csv | head -$parallel |cut -d ',' -f 2) ? ^^^^^^ do - (tcping -u 10000000 $t 443; if [ $? -gt 0 ];then continue;fi;../cipherscan $t:443 -json > results/$t )& + (tcping -u 10000000 $t 443; + if [ $? -gt 0 ];then + tcping -u 10000000 www.$t 443; + if [ $? -gt 0 ]; then + continue; + else + ../cipherscan -json www.$t:443 > results/www.$t + continue; + fi; + fi;../cipherscan -json $t:443 > results/$t )& done - sleep 7 i=$(( i + parallel)) + wait_for_jobs $max_bg done + wait
33
2.538462
28
5
57436ed6968a713014a568ebd254029034f71743
config/routes.rb
config/routes.rb
Devcon::Application.routes.draw do mount Ckeditor::Engine => '/ckeditor' devise_for :users resources :users, :only => [:show] devise_scope :user do get 'login', :to => 'devise/sessions#new', :as => :new_user_session delete 'logout', :to => 'devise/sessions#destroy', :as => :destroy_user_session get 'register', :to => 'devise/registrations#new', :as => :new_user_registration get 'settings', :to => 'devise/registrations#edit', :as => :edit_user_registration end resources :articles do resources :comments, :except => [:new] end resources :events do collection do get :previous end resources :event_partners, :except => [:index, :show] resources :participants, :except => [:index, :show] end resources :partners, :only => [:index, :show] resources :resource_people resources :venues resources :entities resources :categories resources :tags match '/contact', :to => 'static_pages#contact' match '/about', :to => 'static_pages#about' root :to => 'static_pages#home' end
Devcon::Application.routes.draw do mount Ckeditor::Engine => '/ckeditor' devise_for :users resources :users, :only => [:show] devise_scope :user do get 'login', :to => 'devise/sessions#new', :as => :new_user_session delete 'logout', :to => 'devise/sessions#destroy', :as => :destroy_user_session get 'register', :to => 'devise/registrations#new', :as => :new_user_registration get 'settings', :to => 'devise/registrations#edit', :as => :edit_user_registration end resources :articles do resources :comments, :except => [:new] end resources :events do collection do get :previous end resources :event_partners, :except => [:index, :show] resources :participants, :except => [:index, :show] end resources :partners, :only => [:index, :show] resources :resource_people resources :venues resources :entities resources :categories resources :tags match '/contact', :to => 'static_pages#contact' match '/about', :to => 'static_pages#about' root :to => 'static_pages#home' unless Rails.application.config.consider_all_requests_local match '*not_found', to: 'static_pages#error_404' end end
Add missing route for error pages
Add missing route for error pages
Ruby
mit
devcon-ph/devcon,devcon-ph/devcon,devcon-ph/devcon
ruby
## Code Before: Devcon::Application.routes.draw do mount Ckeditor::Engine => '/ckeditor' devise_for :users resources :users, :only => [:show] devise_scope :user do get 'login', :to => 'devise/sessions#new', :as => :new_user_session delete 'logout', :to => 'devise/sessions#destroy', :as => :destroy_user_session get 'register', :to => 'devise/registrations#new', :as => :new_user_registration get 'settings', :to => 'devise/registrations#edit', :as => :edit_user_registration end resources :articles do resources :comments, :except => [:new] end resources :events do collection do get :previous end resources :event_partners, :except => [:index, :show] resources :participants, :except => [:index, :show] end resources :partners, :only => [:index, :show] resources :resource_people resources :venues resources :entities resources :categories resources :tags match '/contact', :to => 'static_pages#contact' match '/about', :to => 'static_pages#about' root :to => 'static_pages#home' end ## Instruction: Add missing route for error pages ## Code After: Devcon::Application.routes.draw do mount Ckeditor::Engine => '/ckeditor' devise_for :users resources :users, :only => [:show] devise_scope :user do get 'login', :to => 'devise/sessions#new', :as => :new_user_session delete 'logout', :to => 'devise/sessions#destroy', :as => :destroy_user_session get 'register', :to => 'devise/registrations#new', :as => :new_user_registration get 'settings', :to => 'devise/registrations#edit', :as => :edit_user_registration end resources :articles do resources :comments, :except => [:new] end resources :events do collection do get :previous end resources :event_partners, :except => [:index, :show] resources :participants, :except => [:index, :show] end resources :partners, :only => [:index, :show] resources :resource_people resources :venues resources :entities resources :categories resources :tags match '/contact', :to => 'static_pages#contact' match '/about', :to => 'static_pages#about' root :to => 'static_pages#home' unless Rails.application.config.consider_all_requests_local match '*not_found', to: 'static_pages#error_404' end end
Devcon::Application.routes.draw do mount Ckeditor::Engine => '/ckeditor' devise_for :users resources :users, :only => [:show] devise_scope :user do get 'login', :to => 'devise/sessions#new', :as => :new_user_session delete 'logout', :to => 'devise/sessions#destroy', :as => :destroy_user_session get 'register', :to => 'devise/registrations#new', :as => :new_user_registration get 'settings', :to => 'devise/registrations#edit', :as => :edit_user_registration end resources :articles do resources :comments, :except => [:new] end resources :events do collection do get :previous end resources :event_partners, :except => [:index, :show] resources :participants, :except => [:index, :show] end resources :partners, :only => [:index, :show] resources :resource_people resources :venues resources :entities resources :categories resources :tags match '/contact', :to => 'static_pages#contact' match '/about', :to => 'static_pages#about' root :to => 'static_pages#home' + unless Rails.application.config.consider_all_requests_local + match '*not_found', to: 'static_pages#error_404' + end end
3
0.078947
3
0
687e965ba722c7a0ec43817530d499280d420e9e
src/coffee/save.coffee
src/coffee/save.coffee
angular.module 'qbn.save', ['qbn.quality'] .factory 'savedGame', (qualities) -> storageName = 'qbnSave' api = load: () -> save = JSON.parse localStorage.getItem storageName return undefined if not save? for savedQuality in save.qualities quality = qualities.lookup savedQuality.id quality.load savedQuality return [save.storylet?.id, save.storylet?.isFrontal] save: (storylet, isFrontal) -> save = qualities: qualities.saveAll() if storylet? save.storylet = id: storylet isFrontal: isFrontal localStorage.setItem storageName, JSON.stringify save return erase: () -> localStorage.clear() return return Object.freeze api
angular.module 'qbn.save', ['qbn.quality'] .factory 'savedGame', (qualities) -> storageName = 'qbnSave' api = load: () -> save = JSON.parse localStorage.getItem storageName return undefined if not save? for savedQuality in save.qualities quality = qualities.lookup savedQuality.id quality.load savedQuality return [save.storylet?.id, save.storylet?.isFrontal] save: (storylet, isFrontal) -> save = qualities: qualities.saveAll() if storylet? save.storylet = id: storylet isFrontal: isFrontal localStorage.setItem storageName, JSON.stringify save return erase: () -> localStorage.clear() return return Object.freeze api window.emergencySaveClear = () -> localStorage.clear()
Allow Clearing the Save from the Console in a Pinch
Allow Clearing the Save from the Console in a Pinch
CoffeeScript
unlicense
arashikou/exper3-2015
coffeescript
## Code Before: angular.module 'qbn.save', ['qbn.quality'] .factory 'savedGame', (qualities) -> storageName = 'qbnSave' api = load: () -> save = JSON.parse localStorage.getItem storageName return undefined if not save? for savedQuality in save.qualities quality = qualities.lookup savedQuality.id quality.load savedQuality return [save.storylet?.id, save.storylet?.isFrontal] save: (storylet, isFrontal) -> save = qualities: qualities.saveAll() if storylet? save.storylet = id: storylet isFrontal: isFrontal localStorage.setItem storageName, JSON.stringify save return erase: () -> localStorage.clear() return return Object.freeze api ## Instruction: Allow Clearing the Save from the Console in a Pinch ## Code After: angular.module 'qbn.save', ['qbn.quality'] .factory 'savedGame', (qualities) -> storageName = 'qbnSave' api = load: () -> save = JSON.parse localStorage.getItem storageName return undefined if not save? for savedQuality in save.qualities quality = qualities.lookup savedQuality.id quality.load savedQuality return [save.storylet?.id, save.storylet?.isFrontal] save: (storylet, isFrontal) -> save = qualities: qualities.saveAll() if storylet? save.storylet = id: storylet isFrontal: isFrontal localStorage.setItem storageName, JSON.stringify save return erase: () -> localStorage.clear() return return Object.freeze api window.emergencySaveClear = () -> localStorage.clear()
angular.module 'qbn.save', ['qbn.quality'] .factory 'savedGame', (qualities) -> storageName = 'qbnSave' api = load: () -> save = JSON.parse localStorage.getItem storageName return undefined if not save? for savedQuality in save.qualities quality = qualities.lookup savedQuality.id quality.load savedQuality return [save.storylet?.id, save.storylet?.isFrontal] save: (storylet, isFrontal) -> save = qualities: qualities.saveAll() if storylet? save.storylet = id: storylet isFrontal: isFrontal localStorage.setItem storageName, JSON.stringify save return erase: () -> localStorage.clear() return return Object.freeze api + + window.emergencySaveClear = () -> + localStorage.clear()
3
0.125
3
0
1e78e00c16a552fd32b87e213a31697d6cc3b2c4
composer.json
composer.json
{ "name": "tpg/extjs-bundle", "type": "symfony-bundle", "description": "Use ExtJs with Symfony 2", "keywords": ["extjs", "bundle", "symfony2"], "homepage": "", "license": "MIT", "authors": [ { "name": "James Moey", "email": "james.moey@tradingpursuits.com" } ], "require": { "php": ">=5.3.2", "symfony/symfony": ">=2.1,<=2.2.*-dev", "jms/serializer-bundle": "0.12.*@dev", "doctrine/orm": ">=2.2.3,<2.4-dev", "sensio/generator-bundle": "2.2.*@dev" }, "require-dev": { "friendsofsymfony/rest-bundle": "0.12.*@dev" }, "autoload": { "psr-0": { "Tpg\\ExtjsBundle": "" } }, "config": { "bin-dir": "bin/" }, "minimum-stability": "alpha" }
{ "name": "tpg/extjs-bundle", "type": "symfony-bundle", "description": "Use ExtJs with Symfony 2", "keywords": ["extjs", "bundle", "symfony2"], "homepage": "", "license": "MIT", "authors": [ { "name": "James Moey", "email": "james.moey@tradingpursuits.com" } ], "require": { "php": ">=5.3.2", "symfony/symfony": "2.3.*", "doctrine/orm": ">=2.2.3,<2.4-dev", "jms/serializer-bundle": "0.12.*@dev", "jms/di-extra-bundle": "1.3.*@dev", "sensio/generator-bundle": "2.2.*@dev" }, "require-dev": { "friendsofsymfony/rest-bundle": "0.12.*@dev" }, "autoload": { "psr-0": { "Tpg\\ExtjsBundle": "" } }, "config": { "bin-dir": "bin/" }, "minimum-stability": "alpha" }
Upgrade Symfony Framework to 2.3
Upgrade Symfony Framework to 2.3
JSON
mit
AmsTaFFix/extjs-bundle,jamesmoey/extjs-bundle,VAndAl37/extjs-bundle,SamEngenner/extjs-bundle,AmsTaFFix/extjs-bundle,VAndAl37/extjs-bundle,SamEngenner/extjs-bundle,jamesmoey/extjs-bundle,VAndAl37/extjs-bundle,SamEngenner/extjs-bundle,AmsTaFFix/extjs-bundle
json
## Code Before: { "name": "tpg/extjs-bundle", "type": "symfony-bundle", "description": "Use ExtJs with Symfony 2", "keywords": ["extjs", "bundle", "symfony2"], "homepage": "", "license": "MIT", "authors": [ { "name": "James Moey", "email": "james.moey@tradingpursuits.com" } ], "require": { "php": ">=5.3.2", "symfony/symfony": ">=2.1,<=2.2.*-dev", "jms/serializer-bundle": "0.12.*@dev", "doctrine/orm": ">=2.2.3,<2.4-dev", "sensio/generator-bundle": "2.2.*@dev" }, "require-dev": { "friendsofsymfony/rest-bundle": "0.12.*@dev" }, "autoload": { "psr-0": { "Tpg\\ExtjsBundle": "" } }, "config": { "bin-dir": "bin/" }, "minimum-stability": "alpha" } ## Instruction: Upgrade Symfony Framework to 2.3 ## Code After: { "name": "tpg/extjs-bundle", "type": "symfony-bundle", "description": "Use ExtJs with Symfony 2", "keywords": ["extjs", "bundle", "symfony2"], "homepage": "", "license": "MIT", "authors": [ { "name": "James Moey", "email": "james.moey@tradingpursuits.com" } ], "require": { "php": ">=5.3.2", "symfony/symfony": "2.3.*", "doctrine/orm": ">=2.2.3,<2.4-dev", "jms/serializer-bundle": "0.12.*@dev", "jms/di-extra-bundle": "1.3.*@dev", "sensio/generator-bundle": "2.2.*@dev" }, "require-dev": { "friendsofsymfony/rest-bundle": "0.12.*@dev" }, "autoload": { "psr-0": { "Tpg\\ExtjsBundle": "" } }, "config": { "bin-dir": "bin/" }, "minimum-stability": "alpha" }
{ "name": "tpg/extjs-bundle", "type": "symfony-bundle", "description": "Use ExtJs with Symfony 2", "keywords": ["extjs", "bundle", "symfony2"], "homepage": "", "license": "MIT", "authors": [ { "name": "James Moey", "email": "james.moey@tradingpursuits.com" } ], "require": { "php": ">=5.3.2", - "symfony/symfony": ">=2.1,<=2.2.*-dev", ? -- ^^^^^^^ ---- + "symfony/symfony": "2.3.*", ? ^ + "doctrine/orm": ">=2.2.3,<2.4-dev", "jms/serializer-bundle": "0.12.*@dev", - "doctrine/orm": ">=2.2.3,<2.4-dev", + "jms/di-extra-bundle": "1.3.*@dev", "sensio/generator-bundle": "2.2.*@dev" }, "require-dev": { "friendsofsymfony/rest-bundle": "0.12.*@dev" }, "autoload": { "psr-0": { "Tpg\\ExtjsBundle": "" } }, "config": { "bin-dir": "bin/" }, "minimum-stability": "alpha" }
5
0.16129
3
2
bf573896472c83e2b85b52f6cbf606765b73cb3e
site/docs/4.1/assets/img/favicons/manifest.json
site/docs/4.1/assets/img/favicons/manifest.json
--- --- { "name": "Bootstrap", "short_name": "Bootstrap", "icons": [ { "src": "{{ site.baseurl }}/docs/{{ site.docs_version }}/assets/img/favicons/android-chrome-192x192.png", "sizes": "192x192", "type": "image/png" }, { "src": "{{ site.baseurl }}/docs/{{ site.docs_version }}/assets/img/favicons/android-chrome-512x512.png", "sizes": "512x512", "type": "image/png" } ], "start_url": "/", "theme_color": "#563d7c", "background_color": "#563d7c", "display": "standalone" }
--- --- { "name": "Bootstrap", "short_name": "Bootstrap", "icons": [ { "src": "{{ site.baseurl }}/docs/{{ site.docs_version }}/assets/img/favicons/android-chrome-192x192.png", "sizes": "192x192", "type": "image/png" }, { "src": "{{ site.baseurl }}/docs/{{ site.docs_version }}/assets/img/favicons/android-chrome-512x512.png", "sizes": "512x512", "type": "image/png" } ], "start_url": "/?utm_source=a2hs", "theme_color": "#563d7c", "background_color": "#563d7c", "display": "standalone" }
Add query string to the start_url to track how often app is launched
Add query string to the start_url to track how often app is launched Useful suggestion from Google in the Web App Manifest documentation. https://developers.google.com/web/fundamentals/web-app-manifest/#start-url
JSON
mit
zalog/bootstrap,twbs/bootstrap,coliff/bootstrap,bardiharborow/bootstrap,tjkohli/bootstrap,stanwmusic/bootstrap,fschumann1211/bootstrap,kvlsrg/bootstrap,peterblazejewicz/bootstrap,inway/bootstrap,zalog/bootstrap,stanwmusic/bootstrap,inway/bootstrap,fschumann1211/bootstrap,GerHobbelt/bootstrap,nice-fungal/bootstrap,coliff/bootstrap,nice-fungal/bootstrap,yuyokk/bootstrap,yuyokk/bootstrap,gijsbotje/bootstrap,tagliala/bootstrap,tagliala/bootstrap,stanwmusic/bootstrap,stanwmusic/bootstrap,nice-fungal/bootstrap,GerHobbelt/bootstrap,fschumann1211/bootstrap,GerHobbelt/bootstrap,tjkohli/bootstrap,peterblazejewicz/bootstrap,gijsbotje/bootstrap,bardiharborow/bootstrap,kvlsrg/bootstrap,tagliala/bootstrap,bardiharborow/bootstrap,fschumann1211/bootstrap,peterblazejewicz/bootstrap,gijsbotje/bootstrap,gijsbotje/bootstrap,yuyokk/bootstrap,bardiharborow/bootstrap,zalog/bootstrap,yuyokk/bootstrap,m5o/bootstrap,m5o/bootstrap,inway/bootstrap,kvlsrg/bootstrap,twbs/bootstrap
json
## Code Before: --- --- { "name": "Bootstrap", "short_name": "Bootstrap", "icons": [ { "src": "{{ site.baseurl }}/docs/{{ site.docs_version }}/assets/img/favicons/android-chrome-192x192.png", "sizes": "192x192", "type": "image/png" }, { "src": "{{ site.baseurl }}/docs/{{ site.docs_version }}/assets/img/favicons/android-chrome-512x512.png", "sizes": "512x512", "type": "image/png" } ], "start_url": "/", "theme_color": "#563d7c", "background_color": "#563d7c", "display": "standalone" } ## Instruction: Add query string to the start_url to track how often app is launched Useful suggestion from Google in the Web App Manifest documentation. https://developers.google.com/web/fundamentals/web-app-manifest/#start-url ## Code After: --- --- { "name": "Bootstrap", "short_name": "Bootstrap", "icons": [ { "src": "{{ site.baseurl }}/docs/{{ site.docs_version }}/assets/img/favicons/android-chrome-192x192.png", "sizes": "192x192", "type": "image/png" }, { "src": "{{ site.baseurl }}/docs/{{ site.docs_version }}/assets/img/favicons/android-chrome-512x512.png", "sizes": "512x512", "type": "image/png" } ], "start_url": "/?utm_source=a2hs", "theme_color": "#563d7c", "background_color": "#563d7c", "display": "standalone" }
--- --- { "name": "Bootstrap", "short_name": "Bootstrap", "icons": [ { "src": "{{ site.baseurl }}/docs/{{ site.docs_version }}/assets/img/favicons/android-chrome-192x192.png", "sizes": "192x192", "type": "image/png" }, { "src": "{{ site.baseurl }}/docs/{{ site.docs_version }}/assets/img/favicons/android-chrome-512x512.png", "sizes": "512x512", "type": "image/png" } ], - "start_url": "/", + "start_url": "/?utm_source=a2hs", "theme_color": "#563d7c", "background_color": "#563d7c", "display": "standalone" }
2
0.090909
1
1
9947f37dae0fa329020bbc8f745402fa96b164c9
.travis.yml
.travis.yml
language: cpp compiler: - gcc - clang before_install: # Install cpputest - pushd .. - wget "https://github.com/cpputest/cpputest.github.io/blob/master/releases/cpputest-3.6.tar.gz?raw=true" -O cpputest.tar.gz - tar -xzf cpputest.tar.gz - cd cpputest-3.6/ - ./configure - make - sudo make install - popd # Install test environment for the client - sudo apt-get install python-virtualenv python3 - python3 --version # Clone needed python dependencies - git clone https://github.com/cvra/serial-can-bridge.git before_script: # packager requirements - sudo pip install -r packager/requirements.txt # Create client test environment - virtualenv --python=python3 venv - source venv/bin/activate - python --version - pip install -r client/requirements.txt - pip install mock # python 3.2 doesn't have unittest.mock - pushd serial-can-bridge/python - python setup.py install - popd - deactivate # Prepare bootloader build - ./packager/packager.py - mkdir build/ - pushd build/ - cmake .. - popd script: # Booloader tests - pushd build/ - make - ./tests - popd # Client tests - source venv/bin/activate - pushd client/ - python -m unittest2 - deactivate - popd
language: cpp compiler: - gcc - clang before_install: # Start by fetching latest apt-get repositories - sudo apt-get update # Install cpputest - pushd .. - wget "https://github.com/cpputest/cpputest.github.io/blob/master/releases/cpputest-3.6.tar.gz?raw=true" -O cpputest.tar.gz - tar -xzf cpputest.tar.gz - cd cpputest-3.6/ - ./configure - make - sudo make install - popd # Install test environment for the client - sudo apt-get install python-virtualenv python3 - python3 --version # Clone needed python dependencies - git clone https://github.com/cvra/serial-can-bridge.git before_script: # packager requirements - sudo pip install -r packager/requirements.txt # Create client test environment - virtualenv --python=python3 venv - source venv/bin/activate - python --version - pip install -r client/requirements.txt - pip install mock # python 3.2 doesn't have unittest.mock - pushd serial-can-bridge/python - python setup.py install - popd - deactivate # Prepare bootloader build - ./packager/packager.py - mkdir build/ - pushd build/ - cmake .. - popd script: # Booloader tests - pushd build/ - make - ./tests - popd # Client tests - source venv/bin/activate - pushd client/ - python -m unittest2 - deactivate - popd
Update apt-get database before running Travis script
Update apt-get database before running Travis script
YAML
bsd-2-clause
cvra/can-bootloader,cvra/can-bootloader,cvra/can-bootloader,cvra/can-bootloader
yaml
## Code Before: language: cpp compiler: - gcc - clang before_install: # Install cpputest - pushd .. - wget "https://github.com/cpputest/cpputest.github.io/blob/master/releases/cpputest-3.6.tar.gz?raw=true" -O cpputest.tar.gz - tar -xzf cpputest.tar.gz - cd cpputest-3.6/ - ./configure - make - sudo make install - popd # Install test environment for the client - sudo apt-get install python-virtualenv python3 - python3 --version # Clone needed python dependencies - git clone https://github.com/cvra/serial-can-bridge.git before_script: # packager requirements - sudo pip install -r packager/requirements.txt # Create client test environment - virtualenv --python=python3 venv - source venv/bin/activate - python --version - pip install -r client/requirements.txt - pip install mock # python 3.2 doesn't have unittest.mock - pushd serial-can-bridge/python - python setup.py install - popd - deactivate # Prepare bootloader build - ./packager/packager.py - mkdir build/ - pushd build/ - cmake .. - popd script: # Booloader tests - pushd build/ - make - ./tests - popd # Client tests - source venv/bin/activate - pushd client/ - python -m unittest2 - deactivate - popd ## Instruction: Update apt-get database before running Travis script ## Code After: language: cpp compiler: - gcc - clang before_install: # Start by fetching latest apt-get repositories - sudo apt-get update # Install cpputest - pushd .. - wget "https://github.com/cpputest/cpputest.github.io/blob/master/releases/cpputest-3.6.tar.gz?raw=true" -O cpputest.tar.gz - tar -xzf cpputest.tar.gz - cd cpputest-3.6/ - ./configure - make - sudo make install - popd # Install test environment for the client - sudo apt-get install python-virtualenv python3 - python3 --version # Clone needed python dependencies - git clone https://github.com/cvra/serial-can-bridge.git before_script: # packager requirements - sudo pip install -r packager/requirements.txt # Create client test environment - virtualenv --python=python3 venv - source venv/bin/activate - python --version - pip install -r client/requirements.txt - pip install mock # python 3.2 doesn't have unittest.mock - pushd serial-can-bridge/python - python setup.py install - popd - deactivate # Prepare bootloader build - ./packager/packager.py - mkdir build/ - pushd build/ - cmake .. - popd script: # Booloader tests - pushd build/ - make - ./tests - popd # Client tests - source venv/bin/activate - pushd client/ - python -m unittest2 - deactivate - popd
language: cpp compiler: - gcc - clang before_install: + # Start by fetching latest apt-get repositories + - sudo apt-get update - # Install cpputest ? -- + # Install cpputest - pushd .. - wget "https://github.com/cpputest/cpputest.github.io/blob/master/releases/cpputest-3.6.tar.gz?raw=true" -O cpputest.tar.gz - tar -xzf cpputest.tar.gz - cd cpputest-3.6/ - ./configure - make - sudo make install - popd # Install test environment for the client - sudo apt-get install python-virtualenv python3 - python3 --version # Clone needed python dependencies - git clone https://github.com/cvra/serial-can-bridge.git before_script: # packager requirements - sudo pip install -r packager/requirements.txt # Create client test environment - virtualenv --python=python3 venv - source venv/bin/activate - python --version - pip install -r client/requirements.txt - pip install mock # python 3.2 doesn't have unittest.mock - pushd serial-can-bridge/python - python setup.py install - popd - deactivate # Prepare bootloader build - ./packager/packager.py - mkdir build/ - pushd build/ - cmake .. - popd script: # Booloader tests - pushd build/ - make - ./tests - popd # Client tests - source venv/bin/activate - pushd client/ - python -m unittest2 - deactivate - popd
4
0.063492
3
1
f8186b3c992327261d5d42e0277f788cc7afe7b6
server/lib/network/redirect-to-canonical.ts
server/lib/network/redirect-to-canonical.ts
import Koa from 'koa' /** Redirects any requests coming to a non-canonical host to the canonical one. */ export function redirectToCanonical(canonicalHost: string) { const asUrl = new URL(canonicalHost) const toCompare = asUrl.host.toLowerCase() return async function redirectToCanonicalMiddleware(ctx: Koa.Context, next: Koa.Next) { const host = ctx.get('Host') ?? '' if (host.toLowerCase() !== toCompare) { ctx.redirect(`${canonicalHost}${ctx.url}`) ctx.status = 308 } else { await next() } } }
import Koa from 'koa' /** Redirects any requests coming to a non-canonical host to the canonical one. */ export function redirectToCanonical(canonicalHost: string) { const asUrl = new URL(canonicalHost) const toCompare = asUrl.host.toLowerCase() return async function redirectToCanonicalMiddleware(ctx: Koa.Context, next: Koa.Next) { const host = ctx.request.host if (host.toLowerCase() !== toCompare) { ctx.redirect(`${canonicalHost}${ctx.url}`) ctx.status = 308 } else { await next() } } }
Use a better way of getting the host so that it deals with proxied requests properly.
Use a better way of getting the host so that it deals with proxied requests properly.
TypeScript
mit
ShieldBattery/ShieldBattery,ShieldBattery/ShieldBattery,ShieldBattery/ShieldBattery,ShieldBattery/ShieldBattery,ShieldBattery/ShieldBattery
typescript
## Code Before: import Koa from 'koa' /** Redirects any requests coming to a non-canonical host to the canonical one. */ export function redirectToCanonical(canonicalHost: string) { const asUrl = new URL(canonicalHost) const toCompare = asUrl.host.toLowerCase() return async function redirectToCanonicalMiddleware(ctx: Koa.Context, next: Koa.Next) { const host = ctx.get('Host') ?? '' if (host.toLowerCase() !== toCompare) { ctx.redirect(`${canonicalHost}${ctx.url}`) ctx.status = 308 } else { await next() } } } ## Instruction: Use a better way of getting the host so that it deals with proxied requests properly. ## Code After: import Koa from 'koa' /** Redirects any requests coming to a non-canonical host to the canonical one. */ export function redirectToCanonical(canonicalHost: string) { const asUrl = new URL(canonicalHost) const toCompare = asUrl.host.toLowerCase() return async function redirectToCanonicalMiddleware(ctx: Koa.Context, next: Koa.Next) { const host = ctx.request.host if (host.toLowerCase() !== toCompare) { ctx.redirect(`${canonicalHost}${ctx.url}`) ctx.status = 308 } else { await next() } } }
import Koa from 'koa' /** Redirects any requests coming to a non-canonical host to the canonical one. */ export function redirectToCanonical(canonicalHost: string) { const asUrl = new URL(canonicalHost) const toCompare = asUrl.host.toLowerCase() return async function redirectToCanonicalMiddleware(ctx: Koa.Context, next: Koa.Next) { - const host = ctx.get('Host') ?? '' + const host = ctx.request.host if (host.toLowerCase() !== toCompare) { ctx.redirect(`${canonicalHost}${ctx.url}`) ctx.status = 308 } else { await next() } } }
2
0.117647
1
1
28e832bd2cec77c16e6846d11b1d9971d03a5ca5
.github/workflows/tests.yml
.github/workflows/tests.yml
name: Tests on: [push, pull_request] jobs: build: runs-on: ubuntu-16.04 services: mariadb: image: mariadb/server:10.0 env: MARIADB_USER: opendominion MARIADB_PASSWORD: secret MARIADB_DATABASE: opendominion ports: - 3306 # options: --health-cmd="mysqladmin ping --silent" --health-interval=10s --health-timeout=5s --health-retries=3 steps: - uses: actions/checkout@v1 - name: Install PHP dependencies run: composer install --no-interaction --prefer-dist - name: Setup .env file run: | cp .env.ci .env sed -i 's/DB_PORT=/DB_PORT=${{ job.services.mariadb.ports['3306'] }}/' .env php artisan key:generate - name: Run database migrations run: php artisan migrate - name: Seed database run: php artisan db:seed - name: Sync game data run: php artisan game:data:sync - name: Run tests run: vendor/bin/phpunit
name: Tests on: [push, pull_request] jobs: build: runs-on: ubuntu-16.04 services: mariadb: image: mariadb:10.0 env: MYSQL_USER: opendominion MYSQL_PASSWORD: secret MYSQL_DATABASE: opendominion ports: - 3306 # options: --health-cmd="mysqladmin ping --silent" --health-interval=10s --health-timeout=5s --health-retries=3 steps: - uses: actions/checkout@v1 - name: Install PHP dependencies run: composer install --no-interaction --prefer-dist - name: Setup .env file run: | cp .env.ci .env sed -i 's/DB_PORT=/DB_PORT=${{ job.services.mariadb.ports['3306'] }}/' .env php artisan key:generate - name: Run database migrations run: php artisan migrate - name: Seed database run: php artisan db:seed - name: Sync game data run: php artisan game:data:sync - name: Run tests run: vendor/bin/phpunit
Revert changing service image and env vars
Revert changing service image and env vars
YAML
agpl-3.0
WaveHack/OpenDominion,WaveHack/OpenDominion,WaveHack/OpenDominion
yaml
## Code Before: name: Tests on: [push, pull_request] jobs: build: runs-on: ubuntu-16.04 services: mariadb: image: mariadb/server:10.0 env: MARIADB_USER: opendominion MARIADB_PASSWORD: secret MARIADB_DATABASE: opendominion ports: - 3306 # options: --health-cmd="mysqladmin ping --silent" --health-interval=10s --health-timeout=5s --health-retries=3 steps: - uses: actions/checkout@v1 - name: Install PHP dependencies run: composer install --no-interaction --prefer-dist - name: Setup .env file run: | cp .env.ci .env sed -i 's/DB_PORT=/DB_PORT=${{ job.services.mariadb.ports['3306'] }}/' .env php artisan key:generate - name: Run database migrations run: php artisan migrate - name: Seed database run: php artisan db:seed - name: Sync game data run: php artisan game:data:sync - name: Run tests run: vendor/bin/phpunit ## Instruction: Revert changing service image and env vars ## Code After: name: Tests on: [push, pull_request] jobs: build: runs-on: ubuntu-16.04 services: mariadb: image: mariadb:10.0 env: MYSQL_USER: opendominion MYSQL_PASSWORD: secret MYSQL_DATABASE: opendominion ports: - 3306 # options: --health-cmd="mysqladmin ping --silent" --health-interval=10s --health-timeout=5s --health-retries=3 steps: - uses: actions/checkout@v1 - name: Install PHP dependencies run: composer install --no-interaction --prefer-dist - name: Setup .env file run: | cp .env.ci .env sed -i 's/DB_PORT=/DB_PORT=${{ job.services.mariadb.ports['3306'] }}/' .env php artisan key:generate - name: Run database migrations run: php artisan migrate - name: Seed database run: php artisan db:seed - name: Sync game data run: php artisan game:data:sync - name: Run tests run: vendor/bin/phpunit
name: Tests on: [push, pull_request] jobs: build: runs-on: ubuntu-16.04 services: mariadb: - image: mariadb/server:10.0 ? ------- + image: mariadb:10.0 env: - MARIADB_USER: opendominion ? ^^^^^^ + MYSQL_USER: opendominion ? ^^^^ - MARIADB_PASSWORD: secret ? ^^^^^^ + MYSQL_PASSWORD: secret ? ^^^^ - MARIADB_DATABASE: opendominion ? ^^^^^^ + MYSQL_DATABASE: opendominion ? ^^^^ ports: - 3306 # options: --health-cmd="mysqladmin ping --silent" --health-interval=10s --health-timeout=5s --health-retries=3 steps: - uses: actions/checkout@v1 - name: Install PHP dependencies run: composer install --no-interaction --prefer-dist - name: Setup .env file run: | cp .env.ci .env sed -i 's/DB_PORT=/DB_PORT=${{ job.services.mariadb.ports['3306'] }}/' .env php artisan key:generate - name: Run database migrations run: php artisan migrate - name: Seed database run: php artisan db:seed - name: Sync game data run: php artisan game:data:sync - name: Run tests run: vendor/bin/phpunit
8
0.186047
4
4