commit
stringlengths
40
40
old_file
stringlengths
4
237
new_file
stringlengths
4
237
old_contents
stringlengths
1
4.24k
new_contents
stringlengths
5
4.84k
subject
stringlengths
15
778
message
stringlengths
16
6.86k
lang
stringlengths
1
30
license
stringclasses
13 values
repos
stringlengths
5
116k
config
stringlengths
1
30
content
stringlengths
105
8.72k
dfdc8825763851bc6920fd96949fa6f72c3e0f42
app/assets/javascripts/components/inline_edit_body_part.js.coffee
app/assets/javascripts/components/inline_edit_body_part.js.coffee
ETahi.InlineEditBodyPartComponent = Em.Component.extend editing: false snapshot: [] confirmDelete: false createSnapshot: (-> @set('snapshot', Em.copy(@get('block'), true)) ).observes('editing') hasContent: true # hasContent: Em.computed.notEmpty('bodyPart.value') hasNoContent: Em.computed.not('hasContent') actions: toggleEdit: -> @sendAction('cancel', @get('block'), @get('snapshot')) if @get('editing') @toggleProperty 'editing' deleteBlock: -> @sendAction('delete', @get('block')) save: -> if @get('hasContent') @sendAction('save', @get('block')) @toggleProperty 'editing' confirmDeletion: -> @set('confirmDelete', true) cancelDestroy: -> @set('confirmDelete', false) addItem: -> @sendAction('addItem', @get('block'))
ETahi.InlineEditBodyPartComponent = Em.Component.extend editing: false snapshot: [] confirmDelete: false createSnapshot: (-> @set('snapshot', Em.copy(@get('block'), true)) ).observes('editing') hasContent: (-> @get('block').any(@_isEmpty) ).property('block.@each.value') hasNoContent: Em.computed.not('hasContent') _isEmpty: (item) -> item && !Ember.isEmpty(item.value) actions: toggleEdit: -> @sendAction('cancel', @get('block'), @get('snapshot')) if @get('editing') @toggleProperty 'editing' deleteBlock: -> @sendAction('delete', @get('block')) save: -> if @get('hasContent') @sendAction('save', @get('block')) @toggleProperty 'editing' confirmDeletion: -> @set('confirmDelete', true) cancelDestroy: -> @set('confirmDelete', false) addItem: -> @sendAction('addItem', @get('block'))
Disable saving when items are all empty
Disable saving when items are all empty
CoffeeScript
mit
johan--/tahi,johan--/tahi,johan--/tahi,johan--/tahi
coffeescript
## Code Before: ETahi.InlineEditBodyPartComponent = Em.Component.extend editing: false snapshot: [] confirmDelete: false createSnapshot: (-> @set('snapshot', Em.copy(@get('block'), true)) ).observes('editing') hasContent: true # hasContent: Em.computed.notEmpty('bodyPart.value') hasNoContent: Em.computed.not('hasContent') actions: toggleEdit: -> @sendAction('cancel', @get('block'), @get('snapshot')) if @get('editing') @toggleProperty 'editing' deleteBlock: -> @sendAction('delete', @get('block')) save: -> if @get('hasContent') @sendAction('save', @get('block')) @toggleProperty 'editing' confirmDeletion: -> @set('confirmDelete', true) cancelDestroy: -> @set('confirmDelete', false) addItem: -> @sendAction('addItem', @get('block')) ## Instruction: Disable saving when items are all empty ## Code After: ETahi.InlineEditBodyPartComponent = Em.Component.extend editing: false snapshot: [] confirmDelete: false createSnapshot: (-> @set('snapshot', Em.copy(@get('block'), true)) ).observes('editing') hasContent: (-> @get('block').any(@_isEmpty) ).property('block.@each.value') hasNoContent: Em.computed.not('hasContent') _isEmpty: (item) -> item && !Ember.isEmpty(item.value) actions: toggleEdit: -> @sendAction('cancel', @get('block'), @get('snapshot')) if @get('editing') @toggleProperty 'editing' deleteBlock: -> @sendAction('delete', @get('block')) save: -> if @get('hasContent') @sendAction('save', @get('block')) @toggleProperty 'editing' confirmDeletion: -> @set('confirmDelete', true) cancelDestroy: -> @set('confirmDelete', false) addItem: -> @sendAction('addItem', @get('block'))
c4996a5c30481d5bf368a17ac3b4942fd51782ef
spec/prompt-view-list-spec.js
spec/prompt-view-list-spec.js
'use babel' import PromptViewList from '../lib/prompt-view-list'; describe('PromptViewList', () => { describe('when setSelectedItem is called', () => { it('changes the selected item', () => { const list = new PromptViewList() list.initialize() list.open(['1', '2', '3']) list.setSelectedItem('1') expect(list.getItem()).toBe('1') }) }) })
'use babel' import PromptViewList from '../lib/prompt-view-list'; describe('PromptViewList', () => { describe('.setSelectedItem', () => { it('changes the selected item', () => { const list = new PromptViewList() list.initialize() list.open(['1', '2', '3']) list.setSelectedItem('1') expect(list.getItem()).toBe('1') }) }) })
Fix the names of the test cases
Fix the names of the test cases ref #37
JavaScript
mit
HiroakiMikami/atom-user-support-helper
javascript
## Code Before: 'use babel' import PromptViewList from '../lib/prompt-view-list'; describe('PromptViewList', () => { describe('when setSelectedItem is called', () => { it('changes the selected item', () => { const list = new PromptViewList() list.initialize() list.open(['1', '2', '3']) list.setSelectedItem('1') expect(list.getItem()).toBe('1') }) }) }) ## Instruction: Fix the names of the test cases ref #37 ## Code After: 'use babel' import PromptViewList from '../lib/prompt-view-list'; describe('PromptViewList', () => { describe('.setSelectedItem', () => { it('changes the selected item', () => { const list = new PromptViewList() list.initialize() list.open(['1', '2', '3']) list.setSelectedItem('1') expect(list.getItem()).toBe('1') }) }) })
94a55dfc68fcd2352f867b01fc703a202c87f453
troposphere/events.py
troposphere/events.py
from . import AWSObject, AWSProperty class Target(AWSProperty): props = { 'Arn': (basestring, True), 'Id': (basestring, True), 'Input': (basestring, False), 'InputPath': (basestring, False) } class Rule(AWSObject): resource_type = "AWS::Events::Rule" props = { 'Description': (basestring, False), 'EventPattern': (dict, False), 'Name': (basestring, False), 'RoleArn': (basestring, False), 'ScheduleExpression': (basestring, False), 'State': (basestring, False), 'Targets': ([Target], False) }
from . import AWSObject, AWSProperty class Target(AWSProperty): props = { 'Arn': (basestring, True), 'Id': (basestring, True), 'Input': (basestring, False), 'InputPath': (basestring, False), 'RoleArn': (basestring, False), } class Rule(AWSObject): resource_type = "AWS::Events::Rule" props = { 'Description': (basestring, False), 'EventPattern': (dict, False), 'Name': (basestring, False), 'ScheduleExpression': (basestring, False), 'State': (basestring, False), 'Targets': ([Target], False), }
Remove RoleArn from Events::Rule and add to Target property
Remove RoleArn from Events::Rule and add to Target property
Python
bsd-2-clause
pas256/troposphere,pas256/troposphere,ikben/troposphere,7digital/troposphere,ikben/troposphere,cloudtools/troposphere,7digital/troposphere,johnctitus/troposphere,johnctitus/troposphere,cloudtools/troposphere
python
## Code Before: from . import AWSObject, AWSProperty class Target(AWSProperty): props = { 'Arn': (basestring, True), 'Id': (basestring, True), 'Input': (basestring, False), 'InputPath': (basestring, False) } class Rule(AWSObject): resource_type = "AWS::Events::Rule" props = { 'Description': (basestring, False), 'EventPattern': (dict, False), 'Name': (basestring, False), 'RoleArn': (basestring, False), 'ScheduleExpression': (basestring, False), 'State': (basestring, False), 'Targets': ([Target], False) } ## Instruction: Remove RoleArn from Events::Rule and add to Target property ## Code After: from . import AWSObject, AWSProperty class Target(AWSProperty): props = { 'Arn': (basestring, True), 'Id': (basestring, True), 'Input': (basestring, False), 'InputPath': (basestring, False), 'RoleArn': (basestring, False), } class Rule(AWSObject): resource_type = "AWS::Events::Rule" props = { 'Description': (basestring, False), 'EventPattern': (dict, False), 'Name': (basestring, False), 'ScheduleExpression': (basestring, False), 'State': (basestring, False), 'Targets': ([Target], False), }
e04a3f0eceb6edb9a386be0886f1d8cfbe988624
BHCDatabase/app/views/areas/show.html.erb
BHCDatabase/app/views/areas/show.html.erb
<% provide(:title, @area.name) %> <h1> <%= @area.name %> </h1> <h2> <%= @area.description %> </h2>
<% provide(:title, @area.name) %> <div id="area"> <h1> <%= @area.name %> </h1> <div class="stdcontainer"> <h3> <%= @area.description %> </h3> </div> </div>
Modify individual area pages to follow website scheme.
Modify individual area pages to follow website scheme.
HTML+ERB
mit
DaBrown95/BHCDatabase,DaBrown95/BHCDatabase,DaBrown95/BHCDatabase
html+erb
## Code Before: <% provide(:title, @area.name) %> <h1> <%= @area.name %> </h1> <h2> <%= @area.description %> </h2> ## Instruction: Modify individual area pages to follow website scheme. ## Code After: <% provide(:title, @area.name) %> <div id="area"> <h1> <%= @area.name %> </h1> <div class="stdcontainer"> <h3> <%= @area.description %> </h3> </div> </div>
ccc98ced56ee8dda02332720c7146e1548a3b53c
project/project/urls.py
project/project/urls.py
from django.conf.urls import include, url from django.contrib import admin urlpatterns = [ url(r'^admin/', include(admin.site.urls)), url(r'^admin_tools/', include('admin_tools.urls')), url(r'^accounts/logout/$', 'allauth.account.views.logout', name='account_logout'), url('^accounts/social/', include('allauth.socialaccount.urls')), url('^accounts/', include('allauth.socialaccount.providers.google.urls')), url(r'^', include("project.teams.urls")), url(r'^', include("project.profiles.urls")), ]
from django.conf.urls import include, url from django.conf import settings from django.contrib import admin from django.views.generic.base import RedirectView urlpatterns = [ url(r'^admin/', include(admin.site.urls)), url(r'^admin_tools/', include('admin_tools.urls')), url(r'^accounts/login/$', RedirectView.as_view(url=settings.LOGIN_URL), name='account_login'), url(r'^accounts/logout/$', 'allauth.account.views.logout', name='account_logout'), url(r'^accounts/social/', include('allauth.socialaccount.urls')), url(r'^accounts/', include('allauth.socialaccount.providers.google.urls')), url(r'^', include("project.teams.urls")), url(r'^', include("project.profiles.urls")), ]
Set up redirect to login view
Set up redirect to login view
Python
mit
jonsimington/app,compsci-hfh/app,compsci-hfh/app,jonsimington/app
python
## Code Before: from django.conf.urls import include, url from django.contrib import admin urlpatterns = [ url(r'^admin/', include(admin.site.urls)), url(r'^admin_tools/', include('admin_tools.urls')), url(r'^accounts/logout/$', 'allauth.account.views.logout', name='account_logout'), url('^accounts/social/', include('allauth.socialaccount.urls')), url('^accounts/', include('allauth.socialaccount.providers.google.urls')), url(r'^', include("project.teams.urls")), url(r'^', include("project.profiles.urls")), ] ## Instruction: Set up redirect to login view ## Code After: from django.conf.urls import include, url from django.conf import settings from django.contrib import admin from django.views.generic.base import RedirectView urlpatterns = [ url(r'^admin/', include(admin.site.urls)), url(r'^admin_tools/', include('admin_tools.urls')), url(r'^accounts/login/$', RedirectView.as_view(url=settings.LOGIN_URL), name='account_login'), url(r'^accounts/logout/$', 'allauth.account.views.logout', name='account_logout'), url(r'^accounts/social/', include('allauth.socialaccount.urls')), url(r'^accounts/', include('allauth.socialaccount.providers.google.urls')), url(r'^', include("project.teams.urls")), url(r'^', include("project.profiles.urls")), ]
c752beac210bd6a74581511096f83fecca710252
julia/wordcount.jl
julia/wordcount.jl
counts = (String => Uint64)[] for line in eachline(STDIN) for word in matchall(r"[a-z\']+", lowercase(line)) counts[word] = get(counts, word, 0) + 1 end end for (word, count) in sort(collect(counts)) println("$word $count") end
counts = Dict{String, Uint64}() for line in eachline(STDIN) for word in matchall(r"[a-z\']+", lowercase(line)) counts[word] = get(counts, word, 0) + 1 end end for (word, count) in sort(collect(counts)) println("$word $count") end
Use the more modern Julia dictionary constructor
Use the more modern Julia dictionary constructor
Julia
mit
rtoal/ple,rtoal/ple,rtoal/ple,rtoal/polyglot,rtoal/polyglot,rtoal/ple,rtoal/polyglot,rtoal/ple,rtoal/ple,rtoal/ple,rtoal/polyglot,rtoal/polyglot,rtoal/ple,rtoal/ple,rtoal/polyglot,rtoal/polyglot,rtoal/ple,rtoal/polyglot,rtoal/ple,rtoal/polyglot,rtoal/polyglot,rtoal/polyglot,rtoal/ple,rtoal/polyglot,rtoal/polyglot,rtoal/ple,rtoal/ple,rtoal/polyglot,rtoal/ple,rtoal/ple,rtoal/polyglot
julia
## Code Before: counts = (String => Uint64)[] for line in eachline(STDIN) for word in matchall(r"[a-z\']+", lowercase(line)) counts[word] = get(counts, word, 0) + 1 end end for (word, count) in sort(collect(counts)) println("$word $count") end ## Instruction: Use the more modern Julia dictionary constructor ## Code After: counts = Dict{String, Uint64}() for line in eachline(STDIN) for word in matchall(r"[a-z\']+", lowercase(line)) counts[word] = get(counts, word, 0) + 1 end end for (word, count) in sort(collect(counts)) println("$word $count") end
d9c677a35d18a878ef8d253a9453e93da3341e96
runTwircBot.py
runTwircBot.py
from src.TwircBot import TwircBot import sys try: bot = TwircBot(sys.argv[1]) except IndexError: bot = TwircBot() bot.print_config() bot.start()
from src.TwircBot import TwircBot from src.CommandModule import CommandModule import sys try: bot = TwircBot(sys.argv[1]) except IndexError: bot = TwircBot() module = CommandModule() bot.print_config() # bot.start()
Add extremely basic template for command modules
Add extremely basic template for command modules
Python
mit
johnmarcampbell/twircBot
python
## Code Before: from src.TwircBot import TwircBot import sys try: bot = TwircBot(sys.argv[1]) except IndexError: bot = TwircBot() bot.print_config() bot.start() ## Instruction: Add extremely basic template for command modules ## Code After: from src.TwircBot import TwircBot from src.CommandModule import CommandModule import sys try: bot = TwircBot(sys.argv[1]) except IndexError: bot = TwircBot() module = CommandModule() bot.print_config() # bot.start()
39a235fbd619b4d24346f0b7889d4dfa489b1cbb
app/view/twig/editcontent/_aside-save.twig
app/view/twig/editcontent/_aside-save.twig
<div class="btn-group"> <button type="button" class="btn btn-primary" id="sidebar_save"> <i class="fa fa-flag"></i> {{ __('contenttypes.generic.save', {'%contenttype%': context.contenttype.singular_name}) }} </button> <button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown"> <span class="caret"></span> <span class="sr-only">Toggle Dropdown</span> </button> <ul class="dropdown-menu" role="menu"> <li> <button type="submit" class="btn btn-link" id="save_return"> <i class="fa fa-fw fa-flag"></i> {{ __('general.phrase.save-and-return-overview') }} </button> </li> <li> <button type="submit" class="btn btn-link" id="sidebar_save_create"> <i class="fa fa-fw fa-flag"></i> {{ __('general.phrase.save-and-create-new-record') }} </button> </li> </ul> </div>
<div class="btn-group"> <button type="button" class="btn btn-primary" id="sidebar_save"> <i class="fa fa-flag"></i> {{ __('contenttypes.generic.save', {'%contenttype%': context.contenttype.singular_name}) }} </button> {% if not context.contenttype.singleton %} <button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown"> <span class="caret"></span> <span class="sr-only">Toggle Dropdown</span> </button> <ul class="dropdown-menu" role="menu"> <li> <button type="submit" class="btn btn-link" id="save_return"> <i class="fa fa-fw fa-flag"></i> {{ __('general.phrase.save-and-return-overview') }} </button> </li> <li> <button type="submit" class="btn btn-link" id="sidebar_save_create"> <i class="fa fa-fw fa-flag"></i> {{ __('general.phrase.save-and-create-new-record') }} </button> </li> </ul> {% endif %} </div>
Remove dropdown options for singleton
Remove dropdown options for singleton
Twig
mit
nikgo/bolt,nikgo/bolt,GawainLynch/bolt,romulo1984/bolt,GawainLynch/bolt,bolt/bolt,romulo1984/bolt,bolt/bolt,GawainLynch/bolt,bolt/bolt,nikgo/bolt,romulo1984/bolt,nikgo/bolt,bolt/bolt,GawainLynch/bolt,romulo1984/bolt
twig
## Code Before: <div class="btn-group"> <button type="button" class="btn btn-primary" id="sidebar_save"> <i class="fa fa-flag"></i> {{ __('contenttypes.generic.save', {'%contenttype%': context.contenttype.singular_name}) }} </button> <button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown"> <span class="caret"></span> <span class="sr-only">Toggle Dropdown</span> </button> <ul class="dropdown-menu" role="menu"> <li> <button type="submit" class="btn btn-link" id="save_return"> <i class="fa fa-fw fa-flag"></i> {{ __('general.phrase.save-and-return-overview') }} </button> </li> <li> <button type="submit" class="btn btn-link" id="sidebar_save_create"> <i class="fa fa-fw fa-flag"></i> {{ __('general.phrase.save-and-create-new-record') }} </button> </li> </ul> </div> ## Instruction: Remove dropdown options for singleton ## Code After: <div class="btn-group"> <button type="button" class="btn btn-primary" id="sidebar_save"> <i class="fa fa-flag"></i> {{ __('contenttypes.generic.save', {'%contenttype%': context.contenttype.singular_name}) }} </button> {% if not context.contenttype.singleton %} <button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown"> <span class="caret"></span> <span class="sr-only">Toggle Dropdown</span> </button> <ul class="dropdown-menu" role="menu"> <li> <button type="submit" class="btn btn-link" id="save_return"> <i class="fa fa-fw fa-flag"></i> {{ __('general.phrase.save-and-return-overview') }} </button> </li> <li> <button type="submit" class="btn btn-link" id="sidebar_save_create"> <i class="fa fa-fw fa-flag"></i> {{ __('general.phrase.save-and-create-new-record') }} </button> </li> </ul> {% endif %} </div>
b1a7ce456c65b5086804065f30920e661dbd82e2
S06-signature/unpack-array.t
S06-signature/unpack-array.t
use v6; use Test; plan 3; # L<S06/Unpacking array parameters> sub foo($x, [$y, *@z]) { return "$x|$y|" ~ @z.join(';'); } my @a = 2, 3, 4, 5; is foo(1, @a), '2|3|4;5', 'array unpacking'; sub bar([$x, $y, $z]) { return [*] $x, $y, $z; } ok bar(@a[0..2]) == 24, 'fixed length array unpacking'; dies_ok { bar [1,2] }, 'fixed length array unpacking with wrong length'; # vim: ft=perl6
use v6; use Test; plan 3; # L<S06/Unpacking array parameters> sub foo($x, [$y, *@z]) { return "$x|$y|" ~ @z.join(';'); } my @a = 2, 3, 4, 5; is foo(1, @a), '1|2|3;4;5', 'array unpacking'; sub bar([$x, $y, $z]) { return $x * $y * $z; } ok bar(@a[0..2]) == 24, 'fixed length array unpacking'; dies_ok { bar [1,2] }, 'fixed length array unpacking with wrong length'; # vim: ft=perl6
Correct mistake in array unpacking test, and make it work without reduction operator.
[t/spec] Correct mistake in array unpacking test, and make it work without reduction operator. git-svn-id: 53605643c415f7495558be95614cf14171f1db78@29753 c213334d-75ef-0310-aa23-eaa082d1ae64
Perl
artistic-2.0
perl6/roast,b2gills/roast,bitrauser/roast,dankogai/roast,bitrauser/roast,zostay/roast,skids/roast,zostay/roast,laben/roast,cygx/roast,b2gills/roast,dogbert17/roast,dankogai/roast,dankogai/roast,cygx/roast,skids/roast,zostay/roast,b2gills/roast,skids/roast,niner/roast,laben/roast,niner/roast,dogbert17/roast,niner/roast,laben/roast,cygx/roast
perl
## Code Before: use v6; use Test; plan 3; # L<S06/Unpacking array parameters> sub foo($x, [$y, *@z]) { return "$x|$y|" ~ @z.join(';'); } my @a = 2, 3, 4, 5; is foo(1, @a), '2|3|4;5', 'array unpacking'; sub bar([$x, $y, $z]) { return [*] $x, $y, $z; } ok bar(@a[0..2]) == 24, 'fixed length array unpacking'; dies_ok { bar [1,2] }, 'fixed length array unpacking with wrong length'; # vim: ft=perl6 ## Instruction: [t/spec] Correct mistake in array unpacking test, and make it work without reduction operator. git-svn-id: 53605643c415f7495558be95614cf14171f1db78@29753 c213334d-75ef-0310-aa23-eaa082d1ae64 ## Code After: use v6; use Test; plan 3; # L<S06/Unpacking array parameters> sub foo($x, [$y, *@z]) { return "$x|$y|" ~ @z.join(';'); } my @a = 2, 3, 4, 5; is foo(1, @a), '1|2|3;4;5', 'array unpacking'; sub bar([$x, $y, $z]) { return $x * $y * $z; } ok bar(@a[0..2]) == 24, 'fixed length array unpacking'; dies_ok { bar [1,2] }, 'fixed length array unpacking with wrong length'; # vim: ft=perl6
7e9075f11fd8797ba47cc31e73399e62a61a6b41
circle.yml
circle.yml
machine: node: version: 4.3.0 test: override: - exit 0 deployment: dev: branch: develop commands: - npm run deploy-dev prod: tag: /v[0-9]+(\.[0-9]+)*/ commands: - npm run deploy-prod
machine: node: version: 8.10.0 dependencies: post: - npm run lint test: override: - exit 0 deployment: dev: branch: develop commands: - npm run deploy-dev prod: tag: /v[0-9]+(\.[0-9]+)*/ commands: - npm run deploy-prod
Update Node version in CircleCI
Update Node version in CircleCI
YAML
mit
zeplin/zeplin-html-to-pdf
yaml
## Code Before: machine: node: version: 4.3.0 test: override: - exit 0 deployment: dev: branch: develop commands: - npm run deploy-dev prod: tag: /v[0-9]+(\.[0-9]+)*/ commands: - npm run deploy-prod ## Instruction: Update Node version in CircleCI ## Code After: machine: node: version: 8.10.0 dependencies: post: - npm run lint test: override: - exit 0 deployment: dev: branch: develop commands: - npm run deploy-dev prod: tag: /v[0-9]+(\.[0-9]+)*/ commands: - npm run deploy-prod
b2ed227612f343630682665419731117065eafaa
app/controllers/registrations_controller.rb
app/controllers/registrations_controller.rb
class RegistrationsController < Devise::RegistrationsController def new # Building the resource with information that MAY BE available from omniauth! build_resource(:first_name => session[:omniauth] && session[:omniauth]['user_info'] && session[:omniauth]['user_info']['first_name'], :last_name => session[:omniauth] && session[:omniauth]['user_info'] && session[:omniauth]['user_info']['last_name'], :email => session[:omniauth_email] ) render :new end def create build_resource if session[:omniauth] && @user.errors[:email][0] =~ /has already been taken/ user = User.find_by_email(@user.email) # Link Accounts - if via social connect return redirect_to link_accounts_url(user.id) end # normal processing super session[:omniauth] = nil unless @user.new_record? end def build_resource(*args) super if session[:omniauth] @user.apply_omniauth(session[:omniauth]) @user.valid? end end def after_update_path_for(scope) session[:referrer] ? session[:referrer] : root_path end end
class RegistrationsController < Devise::RegistrationsController def new # Building the resource with information that MAY BE available from omniauth! build_resource(:first_name => session[:omniauth] && session[:omniauth]['user_info'] && session[:omniauth]['user_info']['first_name'], :last_name => session[:omniauth] && session[:omniauth]['user_info'] && session[:omniauth]['user_info']['last_name'], :email => session[:omniauth_email] ) render :new end def create build_resource # normal processing super session[:omniauth] = nil unless @user.new_record? end def build_resource(*args) super if session[:omniauth] @user.apply_omniauth(session[:omniauth]) @user.valid? end end def after_update_path_for(scope) session[:referrer] ? session[:referrer] : root_path end end
Remove a no longer valid reference
Remove a no longer valid reference
Ruby
mit
concord-consortium/rigse,concord-consortium/rigse,concord-consortium/rigse,concord-consortium/rigse,concord-consortium/rigse,concord-consortium/rigse
ruby
## Code Before: class RegistrationsController < Devise::RegistrationsController def new # Building the resource with information that MAY BE available from omniauth! build_resource(:first_name => session[:omniauth] && session[:omniauth]['user_info'] && session[:omniauth]['user_info']['first_name'], :last_name => session[:omniauth] && session[:omniauth]['user_info'] && session[:omniauth]['user_info']['last_name'], :email => session[:omniauth_email] ) render :new end def create build_resource if session[:omniauth] && @user.errors[:email][0] =~ /has already been taken/ user = User.find_by_email(@user.email) # Link Accounts - if via social connect return redirect_to link_accounts_url(user.id) end # normal processing super session[:omniauth] = nil unless @user.new_record? end def build_resource(*args) super if session[:omniauth] @user.apply_omniauth(session[:omniauth]) @user.valid? end end def after_update_path_for(scope) session[:referrer] ? session[:referrer] : root_path end end ## Instruction: Remove a no longer valid reference ## Code After: class RegistrationsController < Devise::RegistrationsController def new # Building the resource with information that MAY BE available from omniauth! build_resource(:first_name => session[:omniauth] && session[:omniauth]['user_info'] && session[:omniauth]['user_info']['first_name'], :last_name => session[:omniauth] && session[:omniauth]['user_info'] && session[:omniauth]['user_info']['last_name'], :email => session[:omniauth_email] ) render :new end def create build_resource # normal processing super session[:omniauth] = nil unless @user.new_record? end def build_resource(*args) super if session[:omniauth] @user.apply_omniauth(session[:omniauth]) @user.valid? end end def after_update_path_for(scope) session[:referrer] ? session[:referrer] : root_path end end
696082e98fd5a7efeb1ac6f8405071d0caad4ac8
ENG/README.md
ENG/README.md
core course * seminarist: Alina ## Materials * [NEF Student's book Advanced](https://elt.oup.com/student/englishfile/advanced/?cc=ru&selLanguage=ru) * [NEF WorkBook Advanced](https://elt.oup.com/student/englishfile/advanced/?cc=ru&selLanguage=ru) ## Homework * WB ex. 1 p. 4 (2015-08-26) * SB ex. 1A.c p. 136 (2015-08-31) * WB p.7 ex. 1, 2, 3 (2015-09-02)
core course * seminarist: Alina ## Materials * [NEF Student's book Advanced](https://elt.oup.com/student/englishfile/advanced/?cc=ru&selLanguage=ru) * [NEF WorkBook Advanced](https://elt.oup.com/student/englishfile/advanced/?cc=ru&selLanguage=ru) ## Homework * WB ex. 1 p. 4 (2015-08-26) * SB ex. 1A.c p. 136 (2015-08-31) * WB p.7 ex. 1, 2, 3 (2015-09-02) * SB p.8 ex. 2 (2015-09-07)
Add ENG homework task (2015-09-07)
Add ENG homework task (2015-09-07)
Markdown
mit
abcdw/inno,abcdw/inno
markdown
## Code Before: core course * seminarist: Alina ## Materials * [NEF Student's book Advanced](https://elt.oup.com/student/englishfile/advanced/?cc=ru&selLanguage=ru) * [NEF WorkBook Advanced](https://elt.oup.com/student/englishfile/advanced/?cc=ru&selLanguage=ru) ## Homework * WB ex. 1 p. 4 (2015-08-26) * SB ex. 1A.c p. 136 (2015-08-31) * WB p.7 ex. 1, 2, 3 (2015-09-02) ## Instruction: Add ENG homework task (2015-09-07) ## Code After: core course * seminarist: Alina ## Materials * [NEF Student's book Advanced](https://elt.oup.com/student/englishfile/advanced/?cc=ru&selLanguage=ru) * [NEF WorkBook Advanced](https://elt.oup.com/student/englishfile/advanced/?cc=ru&selLanguage=ru) ## Homework * WB ex. 1 p. 4 (2015-08-26) * SB ex. 1A.c p. 136 (2015-08-31) * WB p.7 ex. 1, 2, 3 (2015-09-02) * SB p.8 ex. 2 (2015-09-07)
7d06f50c3c4f1d4428a084bb0056f68e1450da73
Spycodes/Utilities/SCUnderlineTextField.swift
Spycodes/Utilities/SCUnderlineTextField.swift
import UIKit class SCUnderlineTextField: SCTextField { required init?(coder aDecoder: NSCoder) { super.init(coder: aDecoder) self.font = SCFonts.largeSizeFont(SCFonts.FontType.Regular) } override func layoutSubviews() { super.layoutSubviews() let bottomBorder = CALayer() bottomBorder.frame = CGRect(x: 0.0, y: self.frame.size.height - 1.0, width: self.frame.size.width, height: 1.0) bottomBorder.backgroundColor = UIColor.spycodesGrayColor().CGColor self.layer.addSublayer(bottomBorder) } }
import UIKit class SCUnderlineTextField: SCTextField { required init?(coder aDecoder: NSCoder) { super.init(coder: aDecoder) self.font = SCFonts.largeSizeFont(SCFonts.FontType.Regular) } override func layoutSubviews() { super.layoutSubviews() let bottomBorder = CALayer() bottomBorder.frame = CGRect( x: 0.0, y: self.frame.size.height - 1.0, width: self.frame.size.width, height: 1.0 ) bottomBorder.backgroundColor = UIColor.spycodesGrayColor().CGColor self.layer.addSublayer(bottomBorder) } }
Improve code readability in utilities
Improve code readability in utilities
Swift
mit
davidozhang/spycodes,davidozhang/spycodes,davidozhang/spycodes
swift
## Code Before: import UIKit class SCUnderlineTextField: SCTextField { required init?(coder aDecoder: NSCoder) { super.init(coder: aDecoder) self.font = SCFonts.largeSizeFont(SCFonts.FontType.Regular) } override func layoutSubviews() { super.layoutSubviews() let bottomBorder = CALayer() bottomBorder.frame = CGRect(x: 0.0, y: self.frame.size.height - 1.0, width: self.frame.size.width, height: 1.0) bottomBorder.backgroundColor = UIColor.spycodesGrayColor().CGColor self.layer.addSublayer(bottomBorder) } } ## Instruction: Improve code readability in utilities ## Code After: import UIKit class SCUnderlineTextField: SCTextField { required init?(coder aDecoder: NSCoder) { super.init(coder: aDecoder) self.font = SCFonts.largeSizeFont(SCFonts.FontType.Regular) } override func layoutSubviews() { super.layoutSubviews() let bottomBorder = CALayer() bottomBorder.frame = CGRect( x: 0.0, y: self.frame.size.height - 1.0, width: self.frame.size.width, height: 1.0 ) bottomBorder.backgroundColor = UIColor.spycodesGrayColor().CGColor self.layer.addSublayer(bottomBorder) } }
399d87354afe1a94d34741e9d163d62a2cda7e2d
app/controllers/peoplefinder/information_requests_controller.rb
app/controllers/peoplefinder/information_requests_controller.rb
module Peoplefinder class InformationRequestsController < ApplicationController before_action :set_recipient def new @information_request = InformationRequest.new( recipient: @person, message: I18n.t('peoplefinder.controllers.information_requests.default_message', recipient: @person, sender: current_user) ) end def create @information_request = InformationRequest.new(information_request_params) @information_request.recipient = @person @information_request.sender_email = current_user.email if @information_request.save ReminderMailer.information_request(@information_request).deliver notice :message_sent, person: @person redirect_to person_path(@person) else render action: :new end end private def set_recipient @person = Person.friendly.find(params[:person_id]) end def information_request_params params.require(:information_request).permit( :message ) end end end
module Peoplefinder class InformationRequestsController < ApplicationController before_action :set_recipient def new @information_request = InformationRequest.new( recipient: @person, message: I18n.t( 'peoplefinder.controllers.information_requests.default_message', recipient: @person, sender: current_user) ) end def create @information_request = InformationRequest.new(information_request_params) @information_request.recipient = @person @information_request.sender_email = current_user.email if @information_request.save ReminderMailer.information_request(@information_request).deliver notice :message_sent, person: @person redirect_to person_path(@person) else render action: :new end end private def set_recipient @person = Person.friendly.find(params[:person_id]) end def information_request_params params.require(:information_request).permit( :message ) end end end
Fix line length for rubocop
Fix line length for rubocop
Ruby
mit
MjAbuz/peoplefinder,ministryofjustice/peoplefinder,MjAbuz/peoplefinder,ministryofjustice/peoplefinder,MjAbuz/peoplefinder,ministryofjustice/peoplefinder,ministryofjustice/peoplefinder,ministryofjustice/peoplefinder,MjAbuz/peoplefinder
ruby
## Code Before: module Peoplefinder class InformationRequestsController < ApplicationController before_action :set_recipient def new @information_request = InformationRequest.new( recipient: @person, message: I18n.t('peoplefinder.controllers.information_requests.default_message', recipient: @person, sender: current_user) ) end def create @information_request = InformationRequest.new(information_request_params) @information_request.recipient = @person @information_request.sender_email = current_user.email if @information_request.save ReminderMailer.information_request(@information_request).deliver notice :message_sent, person: @person redirect_to person_path(@person) else render action: :new end end private def set_recipient @person = Person.friendly.find(params[:person_id]) end def information_request_params params.require(:information_request).permit( :message ) end end end ## Instruction: Fix line length for rubocop ## Code After: module Peoplefinder class InformationRequestsController < ApplicationController before_action :set_recipient def new @information_request = InformationRequest.new( recipient: @person, message: I18n.t( 'peoplefinder.controllers.information_requests.default_message', recipient: @person, sender: current_user) ) end def create @information_request = InformationRequest.new(information_request_params) @information_request.recipient = @person @information_request.sender_email = current_user.email if @information_request.save ReminderMailer.information_request(@information_request).deliver notice :message_sent, person: @person redirect_to person_path(@person) else render action: :new end end private def set_recipient @person = Person.friendly.find(params[:person_id]) end def information_request_params params.require(:information_request).permit( :message ) end end end
b524e1540319444f511c9acff9968a77cbb41535
features/app/blueprints.rb
features/app/blueprints.rb
require 'machinist' Sham.spoon_name { |i| "Spoon #{i}" } Spoon.blueprint do name { Sham.spoon_name } end
require 'machinist/active_record' Sham.spoon_name { |i| "Spoon #{i}" } Spoon.blueprint do name { Sham.spoon_name } end # reset shams between scenarios Before { Sham.reset }
Update machinist in pickle cucumber tests for latest machinist
Update machinist in pickle cucumber tests for latest machinist
Ruby
mit
venuenext/pickle,venuenext/pickle,ianwhite/pickle,ianwhite/pickle
ruby
## Code Before: require 'machinist' Sham.spoon_name { |i| "Spoon #{i}" } Spoon.blueprint do name { Sham.spoon_name } end ## Instruction: Update machinist in pickle cucumber tests for latest machinist ## Code After: require 'machinist/active_record' Sham.spoon_name { |i| "Spoon #{i}" } Spoon.blueprint do name { Sham.spoon_name } end # reset shams between scenarios Before { Sham.reset }
b25df85d62cb20d3c5d9e225ca720adc1bdb8ffd
uninstall.sh
uninstall.sh
INNFARM_HOME=/opt/inn-farm/ SERVICE_HOME=${INNFARM_HOME}/ltepi/ function assert_root { if [[ $EUID -ne 0 ]]; then echo "This script must be run as root" exit 1 fi } function uninstall { rm -f /etc/network/interfaces install -o root -g root -D -m 644 /etc/network/interfaces.bak /etc/network/interfaces && rm -f /etc/network/interfaces.bak rm -f /etc/rc.local install -o root -g root -D -m 755 /etc/rc.local.bak /etc/rc.local && rm -f /etc/rc.local.bak cd ${SERVICE_HOME}/bin ./ltepi-uninstall.sh ${SERVICE_HOME}/bin rm -fr ${SERVICE_HOME} [ "$(ls -A ${INNFARM_HOME})" ] || rmdir ${INNFARM_HOME} } assert_root uninstall
INNFARM_HOME=/opt/inn-farm/ SERVICE_HOME=${INNFARM_HOME}/ltepi/ function assert_root { if [[ $EUID -ne 0 ]]; then echo "This script must be run as root" exit 1 fi } function uninstall { rm -f /etc/network/interfaces.d/ltepi.conf for p in $(ls /usr/bin/ltepi*); do rm -f ${p} done cd ${SERVICE_HOME}/bin ./ltepi-uninstall.sh ${SERVICE_HOME}/bin rm -fr ${SERVICE_HOME} [ "$(ls -A ${INNFARM_HOME})" ] || rmdir ${INNFARM_HOME} } assert_root uninstall
Modify the paths to be removed
Modify the paths to be removed
Shell
bsd-3-clause
Robotma-com/ltepi-service,Robotma-com/ltepi-service
shell
## Code Before: INNFARM_HOME=/opt/inn-farm/ SERVICE_HOME=${INNFARM_HOME}/ltepi/ function assert_root { if [[ $EUID -ne 0 ]]; then echo "This script must be run as root" exit 1 fi } function uninstall { rm -f /etc/network/interfaces install -o root -g root -D -m 644 /etc/network/interfaces.bak /etc/network/interfaces && rm -f /etc/network/interfaces.bak rm -f /etc/rc.local install -o root -g root -D -m 755 /etc/rc.local.bak /etc/rc.local && rm -f /etc/rc.local.bak cd ${SERVICE_HOME}/bin ./ltepi-uninstall.sh ${SERVICE_HOME}/bin rm -fr ${SERVICE_HOME} [ "$(ls -A ${INNFARM_HOME})" ] || rmdir ${INNFARM_HOME} } assert_root uninstall ## Instruction: Modify the paths to be removed ## Code After: INNFARM_HOME=/opt/inn-farm/ SERVICE_HOME=${INNFARM_HOME}/ltepi/ function assert_root { if [[ $EUID -ne 0 ]]; then echo "This script must be run as root" exit 1 fi } function uninstall { rm -f /etc/network/interfaces.d/ltepi.conf for p in $(ls /usr/bin/ltepi*); do rm -f ${p} done cd ${SERVICE_HOME}/bin ./ltepi-uninstall.sh ${SERVICE_HOME}/bin rm -fr ${SERVICE_HOME} [ "$(ls -A ${INNFARM_HOME})" ] || rmdir ${INNFARM_HOME} } assert_root uninstall
a7de8c393f184e3e1ca9fdecc092f7829a09fcc6
data/hostname/worker01.softwareheritage.org.yaml
data/hostname/worker01.softwareheritage.org.yaml
networks: private: interface: eth1 address: 192.168.100.21 netmask: 255.255.255.0 gateway: 192.168.100.1 default: interface: eth0 address: 128.93.193.21 netmask: 255.255.255.0 gateway: 128.93.193.254
networks: private: interface: eth1 address: 192.168.100.21 netmask: 255.255.255.0 gateway: 192.168.100.1 default: interface: eth0 address: 128.93.193.21 netmask: 255.255.255.0 gateway: 128.93.193.254 # temporary for testing swh-loader-dir before going live swh::deploy::storage::db::dbname: softwareheritage-test-dir swh::deploy::storage::directory: /srv/storage/space/test-dir
Add temporary data setup for storage on worker01
Add temporary data setup for storage on worker01 Context: test swh-loader-dir before going live
YAML
apache-2.0
SoftwareHeritage/puppet-swh-site,SoftwareHeritage/puppet-swh-site,SoftwareHeritage/puppet-swh-site,SoftwareHeritage/puppet-swh-site,SoftwareHeritage/puppet-swh-site
yaml
## Code Before: networks: private: interface: eth1 address: 192.168.100.21 netmask: 255.255.255.0 gateway: 192.168.100.1 default: interface: eth0 address: 128.93.193.21 netmask: 255.255.255.0 gateway: 128.93.193.254 ## Instruction: Add temporary data setup for storage on worker01 Context: test swh-loader-dir before going live ## Code After: networks: private: interface: eth1 address: 192.168.100.21 netmask: 255.255.255.0 gateway: 192.168.100.1 default: interface: eth0 address: 128.93.193.21 netmask: 255.255.255.0 gateway: 128.93.193.254 # temporary for testing swh-loader-dir before going live swh::deploy::storage::db::dbname: softwareheritage-test-dir swh::deploy::storage::directory: /srv/storage/space/test-dir
6eaf6cc7a7c84021131771d9307cb98c70656fb5
CHANGELOG.md
CHANGELOG.md
* Fixed "locked condition" broadcast sequencing * Fixed "Fetch Shared" to work even if the pseudo-branch has not yet been created in the remote repository ## 1.3.1 - Bug fixes * State management when pseudo-branch does not exist on remote ## 1.3.0 - Casefile sharing * Share casefiles through the Git repository * Better bookmark anchors using `git blame` * Better internal state management ## 1.2.1 - Bug fixes * Drag-and-drop state management fixed * Tooltip lifecycle fixed ## 1.2.0 - Improved UI * "T" division of bookmark for drop location: * Move to sibling above, * Move to sibling below, or * Move to first child ## 1.1.2 - Project-relative file paths * Make paths in bookmarks relative to files, so sharing casefiles with others using the same repo at a different file path works ## 1.1.1 - Bug fix * Fix tooltip creation ## 1.1.0 - Reimplement with Etch framework * Etch is better integrated with Atom than is ReactJS ## 1.0.0 - Basic Functionality * Bookmarking: file, line, marked text, notes (and, invisibly, git commit) * Bookmark ordering and hierarchy with drag-and-drop * Dump casefile to editor * Load casefile from editor: * Loads under a header (so entire casefile can be discarded) * Promote to container with "Move Children Up"
* Relativize bookmark paths before sharing * Fix line numbers represented as strings in bookmark location computation ## 1.3.2 - Bug fixes * Fixed "locked condition" broadcast sequencing * Fixed "Fetch Shared" to work even if the pseudo-branch has not yet been created in the remote repository ## 1.3.1 - Bug fixes * State management when pseudo-branch does not exist on remote ## 1.3.0 - Casefile sharing * Share casefiles through the Git repository * Better bookmark anchors using `git blame` * Better internal state management ## 1.2.1 - Bug fixes * Drag-and-drop state management fixed * Tooltip lifecycle fixed ## 1.2.0 - Improved UI * "T" division of bookmark for drop location: * Move to sibling above, * Move to sibling below, or * Move to first child ## 1.1.2 - Project-relative file paths * Make paths in bookmarks relative to files, so sharing casefiles with others using the same repo at a different file path works ## 1.1.1 - Bug fix * Fix tooltip creation ## 1.1.0 - Reimplement with Etch framework * Etch is better integrated with Atom than is ReactJS ## 1.0.0 - Basic Functionality * Bookmarking: file, line, marked text, notes (and, invisibly, git commit) * Bookmark ordering and hierarchy with drag-and-drop * Dump casefile to editor * Load casefile from editor: * Loads under a header (so entire casefile can be discarded) * Promote to container with "Move Children Up"
Update changelog for 1.3.3 release
Update changelog for 1.3.3 release
Markdown
mit
rtweeks/casefile
markdown
## Code Before: * Fixed "locked condition" broadcast sequencing * Fixed "Fetch Shared" to work even if the pseudo-branch has not yet been created in the remote repository ## 1.3.1 - Bug fixes * State management when pseudo-branch does not exist on remote ## 1.3.0 - Casefile sharing * Share casefiles through the Git repository * Better bookmark anchors using `git blame` * Better internal state management ## 1.2.1 - Bug fixes * Drag-and-drop state management fixed * Tooltip lifecycle fixed ## 1.2.0 - Improved UI * "T" division of bookmark for drop location: * Move to sibling above, * Move to sibling below, or * Move to first child ## 1.1.2 - Project-relative file paths * Make paths in bookmarks relative to files, so sharing casefiles with others using the same repo at a different file path works ## 1.1.1 - Bug fix * Fix tooltip creation ## 1.1.0 - Reimplement with Etch framework * Etch is better integrated with Atom than is ReactJS ## 1.0.0 - Basic Functionality * Bookmarking: file, line, marked text, notes (and, invisibly, git commit) * Bookmark ordering and hierarchy with drag-and-drop * Dump casefile to editor * Load casefile from editor: * Loads under a header (so entire casefile can be discarded) * Promote to container with "Move Children Up" ## Instruction: Update changelog for 1.3.3 release ## Code After: * Relativize bookmark paths before sharing * Fix line numbers represented as strings in bookmark location computation ## 1.3.2 - Bug fixes * Fixed "locked condition" broadcast sequencing * Fixed "Fetch Shared" to work even if the pseudo-branch has not yet been created in the remote repository ## 1.3.1 - Bug fixes * State management when pseudo-branch does not exist on remote ## 1.3.0 - Casefile sharing * Share casefiles through the Git repository * Better bookmark anchors using `git blame` * Better internal state management ## 1.2.1 - Bug fixes * Drag-and-drop state management fixed * Tooltip lifecycle fixed ## 1.2.0 - Improved UI * "T" division of bookmark for drop location: * Move to sibling above, * Move to sibling below, or * Move to first child ## 1.1.2 - Project-relative file paths * Make paths in bookmarks relative to files, so sharing casefiles with others using the same repo at a different file path works ## 1.1.1 - Bug fix * Fix tooltip creation ## 1.1.0 - Reimplement with Etch framework * Etch is better integrated with Atom than is ReactJS ## 1.0.0 - Basic Functionality * Bookmarking: file, line, marked text, notes (and, invisibly, git commit) * Bookmark ordering and hierarchy with drag-and-drop * Dump casefile to editor * Load casefile from editor: * Loads under a header (so entire casefile can be discarded) * Promote to container with "Move Children Up"
02ae1b69ffb343445e00b01aa29b7e0aa883d923
h2o-web/src/main/steam/templates/dropdown-model-parameter.jade
h2o-web/src/main/steam/templates/dropdown-model-parameter.jade
tr.y-model-parameter(data-bind="css:{'y-invalid':isInvalid}") td.y-shrink label(data-bind='text:label') td.y-shrink select(data-bind='options:values, value:value') td.y-expand span.y-description(data-bind='text:description')
tr.y-model-parameter(data-bind="css:{'y-invalid':isInvalid}") td.y-shrink label(data-bind='text:label') td.y-shrink select(data-bind="options:values, value:value, optionsCaption: '(None)'") td.y-expand span.y-description(data-bind='text:description')
Add caption to optional dropdowns
Add caption to optional dropdowns
Jade
apache-2.0
h2oai/h2o-3,spennihana/h2o-3,pchmieli/h2o-3,bospetersen/h2o-3,kyoren/https-github.com-h2oai-h2o-3,jangorecki/h2o-3,h2oai/h2o-3,michalkurka/h2o-3,nilbody/h2o-3,nilbody/h2o-flow,h2oai/h2o-dev,datachand/h2o-3,mrgloom/h2o-3,datachand/h2o-3,printedheart/h2o-3,spennihana/h2o-3,madmax983/h2o-3,jangorecki/h2o-3,brightchen/h2o-3,printedheart/h2o-3,printedheart/h2o-3,spennihana/h2o-3,ChristosChristofidis/h2o-3,jangorecki/h2o-3,h2oai/h2o-3,mathemage/h2o-3,nilbody/h2o-3,brightchen/h2o-3,ChristosChristofidis/h2o-3,mathemage/h2o-3,printedheart/h2o-flow,mrgloom/h2o-3,mathemage/h2o-3,michalkurka/h2o-3,kyoren/https-github.com-h2oai-h2o-3,h2oai/h2o-dev,bikash/h2o-dev,nilbody/h2o-3,spennihana/h2o-3,madmax983/h2o-3,mathemage/h2o-3,YzPaul3/h2o-3,ChristosChristofidis/h2o-3,weaver-viii/h2o-3,junwucs/h2o-3,printedheart/h2o-3,h2oai/h2o-3,madmax983/h2o-3,mathemage/h2o-3,bospetersen/h2o-3,bospetersen/h2o-3,mrgloom/h2o-3,nilbody/h2o-3,YzPaul3/h2o-3,kyoren/https-github.com-h2oai-h2o-3,michalkurka/h2o-3,mrgloom/h2o-3,junwucs/h2o-3,weaver-viii/h2o-3,pchmieli/h2o-3,pchmieli/h2o-3,weaver-viii/h2o-3,tarasane/h2o-3,nilbody/h2o-flow,nilbody/h2o-flow,pchmieli/h2o-3,datachand/h2o-3,junwucs/h2o-3,spennihana/h2o-3,junwucs/h2o-flow,bikash/h2o-dev,h2oai/h2o-3,h2oai/h2o-dev,h2oai/h2o-3,YzPaul3/h2o-3,tarasane/h2o-3,pchmieli/h2o-3,junwucs/h2o-3,h2oai/h2o-3,h2oai/h2o-dev,h2oai/h2o-dev,jangorecki/h2o-3,datachand/h2o-3,tarasane/h2o-3,mrgloom/h2o-3,junwucs/h2o-3,brightchen/h2o-3,pchmieli/h2o-3,tarasane/h2o-3,ChristosChristofidis/h2o-3,brightchen/h2o-3,spennihana/h2o-3,PawarPawan/h2o-v3,junwucs/h2o-3,h2oai/h2o-flow,PawarPawan/h2o-v3,kyoren/https-github.com-h2oai-h2o-3,PawarPawan/h2o-v3,PawarPawan/h2o-v3,madmax983/h2o-3,mathemage/h2o-3,bospetersen/h2o-3,mathemage/h2o-3,bikash/h2o-dev,ChristosChristofidis/h2o-3,h2oai/h2o-dev,jangorecki/h2o-3,mrgloom/h2o-3,weaver-viii/h2o-3,bospetersen/h2o-3,brightchen/h2o-3,printedheart/h2o-3,h2oai/h2o-3,junwucs/h2o-3,michalkurka/h2o-3,ChristosChristofidis/h2o-3,michalkurka/h2o-3,bikash/h2o-dev,bospetersen/h2o-3,kyoren/https-github.com-h2oai-h2o-3,brightchen/h2o-3,PawarPawan/h2o-v3,kyoren/https-github.com-h2oai-h2o-3,madmax983/h2o-3,PawarPawan/h2o-v3,h2oai/h2o-dev,bospetersen/h2o-3,junwucs/h2o-flow,weaver-viii/h2o-3,printedheart/h2o-3,michalkurka/h2o-3,printedheart/h2o-3,bikash/h2o-dev,YzPaul3/h2o-3,madmax983/h2o-3,pchmieli/h2o-3,printedheart/h2o-flow,datachand/h2o-3,PawarPawan/h2o-v3,ChristosChristofidis/h2o-3,h2oai/h2o-flow,junwucs/h2o-flow,datachand/h2o-3,jangorecki/h2o-3,YzPaul3/h2o-3,tarasane/h2o-3,nilbody/h2o-3,michalkurka/h2o-3,bikash/h2o-dev,YzPaul3/h2o-3,jangorecki/h2o-3,weaver-viii/h2o-3,brightchen/h2o-3,YzPaul3/h2o-3,tarasane/h2o-3,mrgloom/h2o-3,weaver-viii/h2o-3,tarasane/h2o-3,spennihana/h2o-3,kyoren/https-github.com-h2oai-h2o-3,datachand/h2o-3,printedheart/h2o-flow,nilbody/h2o-3,madmax983/h2o-3,nilbody/h2o-3
jade
## Code Before: tr.y-model-parameter(data-bind="css:{'y-invalid':isInvalid}") td.y-shrink label(data-bind='text:label') td.y-shrink select(data-bind='options:values, value:value') td.y-expand span.y-description(data-bind='text:description') ## Instruction: Add caption to optional dropdowns ## Code After: tr.y-model-parameter(data-bind="css:{'y-invalid':isInvalid}") td.y-shrink label(data-bind='text:label') td.y-shrink select(data-bind="options:values, value:value, optionsCaption: '(None)'") td.y-expand span.y-description(data-bind='text:description')
4031aab3317a8932334b8c036517b2330701f06b
addon/-private/closure-action.js
addon/-private/closure-action.js
import Ember from 'ember'; const ClosureActionModule = Ember.__loader.require('ember-routing-htmlbars/keywords/closure-action'); export default ClosureActionModule.ACTION;
import Ember from 'ember'; let ClosureActionModule; if ('ember-htmlbars/keywords/closure-action' in Ember.__loader.registry) { ClosureActionModule = Ember.__loader.require('ember-htmlbars/keywords/closure-action'); } else { ClosureActionModule = Ember.__loader.require('ember-routing-htmlbars/keywords/closure-action'); } export default ClosureActionModule.ACTION;
Fix loading ACTION symbol on canary
Fix loading ACTION symbol on canary
JavaScript
mit
DockYard/ember-functional-helpers,DockYard/ember-functional-helpers
javascript
## Code Before: import Ember from 'ember'; const ClosureActionModule = Ember.__loader.require('ember-routing-htmlbars/keywords/closure-action'); export default ClosureActionModule.ACTION; ## Instruction: Fix loading ACTION symbol on canary ## Code After: import Ember from 'ember'; let ClosureActionModule; if ('ember-htmlbars/keywords/closure-action' in Ember.__loader.registry) { ClosureActionModule = Ember.__loader.require('ember-htmlbars/keywords/closure-action'); } else { ClosureActionModule = Ember.__loader.require('ember-routing-htmlbars/keywords/closure-action'); } export default ClosureActionModule.ACTION;
761789b490deb29e0cdbf46ec15d2cdaf97959e0
README.md
README.md
vim_setup ========= Scripts to set up my vim environment on any machine. Right now it installs the following scripts and plugins: * [Most Recently Used](https://github.com/yegappan/mru) * [taglist.vim](https://github.com/vim-scripts/taglist.vim) * [pathogen.vim](https://github.com/tpope/vim-pathogen) * [SnipMate](https://github.com/garbas/vim-snipmate) along with some custom snippets The vimrc will change the leader key to `<Space>`. The following custom mappings are defined: * `<Space>s` Save session (to ~/.vim/session) * `<Space>l` Restore session * `<Space>mf` Add `:Mru ` in command line which allows you to specify a filter before hitting enter * `<Space>mr` Directly open most recently used files list * `<Space>t` Open new tab * `<Space>g` Toggle taglist * `<Space><NUM>` Go to tab <NUM> (works with numbers from 1 to 7) * `<Space>q` Quit * `<Space>e` Explore Directory Installation ------------ **Attention: This will overwrite your .vimrc without asking! You have been warned.** `git clone https://github.com/moee/vim_setup.git ~/vim_setup && cd ~/vim_setup && ./setup.sh && cd .. && rm vim_setup -rf`
vim_setup ========= Scripts to set up my vim environment on any machine. Right now it installs the following scripts and plugins: * [Most Recently Used](https://github.com/yegappan/mru) * [taglist.vim](https://github.com/vim-scripts/taglist.vim) * [pathogen.vim](https://github.com/tpope/vim-pathogen) * [SnipMate](https://github.com/garbas/vim-snipmate) along with some custom snippets The vimrc will change the leader key to `<Space>`. The following custom mappings are defined: * `<Space>s` Save session (to ~/.vim/session) * `<Space>l` Restore session * `<Space>mf` Add `:Mru ` in command line which allows you to specify a filter before hitting enter * `<Space>mr` Directly open most recently used files list * `<Space>t` Open new tab and explore the current file's directory * `<Space>g` Toggle taglist * `<Space><NUM>` Go to tab <NUM> (works with numbers from 1 to 7) * `<Space>q` Quit * `<Space>e` Explore Directory Installation ------------ **Attention: This will overwrite your .vimrc without asking! You have been warned.** `git clone https://github.com/moee/vim_setup.git ~/vim_setup && cd ~/vim_setup && ./setup.sh && cd .. && rm vim_setup -rf`
Document changed behavior of <Space>t
Document changed behavior of <Space>t
Markdown
mit
moee/vim_setup
markdown
## Code Before: vim_setup ========= Scripts to set up my vim environment on any machine. Right now it installs the following scripts and plugins: * [Most Recently Used](https://github.com/yegappan/mru) * [taglist.vim](https://github.com/vim-scripts/taglist.vim) * [pathogen.vim](https://github.com/tpope/vim-pathogen) * [SnipMate](https://github.com/garbas/vim-snipmate) along with some custom snippets The vimrc will change the leader key to `<Space>`. The following custom mappings are defined: * `<Space>s` Save session (to ~/.vim/session) * `<Space>l` Restore session * `<Space>mf` Add `:Mru ` in command line which allows you to specify a filter before hitting enter * `<Space>mr` Directly open most recently used files list * `<Space>t` Open new tab * `<Space>g` Toggle taglist * `<Space><NUM>` Go to tab <NUM> (works with numbers from 1 to 7) * `<Space>q` Quit * `<Space>e` Explore Directory Installation ------------ **Attention: This will overwrite your .vimrc without asking! You have been warned.** `git clone https://github.com/moee/vim_setup.git ~/vim_setup && cd ~/vim_setup && ./setup.sh && cd .. && rm vim_setup -rf` ## Instruction: Document changed behavior of <Space>t ## Code After: vim_setup ========= Scripts to set up my vim environment on any machine. Right now it installs the following scripts and plugins: * [Most Recently Used](https://github.com/yegappan/mru) * [taglist.vim](https://github.com/vim-scripts/taglist.vim) * [pathogen.vim](https://github.com/tpope/vim-pathogen) * [SnipMate](https://github.com/garbas/vim-snipmate) along with some custom snippets The vimrc will change the leader key to `<Space>`. The following custom mappings are defined: * `<Space>s` Save session (to ~/.vim/session) * `<Space>l` Restore session * `<Space>mf` Add `:Mru ` in command line which allows you to specify a filter before hitting enter * `<Space>mr` Directly open most recently used files list * `<Space>t` Open new tab and explore the current file's directory * `<Space>g` Toggle taglist * `<Space><NUM>` Go to tab <NUM> (works with numbers from 1 to 7) * `<Space>q` Quit * `<Space>e` Explore Directory Installation ------------ **Attention: This will overwrite your .vimrc without asking! You have been warned.** `git clone https://github.com/moee/vim_setup.git ~/vim_setup && cd ~/vim_setup && ./setup.sh && cd .. && rm vim_setup -rf`
1bf3f30430e07bc4093321971a041ce3c4abed63
.travis.yml
.travis.yml
language: ruby before_install: - gem uninstall -v '>= 2' -i $(rvm gemdir)@global -ax bundler || true - gem install bundler -v '< 2' install: "bundle install --jobs 8" rvm: - 2.4.9 - 2.5.7 - 2.6.5 - 2.7.0 gemfile: - gemfiles/rails42.gemfile - gemfiles/rails50.gemfile - gemfiles/rails51.gemfile - gemfiles/rails52.gemfile - gemfiles/rails60.gemfile matrix: exclude: - rvm: 2.7.0 gemfile: gemfiles/rails42.gemfile fast_finish: true script: - RAILS_ENV=test bundle exec rake db:migrate --trace - bundle exec rspec
language: ruby before_install: - gem uninstall -v '>= 2' -i $(rvm gemdir)@global -ax bundler || true - gem install bundler -v '< 2' install: "bundle install --jobs 8" rvm: - 2.4.9 - 2.5.7 - 2.6.5 - 2.7.0 gemfile: - gemfiles/rails42.gemfile - gemfiles/rails50.gemfile - gemfiles/rails51.gemfile - gemfiles/rails52.gemfile - gemfiles/rails60.gemfile matrix: exclude: - rvm: 2.4.9 gemfile: gemfiles/rails60.gemfile - rvm: 2.7.0 gemfile: gemfiles/rails42.gemfile fast_finish: true script: - RAILS_ENV=test bundle exec rake db:migrate --trace - bundle exec rspec
Exclude ruby 2.4 & rails 6
Exclude ruby 2.4 & rails 6
YAML
mit
itmammoth/rails_sortable,itmammoth/rails_sortable,itmammoth/rails_sortable
yaml
## Code Before: language: ruby before_install: - gem uninstall -v '>= 2' -i $(rvm gemdir)@global -ax bundler || true - gem install bundler -v '< 2' install: "bundle install --jobs 8" rvm: - 2.4.9 - 2.5.7 - 2.6.5 - 2.7.0 gemfile: - gemfiles/rails42.gemfile - gemfiles/rails50.gemfile - gemfiles/rails51.gemfile - gemfiles/rails52.gemfile - gemfiles/rails60.gemfile matrix: exclude: - rvm: 2.7.0 gemfile: gemfiles/rails42.gemfile fast_finish: true script: - RAILS_ENV=test bundle exec rake db:migrate --trace - bundle exec rspec ## Instruction: Exclude ruby 2.4 & rails 6 ## Code After: language: ruby before_install: - gem uninstall -v '>= 2' -i $(rvm gemdir)@global -ax bundler || true - gem install bundler -v '< 2' install: "bundle install --jobs 8" rvm: - 2.4.9 - 2.5.7 - 2.6.5 - 2.7.0 gemfile: - gemfiles/rails42.gemfile - gemfiles/rails50.gemfile - gemfiles/rails51.gemfile - gemfiles/rails52.gemfile - gemfiles/rails60.gemfile matrix: exclude: - rvm: 2.4.9 gemfile: gemfiles/rails60.gemfile - rvm: 2.7.0 gemfile: gemfiles/rails42.gemfile fast_finish: true script: - RAILS_ENV=test bundle exec rake db:migrate --trace - bundle exec rspec
71992fbaf93f0aa50e6244a571ea723aa8476382
packages/hs/hslua-module-text.yaml
packages/hs/hslua-module-text.yaml
homepage: https://github.com/hslua/hslua-text-module changelog-type: markdown hash: a81cee216643fe4a59133fba3288c96997ec2ee91ffb1cdd94ae6c2bc45e5369 test-bench-deps: base: -any text: -any hslua-module-text: -any tasty-hunit: -any tasty: -any hslua: -any maintainer: albert+hslua@zeitkraut.de synopsis: Lua module for text changelog: ! '# Revision history for hslua-module-text ## 0.1 -- 2017-11-15 * First version. Released on an unsuspecting world. ' basic-deps: base: ! '>=4.8 && <4.11' text: ! '>=1 && <1.3' hslua: ! '>=0.9 && <0.10' all-versions: - '0.1' author: Albert Krewinkel latest: '0.1' description-type: haddock description: UTF-8 aware subset of Lua's `string` module. license-name: MIT
homepage: https://github.com/hslua/hslua-module-test changelog-type: markdown hash: 53fdb4bb0868fabef7a8dfb4ab08c554f7dffd980196c282afc0f32a4937fbf7 test-bench-deps: base: -any text: -any hslua-module-text: -any tasty-hunit: -any tasty: -any hslua: -any maintainer: albert+hslua@zeitkraut.de synopsis: Lua module for text changelog: ! '# Revision history for hslua-module-text ## 0.1.1 -- 2017-11-16 * Lift restriction on base to allow GHC 7.8. ## 0.1 -- 2017-11-15 * First version. Released on an unsuspecting world. ' basic-deps: base: ! '>=4.7 && <4.11' text: ! '>=1 && <1.3' hslua: ! '>=0.9 && <0.10' all-versions: - '0.1' - '0.1.1' author: Albert Krewinkel latest: '0.1.1' description-type: haddock description: UTF-8 aware subset of Lua's `string` module. license-name: MIT
Update from Hackage at 2017-11-16T21:37:49Z
Update from Hackage at 2017-11-16T21:37:49Z
YAML
mit
commercialhaskell/all-cabal-metadata
yaml
## Code Before: homepage: https://github.com/hslua/hslua-text-module changelog-type: markdown hash: a81cee216643fe4a59133fba3288c96997ec2ee91ffb1cdd94ae6c2bc45e5369 test-bench-deps: base: -any text: -any hslua-module-text: -any tasty-hunit: -any tasty: -any hslua: -any maintainer: albert+hslua@zeitkraut.de synopsis: Lua module for text changelog: ! '# Revision history for hslua-module-text ## 0.1 -- 2017-11-15 * First version. Released on an unsuspecting world. ' basic-deps: base: ! '>=4.8 && <4.11' text: ! '>=1 && <1.3' hslua: ! '>=0.9 && <0.10' all-versions: - '0.1' author: Albert Krewinkel latest: '0.1' description-type: haddock description: UTF-8 aware subset of Lua's `string` module. license-name: MIT ## Instruction: Update from Hackage at 2017-11-16T21:37:49Z ## Code After: homepage: https://github.com/hslua/hslua-module-test changelog-type: markdown hash: 53fdb4bb0868fabef7a8dfb4ab08c554f7dffd980196c282afc0f32a4937fbf7 test-bench-deps: base: -any text: -any hslua-module-text: -any tasty-hunit: -any tasty: -any hslua: -any maintainer: albert+hslua@zeitkraut.de synopsis: Lua module for text changelog: ! '# Revision history for hslua-module-text ## 0.1.1 -- 2017-11-16 * Lift restriction on base to allow GHC 7.8. ## 0.1 -- 2017-11-15 * First version. Released on an unsuspecting world. ' basic-deps: base: ! '>=4.7 && <4.11' text: ! '>=1 && <1.3' hslua: ! '>=0.9 && <0.10' all-versions: - '0.1' - '0.1.1' author: Albert Krewinkel latest: '0.1.1' description-type: haddock description: UTF-8 aware subset of Lua's `string` module. license-name: MIT
4968c45dfee0c99616bc93230e63ca1efa53b9b6
neovim/config/vim-airline/vim-airline-themes.vim
neovim/config/vim-airline/vim-airline-themes.vim
" " Airline Themes " " Set the theme to use let g:airline_theme='solarized'
" " Airline Themes " https://github.com/vim-airline/vim-airline " " Set the theme to use let g:airline_theme='solarized' let g:airline_solarized_bg='dark'
Set dark background for solarized theme
Set dark background for solarized theme
VimL
mit
chauncey-garrett/dotfiles,chauncey-garrett/dotfiles,chauncey-garrett/dotfiles,chauncey-garrett/dotfiles,chauncey-garrett/dotfiles
viml
## Code Before: " " Airline Themes " " Set the theme to use let g:airline_theme='solarized' ## Instruction: Set dark background for solarized theme ## Code After: " " Airline Themes " https://github.com/vim-airline/vim-airline " " Set the theme to use let g:airline_theme='solarized' let g:airline_solarized_bg='dark'
5b12b9b42961c4686a06bc636221b16d2d3ed033
src/main/java/me/semx11/autotip/api/reply/TipReply.java
src/main/java/me/semx11/autotip/api/reply/TipReply.java
package me.semx11.autotip.api.reply; import java.util.Collections; import java.util.List; import me.semx11.autotip.api.util.RequestType; public class TipReply extends AbstractReply { private List<Tip> tips; public TipReply() { } public TipReply(boolean success) { super(success); } private TipReply(List<Tip> tips) { this.tips = tips; } public static TipReply getDefault() { return new TipReply(Collections.singletonList(new Tip("all", ""))); } public List<Tip> getTips() { return tips; } @Override public RequestType getRequestType() { return RequestType.TIP; } public static class Tip { private String gamemode; private String username; private Tip() { } private Tip(String gamemode, String username) { this.gamemode = gamemode; this.username = username; } public String getGamemode() { return gamemode; } public String getUsername() { return username != null ? username : ""; } public String getAsCommand() { return "/tip " + (username != null ? username + " " : "") + gamemode; } @Override public String toString() { return getUsername() + " " + getGamemode(); } } }
package me.semx11.autotip.api.reply; import java.util.Collections; import java.util.List; import java.util.Objects; import me.semx11.autotip.api.util.RequestType; public class TipReply extends AbstractReply { private List<Tip> tips; public TipReply() { } public TipReply(boolean success) { super(success); } private TipReply(List<Tip> tips) { this.tips = tips; } public static TipReply getDefault() { return new TipReply(Collections.singletonList(new Tip("all", ""))); } public List<Tip> getTips() { return tips; } @Override public RequestType getRequestType() { return RequestType.TIP; } public static class Tip { private String gamemode; private String username; private Tip() { } private Tip(String gamemode, String username) { this.gamemode = gamemode; this.username = username; } public String getGamemode() { return gamemode; } public String getUsername() { return username != null ? username : ""; } public String getAsCommand() { return "/tip " + (!Objects.equals(username, "") && username != null ? username + " " : "") + gamemode; } @Override public String toString() { return getUsername() + " " + getGamemode(); } } }
Bump 2.1.0.3 beta release - ha
Bump 2.1.0.3 beta release - ha
Java
mit
Semx11/Autotip
java
## Code Before: package me.semx11.autotip.api.reply; import java.util.Collections; import java.util.List; import me.semx11.autotip.api.util.RequestType; public class TipReply extends AbstractReply { private List<Tip> tips; public TipReply() { } public TipReply(boolean success) { super(success); } private TipReply(List<Tip> tips) { this.tips = tips; } public static TipReply getDefault() { return new TipReply(Collections.singletonList(new Tip("all", ""))); } public List<Tip> getTips() { return tips; } @Override public RequestType getRequestType() { return RequestType.TIP; } public static class Tip { private String gamemode; private String username; private Tip() { } private Tip(String gamemode, String username) { this.gamemode = gamemode; this.username = username; } public String getGamemode() { return gamemode; } public String getUsername() { return username != null ? username : ""; } public String getAsCommand() { return "/tip " + (username != null ? username + " " : "") + gamemode; } @Override public String toString() { return getUsername() + " " + getGamemode(); } } } ## Instruction: Bump 2.1.0.3 beta release - ha ## Code After: package me.semx11.autotip.api.reply; import java.util.Collections; import java.util.List; import java.util.Objects; import me.semx11.autotip.api.util.RequestType; public class TipReply extends AbstractReply { private List<Tip> tips; public TipReply() { } public TipReply(boolean success) { super(success); } private TipReply(List<Tip> tips) { this.tips = tips; } public static TipReply getDefault() { return new TipReply(Collections.singletonList(new Tip("all", ""))); } public List<Tip> getTips() { return tips; } @Override public RequestType getRequestType() { return RequestType.TIP; } public static class Tip { private String gamemode; private String username; private Tip() { } private Tip(String gamemode, String username) { this.gamemode = gamemode; this.username = username; } public String getGamemode() { return gamemode; } public String getUsername() { return username != null ? username : ""; } public String getAsCommand() { return "/tip " + (!Objects.equals(username, "") && username != null ? username + " " : "") + gamemode; } @Override public String toString() { return getUsername() + " " + getGamemode(); } } }
088b8db10664ecba24443d39413e95fe8a80e01d
config/settings/analytics.js
config/settings/analytics.js
// web analytics configuration module.exports = { //ANALYTICS SETTINGS google: { enabled: true, key: 'UA-48605964-17' }, piwik: { enabled: false, host: '', key: '' }, dap: { enabled: true, source: 'https://analytics.usa.gov/dap/dap.min.js' } };
// web analytics configuration module.exports = { //ANALYTICS SETTINGS google: { enabled: true, key: 'UA-48605964-17' }, piwik: { enabled: false, host: '', key: '' }, dap: { enabled: true, source: 'https://dap.digitalgov.gov/Universal-Federated-Analytics-Min.js?agency=GSA' } };
Update to new DAP location
Update to new DAP location
JavaScript
cc0-1.0
18F/open-opportunities-theme,18F/midas-open-opportunities,18F/open-opportunities-theme,18F/midas-open-opportunities
javascript
## Code Before: // web analytics configuration module.exports = { //ANALYTICS SETTINGS google: { enabled: true, key: 'UA-48605964-17' }, piwik: { enabled: false, host: '', key: '' }, dap: { enabled: true, source: 'https://analytics.usa.gov/dap/dap.min.js' } }; ## Instruction: Update to new DAP location ## Code After: // web analytics configuration module.exports = { //ANALYTICS SETTINGS google: { enabled: true, key: 'UA-48605964-17' }, piwik: { enabled: false, host: '', key: '' }, dap: { enabled: true, source: 'https://dap.digitalgov.gov/Universal-Federated-Analytics-Min.js?agency=GSA' } };
9b236358d44aece4c04b07d76aa01a262da4b5c7
npm2nix.coffee
npm2nix.coffee
http = require 'http' util = require 'util' crypto = require 'crypto' name = process.argv[2] version = process.argv[3] ? "latest" deps = [] hash = crypto.createHash 'sha256' http.get "http://registry.npmjs.org/#{name}", (res) -> res.setEncoding() val = "" res.on 'data', (chunk) -> val += chunk res.on 'end', -> pkginfo = JSON.parse val version = pkginfo['dist-tags'].stable ? pkginfo['dist-tags'].latest if version is "latest" http.get "http://registry.npmjs.org/#{name}/-/#{name}-#{version}.tgz", (res) -> res.on 'data', (chunk) -> hash.update chunk res.on 'end', -> process.stdout.write """ "#{name}" = buildNodePackage rec { name = "#{name}-#{version}"; src = fetchurl { url = "http://registry.npmjs.org/#{name}/-/${name}.tgz"; sha256 = "#{hash.digest('hex')}"; }; deps = [ #{("self.\"#{dep}\"" for dep in deps).join " "} ]; }; """ deps = (key for key, value of (pkginfo.versions[version].dependencies ? {}))
http = require 'http' util = require 'util' crypto = require 'crypto' name = process.argv[2] version = process.argv[3] ? "latest" deps = [] hash = crypto.createHash 'sha256' http.get "http://registry.npmjs.org/#{name}", (res) -> res.setEncoding() val = "" res.on 'data', (chunk) -> val += chunk res.on 'end', -> pkginfo = JSON.parse val version = pkginfo['dist-tags'].stable ? pkginfo['dist-tags'].latest if version is "latest" http.get "http://registry.npmjs.org/#{name}/-/#{name}-#{version}.tgz", (res) -> res.on 'data', (chunk) -> hash.update chunk res.on 'end', -> process.stdout.write """ #{} "#{name}" = self."#{name}-#{version}"; "#{name}-#{version}" = buildNodePackage rec { name = "#{name}-#{version}"; src = fetchurl { url = "http://registry.npmjs.org/#{name}/-/${name}.tgz"; sha256 = "#{hash.digest('hex')}"; }; deps = [ #{(" self.\"#{dep}#{if ver is "*" then "" else "-#{ver}"}\"" for dep, ver of deps).join "\n"} ]; }; """ deps = pkginfo.versions[version].dependencies ? {}
Put versions in to generated attribute names, indent generated code
Put versions in to generated attribute names, indent generated code
CoffeeScript
mit
bobvanderlinden/npm2nix,NixOS/npm2nix
coffeescript
## Code Before: http = require 'http' util = require 'util' crypto = require 'crypto' name = process.argv[2] version = process.argv[3] ? "latest" deps = [] hash = crypto.createHash 'sha256' http.get "http://registry.npmjs.org/#{name}", (res) -> res.setEncoding() val = "" res.on 'data', (chunk) -> val += chunk res.on 'end', -> pkginfo = JSON.parse val version = pkginfo['dist-tags'].stable ? pkginfo['dist-tags'].latest if version is "latest" http.get "http://registry.npmjs.org/#{name}/-/#{name}-#{version}.tgz", (res) -> res.on 'data', (chunk) -> hash.update chunk res.on 'end', -> process.stdout.write """ "#{name}" = buildNodePackage rec { name = "#{name}-#{version}"; src = fetchurl { url = "http://registry.npmjs.org/#{name}/-/${name}.tgz"; sha256 = "#{hash.digest('hex')}"; }; deps = [ #{("self.\"#{dep}\"" for dep in deps).join " "} ]; }; """ deps = (key for key, value of (pkginfo.versions[version].dependencies ? {})) ## Instruction: Put versions in to generated attribute names, indent generated code ## Code After: http = require 'http' util = require 'util' crypto = require 'crypto' name = process.argv[2] version = process.argv[3] ? "latest" deps = [] hash = crypto.createHash 'sha256' http.get "http://registry.npmjs.org/#{name}", (res) -> res.setEncoding() val = "" res.on 'data', (chunk) -> val += chunk res.on 'end', -> pkginfo = JSON.parse val version = pkginfo['dist-tags'].stable ? pkginfo['dist-tags'].latest if version is "latest" http.get "http://registry.npmjs.org/#{name}/-/#{name}-#{version}.tgz", (res) -> res.on 'data', (chunk) -> hash.update chunk res.on 'end', -> process.stdout.write """ #{} "#{name}" = self."#{name}-#{version}"; "#{name}-#{version}" = buildNodePackage rec { name = "#{name}-#{version}"; src = fetchurl { url = "http://registry.npmjs.org/#{name}/-/${name}.tgz"; sha256 = "#{hash.digest('hex')}"; }; deps = [ #{(" self.\"#{dep}#{if ver is "*" then "" else "-#{ver}"}\"" for dep, ver of deps).join "\n"} ]; }; """ deps = pkginfo.versions[version].dependencies ? {}
b3515e913f546dd6a2ed704b3940ff4677351083
circle.yml
circle.yml
machine: services: - docker dependencies: post: - docker build -t $AWS_ACCOUNT_ID.dkr.ecr.us-west-2.amazonaws.com/tyrantrep:$CIRCLE_SHA1 . test: post: - docker run -d -p 8080:8080 --name tubackend $AWS_ACCOUNT_ID.dkr.ecr.us-west-2.amazonaws.com/tyrantrep:$CIRCLE_SHA1 - sleep 10 - curl --retry 10 --retry-delay 5 localhost:8080 | grep "Hello World!" deployment: prod: branch: master commands: - ./deploy.sh
machine: services: - docker dependencies: post: - docker build -t $AWS_ACCOUNT_ID.dkr.ecr.us-west-2.amazonaws.com/tyrantrep:$CIRCLE_SHA1 . test: post: - docker run -d -p 8080:8080 --name tubackend $AWS_ACCOUNT_ID.dkr.ecr.us-west-2.amazonaws.com/tyrantrep:$CIRCLE_SHA1 - sleep 10 - curl --retry 10 --retry-delay 5 localhost:8080 | grep "Hello World!" deployment: prod: branch: master commands: - chmod +x ./deploy.sh - ./deploy.sh
Set permissions for deploy file
Set permissions for deploy file
YAML
mit
kragej/tubackend,kragej/tubackend
yaml
## Code Before: machine: services: - docker dependencies: post: - docker build -t $AWS_ACCOUNT_ID.dkr.ecr.us-west-2.amazonaws.com/tyrantrep:$CIRCLE_SHA1 . test: post: - docker run -d -p 8080:8080 --name tubackend $AWS_ACCOUNT_ID.dkr.ecr.us-west-2.amazonaws.com/tyrantrep:$CIRCLE_SHA1 - sleep 10 - curl --retry 10 --retry-delay 5 localhost:8080 | grep "Hello World!" deployment: prod: branch: master commands: - ./deploy.sh ## Instruction: Set permissions for deploy file ## Code After: machine: services: - docker dependencies: post: - docker build -t $AWS_ACCOUNT_ID.dkr.ecr.us-west-2.amazonaws.com/tyrantrep:$CIRCLE_SHA1 . test: post: - docker run -d -p 8080:8080 --name tubackend $AWS_ACCOUNT_ID.dkr.ecr.us-west-2.amazonaws.com/tyrantrep:$CIRCLE_SHA1 - sleep 10 - curl --retry 10 --retry-delay 5 localhost:8080 | grep "Hello World!" deployment: prod: branch: master commands: - chmod +x ./deploy.sh - ./deploy.sh
94610608117e5e7804a08864210ee0798dec9353
app/views/devise/sessions/new.html.haml
app/views/devise/sessions/new.html.haml
.row .col-md-4 .col-md-4 .panel.panel-primary .panel-heading.text-center %h2.panel-title Sign in .panel-body = form_for resource, as: resource_name, url: session_path(resource_name), class: 'input-group input-group-lg' do |f| = f.text_field :login, placeholder: 'Login', autofocus: true, class: 'form-control' %br = f.password_field :password, placeholder: 'Password', class: 'form-control' %br = f.submit 'Sign in', class: 'btn btn-primary btn-block' .panel-footer = render 'devise/shared/links' .col-md-4
.row .col-md-4 .col-md-4 .panel.panel-primary .panel-heading.text-center %h2.panel-title Sign in .panel-body = form_for resource, as: resource_name, url: session_path(resource_name), class: 'input-group input-group-lg' do |f| = f.text_field :login, placeholder: 'Login', required: 'true', autofocus: true, class: 'form-control' %br = f.password_field :password, placeholder: 'Password', required: 'true', class: 'form-control' %br = f.submit 'Sign in', class: 'btn btn-primary btn-block' .panel-footer = render 'devise/shared/links' .col-md-4
Add required field setting to sign in view form
Add required field setting to sign in view form
Haml
mit
rafalchmiel/issuet,tiimgreen/issuet,tiimgreen/issuet,rafalchmiel/issuet
haml
## Code Before: .row .col-md-4 .col-md-4 .panel.panel-primary .panel-heading.text-center %h2.panel-title Sign in .panel-body = form_for resource, as: resource_name, url: session_path(resource_name), class: 'input-group input-group-lg' do |f| = f.text_field :login, placeholder: 'Login', autofocus: true, class: 'form-control' %br = f.password_field :password, placeholder: 'Password', class: 'form-control' %br = f.submit 'Sign in', class: 'btn btn-primary btn-block' .panel-footer = render 'devise/shared/links' .col-md-4 ## Instruction: Add required field setting to sign in view form ## Code After: .row .col-md-4 .col-md-4 .panel.panel-primary .panel-heading.text-center %h2.panel-title Sign in .panel-body = form_for resource, as: resource_name, url: session_path(resource_name), class: 'input-group input-group-lg' do |f| = f.text_field :login, placeholder: 'Login', required: 'true', autofocus: true, class: 'form-control' %br = f.password_field :password, placeholder: 'Password', required: 'true', class: 'form-control' %br = f.submit 'Sign in', class: 'btn btn-primary btn-block' .panel-footer = render 'devise/shared/links' .col-md-4
f0a5a23b206f69eb586a1b28b5e1ad2111b33778
composer.json
composer.json
{ "name": "joshpinkney/tv-maze-php-api", "description": "TVMaze-API-Wrapper", "authors": [ { "name": "Josh Pinkney", "email": "Joshpinkney@gmail.com" } ], "require": { "joshpinkney/tv-maze-php-api" : "dev-master" }, "require-dev": { "joshpinkney/tv-maze-php-api" : "dev-master" }, "minimum-stability": "dev", "autoload": { "psr-0": { "JPinkney": "" } } }
{ "name": "joshpinkney/tv-maze-php-api", "type": "library", "license": "MIT", "description": "TVMaze-API-Wrapper", "authors": [ { "name": "Josh Pinkney", "email": "Joshpinkney@gmail.com" } ], "minimum-stability": "dev", "autoload": { "psr-0": { "JPinkney": "" } } }
Remove unnecessary requires and add type and license sections.
Remove unnecessary requires and add type and license sections.
JSON
mit
JPinkney/TVMaze-PHP-API-Wrapper
json
## Code Before: { "name": "joshpinkney/tv-maze-php-api", "description": "TVMaze-API-Wrapper", "authors": [ { "name": "Josh Pinkney", "email": "Joshpinkney@gmail.com" } ], "require": { "joshpinkney/tv-maze-php-api" : "dev-master" }, "require-dev": { "joshpinkney/tv-maze-php-api" : "dev-master" }, "minimum-stability": "dev", "autoload": { "psr-0": { "JPinkney": "" } } } ## Instruction: Remove unnecessary requires and add type and license sections. ## Code After: { "name": "joshpinkney/tv-maze-php-api", "type": "library", "license": "MIT", "description": "TVMaze-API-Wrapper", "authors": [ { "name": "Josh Pinkney", "email": "Joshpinkney@gmail.com" } ], "minimum-stability": "dev", "autoload": { "psr-0": { "JPinkney": "" } } }
44555c339da67e894673ad44fe589c91ae87d21b
src/Html/Form/Field.php
src/Html/Form/Field.php
<?php namespace Orchestra\Html\Form; use Illuminate\Support\Fluent; class Field extends Fluent { /** * Get value of column. * * @param mixed $row * @param mixed $control * @param array $attributes * @return string */ public function getField($row, $control, array $attributes = array()) { return call_user_func($this->attributes['field'], $row, $control, $attributes); } }
<?php namespace Orchestra\Html\Form; use Illuminate\Support\Contracts\RenderableInterface; use Illuminate\Support\Fluent; class Field extends Fluent { /** * Get value of column. * * @param mixed $row * @param mixed $control * @param array $attributes * @return string */ public function getField($row, $control, array $attributes = array()) { $value = call_user_func($this->attributes['field'], $row, $control, $attributes); if ($value instanceof RenderableInterface) { return $value->render(); } return $value; } }
Allow field to automatically resolve renderable instance.
Allow field to automatically resolve renderable instance. Signed-off-by: crynobone <e1a543840a942eb68427510a8a483282a7bfeddf@gmail.com>
PHP
mit
stevebauman/html,orchestral/html
php
## Code Before: <?php namespace Orchestra\Html\Form; use Illuminate\Support\Fluent; class Field extends Fluent { /** * Get value of column. * * @param mixed $row * @param mixed $control * @param array $attributes * @return string */ public function getField($row, $control, array $attributes = array()) { return call_user_func($this->attributes['field'], $row, $control, $attributes); } } ## Instruction: Allow field to automatically resolve renderable instance. Signed-off-by: crynobone <e1a543840a942eb68427510a8a483282a7bfeddf@gmail.com> ## Code After: <?php namespace Orchestra\Html\Form; use Illuminate\Support\Contracts\RenderableInterface; use Illuminate\Support\Fluent; class Field extends Fluent { /** * Get value of column. * * @param mixed $row * @param mixed $control * @param array $attributes * @return string */ public function getField($row, $control, array $attributes = array()) { $value = call_user_func($this->attributes['field'], $row, $control, $attributes); if ($value instanceof RenderableInterface) { return $value->render(); } return $value; } }
c0f4c4fc822a7faa8a4aadae82d3b1033f495756
.devcontainer/prepare.sh
.devcontainer/prepare.sh
yarn install yarn electron
yarn install yarn electron cd "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/.." sudo chown root .build/electron/chrome-sandbox sudo chmod 4755 .build/electron/chrome-sandbox
Update permissions of the chrom-sandbox
Update permissions of the chrom-sandbox
Shell
mit
eamodio/vscode,eamodio/vscode,microsoft/vscode,microsoft/vscode,eamodio/vscode,microsoft/vscode,microsoft/vscode,eamodio/vscode,microsoft/vscode,microsoft/vscode,eamodio/vscode,microsoft/vscode,microsoft/vscode,microsoft/vscode,eamodio/vscode,eamodio/vscode,eamodio/vscode,microsoft/vscode,microsoft/vscode,eamodio/vscode,eamodio/vscode,eamodio/vscode,eamodio/vscode,microsoft/vscode,eamodio/vscode,microsoft/vscode,eamodio/vscode,eamodio/vscode,microsoft/vscode,eamodio/vscode,microsoft/vscode,eamodio/vscode,microsoft/vscode,microsoft/vscode
shell
## Code Before: yarn install yarn electron ## Instruction: Update permissions of the chrom-sandbox ## Code After: yarn install yarn electron cd "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/.." sudo chown root .build/electron/chrome-sandbox sudo chmod 4755 .build/electron/chrome-sandbox
7c7e15adad6067977a4a2e1d3431953ffa691b50
executable/ParallelMain.hs
executable/ParallelMain.hs
{-# LANGUAGE ForeignFunctionInterface #-} import System.IO import Control.Concurrent.Async hiding (link) import System.Posix import System.Environment import qualified SequentialMain import Control.Monad foreign import ccall "link_to_parent" link :: CPid -> IO () raceMany :: [IO a] -> IO a raceMany [x] = x raceMany (x:xs) = do result <- race x (raceMany xs) case result of Left res -> return res Right res -> return res raceStdout :: [IO ()] -> IO () raceStdout xs = do action <- raceMany (map waitForStdout xs) action where end = "*** END OF OUTPUT" waitForStdout p = do (fdIn, fdOut) <- createPipe pid <- getProcessID forkProcess $ do link (fromIntegral pid) dupTo fdOut stdOutput hSetBuffering stdout LineBuffering p putStrLn end hIn <- fdToHandle fdIn hSetBuffering hIn LineBuffering line <- hGetLine hIn putStrLn line return $ do let loop = do line <- hGetLine hIn unless (line == end) $ do putStrLn line loop loop variants :: [[String]] variants = concat $ repeat [["--lhs-weight", "3"], ["--lhs-weight", "4", "--flip-ordering"]] main = do hSetBuffering stdout LineBuffering (n:args) <- getArgs raceStdout [withArgs (args ++ variant) SequentialMain.main | variant <- take (read n) variants]
{-# LANGUAGE ForeignFunctionInterface #-} import System.IO import Control.Concurrent.Async hiding (link) import System.Posix import System.Environment import qualified SequentialMain import Control.Monad foreign import ccall "link_to_parent" link :: CPid -> IO () raceMany :: [IO a] -> IO a raceMany [x] = x raceMany (x:xs) = do result <- race x (raceMany xs) case result of Left res -> return res Right res -> return res raceStdout :: [IO ()] -> IO () raceStdout xs = do action <- raceMany (map waitForStdout xs) action where end = "*** END OF OUTPUT" waitForStdout p = do (fdIn, fdOut) <- createPipe pid <- getProcessID forkProcess $ do link (fromIntegral pid) dupTo fdOut stdOutput hSetBuffering stdout LineBuffering p putStrLn end hIn <- fdToHandle fdIn hSetBuffering hIn LineBuffering line <- hGetLine hIn return $ do putStrLn line let loop = do line <- hGetLine hIn unless (line == end) $ do putStrLn line loop loop variants :: [[String]] variants = concat $ repeat [["--lhs-weight", "3"], ["--lhs-weight", "4", "--flip-ordering"]] main = do hSetBuffering stdout LineBuffering (n:args) <- getArgs raceStdout [withArgs (args ++ variant) SequentialMain.main | variant <- take (read n) variants]
Fix race in parallel twee.
Fix race in parallel twee.
Haskell
bsd-3-clause
nick8325/kbc,nick8325/twee,nick8325/twee,nick8325/twee
haskell
## Code Before: {-# LANGUAGE ForeignFunctionInterface #-} import System.IO import Control.Concurrent.Async hiding (link) import System.Posix import System.Environment import qualified SequentialMain import Control.Monad foreign import ccall "link_to_parent" link :: CPid -> IO () raceMany :: [IO a] -> IO a raceMany [x] = x raceMany (x:xs) = do result <- race x (raceMany xs) case result of Left res -> return res Right res -> return res raceStdout :: [IO ()] -> IO () raceStdout xs = do action <- raceMany (map waitForStdout xs) action where end = "*** END OF OUTPUT" waitForStdout p = do (fdIn, fdOut) <- createPipe pid <- getProcessID forkProcess $ do link (fromIntegral pid) dupTo fdOut stdOutput hSetBuffering stdout LineBuffering p putStrLn end hIn <- fdToHandle fdIn hSetBuffering hIn LineBuffering line <- hGetLine hIn putStrLn line return $ do let loop = do line <- hGetLine hIn unless (line == end) $ do putStrLn line loop loop variants :: [[String]] variants = concat $ repeat [["--lhs-weight", "3"], ["--lhs-weight", "4", "--flip-ordering"]] main = do hSetBuffering stdout LineBuffering (n:args) <- getArgs raceStdout [withArgs (args ++ variant) SequentialMain.main | variant <- take (read n) variants] ## Instruction: Fix race in parallel twee. ## Code After: {-# LANGUAGE ForeignFunctionInterface #-} import System.IO import Control.Concurrent.Async hiding (link) import System.Posix import System.Environment import qualified SequentialMain import Control.Monad foreign import ccall "link_to_parent" link :: CPid -> IO () raceMany :: [IO a] -> IO a raceMany [x] = x raceMany (x:xs) = do result <- race x (raceMany xs) case result of Left res -> return res Right res -> return res raceStdout :: [IO ()] -> IO () raceStdout xs = do action <- raceMany (map waitForStdout xs) action where end = "*** END OF OUTPUT" waitForStdout p = do (fdIn, fdOut) <- createPipe pid <- getProcessID forkProcess $ do link (fromIntegral pid) dupTo fdOut stdOutput hSetBuffering stdout LineBuffering p putStrLn end hIn <- fdToHandle fdIn hSetBuffering hIn LineBuffering line <- hGetLine hIn return $ do putStrLn line let loop = do line <- hGetLine hIn unless (line == end) $ do putStrLn line loop loop variants :: [[String]] variants = concat $ repeat [["--lhs-weight", "3"], ["--lhs-weight", "4", "--flip-ordering"]] main = do hSetBuffering stdout LineBuffering (n:args) <- getArgs raceStdout [withArgs (args ++ variant) SequentialMain.main | variant <- take (read n) variants]
5cb0599afb40e1b93f8d0efa1d28e194330b2145
phpunit.xml
phpunit.xml
<?xml version="1.0" encoding="UTF-8"?> <phpunit backupGlobals="false" backupStaticAttributes="false" bootstrap="vendor/autoload.php" colors="true" convertErrorsToExceptions="true" convertNoticesToExceptions="true" convertWarningsToExceptions="true" processIsolation="false" stopOnFailure="false" syntaxCheck="false" > <testsuites> <testsuite name="D3 Catalyst Package Test Suite"> <directory suffix=".php">./tests/</directory> </testsuite> </testsuites> </phpunit>
<phpunit bootstrap="vendor/autoload.php" colors="true" convertErrorsToExceptions="true" convertNoticesToExceptions="true" convertWarningsToExceptions="true" stopOnFailure="true"> <testsuites> <testsuite name="D3 Catalyst Package Test Suite"> <directory>tests</directory> </testsuite> </testsuites> </phpunit>
Update file to unit testing
Update file to unit testing
XML
mit
D3Catalyst/laravel-4-exchange-rate-ggl
xml
## Code Before: <?xml version="1.0" encoding="UTF-8"?> <phpunit backupGlobals="false" backupStaticAttributes="false" bootstrap="vendor/autoload.php" colors="true" convertErrorsToExceptions="true" convertNoticesToExceptions="true" convertWarningsToExceptions="true" processIsolation="false" stopOnFailure="false" syntaxCheck="false" > <testsuites> <testsuite name="D3 Catalyst Package Test Suite"> <directory suffix=".php">./tests/</directory> </testsuite> </testsuites> </phpunit> ## Instruction: Update file to unit testing ## Code After: <phpunit bootstrap="vendor/autoload.php" colors="true" convertErrorsToExceptions="true" convertNoticesToExceptions="true" convertWarningsToExceptions="true" stopOnFailure="true"> <testsuites> <testsuite name="D3 Catalyst Package Test Suite"> <directory>tests</directory> </testsuite> </testsuites> </phpunit>
293ef3e0c6e4754a1cab9e97ee1a807035ab3de4
Formula/s3-backer.rb
Formula/s3-backer.rb
require 'formula' class S3Backer < Formula url 'http://s3backer.googlecode.com/files/s3backer-1.3.2.tar.gz' homepage 'http://code.google.com/p/s3backer/' sha1 'badc003ffb0830a3fa59c9f39f13ad94729cbcf1' depends_on 'pkg-config' => :build def install system "./configure", "--prefix=#{prefix}" system "make install" end def caveats <<-EOS.undent This depends on the MacFUSE installation from http://code.google.com/p/macfuse/ MacFUSE must be installed prior to installing this formula. EOS end end
require 'formula' class S3Backer < Formula url 'http://s3backer.googlecode.com/files/s3backer-1.3.2.tar.gz' homepage 'http://code.google.com/p/s3backer/' sha1 'badc003ffb0830a3fa59c9f39f13ad94729cbcf1' depends_on 'pkg-config' => :build depends_on 'fuse4x' def install inreplace "configure", "-lfuse", "-lfuse4x" system "./configure", "--prefix=#{prefix}" system "make install" end def caveats <<-EOS.undent Make sure to follow the directions given by `brew info fuse4x-kext` before trying to use a FUSE-based filesystem. EOS end end
Use fuse4x as a default FUSE provider
s3backer: Use fuse4x as a default FUSE provider Closes Homebrew/homebrew#6079. Closes Homebrew/homebrew#7712. Signed-off-by: Charlie Sharpsteen <828d338a9b04221c9cbe286f50cd389f68de4ecf@sharpsteen.net>
Ruby
bsd-2-clause
ShivaHuang/homebrew-core,adamliter/homebrew-core,j-bennet/homebrew-core,battlemidget/homebrew-core,jdubois/homebrew-core,robohack/homebrew-core,battlemidget/homebrew-core,zyedidia/homebrew-core,mvbattista/homebrew-core,JCount/homebrew-core,Homebrew/homebrew-core,ylluminarious/homebrew-core,lasote/homebrew-core,wolffaxn/homebrew-core,straxhaber/homebrew-core,smessmer/homebrew-core,dsXLII/homebrew-core,moderndeveloperllc/homebrew-core,mvitz/homebrew-core,sjackman/homebrew-core,bfontaine/homebrew-core,Moisan/homebrew-core,j-bennet/homebrew-core,mvbattista/homebrew-core,andyjeffries/homebrew-core,kunickiaj/homebrew-core,FinalDes/homebrew-core,mfikes/homebrew-core,mfikes/homebrew-core,phusion/homebrew-core,DomT4/homebrew-core,bcg62/homebrew-core,bcg62/homebrew-core,smessmer/homebrew-core,adamliter/homebrew-core,robohack/homebrew-core,rwhogg/homebrew-core,phusion/homebrew-core,mbcoguno/homebrew-core,cblecker/homebrew-core,LinuxbrewTestBot/homebrew-core,jvillard/homebrew-core,edporras/homebrew-core,FinalDes/homebrew-core,makigumo/homebrew-core,fvioz/homebrew-core,LinuxbrewTestBot/homebrew-core,filcab/homebrew-core,stgraber/homebrew-core,sjackman/homebrew-core,Homebrew/homebrew-core,zmwangx/homebrew-core,lembacon/homebrew-core,maxim-belkin/homebrew-core,lemzwerg/homebrew-core,nbari/homebrew-core,moderndeveloperllc/homebrew-core,jabenninghoff/homebrew-core,ShivaHuang/homebrew-core,nandub/homebrew-core,ilovezfs/homebrew-core,bigbes/homebrew-core,jdubois/homebrew-core,git-lfs/homebrew-core,jvillard/homebrew-core,reelsense/homebrew-core,forevergenin/homebrew-core,BrewTestBot/homebrew-core,jvehent/homebrew-core,rwhogg/homebrew-core,mahori/homebrew-core,spaam/homebrew-core,tkoenig/homebrew-core,spaam/homebrew-core,lembacon/homebrew-core,forevergenin/homebrew-core,stgraber/homebrew-core,fvioz/homebrew-core,edporras/homebrew-core,nbari/homebrew-core,kunickiaj/homebrew-core,adam-moss/homebrew-core,grhawk/homebrew-core,mbcoguno/homebrew-core,jvillard/homebrew-core,zyedidia/homebrew-core,sdorra/homebrew-core,grhawk/homebrew-core,kuahyeow/homebrew-core,JCount/homebrew-core,Moisan/homebrew-core,cblecker/homebrew-core,uyjulian/homebrew-core,passerbyid/homebrew-core,dsXLII/homebrew-core,bcg62/homebrew-core,maxim-belkin/homebrew-core,lembacon/homebrew-core,chrisfinazzo/homebrew-core,jabenninghoff/homebrew-core,mvitz/homebrew-core,lasote/homebrew-core,BrewTestBot/homebrew-core,wolffaxn/homebrew-core,ylluminarious/homebrew-core,andyjeffries/homebrew-core,zmwangx/homebrew-core,bfontaine/homebrew-core,aren55555/homebrew-core,tkoenig/homebrew-core,jvehent/homebrew-core,mbcoguno/homebrew-core,mahori/homebrew-core,makigumo/homebrew-core,kuahyeow/homebrew-core,bigbes/homebrew-core,nandub/homebrew-core,gserra-olx/homebrew-core,chrisfinazzo/homebrew-core,wolffaxn/homebrew-core,jdubois/homebrew-core,DomT4/homebrew-core,git-lfs/homebrew-core,aabdnn/homebrew-core,uyjulian/homebrew-core,passerbyid/homebrew-core,lemzwerg/homebrew-core,aabdnn/homebrew-core,sdorra/homebrew-core,reelsense/homebrew-core,straxhaber/homebrew-core,adam-moss/homebrew-core,filcab/homebrew-core,mvitz/homebrew-core,aren55555/homebrew-core,Linuxbrew/homebrew-core,ilovezfs/homebrew-core,gserra-olx/homebrew-core,Linuxbrew/homebrew-core
ruby
## Code Before: require 'formula' class S3Backer < Formula url 'http://s3backer.googlecode.com/files/s3backer-1.3.2.tar.gz' homepage 'http://code.google.com/p/s3backer/' sha1 'badc003ffb0830a3fa59c9f39f13ad94729cbcf1' depends_on 'pkg-config' => :build def install system "./configure", "--prefix=#{prefix}" system "make install" end def caveats <<-EOS.undent This depends on the MacFUSE installation from http://code.google.com/p/macfuse/ MacFUSE must be installed prior to installing this formula. EOS end end ## Instruction: s3backer: Use fuse4x as a default FUSE provider Closes Homebrew/homebrew#6079. Closes Homebrew/homebrew#7712. Signed-off-by: Charlie Sharpsteen <828d338a9b04221c9cbe286f50cd389f68de4ecf@sharpsteen.net> ## Code After: require 'formula' class S3Backer < Formula url 'http://s3backer.googlecode.com/files/s3backer-1.3.2.tar.gz' homepage 'http://code.google.com/p/s3backer/' sha1 'badc003ffb0830a3fa59c9f39f13ad94729cbcf1' depends_on 'pkg-config' => :build depends_on 'fuse4x' def install inreplace "configure", "-lfuse", "-lfuse4x" system "./configure", "--prefix=#{prefix}" system "make install" end def caveats <<-EOS.undent Make sure to follow the directions given by `brew info fuse4x-kext` before trying to use a FUSE-based filesystem. EOS end end
a393357f8080e106c1a9419a7ae0c1f17603ddc5
conf/deploy.json
conf/deploy.json
{ "defaultStacks":[ "ophan", "content-api" ], "packages":{ "status-app":{ "type":"autoscaling" } }, "recipes":{ "default":{ "actionsBeforeApp": ["status-app.uploadArtifacts", "status-app.deploy"] }, "deployOnly": { "actionsBeforeApp": ["status-app.deploy"] } } }
{ "defaultStacks":[ "ophan", "content-api", "mobile" ], "packages":{ "status-app":{ "type":"autoscaling" } }, "recipes":{ "default":{ "actionsBeforeApp": ["status-app.uploadArtifacts", "status-app.deploy"] }, "deployOnly": { "actionsBeforeApp": ["status-app.deploy"] } } }
Add the mobile stack to the defaults
Add the mobile stack to the defaults
JSON
apache-2.0
guardian/status-app
json
## Code Before: { "defaultStacks":[ "ophan", "content-api" ], "packages":{ "status-app":{ "type":"autoscaling" } }, "recipes":{ "default":{ "actionsBeforeApp": ["status-app.uploadArtifacts", "status-app.deploy"] }, "deployOnly": { "actionsBeforeApp": ["status-app.deploy"] } } } ## Instruction: Add the mobile stack to the defaults ## Code After: { "defaultStacks":[ "ophan", "content-api", "mobile" ], "packages":{ "status-app":{ "type":"autoscaling" } }, "recipes":{ "default":{ "actionsBeforeApp": ["status-app.uploadArtifacts", "status-app.deploy"] }, "deployOnly": { "actionsBeforeApp": ["status-app.deploy"] } } }
c45241807ee6998dc5e02d85023f31f518b4b8d0
components/logged_in_navigation/components/channel_create/view.coffee
components/logged_in_navigation/components/channel_create/view.coffee
Promise = require 'bluebird-q' Backbone = require 'backbone' template = -> require('./index.jade') arguments... module.exports = class ChannelCreateView extends Backbone.View events: 'mouseover': 'focus' 'input .js-title': 'title' 'click .js-status': 'status' 'click .js-create': 'create' initialize: ({ @user }) -> @listenTo @model, 'change', @render focus: -> @dom.title.focus() title: -> @model.set 'title', @dom.title.val(), silent: true status: (e) -> e.preventDefault() status = $(e.currentTarget).data 'value' @model.set 'status', status create: (e) -> e.preventDefault() return unless @model.has('title') @dom.create.text 'Creating...' Promise(@model.save()) .then => @dom.create.text 'Redirecting...' window.location.href = "/#{@model.get('user').slug}/#{@model.get('slug')}" .catch => @dom.create.text 'Error' render: -> @$el.html template user: @user channel: @model @dom = title: @$('.js-title') create: @$('.js-create') @focus() this
Promise = require 'bluebird-q' Backbone = require 'backbone' template = -> require('./index.jade') arguments... module.exports = class ChannelCreateView extends Backbone.View events: 'mouseover': 'focus' 'keyup .js-title': 'onKeyup' 'input .js-title': 'title' 'click .js-status': 'status' 'click .js-create': 'create' initialize: ({ @user }) -> @listenTo @model, 'change', @render onKeyup: (e) -> return unless e.keyCode is 13 @create e focus: -> @dom.title.focus() title: -> @model.set 'title', @dom.title.val(), silent: true status: (e) -> e.preventDefault() status = $(e.currentTarget).data 'value' @model.set 'status', status create: (e) -> e.preventDefault() return unless @model.has('title') @dom.create.text 'Creating...' Promise(@model.save()) .then => @dom.create.text 'Redirecting...' window.location.href = "/#{@model.get('user').slug}/#{@model.get('slug')}" .catch => @dom.create.text 'Error' render: -> @$el.html template user: @user channel: @model @dom = title: @$('.js-title') create: @$('.js-create') @focus() this
Handle <enter> for creating channels
Handle <enter> for creating channels
CoffeeScript
mit
aredotna/ervell,aredotna/ervell,aredotna/ervell,aredotna/ervell,aredotna/ervell
coffeescript
## Code Before: Promise = require 'bluebird-q' Backbone = require 'backbone' template = -> require('./index.jade') arguments... module.exports = class ChannelCreateView extends Backbone.View events: 'mouseover': 'focus' 'input .js-title': 'title' 'click .js-status': 'status' 'click .js-create': 'create' initialize: ({ @user }) -> @listenTo @model, 'change', @render focus: -> @dom.title.focus() title: -> @model.set 'title', @dom.title.val(), silent: true status: (e) -> e.preventDefault() status = $(e.currentTarget).data 'value' @model.set 'status', status create: (e) -> e.preventDefault() return unless @model.has('title') @dom.create.text 'Creating...' Promise(@model.save()) .then => @dom.create.text 'Redirecting...' window.location.href = "/#{@model.get('user').slug}/#{@model.get('slug')}" .catch => @dom.create.text 'Error' render: -> @$el.html template user: @user channel: @model @dom = title: @$('.js-title') create: @$('.js-create') @focus() this ## Instruction: Handle <enter> for creating channels ## Code After: Promise = require 'bluebird-q' Backbone = require 'backbone' template = -> require('./index.jade') arguments... module.exports = class ChannelCreateView extends Backbone.View events: 'mouseover': 'focus' 'keyup .js-title': 'onKeyup' 'input .js-title': 'title' 'click .js-status': 'status' 'click .js-create': 'create' initialize: ({ @user }) -> @listenTo @model, 'change', @render onKeyup: (e) -> return unless e.keyCode is 13 @create e focus: -> @dom.title.focus() title: -> @model.set 'title', @dom.title.val(), silent: true status: (e) -> e.preventDefault() status = $(e.currentTarget).data 'value' @model.set 'status', status create: (e) -> e.preventDefault() return unless @model.has('title') @dom.create.text 'Creating...' Promise(@model.save()) .then => @dom.create.text 'Redirecting...' window.location.href = "/#{@model.get('user').slug}/#{@model.get('slug')}" .catch => @dom.create.text 'Error' render: -> @$el.html template user: @user channel: @model @dom = title: @$('.js-title') create: @$('.js-create') @focus() this
d68bdfe0b89137efc6b0c167663a0edf7decb4cd
nashvegas/management/commands/syncdb.py
nashvegas/management/commands/syncdb.py
from django.core.management import call_command from django.core.management.commands.syncdb import Command as SyncDBCommand class Command(SyncDBCommand): def handle_noargs(self, **options): # Run migrations first if options.get('database'): databases = [options.get('database')] else: databases = None call_command("upgradedb", do_execute=True, databases=databases, interactive=options.get('interactive'), verbosity=options.get('verbosity'), ) # Follow up with a syncdb on anything that wasnt included in migrations # (this catches things like test-only models) super(Command, self).handle_noargs(**options)
from django.core.management import call_command from django.core.management.commands.syncdb import Command as SyncDBCommand class Command(SyncDBCommand): def handle_noargs(self, **options): # Run migrations first if options.get("database"): databases = [options.get("database")] else: databases = None call_command("upgradedb", do_execute=True, databases=databases, interactive=options.get("interactive"), verbosity=options.get("verbosity"), ) # Follow up with a syncdb on anything that wasnt included in migrations # (this catches things like test-only models) super(Command, self).handle_noargs(**options)
Update style to be consistent with project
Update style to be consistent with project
Python
mit
dcramer/nashvegas,iivvoo/nashvegas,paltman/nashvegas,paltman-archive/nashvegas,jonathanchu/nashvegas
python
## Code Before: from django.core.management import call_command from django.core.management.commands.syncdb import Command as SyncDBCommand class Command(SyncDBCommand): def handle_noargs(self, **options): # Run migrations first if options.get('database'): databases = [options.get('database')] else: databases = None call_command("upgradedb", do_execute=True, databases=databases, interactive=options.get('interactive'), verbosity=options.get('verbosity'), ) # Follow up with a syncdb on anything that wasnt included in migrations # (this catches things like test-only models) super(Command, self).handle_noargs(**options) ## Instruction: Update style to be consistent with project ## Code After: from django.core.management import call_command from django.core.management.commands.syncdb import Command as SyncDBCommand class Command(SyncDBCommand): def handle_noargs(self, **options): # Run migrations first if options.get("database"): databases = [options.get("database")] else: databases = None call_command("upgradedb", do_execute=True, databases=databases, interactive=options.get("interactive"), verbosity=options.get("verbosity"), ) # Follow up with a syncdb on anything that wasnt included in migrations # (this catches things like test-only models) super(Command, self).handle_noargs(**options)
0dafb1c8b57e792e10345161d2e332874f9fde3b
cmd/client/main.go
cmd/client/main.go
package main import ( "github.com/itsankoff/gotcha/client" "log" ) func main() { ws := client.NewWebSocketClient() c := client.New(ws) err := c.Connect("ws://127.0.0.1:9000/websocket") log.Println("connected", err) userId, err := c.Register("pesho", "123") log.Println("registered", err) err = c.Authenticate(userId, "123") log.Println("authenticated", err) if err == nil { c.StartInteractiveMode() } }
package main import ( "flag" "github.com/itsankoff/gotcha/client" "log" ) func main() { var host string flag.StringVar(&host, "host", "ws://0.0.0.0:9000/websocket", "remote server host") flag.Parse() ws := client.NewWebSocketClient() c := client.New(ws) err := c.Connect(host) log.Println("connected", err) userId, err := c.Register("pesho", "123") log.Println("registered", err) err = c.Authenticate(userId, "123") log.Println("authenticated", err) if err == nil { c.StartInteractiveMode() } }
Add cmd arguments for client cmd tool
Add cmd arguments for client cmd tool
Go
mit
itsankoff/gotcha,itsankoff/gotcha
go
## Code Before: package main import ( "github.com/itsankoff/gotcha/client" "log" ) func main() { ws := client.NewWebSocketClient() c := client.New(ws) err := c.Connect("ws://127.0.0.1:9000/websocket") log.Println("connected", err) userId, err := c.Register("pesho", "123") log.Println("registered", err) err = c.Authenticate(userId, "123") log.Println("authenticated", err) if err == nil { c.StartInteractiveMode() } } ## Instruction: Add cmd arguments for client cmd tool ## Code After: package main import ( "flag" "github.com/itsankoff/gotcha/client" "log" ) func main() { var host string flag.StringVar(&host, "host", "ws://0.0.0.0:9000/websocket", "remote server host") flag.Parse() ws := client.NewWebSocketClient() c := client.New(ws) err := c.Connect(host) log.Println("connected", err) userId, err := c.Register("pesho", "123") log.Println("registered", err) err = c.Authenticate(userId, "123") log.Println("authenticated", err) if err == nil { c.StartInteractiveMode() } }
776f084cf1bc7d174184e2d51b224e168fcd6fa4
nixos/tests/run-in-machine.nix
nixos/tests/run-in-machine.nix
{ system ? builtins.currentSystem, config ? {}, pkgs ? import ../.. { inherit system config; } }: with import ../lib/testing.nix { inherit system pkgs; }; let output = runInMachine { drv = pkgs.hello; machine = { ... }: { /* services.sshd.enable = true; */ }; }; in pkgs.runCommand "verify-output" { inherit output; } '' if [ ! -e "$output/bin/hello" ]; then echo "Derivation built using runInMachine produced incorrect output:" >&2 ls -laR "$output" >&2 exit 1 fi "$output/bin/hello" > "$out" ''
{ system ? builtins.currentSystem, config ? {}, pkgs ? import ../.. { inherit system config; } }: with import ../lib/testing.nix { inherit system pkgs; }; let output = runInMachine { drv = pkgs.hello; machine = { ... }: { /* services.sshd.enable = true; */ }; }; test = pkgs.runCommand "verify-output" { inherit output; } '' if [ ! -e "$output/bin/hello" ]; then echo "Derivation built using runInMachine produced incorrect output:" >&2 ls -laR "$output" >&2 exit 1 fi "$output/bin/hello" > "$out" ''; in test // { inherit test; } # To emulate behaviour of makeTest
Fix wrong arch in runInMachine test
nixos/tests: Fix wrong arch in runInMachine test Since 83b27f60ceff23967e477c90bef8e78cc96d50a2, the tests were moved into all-tests.nix and some of the tooling has changed so that subattributes of test expressions are now recursively evaluated until a derivation with a .test attribute has been found. Unfortunately this isn't the case for all of the tests and the runInMachine doesn't use the makeTest function other tests are using but instead uses runInMachine, which doesn't generate a .test attribute. Whener a .test attribute wasn't found by the new handleTest function, it recurses down again until there is no value left that is an attribute set and subsequently returns its unchanged value. This however has the drawback that instead of getting different attributes for each architecture we only get the last architecture in the supportedSystems list. In the case of the release.nix, the last architecture in supportedSystems is "aarch64-linux", so the runInMachine test is always built on that architecture. In order to work around this, I changed runInMachine to emit a .test attribute so that it looks to handleTest like it was a test created via makeTest. Signed-off-by: aszlig <ee1aa092358634f9c53f01b5a783726c9e21b35a@nix.build>
Nix
mit
NixOS/nixpkgs,SymbiFlow/nixpkgs,NixOS/nixpkgs,SymbiFlow/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,SymbiFlow/nixpkgs,NixOS/nixpkgs,SymbiFlow/nixpkgs,SymbiFlow/nixpkgs,SymbiFlow/nixpkgs,SymbiFlow/nixpkgs,SymbiFlow/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,SymbiFlow/nixpkgs,NixOS/nixpkgs,SymbiFlow/nixpkgs,NixOS/nixpkgs,SymbiFlow/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,SymbiFlow/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,SymbiFlow/nixpkgs,NixOS/nixpkgs
nix
## Code Before: { system ? builtins.currentSystem, config ? {}, pkgs ? import ../.. { inherit system config; } }: with import ../lib/testing.nix { inherit system pkgs; }; let output = runInMachine { drv = pkgs.hello; machine = { ... }: { /* services.sshd.enable = true; */ }; }; in pkgs.runCommand "verify-output" { inherit output; } '' if [ ! -e "$output/bin/hello" ]; then echo "Derivation built using runInMachine produced incorrect output:" >&2 ls -laR "$output" >&2 exit 1 fi "$output/bin/hello" > "$out" '' ## Instruction: nixos/tests: Fix wrong arch in runInMachine test Since 83b27f60ceff23967e477c90bef8e78cc96d50a2, the tests were moved into all-tests.nix and some of the tooling has changed so that subattributes of test expressions are now recursively evaluated until a derivation with a .test attribute has been found. Unfortunately this isn't the case for all of the tests and the runInMachine doesn't use the makeTest function other tests are using but instead uses runInMachine, which doesn't generate a .test attribute. Whener a .test attribute wasn't found by the new handleTest function, it recurses down again until there is no value left that is an attribute set and subsequently returns its unchanged value. This however has the drawback that instead of getting different attributes for each architecture we only get the last architecture in the supportedSystems list. In the case of the release.nix, the last architecture in supportedSystems is "aarch64-linux", so the runInMachine test is always built on that architecture. In order to work around this, I changed runInMachine to emit a .test attribute so that it looks to handleTest like it was a test created via makeTest. Signed-off-by: aszlig <ee1aa092358634f9c53f01b5a783726c9e21b35a@nix.build> ## Code After: { system ? builtins.currentSystem, config ? {}, pkgs ? import ../.. { inherit system config; } }: with import ../lib/testing.nix { inherit system pkgs; }; let output = runInMachine { drv = pkgs.hello; machine = { ... }: { /* services.sshd.enable = true; */ }; }; test = pkgs.runCommand "verify-output" { inherit output; } '' if [ ! -e "$output/bin/hello" ]; then echo "Derivation built using runInMachine produced incorrect output:" >&2 ls -laR "$output" >&2 exit 1 fi "$output/bin/hello" > "$out" ''; in test // { inherit test; } # To emulate behaviour of makeTest
cecc9f4748e6146e9b1c7cc5f8d2005a74223f44
README.md
README.md
[![build status](https://gitlab.com/jasperdenkers/play-auth/badges/master/build.svg)](https://gitlab.com/jasperdenkers/play-auth/commits/master) [![coverage report](https://gitlab.com/jasperdenkers/play-auth/badges/master/coverage.svg)](https://gitlab.com/jasperdenkers/play-auth/commits/master) A simple framework for authentication and authorization in Play.
[![build status](https://gitlab.com/jasperdenkers/play-auth/badges/master/build.svg)](https://gitlab.com/jasperdenkers/play-auth/commits/master) [![coverage report](https://gitlab.com/jasperdenkers/play-auth/badges/master/coverage.svg)](https://gitlab.com/jasperdenkers/play-auth/commits/master) _This repository is primarily hosted on [GitLab](https://gitlab.com/jasperdenkers/play-auth) and mirrored on [GitHub](https://github.com/jasperdenkers/play-auth)._ A simple framework for authentication and authorization in Play.
Add notice in readme about mirror of repository on GitHub
Add notice in readme about mirror of repository on GitHub
Markdown
mit
jasperdenkers/play-auth
markdown
## Code Before: [![build status](https://gitlab.com/jasperdenkers/play-auth/badges/master/build.svg)](https://gitlab.com/jasperdenkers/play-auth/commits/master) [![coverage report](https://gitlab.com/jasperdenkers/play-auth/badges/master/coverage.svg)](https://gitlab.com/jasperdenkers/play-auth/commits/master) A simple framework for authentication and authorization in Play. ## Instruction: Add notice in readme about mirror of repository on GitHub ## Code After: [![build status](https://gitlab.com/jasperdenkers/play-auth/badges/master/build.svg)](https://gitlab.com/jasperdenkers/play-auth/commits/master) [![coverage report](https://gitlab.com/jasperdenkers/play-auth/badges/master/coverage.svg)](https://gitlab.com/jasperdenkers/play-auth/commits/master) _This repository is primarily hosted on [GitLab](https://gitlab.com/jasperdenkers/play-auth) and mirrored on [GitHub](https://github.com/jasperdenkers/play-auth)._ A simple framework for authentication and authorization in Play.
32a9803937599c62714ad3524f09253f0cb56566
pytest.ini
pytest.ini
[pytest] addopts = --capture=no --assert=plain --strict testpaths = tests
[pytest] addopts = --capture=no --assert=plain --strict --tb native testpaths = tests
Use native tracebacks for py.test
Use native tracebacks for py.test
INI
apache-2.0
1st1/uvloop,MagicStack/uvloop,MagicStack/uvloop
ini
## Code Before: [pytest] addopts = --capture=no --assert=plain --strict testpaths = tests ## Instruction: Use native tracebacks for py.test ## Code After: [pytest] addopts = --capture=no --assert=plain --strict --tb native testpaths = tests
80bdd54640cd28896539c3c9df7692e6655e3784
server/publications/gamesPublications.js
server/publications/gamesPublications.js
// Publication who send back everything, use it carrefully Meteor.publish('games', function() { return Games.find(); }); // Publication who send back the last 3 live games Meteor.publish('last3LiveGames', function() { return Games.find({ state: { $nin: ['gameEnded', 'notStarted'] }, privateGame: false }, { limit: 3 }); }); // Publication who send back the last 3 ended games Meteor.publish('last3EndedGames', function() { return Games.find({ state: 'gameEnded', privateGame: false }, { limit: 3 }); }); // Send back one game Meteor.publish('oneGame', function(gameId) { return Games.find({ _id: gameId }); }); // Send back only the user's games Meteor.publish('myGames', function(userId) { return Games.find({ userId: userId }); }); // Send back only the games that have been created less than 7 days ago Meteor.publish('liveGames', function() { return Games.find({ privateGame: false, state: { $nin: ['notStarted'] } }); });
// Publication who send back everything, use it carrefully Meteor.publish('games', function() { return Games.find(); }); // Publication who send back the last 3 live games Meteor.publish('last3LiveGames', function() { return Games.find({ gameState: { $nin: ['gameEnded', 'notStarted'] }, privateGame: false }, { limit: 3, sort: { createdAt: -1 } }); }); // Publication who send back the last 3 ended games Meteor.publish('last3EndedGames', function() { return Games.find({ gameState: 'gameEnded', privateGame: false }, { limit: 3, sort: { createdAt: -1 } }); }); // Send back one game Meteor.publish('oneGame', function(gameId) { return Games.find({ _id: gameId }); }); // Send back only the user's games Meteor.publish('myGames', function(userId) { return Games.find({ userId: userId }); }); // Send back only the games that have been created less than 7 days ago Meteor.publish('liveGames', function() { return Games.find({ privateGame: false, state: { $nin: ['notStarted'] } }); });
Update publications for the home page
Update publications for the home page
JavaScript
mit
jeremyfourna/basket-live-stats,jeremyfourna/basket-live-stats
javascript
## Code Before: // Publication who send back everything, use it carrefully Meteor.publish('games', function() { return Games.find(); }); // Publication who send back the last 3 live games Meteor.publish('last3LiveGames', function() { return Games.find({ state: { $nin: ['gameEnded', 'notStarted'] }, privateGame: false }, { limit: 3 }); }); // Publication who send back the last 3 ended games Meteor.publish('last3EndedGames', function() { return Games.find({ state: 'gameEnded', privateGame: false }, { limit: 3 }); }); // Send back one game Meteor.publish('oneGame', function(gameId) { return Games.find({ _id: gameId }); }); // Send back only the user's games Meteor.publish('myGames', function(userId) { return Games.find({ userId: userId }); }); // Send back only the games that have been created less than 7 days ago Meteor.publish('liveGames', function() { return Games.find({ privateGame: false, state: { $nin: ['notStarted'] } }); }); ## Instruction: Update publications for the home page ## Code After: // Publication who send back everything, use it carrefully Meteor.publish('games', function() { return Games.find(); }); // Publication who send back the last 3 live games Meteor.publish('last3LiveGames', function() { return Games.find({ gameState: { $nin: ['gameEnded', 'notStarted'] }, privateGame: false }, { limit: 3, sort: { createdAt: -1 } }); }); // Publication who send back the last 3 ended games Meteor.publish('last3EndedGames', function() { return Games.find({ gameState: 'gameEnded', privateGame: false }, { limit: 3, sort: { createdAt: -1 } }); }); // Send back one game Meteor.publish('oneGame', function(gameId) { return Games.find({ _id: gameId }); }); // Send back only the user's games Meteor.publish('myGames', function(userId) { return Games.find({ userId: userId }); }); // Send back only the games that have been created less than 7 days ago Meteor.publish('liveGames', function() { return Games.find({ privateGame: false, state: { $nin: ['notStarted'] } }); });
df99180faf57ce68d85079ebd3bc7998263896fa
assets/sass/atomic-squirrel/_backgrounds.scss
assets/sass/atomic-squirrel/_backgrounds.scss
@import 'atomic-squirrel/variables'; .bg-grass { background-image: url('/assets/images/grass.jpg'); } .bg-rocket-launch { background-image: url('/assets/images/rocket-launching.jpg'); } .bg-repeat { background-repeat: repeat; } .bg-no-repeat { background-repeat: no-repeat; } .bg-fixed { background-attachment: fixed; } // Workaround because mobile browsers don't support background-attachment: // "fixed". See http://stackoverflow.com/a/19045667/483528 @media screen and (max-width: 40em) { .bg-rocket-launch { background-size: 215% !important; background-attachment: scroll !important; background-position: center 0 !important; } } .bg-cover { background-size: cover; -webkit-background-size: cover; -moz-background-size: cover; -o-background-size: cover; background-position: center center; } .bg-translucent-white { background-color: rgba(255, 255, 255, 0.90); }
@import 'atomic-squirrel/variables'; .bg-grass { background-image: url('/assets/images/grass.jpg'); } .bg-rocket-launch { background-image: url('/assets/images/rocket-launching.jpg'); } .bg-repeat { background-repeat: repeat; } .bg-no-repeat { background-repeat: no-repeat; } .bg-fixed { background-attachment: fixed; } // Workaround because mobile browsers don't support background-attachment: // "fixed". See http://stackoverflow.com/a/19045667/483528 @media screen and (max-width: 40em) { .bg-rocket-launch { background-size: 215% !important; background-attachment: scroll !important; background-position: center 0 !important; } } .bg-cover { background-size: cover; -webkit-background-size: cover; -moz-background-size: cover; -o-background-size: cover; background-position: center center; } .bg-translucent-white { background: rgb(255, 255, 255); background-color: rgba(255, 255, 255, 0.90); }
Add background fallback for IE
Add background fallback for IE
SCSS
mit
atomic-squirrel/atomic-squirrel-homepage,atomic-squirrel/atomic-squirrel-homepage,atomic-squirrel/atomic-squirrel-homepage
scss
## Code Before: @import 'atomic-squirrel/variables'; .bg-grass { background-image: url('/assets/images/grass.jpg'); } .bg-rocket-launch { background-image: url('/assets/images/rocket-launching.jpg'); } .bg-repeat { background-repeat: repeat; } .bg-no-repeat { background-repeat: no-repeat; } .bg-fixed { background-attachment: fixed; } // Workaround because mobile browsers don't support background-attachment: // "fixed". See http://stackoverflow.com/a/19045667/483528 @media screen and (max-width: 40em) { .bg-rocket-launch { background-size: 215% !important; background-attachment: scroll !important; background-position: center 0 !important; } } .bg-cover { background-size: cover; -webkit-background-size: cover; -moz-background-size: cover; -o-background-size: cover; background-position: center center; } .bg-translucent-white { background-color: rgba(255, 255, 255, 0.90); } ## Instruction: Add background fallback for IE ## Code After: @import 'atomic-squirrel/variables'; .bg-grass { background-image: url('/assets/images/grass.jpg'); } .bg-rocket-launch { background-image: url('/assets/images/rocket-launching.jpg'); } .bg-repeat { background-repeat: repeat; } .bg-no-repeat { background-repeat: no-repeat; } .bg-fixed { background-attachment: fixed; } // Workaround because mobile browsers don't support background-attachment: // "fixed". See http://stackoverflow.com/a/19045667/483528 @media screen and (max-width: 40em) { .bg-rocket-launch { background-size: 215% !important; background-attachment: scroll !important; background-position: center 0 !important; } } .bg-cover { background-size: cover; -webkit-background-size: cover; -moz-background-size: cover; -o-background-size: cover; background-position: center center; } .bg-translucent-white { background: rgb(255, 255, 255); background-color: rgba(255, 255, 255, 0.90); }
4fc8294055e000ae39057c759b1d00b66f4547f7
app/assets/stylesheets/hits.css.scss
app/assets/stylesheets/hits.css.scss
@import 'bootstrap/_variables'; @import 'mixins'; @import 'theme'; .bar-chart-row { position: absolute; left: 0; top: 0; bottom: 0; background-color: $defaultHTTPStatusColor; min-width: 3px; } .bar-chart-row-301 { background-color: $goodHTTPStatusColor; } .bar-chart-row-500, .bar-chart-row-404 { background-color: $badHTTPStatusColor; } .hits { table-layout: fixed; } .status { width: $gridColumnWidth; @include box-sizing(); } .count { width: $gridColumnWidth * 2; @include box-sizing(); } .hit-to-mapping { width: $gridColumnWidth; @include box-sizing(); } .path { word-wrap: break-word; position: relative; z-index: 1; }
@import 'bootstrap/_variables'; @import 'mixins'; @import 'theme'; .bar-chart-row { position: absolute; left: 0; top: 0; bottom: 0; background-color: $defaultHTTPStatusColor; min-width: 3px; } .bar-chart-row-301 { background-color: $goodHTTPStatusColor; } .bar-chart-row-500, .bar-chart-row-404 { background-color: $badHTTPStatusColor; } .hits { table-layout: fixed; } .status { width: $gridColumnWidth; @include box-sizing(); } .count { width: $gridColumnWidth * 2; @include box-sizing(); } .hit-to-mapping { width: 45px; @include box-sizing(); } .path { word-wrap: break-word; position: relative; z-index: 1; }
Make column width narrower so it fits the icon more neatly
Make column width narrower so it fits the icon more neatly
SCSS
mit
alphagov/transition,alphagov/transition,alphagov/transition
scss
## Code Before: @import 'bootstrap/_variables'; @import 'mixins'; @import 'theme'; .bar-chart-row { position: absolute; left: 0; top: 0; bottom: 0; background-color: $defaultHTTPStatusColor; min-width: 3px; } .bar-chart-row-301 { background-color: $goodHTTPStatusColor; } .bar-chart-row-500, .bar-chart-row-404 { background-color: $badHTTPStatusColor; } .hits { table-layout: fixed; } .status { width: $gridColumnWidth; @include box-sizing(); } .count { width: $gridColumnWidth * 2; @include box-sizing(); } .hit-to-mapping { width: $gridColumnWidth; @include box-sizing(); } .path { word-wrap: break-word; position: relative; z-index: 1; } ## Instruction: Make column width narrower so it fits the icon more neatly ## Code After: @import 'bootstrap/_variables'; @import 'mixins'; @import 'theme'; .bar-chart-row { position: absolute; left: 0; top: 0; bottom: 0; background-color: $defaultHTTPStatusColor; min-width: 3px; } .bar-chart-row-301 { background-color: $goodHTTPStatusColor; } .bar-chart-row-500, .bar-chart-row-404 { background-color: $badHTTPStatusColor; } .hits { table-layout: fixed; } .status { width: $gridColumnWidth; @include box-sizing(); } .count { width: $gridColumnWidth * 2; @include box-sizing(); } .hit-to-mapping { width: 45px; @include box-sizing(); } .path { word-wrap: break-word; position: relative; z-index: 1; }
833c6ad97ab3bead49c70c2536734c37091d942f
spec/models/task_user_spec.rb
spec/models/task_user_spec.rb
require 'spec_helper' describe TaskUser do before(:each) do @valid_attributes = { :user_id => 1, :task_id => 1, :unread => false, } end it "should create a new instance given valid attributes" do TaskUser.create!(@valid_attributes) end end # == Schema Information # # Table name: task_users # # id :integer(4) not null, primary key # user_id :integer(4) # task_id :integer(4) # type :string(255) default("TaskOwner") # unread :boolean(1) # created_at :datetime # updated_at :datetime #
require 'spec_helper' describe TaskUser do before(:each) do @valid_attributes = { :user => User.make, :task => Task.make, :unread => false } end it "should create a new instance given valid attributes" do TaskUser.create!(@valid_attributes) end end # == Schema Information # # Table name: task_users # # id :integer(4) not null, primary key # user_id :integer(4) # task_id :integer(4) # type :string(255) default("TaskOwner") # unread :boolean(1) # created_at :datetime # updated_at :datetime #
Update specs: use factory instead of magic numbers in TaskUser spec.
Update specs: use factory instead of magic numbers in TaskUser spec.
Ruby
agpl-3.0
ari/jobsworth,xuewenfei/jobsworth,rafaspinola/jobsworth,webstream-io/jobsworth,webstream-io/jobsworth,webstream-io/jobsworth,digitalnatives/jobsworth,ari/jobsworth,ari/jobsworth,digitalnatives/jobsworth,webstream-io/jobsworth,rafaspinola/jobsworth,ari/jobsworth,xuewenfei/jobsworth,xuewenfei/jobsworth,xuewenfei/jobsworth,digitalnatives/jobsworth,digitalnatives/jobsworth,digitalnatives/jobsworth,rafaspinola/jobsworth,rafaspinola/jobsworth
ruby
## Code Before: require 'spec_helper' describe TaskUser do before(:each) do @valid_attributes = { :user_id => 1, :task_id => 1, :unread => false, } end it "should create a new instance given valid attributes" do TaskUser.create!(@valid_attributes) end end # == Schema Information # # Table name: task_users # # id :integer(4) not null, primary key # user_id :integer(4) # task_id :integer(4) # type :string(255) default("TaskOwner") # unread :boolean(1) # created_at :datetime # updated_at :datetime # ## Instruction: Update specs: use factory instead of magic numbers in TaskUser spec. ## Code After: require 'spec_helper' describe TaskUser do before(:each) do @valid_attributes = { :user => User.make, :task => Task.make, :unread => false } end it "should create a new instance given valid attributes" do TaskUser.create!(@valid_attributes) end end # == Schema Information # # Table name: task_users # # id :integer(4) not null, primary key # user_id :integer(4) # task_id :integer(4) # type :string(255) default("TaskOwner") # unread :boolean(1) # created_at :datetime # updated_at :datetime #
24c67ce5972c1edf51f23c0029d56fd2b30daa47
setup.py
setup.py
import re from setuptools import find_packages, setup with open('netsgiro/__init__.py') as fh: metadata = dict(re.findall("__([a-z]+)__ = '([^']+)'", fh.read())) with open('README.rst') as fh: long_description = fh.read() setup( name='netsgiro', version=metadata['version'], description='File parsers for Nets AvtaleGiro and OCR Giro', long_description=long_description, url='https://github.com/otovo/python-netsgiro', author='Otovo AS', license='Apache License, Version 2.0', classifiers=[ 'Development Status :: 3 - Alpha', 'Intended Audience :: Developers', 'License :: OSI Approved :: Apache Software License', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', ], keywords='avtalegiro ocr giro', packages=find_packages(exclude=['tests', 'tests.*']), install_requires=[ 'attrs', 'typing', # Needed for Python 3.4 ], extras_require={ 'dev': [ 'check-manifest', 'flake8', 'flake8-import-order', 'mypy', 'pytest', 'pytest-xdist', 'tox', ], }, )
import re from setuptools import find_packages, setup with open('netsgiro/__init__.py') as fh: metadata = dict(re.findall("__([a-z]+)__ = '([^']+)'", fh.read())) with open('README.rst') as fh: long_description = fh.read() setup( name='netsgiro', version=metadata['version'], description='File parsers for Nets AvtaleGiro and OCR Giro', long_description=long_description, url='https://github.com/otovo/python-netsgiro', author='Otovo AS', author_email='jodal+netsgiro@otovo.no', license='Apache License, Version 2.0', classifiers=[ 'Development Status :: 3 - Alpha', 'Intended Audience :: Developers', 'License :: OSI Approved :: Apache Software License', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', ], keywords='avtalegiro ocr giro', packages=find_packages(exclude=['tests', 'tests.*']), install_requires=[ 'attrs', 'typing', # Needed for Python 3.4 ], extras_require={ 'dev': [ 'check-manifest', 'flake8', 'flake8-import-order', 'mypy', 'pytest', 'pytest-xdist', 'tox', ], }, )
Add required author_email to package metadata
Add required author_email to package metadata
Python
apache-2.0
otovo/python-netsgiro
python
## Code Before: import re from setuptools import find_packages, setup with open('netsgiro/__init__.py') as fh: metadata = dict(re.findall("__([a-z]+)__ = '([^']+)'", fh.read())) with open('README.rst') as fh: long_description = fh.read() setup( name='netsgiro', version=metadata['version'], description='File parsers for Nets AvtaleGiro and OCR Giro', long_description=long_description, url='https://github.com/otovo/python-netsgiro', author='Otovo AS', license='Apache License, Version 2.0', classifiers=[ 'Development Status :: 3 - Alpha', 'Intended Audience :: Developers', 'License :: OSI Approved :: Apache Software License', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', ], keywords='avtalegiro ocr giro', packages=find_packages(exclude=['tests', 'tests.*']), install_requires=[ 'attrs', 'typing', # Needed for Python 3.4 ], extras_require={ 'dev': [ 'check-manifest', 'flake8', 'flake8-import-order', 'mypy', 'pytest', 'pytest-xdist', 'tox', ], }, ) ## Instruction: Add required author_email to package metadata ## Code After: import re from setuptools import find_packages, setup with open('netsgiro/__init__.py') as fh: metadata = dict(re.findall("__([a-z]+)__ = '([^']+)'", fh.read())) with open('README.rst') as fh: long_description = fh.read() setup( name='netsgiro', version=metadata['version'], description='File parsers for Nets AvtaleGiro and OCR Giro', long_description=long_description, url='https://github.com/otovo/python-netsgiro', author='Otovo AS', author_email='jodal+netsgiro@otovo.no', license='Apache License, Version 2.0', classifiers=[ 'Development Status :: 3 - Alpha', 'Intended Audience :: Developers', 'License :: OSI Approved :: Apache Software License', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', ], keywords='avtalegiro ocr giro', packages=find_packages(exclude=['tests', 'tests.*']), install_requires=[ 'attrs', 'typing', # Needed for Python 3.4 ], extras_require={ 'dev': [ 'check-manifest', 'flake8', 'flake8-import-order', 'mypy', 'pytest', 'pytest-xdist', 'tox', ], }, )
90cd6516831e2d4c05c5761a5984c0928797e634
.travis.yml
.travis.yml
language: rust rust: - nightly sudo: required before_install: - sudo add-apt-repository ppa:sonkun/sfml-stable -y - sudo apt-get -qq update - sudo apt-get install -y sfml csfml script: cd deucalion-rs && cargo build && cargo test
language: rust rust: - nightly sudo: required before_install: - sudo echo "deb http://archive.ubuntu.com/ubuntu/ xenial-proposed restricted main multiverse universe" >> /etc/apt/sources.list - sudo apt-get -qq update - sudo apt-get install -y libsfml-dev libcsfml-dev script: cd deucalion-rs && cargo build && cargo test
Switch to using Proposed for builds.
Switch to using Proposed for builds.
YAML
apache-2.0
team-code/deucalion,team-code/deucalion
yaml
## Code Before: language: rust rust: - nightly sudo: required before_install: - sudo add-apt-repository ppa:sonkun/sfml-stable -y - sudo apt-get -qq update - sudo apt-get install -y sfml csfml script: cd deucalion-rs && cargo build && cargo test ## Instruction: Switch to using Proposed for builds. ## Code After: language: rust rust: - nightly sudo: required before_install: - sudo echo "deb http://archive.ubuntu.com/ubuntu/ xenial-proposed restricted main multiverse universe" >> /etc/apt/sources.list - sudo apt-get -qq update - sudo apt-get install -y libsfml-dev libcsfml-dev script: cd deucalion-rs && cargo build && cargo test
53ef6fd54e0bb57774c606deceeca6ed46b3443c
app/app/components/tasks/CreateTask.jsx
app/app/components/tasks/CreateTask.jsx
import React from 'react'; export default class CreateTask extends React.Component { render(){ return( <p>New Task</p> ) } }
import React from 'react'; import GoogleMapsLoader from 'google-maps' import axios from 'axios' import {hashHistory} from 'react-router' export default class CreateTask extends React.Component { componentWillMount() { GoogleMapsLoader.KEY = process.env.GOOGLE_MAPS_API_KEY GoogleMapsLoader.load((google) => { new google.maps.Map(document.getElementById('map'), { center: { lat: 40.7413549, lng: -73.9980244 }, zoom: 13 }); }) } handleClick(){ let data = { name: this.refs.name.value, price: this.refs.price.value, description: this.refs.description.value } axios.post('users/' + this.props.params.id + '/tasks', data).then(() => { hashHistory.push('/') }) } render(){ return( <div> <h3>New Task</h3> <div id="map" /><br /> <div className="form-group"> <label for="exampleInputName2">Task Name</label> <input type="text" className="form-control" ref="name" placeholder="Pick up my laundry"/> </div> <div className="form-group"> <label for="exampleInputEmail2">Description</label> <textarea className="form-control" ref="description" placeholder="Description" /> </div> <div className="form-group"> <label for="exampleInputEmail2">Price</label> <input type="number" className="form-control col-sm-2" ref="price" placeholder="Price($)" /> </div> <button onClick={this.handleClick.bind(this)} className="btn btn-primary">Call A Serf</button><br /><br /> </div> ) } }
Add google maps initial map and task form
Add google maps initial map and task form
JSX
mit
taodav/MicroSerfs,taodav/MicroSerfs
jsx
## Code Before: import React from 'react'; export default class CreateTask extends React.Component { render(){ return( <p>New Task</p> ) } } ## Instruction: Add google maps initial map and task form ## Code After: import React from 'react'; import GoogleMapsLoader from 'google-maps' import axios from 'axios' import {hashHistory} from 'react-router' export default class CreateTask extends React.Component { componentWillMount() { GoogleMapsLoader.KEY = process.env.GOOGLE_MAPS_API_KEY GoogleMapsLoader.load((google) => { new google.maps.Map(document.getElementById('map'), { center: { lat: 40.7413549, lng: -73.9980244 }, zoom: 13 }); }) } handleClick(){ let data = { name: this.refs.name.value, price: this.refs.price.value, description: this.refs.description.value } axios.post('users/' + this.props.params.id + '/tasks', data).then(() => { hashHistory.push('/') }) } render(){ return( <div> <h3>New Task</h3> <div id="map" /><br /> <div className="form-group"> <label for="exampleInputName2">Task Name</label> <input type="text" className="form-control" ref="name" placeholder="Pick up my laundry"/> </div> <div className="form-group"> <label for="exampleInputEmail2">Description</label> <textarea className="form-control" ref="description" placeholder="Description" /> </div> <div className="form-group"> <label for="exampleInputEmail2">Price</label> <input type="number" className="form-control col-sm-2" ref="price" placeholder="Price($)" /> </div> <button onClick={this.handleClick.bind(this)} className="btn btn-primary">Call A Serf</button><br /><br /> </div> ) } }
4987b2e5a2d5ee208a274702f6b88a9021149c86
tests/blueprints/user_message/test_address_formatting.py
tests/blueprints/user_message/test_address_formatting.py
from unittest.mock import patch import pytest from byceps.services.user_message import service as user_message_service from tests.conftest import database_recreated from tests.helpers import app_context, create_brand, create_email_config, \ create_party, create_site, create_user def test_recipient_formatting(application, params): screen_name, email_address, expected = params create_email_config() brand = create_brand() party = create_party(brand.id) site = create_site(party.id) user = create_user(screen_name, email_address=email_address) message = user_message_service.create_message(user.id, user.id, '', '', site.id) assert message.recipients == [expected] @pytest.fixture(params=[ ('Alice', 'alice@example.com', 'Alice <alice@example.com>'), ('<AngleInvestor>', 'angleinvestor@example.com', '"<AngleInvestor>" <angleinvestor@example.com>'), ('-=]YOLO[=-', 'yolo@example.com', '"-=]YOLO[=-" <yolo@example.com>'), ]) def params(request): yield request.param @pytest.fixture def application(db): with app_context(): with database_recreated(db): yield
from unittest.mock import patch import pytest from byceps.services.user_message import service as user_message_service from tests.conftest import database_recreated from tests.helpers import app_context, create_brand, create_email_config, \ create_party, create_site, create_user def test_recipient_formatting(site, params): screen_name, email_address, expected = params user = create_user(screen_name, email_address=email_address) message = user_message_service.create_message(user.id, user.id, '', '', site.id) assert message.recipients == [expected] @pytest.fixture(params=[ ('Alice', 'alice@example.com', 'Alice <alice@example.com>'), ('<AngleInvestor>', 'angleinvestor@example.com', '"<AngleInvestor>" <angleinvestor@example.com>'), ('-=]YOLO[=-', 'yolo@example.com', '"-=]YOLO[=-" <yolo@example.com>'), ]) def params(request): yield request.param @pytest.fixture(scope='module') def site(db): with app_context(): with database_recreated(db): create_email_config() brand = create_brand() party = create_party(brand.id) site = create_site(party.id) yield site
Speed up user message address formatting test
Speed up user message address formatting test The common set-up is moved to the fixture, then the fixture's scope is widened so that it is used for all test cases in the module, avoiding duplicate work.
Python
bsd-3-clause
m-ober/byceps,homeworkprod/byceps,m-ober/byceps,homeworkprod/byceps,homeworkprod/byceps,m-ober/byceps
python
## Code Before: from unittest.mock import patch import pytest from byceps.services.user_message import service as user_message_service from tests.conftest import database_recreated from tests.helpers import app_context, create_brand, create_email_config, \ create_party, create_site, create_user def test_recipient_formatting(application, params): screen_name, email_address, expected = params create_email_config() brand = create_brand() party = create_party(brand.id) site = create_site(party.id) user = create_user(screen_name, email_address=email_address) message = user_message_service.create_message(user.id, user.id, '', '', site.id) assert message.recipients == [expected] @pytest.fixture(params=[ ('Alice', 'alice@example.com', 'Alice <alice@example.com>'), ('<AngleInvestor>', 'angleinvestor@example.com', '"<AngleInvestor>" <angleinvestor@example.com>'), ('-=]YOLO[=-', 'yolo@example.com', '"-=]YOLO[=-" <yolo@example.com>'), ]) def params(request): yield request.param @pytest.fixture def application(db): with app_context(): with database_recreated(db): yield ## Instruction: Speed up user message address formatting test The common set-up is moved to the fixture, then the fixture's scope is widened so that it is used for all test cases in the module, avoiding duplicate work. ## Code After: from unittest.mock import patch import pytest from byceps.services.user_message import service as user_message_service from tests.conftest import database_recreated from tests.helpers import app_context, create_brand, create_email_config, \ create_party, create_site, create_user def test_recipient_formatting(site, params): screen_name, email_address, expected = params user = create_user(screen_name, email_address=email_address) message = user_message_service.create_message(user.id, user.id, '', '', site.id) assert message.recipients == [expected] @pytest.fixture(params=[ ('Alice', 'alice@example.com', 'Alice <alice@example.com>'), ('<AngleInvestor>', 'angleinvestor@example.com', '"<AngleInvestor>" <angleinvestor@example.com>'), ('-=]YOLO[=-', 'yolo@example.com', '"-=]YOLO[=-" <yolo@example.com>'), ]) def params(request): yield request.param @pytest.fixture(scope='module') def site(db): with app_context(): with database_recreated(db): create_email_config() brand = create_brand() party = create_party(brand.id) site = create_site(party.id) yield site
0f3005242ef42ae16554a7c88b158428a2fa8a22
packages/cf/cf.yaml
packages/cf/cf.yaml
homepage: http://github.com/mvr/cf changelog-type: '' hash: 96b1d5c7355b1af76f0dafd7f27df7dd204e2417ad804d2f6f1896deefc76b57 test-bench-deps: test-framework: ! '>=0.6' base: -any cf: -any test-framework-quickcheck2: ! '>=0.2' test-framework-th: ! '>=0.2' QuickCheck: ! '>=2.4' maintainer: mitchell.v.riley@gmail.com synopsis: Exact real arithmetic using continued fractions changelog: '' basic-deps: base: ! '>=4 && <5' all-versions: - '0.1' - '0.2' - '0.3' - '0.4' - '0.4.1' author: Mitchell Riley latest: '0.4.1' description-type: haddock description: ! 'Continued fraction arithmetic using Gosper''s algorithm for the basic operations, and Vuillemin and Lester''s techniques for transcendental functions.' license-name: MIT
homepage: http://github.com/mvr/cf changelog-type: '' hash: 9fd574edfce6ea014201ccc3591638de0574f251290bcf0f44a8a00338131692 test-bench-deps: test-framework: ! '>=0.6' base: -any cf: -any test-framework-quickcheck2: ! '>=0.2' test-framework-th: ! '>=0.2' QuickCheck: ! '>=2.4' maintainer: mitchell.v.riley@gmail.com synopsis: Exact real arithmetic using continued fractions changelog: '' basic-deps: base: ! '>=4.4 && <5' all-versions: - '0.1' - '0.2' - '0.3' - '0.4' - '0.4.1' author: Mitchell Riley latest: '0.4.1' description-type: haddock description: ! 'Continued fraction arithmetic using Gosper''s algorithm for the basic operations, and Vuillemin and Lester''s techniques for transcendental functions.' license-name: MIT
Update from Hackage at 2015-07-10T17:19:33+0000
Update from Hackage at 2015-07-10T17:19:33+0000
YAML
mit
commercialhaskell/all-cabal-metadata
yaml
## Code Before: homepage: http://github.com/mvr/cf changelog-type: '' hash: 96b1d5c7355b1af76f0dafd7f27df7dd204e2417ad804d2f6f1896deefc76b57 test-bench-deps: test-framework: ! '>=0.6' base: -any cf: -any test-framework-quickcheck2: ! '>=0.2' test-framework-th: ! '>=0.2' QuickCheck: ! '>=2.4' maintainer: mitchell.v.riley@gmail.com synopsis: Exact real arithmetic using continued fractions changelog: '' basic-deps: base: ! '>=4 && <5' all-versions: - '0.1' - '0.2' - '0.3' - '0.4' - '0.4.1' author: Mitchell Riley latest: '0.4.1' description-type: haddock description: ! 'Continued fraction arithmetic using Gosper''s algorithm for the basic operations, and Vuillemin and Lester''s techniques for transcendental functions.' license-name: MIT ## Instruction: Update from Hackage at 2015-07-10T17:19:33+0000 ## Code After: homepage: http://github.com/mvr/cf changelog-type: '' hash: 9fd574edfce6ea014201ccc3591638de0574f251290bcf0f44a8a00338131692 test-bench-deps: test-framework: ! '>=0.6' base: -any cf: -any test-framework-quickcheck2: ! '>=0.2' test-framework-th: ! '>=0.2' QuickCheck: ! '>=2.4' maintainer: mitchell.v.riley@gmail.com synopsis: Exact real arithmetic using continued fractions changelog: '' basic-deps: base: ! '>=4.4 && <5' all-versions: - '0.1' - '0.2' - '0.3' - '0.4' - '0.4.1' author: Mitchell Riley latest: '0.4.1' description-type: haddock description: ! 'Continued fraction arithmetic using Gosper''s algorithm for the basic operations, and Vuillemin and Lester''s techniques for transcendental functions.' license-name: MIT
9e9f3e04e52bece3ee3f9dc1d15d66da31dc14e5
src/localization/utilities.js
src/localization/utilities.js
/** * mSupply Mobile * Sustainable Solutions (NZ) Ltd. 2019 */ import { authStrings } from './authStrings'; import { buttonStrings } from './buttonStrings'; import { generalStrings } from './generalStrings'; import { modalStrings } from './modalStrings'; import { navStrings } from './navStrings'; import { pageInfoStrings } from './pageInfoStrings'; import { syncStrings } from './syncStrings'; import { tableStrings } from './tableStrings'; export function setCurrentLanguage(language) { authStrings.setLanguage(language); buttonStrings.setLanguage(language); generalStrings.setLanguage(language); modalStrings.setLanguage(language); navStrings.setLanguage(language); pageInfoStrings.setLanguage(language); tableStrings.setLanguage(language); syncStrings.setLanguage(language); } export default setCurrentLanguage;
/** * mSupply Mobile * Sustainable Solutions (NZ) Ltd. 2019 */ import { authStrings } from './authStrings'; import { buttonStrings } from './buttonStrings'; import { generalStrings } from './generalStrings'; import { modalStrings } from './modalStrings'; import { navStrings } from './navStrings'; import { pageInfoStrings } from './pageInfoStrings'; import { syncStrings } from './syncStrings'; import { tableStrings } from './tableStrings'; import { programStrings } from './programStrings'; export function setCurrentLanguage(language) { authStrings.setLanguage(language); buttonStrings.setLanguage(language); generalStrings.setLanguage(language); modalStrings.setLanguage(language); navStrings.setLanguage(language); pageInfoStrings.setLanguage(language); tableStrings.setLanguage(language); syncStrings.setLanguage(language); programStrings.setLanguage(language); } export default setCurrentLanguage;
Add proper exporting of programStrings
Add proper exporting of programStrings
JavaScript
mit
sussol/mobile,sussol/mobile,sussol/mobile,sussol/mobile
javascript
## Code Before: /** * mSupply Mobile * Sustainable Solutions (NZ) Ltd. 2019 */ import { authStrings } from './authStrings'; import { buttonStrings } from './buttonStrings'; import { generalStrings } from './generalStrings'; import { modalStrings } from './modalStrings'; import { navStrings } from './navStrings'; import { pageInfoStrings } from './pageInfoStrings'; import { syncStrings } from './syncStrings'; import { tableStrings } from './tableStrings'; export function setCurrentLanguage(language) { authStrings.setLanguage(language); buttonStrings.setLanguage(language); generalStrings.setLanguage(language); modalStrings.setLanguage(language); navStrings.setLanguage(language); pageInfoStrings.setLanguage(language); tableStrings.setLanguage(language); syncStrings.setLanguage(language); } export default setCurrentLanguage; ## Instruction: Add proper exporting of programStrings ## Code After: /** * mSupply Mobile * Sustainable Solutions (NZ) Ltd. 2019 */ import { authStrings } from './authStrings'; import { buttonStrings } from './buttonStrings'; import { generalStrings } from './generalStrings'; import { modalStrings } from './modalStrings'; import { navStrings } from './navStrings'; import { pageInfoStrings } from './pageInfoStrings'; import { syncStrings } from './syncStrings'; import { tableStrings } from './tableStrings'; import { programStrings } from './programStrings'; export function setCurrentLanguage(language) { authStrings.setLanguage(language); buttonStrings.setLanguage(language); generalStrings.setLanguage(language); modalStrings.setLanguage(language); navStrings.setLanguage(language); pageInfoStrings.setLanguage(language); tableStrings.setLanguage(language); syncStrings.setLanguage(language); programStrings.setLanguage(language); } export default setCurrentLanguage;
4f62b857fcd59fb3c7398928fb5e34c0ec36ae22
test/profile/CMakeLists.txt
test/profile/CMakeLists.txt
set(PROFILE_LIT_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}) set(PROFILE_LIT_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}) set(PROFILE_TESTSUITES) set(PROFILE_TEST_DEPS ${SANITIZER_COMMON_LIT_TEST_DEPS}) if(NOT COMPILER_RT_STANDALONE_BUILD) list(APPEND PROFILE_TEST_DEPS profile llvm-profdata llvm-cov) endif() set(PROFILE_TEST_ARCH ${PROFILE_SUPPORTED_ARCH}) if(APPLE) darwin_filter_host_archs(PROFILE_SUPPORTED_ARCH PROFILE_TEST_ARCH) endif() foreach(arch ${PROFILE_TEST_ARCH}) set(PROFILE_TEST_TARGET_ARCH ${arch}) get_test_cc_for_arch(${arch} PROFILE_TEST_TARGET_CC PROFILE_TEST_TARGET_CFLAGS) set(CONFIG_NAME Profile-${arch}) configure_lit_site_cfg( ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.py.in ${CMAKE_CURRENT_BINARY_DIR}/${CONFIG_NAME}/lit.site.cfg.py ) list(APPEND PROFILE_TESTSUITES ${CMAKE_CURRENT_BINARY_DIR}/${CONFIG_NAME}) endforeach() add_lit_testsuite(check-profile "Running the profile tests" ${PROFILE_TESTSUITES} DEPENDS ${PROFILE_TEST_DEPS}) set_target_properties(check-profile PROPERTIES FOLDER "Compiler-RT Misc")
set(PROFILE_LIT_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}) set(PROFILE_LIT_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}) set(PROFILE_TESTSUITES) set(PROFILE_TEST_DEPS ${SANITIZER_COMMON_LIT_TEST_DEPS}) if(NOT COMPILER_RT_STANDALONE_BUILD) list(APPEND PROFILE_TEST_DEPS cxx-headers profile llvm-profdata llvm-cov) endif() set(PROFILE_TEST_ARCH ${PROFILE_SUPPORTED_ARCH}) if(APPLE) darwin_filter_host_archs(PROFILE_SUPPORTED_ARCH PROFILE_TEST_ARCH) endif() foreach(arch ${PROFILE_TEST_ARCH}) set(PROFILE_TEST_TARGET_ARCH ${arch}) get_test_cc_for_arch(${arch} PROFILE_TEST_TARGET_CC PROFILE_TEST_TARGET_CFLAGS) set(CONFIG_NAME Profile-${arch}) configure_lit_site_cfg( ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.py.in ${CMAKE_CURRENT_BINARY_DIR}/${CONFIG_NAME}/lit.site.cfg.py ) list(APPEND PROFILE_TESTSUITES ${CMAKE_CURRENT_BINARY_DIR}/${CONFIG_NAME}) endforeach() add_lit_testsuite(check-profile "Running the profile tests" ${PROFILE_TESTSUITES} DEPENDS ${PROFILE_TEST_DEPS}) set_target_properties(check-profile PROPERTIES FOLDER "Compiler-RT Misc")
Add a test dependency on cxx-headers
[profile] Add a test dependency on cxx-headers This enables running profile runtime tests which #include <string>, etc. via just `check-profile`. git-svn-id: c199f293c43da69278bea8e88f92242bf3aa95f7@373120 91177308-0d34-0410-b5e6-96231b3b80d8
Text
apache-2.0
llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt
text
## Code Before: set(PROFILE_LIT_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}) set(PROFILE_LIT_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}) set(PROFILE_TESTSUITES) set(PROFILE_TEST_DEPS ${SANITIZER_COMMON_LIT_TEST_DEPS}) if(NOT COMPILER_RT_STANDALONE_BUILD) list(APPEND PROFILE_TEST_DEPS profile llvm-profdata llvm-cov) endif() set(PROFILE_TEST_ARCH ${PROFILE_SUPPORTED_ARCH}) if(APPLE) darwin_filter_host_archs(PROFILE_SUPPORTED_ARCH PROFILE_TEST_ARCH) endif() foreach(arch ${PROFILE_TEST_ARCH}) set(PROFILE_TEST_TARGET_ARCH ${arch}) get_test_cc_for_arch(${arch} PROFILE_TEST_TARGET_CC PROFILE_TEST_TARGET_CFLAGS) set(CONFIG_NAME Profile-${arch}) configure_lit_site_cfg( ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.py.in ${CMAKE_CURRENT_BINARY_DIR}/${CONFIG_NAME}/lit.site.cfg.py ) list(APPEND PROFILE_TESTSUITES ${CMAKE_CURRENT_BINARY_DIR}/${CONFIG_NAME}) endforeach() add_lit_testsuite(check-profile "Running the profile tests" ${PROFILE_TESTSUITES} DEPENDS ${PROFILE_TEST_DEPS}) set_target_properties(check-profile PROPERTIES FOLDER "Compiler-RT Misc") ## Instruction: [profile] Add a test dependency on cxx-headers This enables running profile runtime tests which #include <string>, etc. via just `check-profile`. git-svn-id: c199f293c43da69278bea8e88f92242bf3aa95f7@373120 91177308-0d34-0410-b5e6-96231b3b80d8 ## Code After: set(PROFILE_LIT_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}) set(PROFILE_LIT_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}) set(PROFILE_TESTSUITES) set(PROFILE_TEST_DEPS ${SANITIZER_COMMON_LIT_TEST_DEPS}) if(NOT COMPILER_RT_STANDALONE_BUILD) list(APPEND PROFILE_TEST_DEPS cxx-headers profile llvm-profdata llvm-cov) endif() set(PROFILE_TEST_ARCH ${PROFILE_SUPPORTED_ARCH}) if(APPLE) darwin_filter_host_archs(PROFILE_SUPPORTED_ARCH PROFILE_TEST_ARCH) endif() foreach(arch ${PROFILE_TEST_ARCH}) set(PROFILE_TEST_TARGET_ARCH ${arch}) get_test_cc_for_arch(${arch} PROFILE_TEST_TARGET_CC PROFILE_TEST_TARGET_CFLAGS) set(CONFIG_NAME Profile-${arch}) configure_lit_site_cfg( ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.py.in ${CMAKE_CURRENT_BINARY_DIR}/${CONFIG_NAME}/lit.site.cfg.py ) list(APPEND PROFILE_TESTSUITES ${CMAKE_CURRENT_BINARY_DIR}/${CONFIG_NAME}) endforeach() add_lit_testsuite(check-profile "Running the profile tests" ${PROFILE_TESTSUITES} DEPENDS ${PROFILE_TEST_DEPS}) set_target_properties(check-profile PROPERTIES FOLDER "Compiler-RT Misc")
e563cd39f8eacfcc7aa1e5571cc654b7e032afe1
packages/ember-validations/lib/errors.js
packages/ember-validations/lib/errors.js
Ember.Validations.Errors = Ember.Object.extend({ add: function(property, value) { this.set(property, (this.get(property) || []).concat(value)); }, clear: function() { var keys = Object.keys(this); for(var i = 0; i < keys.length; i++) { delete this[keys[i]]; } } });
Ember.Validations.Errors = Ember.Object.extend({ add: function(property, value) { this.set(property, (this.get(property) || []).concat(value)); }, clear: function() { var keys = Object.keys(this); for(var i = 0; i < keys.length; i++) { this.set(keys[i], undefined); delete this[keys[i]]; } } });
Set to undefined when clearing
Set to undefined when clearing
JavaScript
mit
davewasmer/ember-validations,Patsy-issa/ember-validations,aaronmcouture/ember-validations,aaronmcouture/ember-validations,spruce/ember-validations,indirect/ember-validations,irma-abh/ember-validations,xymbol/ember-validations,dockyard/ember-validations,Patsy-issa/ember-validations,yonjah/ember-validations,atsjj/ember-validations,Hanastaroth/ember-validations,irma-abh/ember-validations,dollarshaveclub/ember-validations,InboxHealth/ember-validations,meszike123/ember-validations,indirect/ember-validations,jeffreybiles/ember-validations,dockyard/ember-validations,yonjah/ember-validations,SeyZ/ember-validations,spruce/ember-validations,jcope2013/ember-validations,xymbol/ember-validations,nibynic/ember-validations,jeffreybiles/ember-validations,dollarshaveclub/ember-validations,csantero/ember-validations,jcope2013/ember-validations,clairton/ember-validations,davewasmer/ember-validations,meszike123/ember-validations,atsjj/ember-validations,nibynic/ember-validations,clairton/ember-validations,SeyZ/ember-validations,InboxHealth/ember-validations,Hanastaroth/ember-validations
javascript
## Code Before: Ember.Validations.Errors = Ember.Object.extend({ add: function(property, value) { this.set(property, (this.get(property) || []).concat(value)); }, clear: function() { var keys = Object.keys(this); for(var i = 0; i < keys.length; i++) { delete this[keys[i]]; } } }); ## Instruction: Set to undefined when clearing ## Code After: Ember.Validations.Errors = Ember.Object.extend({ add: function(property, value) { this.set(property, (this.get(property) || []).concat(value)); }, clear: function() { var keys = Object.keys(this); for(var i = 0; i < keys.length; i++) { this.set(keys[i], undefined); delete this[keys[i]]; } } });
45be9160a830f43a2f501b1350213b5ce56008f4
attributes/default.rb
attributes/default.rb
default['codecpetion']['dir'] = '/assets' default['codecpetion']['user'] = "www-data" default['codecpetion']['group'] = "www-data" default['codecpetion']['source'] = "http://codeception.com/codecept.phar"
default[:codecpetion][:dir] = "/assets" default[:codecpetion][:user] = "www-data" default[:codecpetion][:group] = "www-data" default[:codecpetion][:source] = "http://codeception.com/codecept.phar"
Access node attributes in a consistent manner
Access node attributes in a consistent manner
Ruby
apache-2.0
arknoll/drupal-codeception
ruby
## Code Before: default['codecpetion']['dir'] = '/assets' default['codecpetion']['user'] = "www-data" default['codecpetion']['group'] = "www-data" default['codecpetion']['source'] = "http://codeception.com/codecept.phar" ## Instruction: Access node attributes in a consistent manner ## Code After: default[:codecpetion][:dir] = "/assets" default[:codecpetion][:user] = "www-data" default[:codecpetion][:group] = "www-data" default[:codecpetion][:source] = "http://codeception.com/codecept.phar"
66c950522a3563c96cb7d4aca0ba4e940b769462
includes/StackAllocator.h
includes/StackAllocator.h
class StackAllocator : public LinearAllocator { public: /* Allocation of real memory */ StackAllocator(const long totalSize); /* Frees all memory */ virtual ~StackAllocator(); /* Allocate virtual memory */ virtual void* Allocate(const std::size_t size, const std::size_t alignment) override; /* Frees virtual memory */ virtual void Free(void* ptr) override; }; #endif /* STACKALLOCATOR_H */
class StackAllocator : public Allocator { protected: /* Offset from the start of the memory block */ std::size_t m_offset; public: /* Allocation of real memory */ StackAllocator(const long totalSize); /* Frees all memory */ virtual ~StackAllocator(); /* Allocate virtual memory */ virtual void* Allocate(const std::size_t size, const std::size_t alignment) override; /* Frees virtual memory */ virtual void Free(void* ptr) override; /* Frees all virtual memory */ virtual void Reset() override; }; #endif /* STACKALLOCATOR_H */
Change parent class from LinearAllocator to Allocator.
Change parent class from LinearAllocator to Allocator.
C
mit
mtrebi/memory-allocators
c
## Code Before: class StackAllocator : public LinearAllocator { public: /* Allocation of real memory */ StackAllocator(const long totalSize); /* Frees all memory */ virtual ~StackAllocator(); /* Allocate virtual memory */ virtual void* Allocate(const std::size_t size, const std::size_t alignment) override; /* Frees virtual memory */ virtual void Free(void* ptr) override; }; #endif /* STACKALLOCATOR_H */ ## Instruction: Change parent class from LinearAllocator to Allocator. ## Code After: class StackAllocator : public Allocator { protected: /* Offset from the start of the memory block */ std::size_t m_offset; public: /* Allocation of real memory */ StackAllocator(const long totalSize); /* Frees all memory */ virtual ~StackAllocator(); /* Allocate virtual memory */ virtual void* Allocate(const std::size_t size, const std::size_t alignment) override; /* Frees virtual memory */ virtual void Free(void* ptr) override; /* Frees all virtual memory */ virtual void Reset() override; }; #endif /* STACKALLOCATOR_H */
8decb758c06f4ce81befde72e0a28311fb6be725
lib/themes/dosomething/paraneue_dosomething/scss/content/_explore-campaigns.scss
lib/themes/dosomething/paraneue_dosomething/scss/content/_explore-campaigns.scss
// ------------------- // EXPLORE CAMPAIGNS // ------------------- .view-explore-campaigns { margin-top: $base-spacing; // A sad re-implementation of the figure pattern. .search-result { text-align: center; margin-bottom: $base-spacing; @include media($tablet) { @include span(4 of 12); &:nth-of-type(3n + 1) { clear: both; } } img { max-width: 100%; margin: 0 auto; } .views-field-label { margin-top: $base-spacing; } } }
// ------------------- // EXPLORE CAMPAIGNS // ------------------- .view-explore-campaigns { margin-top: $base-spacing; // A sad re-implementation of the figure pattern. .search-result { text-align: center; margin-bottom: $base-spacing; @include media($tablet) { @include span(4 of 12); &:nth-of-type(3n + 1) { clear: both; } } img { max-width: 100%; margin: 0 auto; } .views-field-label { margin-top: gutter() / 2; } } }
Update "Explore Campaigns" to mirror Forge 6.7.
Update "Explore Campaigns" to mirror Forge 6.7. Since this page is a Drupal view, it uses silly custom markup, which we’ll update to reflect gallery changes made in Forge 6.7.
SCSS
mit
DoSomething/dosomething,deadlybutter/phoenix,DoSomething/dosomething,mshmsh5000/dosomething-1,deadlybutter/phoenix,sergii-tkachenko/phoenix,DoSomething/dosomething,DoSomething/dosomething,DoSomething/phoenix,mshmsh5000/dosomething-1,sergii-tkachenko/phoenix,sergii-tkachenko/phoenix,deadlybutter/phoenix,DoSomething/dosomething,DoSomething/phoenix,DoSomething/phoenix,sergii-tkachenko/phoenix,mshmsh5000/dosomething-1,deadlybutter/phoenix,deadlybutter/phoenix,mshmsh5000/dosomething-1,DoSomething/phoenix,sergii-tkachenko/phoenix,mshmsh5000/dosomething-1,DoSomething/phoenix,DoSomething/dosomething
scss
## Code Before: // ------------------- // EXPLORE CAMPAIGNS // ------------------- .view-explore-campaigns { margin-top: $base-spacing; // A sad re-implementation of the figure pattern. .search-result { text-align: center; margin-bottom: $base-spacing; @include media($tablet) { @include span(4 of 12); &:nth-of-type(3n + 1) { clear: both; } } img { max-width: 100%; margin: 0 auto; } .views-field-label { margin-top: $base-spacing; } } } ## Instruction: Update "Explore Campaigns" to mirror Forge 6.7. Since this page is a Drupal view, it uses silly custom markup, which we’ll update to reflect gallery changes made in Forge 6.7. ## Code After: // ------------------- // EXPLORE CAMPAIGNS // ------------------- .view-explore-campaigns { margin-top: $base-spacing; // A sad re-implementation of the figure pattern. .search-result { text-align: center; margin-bottom: $base-spacing; @include media($tablet) { @include span(4 of 12); &:nth-of-type(3n + 1) { clear: both; } } img { max-width: 100%; margin: 0 auto; } .views-field-label { margin-top: gutter() / 2; } } }
8cd01feb3296dc609680dac021ac633fbec9887d
lib/DDG/Spice/Plos.pm
lib/DDG/Spice/Plos.pm
package DDG::Spice::Plos; use DDG::Spice; name 'PLOS Search'; description 'Search research articles of PLOS journals'; primary_example_queries 'plos dinosaurs', 'plos echinoderm evolution'; secondary_example_queries 'plos dinosaurs title:metabolism'; source 'PLOS'; category 'special'; topics 'science'; icon_url 'http://www.plosone.org/images/favicon.ico'; code_url 'https://github.com/duckduckgo/zeroclickinfo-spice/blob/master/lib/DDG/Spice/Plos.pm'; attribution twitter => 'nelas', github => ['nelas', 'Bruno C. Vellutini'], web => ['http://organelas.com/', 'organelas.com']; triggers startend => 'plos'; spice to => 'http://api.plos.org/search?q=$1&rows=10&wt=json' . '&fl=id,title_display,author_display,journal,volume,issue,publication_date' . '&api_key={{ENV{DDG_SPICE_PLOS_APIKEY}}}'; spice wrap_jsonp_callback => 1; handle remainder => sub { return $_ if $_; return; }; 1;
package DDG::Spice::Plos; use DDG::Spice; name 'PLOS Search'; description 'Search research articles of PLOS journals'; primary_example_queries 'plos dinosaurs', 'plos echinoderm evolution'; secondary_example_queries 'plos dinosaurs title:metabolism'; source 'PLOS'; category 'special'; topics 'science'; icon_url 'http://www.plosone.org/images/favicon.ico'; code_url 'https://github.com/duckduckgo/zeroclickinfo-spice/blob/master/lib/DDG/Spice/Plos.pm'; attribution twitter => 'nelas', github => ['nelas', 'Bruno C. Vellutini'], web => ['http://organelas.com/', 'organelas.com']; triggers startend => 'plos', 'plos one', 'plosone', 'public library of science', 'plos journal', 'plos publications'; spice to => 'http://api.plos.org/search?q=$1&rows=10&wt=json' . '&fl=id,title_display,author_display,journal,volume,issue,publication_date' . '&api_key={{ENV{DDG_SPICE_PLOS_APIKEY}}}'; spice wrap_jsonp_callback => 1; # Skip these queries. # We don't want this instant answer to trigger with "plos one api" and the like. my %skip = map {$_ => 1} ('blog', 'blogs', 'website', 'api'); handle remainder => sub { # Only trigger if the remainder does not exist in the skip hash. return $_ if $_ && !exists $skip{lc $_}; return; }; 1;
Add additional triggers and skip some words.
PLOS: Add additional triggers and skip some words.
Perl
apache-2.0
kevintab95/zeroclickinfo-spice,mr-karan/zeroclickinfo-spice,stennie/zeroclickinfo-spice,deserted/zeroclickinfo-spice,mohan08p/zeroclickinfo-spice,jyounker/zeroclickinfo-spice,tagawa/zeroclickinfo-spice,iambibhas/zeroclickinfo-spice,xaviervalarino/zeroclickinfo-spice,dachinzo/zeroclickinfo-spice,claytonspinner/zeroclickinfo-spice,iambibhas/zeroclickinfo-spice,xaviervalarino/zeroclickinfo-spice,Dwaligon/zeroclickinfo-spice,lw7360/zeroclickinfo-spice,lernae/zeroclickinfo-spice,P71/zeroclickinfo-spice,MoriTanosuke/zeroclickinfo-spice,alexandernext/zeroclickinfo-spice,levaly/zeroclickinfo-spice,GrandpaCardigan/zeroclickinfo-spice,TomBebbington/zeroclickinfo-spice,imwally/zeroclickinfo-spice,MoriTanosuke/zeroclickinfo-spice,lernae/zeroclickinfo-spice,dogomedia/zeroclickinfo-spice,samskeller/zeroclickinfo-spice,marianosimone/zeroclickinfo-spice,tagawa/zeroclickinfo-spice,andrey-p/zeroclickinfo-spice,lerna/zeroclickinfo-spice,rmad17/zeroclickinfo-spice,evejweinberg/zeroclickinfo-spice,Queeniebee/zeroclickinfo-spice,Kr1tya3/zeroclickinfo-spice,levaly/zeroclickinfo-spice,echosa/zeroclickinfo-spice,GrandpaCardigan/zeroclickinfo-spice,rmad17/zeroclickinfo-spice,sevki/zeroclickinfo-spice,samskeller/zeroclickinfo-spice,echosa/zeroclickinfo-spice,andrey-p/zeroclickinfo-spice,whalenrp/zeroclickinfo-spice,dheeraj143/zeroclickinfo-spice,loganom/zeroclickinfo-spice,dogomedia/zeroclickinfo-spice,marianosimone/zeroclickinfo-spice,samskeller/zeroclickinfo-spice,samskeller/zeroclickinfo-spice,ScreapDK/zeroclickinfo-spice,sevki/zeroclickinfo-spice,xaviervalarino/zeroclickinfo-spice,hshackathons/zeroclickinfo-spice,dogomedia/zeroclickinfo-spice,loganom/zeroclickinfo-spice,lerna/zeroclickinfo-spice,gautamkrishnar/zeroclickinfo-spice,lernae/zeroclickinfo-spice,marianosimone/zeroclickinfo-spice,bdjnk/zeroclickinfo-spice,Kr1tya3/zeroclickinfo-spice,toenu23/zeroclickinfo-spice,imwally/zeroclickinfo-spice,Dwaligon/zeroclickinfo-spice,sevki/zeroclickinfo-spice,jyounker/zeroclickinfo-spice,sagarhani/zeroclickinfo-spice,Dwaligon/zeroclickinfo-spice,whalenrp/zeroclickinfo-spice,GrandpaCardigan/zeroclickinfo-spice,Faiz7412/zeroclickinfo-spice,lerna/zeroclickinfo-spice,lerna/zeroclickinfo-spice,brianrisk/zeroclickinfo-spice,stevenmg/zeroclickinfo-spice,navjotahuja92/zeroclickinfo-spice,Retrobottega/zeroclickinfo-spice,deserted/zeroclickinfo-spice,stevenmg/zeroclickinfo-spice,jyounker/zeroclickinfo-spice,Kr1tya3/zeroclickinfo-spice,jyounker/zeroclickinfo-spice,xaviervalarino/zeroclickinfo-spice,mayo/zeroclickinfo-spice,dachinzo/zeroclickinfo-spice,echosa/zeroclickinfo-spice,Kakkoroid/zeroclickinfo-spice,P71/zeroclickinfo-spice,mr-karan/zeroclickinfo-spice,Dwaligon/zeroclickinfo-spice,soleo/zeroclickinfo-spice,shyamalschandra/zeroclickinfo-spice,marianosimone/zeroclickinfo-spice,bdjnk/zeroclickinfo-spice,Retrobottega/zeroclickinfo-spice,imwally/zeroclickinfo-spice,iambibhas/zeroclickinfo-spice,lw7360/zeroclickinfo-spice,dachinzo/zeroclickinfo-spice,echosa/zeroclickinfo-spice,tagawa/zeroclickinfo-spice,iambibhas/zeroclickinfo-spice,soleo/zeroclickinfo-spice,brianrisk/zeroclickinfo-spice,ppant/zeroclickinfo-spice,cylgom/zeroclickinfo-spice,evejweinberg/zeroclickinfo-spice,ppant/zeroclickinfo-spice,mr-karan/zeroclickinfo-spice,sagarhani/zeroclickinfo-spice,rubinovitz/zeroclickinfo-spice,hshackathons/zeroclickinfo-spice,loganom/zeroclickinfo-spice,levaly/zeroclickinfo-spice,shyamalschandra/zeroclickinfo-spice,whalenrp/zeroclickinfo-spice,lernae/zeroclickinfo-spice,mayo/zeroclickinfo-spice,lw7360/zeroclickinfo-spice,rubinovitz/zeroclickinfo-spice,ScreapDK/zeroclickinfo-spice,sagarhani/zeroclickinfo-spice,claytonspinner/zeroclickinfo-spice,cylgom/zeroclickinfo-spice,GrandpaCardigan/zeroclickinfo-spice,imwally/zeroclickinfo-spice,dogomedia/zeroclickinfo-spice,soleo/zeroclickinfo-spice,MoriTanosuke/zeroclickinfo-spice,mayo/zeroclickinfo-spice,cylgom/zeroclickinfo-spice,ColasBroux/zeroclickinfo-spice,ppant/zeroclickinfo-spice,rmad17/zeroclickinfo-spice,whalenrp/zeroclickinfo-spice,timeanddate/zeroclickinfo-spice,Kakkoroid/zeroclickinfo-spice,xaviervalarino/zeroclickinfo-spice,Queeniebee/zeroclickinfo-spice,deserted/zeroclickinfo-spice,soleo/zeroclickinfo-spice,bibliotechy/zeroclickinfo-spice,gautamkrishnar/zeroclickinfo-spice,ppant/zeroclickinfo-spice,toenu23/zeroclickinfo-spice,hshackathons/zeroclickinfo-spice,echosa/zeroclickinfo-spice,Retrobottega/zeroclickinfo-spice,Faiz7412/zeroclickinfo-spice,stevenmg/zeroclickinfo-spice,P71/zeroclickinfo-spice,levaly/zeroclickinfo-spice,AcriCAA/zeroclickinfo-spice,lernae/zeroclickinfo-spice,TomBebbington/zeroclickinfo-spice,bdjnk/zeroclickinfo-spice,soleo/zeroclickinfo-spice,Kakkoroid/zeroclickinfo-spice,stennie/zeroclickinfo-spice,bigcurl/zeroclickinfo-spice,Kakkoroid/zeroclickinfo-spice,AcriCAA/zeroclickinfo-spice,sagarhani/zeroclickinfo-spice,cylgom/zeroclickinfo-spice,dheeraj143/zeroclickinfo-spice,rmad17/zeroclickinfo-spice,brianrisk/zeroclickinfo-spice,rubinovitz/zeroclickinfo-spice,digit4lfa1l/zeroclickinfo-spice,loganom/zeroclickinfo-spice,toenu23/zeroclickinfo-spice,Faiz7412/zeroclickinfo-spice,mayo/zeroclickinfo-spice,andrey-p/zeroclickinfo-spice,claytonspinner/zeroclickinfo-spice,whalenrp/zeroclickinfo-spice,tagawa/zeroclickinfo-spice,dheeraj143/zeroclickinfo-spice,sevki/zeroclickinfo-spice,hshackathons/zeroclickinfo-spice,gautamkrishnar/zeroclickinfo-spice,ScreapDK/zeroclickinfo-spice,stennie/zeroclickinfo-spice,claytonspinner/zeroclickinfo-spice,navjotahuja92/zeroclickinfo-spice,AcriCAA/zeroclickinfo-spice,xaviervalarino/zeroclickinfo-spice,GrandpaCardigan/zeroclickinfo-spice,bibliotechy/zeroclickinfo-spice,iambibhas/zeroclickinfo-spice,Retrobottega/zeroclickinfo-spice,Kr1tya3/zeroclickinfo-spice,AcriCAA/zeroclickinfo-spice,dogomedia/zeroclickinfo-spice,bigcurl/zeroclickinfo-spice,Faiz7412/zeroclickinfo-spice,cylgom/zeroclickinfo-spice,kevintab95/zeroclickinfo-spice,rmad17/zeroclickinfo-spice,lernae/zeroclickinfo-spice,bibliotechy/zeroclickinfo-spice,bigcurl/zeroclickinfo-spice,mohan08p/zeroclickinfo-spice,mohan08p/zeroclickinfo-spice,toenu23/zeroclickinfo-spice,cylgom/zeroclickinfo-spice,evejweinberg/zeroclickinfo-spice,stennie/zeroclickinfo-spice,P71/zeroclickinfo-spice,kevintab95/zeroclickinfo-spice,marianosimone/zeroclickinfo-spice,deserted/zeroclickinfo-spice,sagarhani/zeroclickinfo-spice,alexandernext/zeroclickinfo-spice,MoriTanosuke/zeroclickinfo-spice,kevintab95/zeroclickinfo-spice,shyamalschandra/zeroclickinfo-spice,bigcurl/zeroclickinfo-spice,deserted/zeroclickinfo-spice,andrey-p/zeroclickinfo-spice,lerna/zeroclickinfo-spice,digit4lfa1l/zeroclickinfo-spice,digit4lfa1l/zeroclickinfo-spice,tagawa/zeroclickinfo-spice,Kakkoroid/zeroclickinfo-spice,marianosimone/zeroclickinfo-spice,AcriCAA/zeroclickinfo-spice,timeanddate/zeroclickinfo-spice,shyamalschandra/zeroclickinfo-spice,andrey-p/zeroclickinfo-spice,imwally/zeroclickinfo-spice,timeanddate/zeroclickinfo-spice,gautamkrishnar/zeroclickinfo-spice,mr-karan/zeroclickinfo-spice,Retrobottega/zeroclickinfo-spice,alexandernext/zeroclickinfo-spice,navjotahuja92/zeroclickinfo-spice,ScreapDK/zeroclickinfo-spice,stevenmg/zeroclickinfo-spice,ColasBroux/zeroclickinfo-spice,TomBebbington/zeroclickinfo-spice,brianrisk/zeroclickinfo-spice,levaly/zeroclickinfo-spice,evejweinberg/zeroclickinfo-spice,bdjnk/zeroclickinfo-spice,navjotahuja92/zeroclickinfo-spice,bibliotechy/zeroclickinfo-spice,dheeraj143/zeroclickinfo-spice,Queeniebee/zeroclickinfo-spice,levaly/zeroclickinfo-spice,shyamalschandra/zeroclickinfo-spice,bigcurl/zeroclickinfo-spice,digit4lfa1l/zeroclickinfo-spice,lw7360/zeroclickinfo-spice,dachinzo/zeroclickinfo-spice,MoriTanosuke/zeroclickinfo-spice,kevintab95/zeroclickinfo-spice,kevintab95/zeroclickinfo-spice,mohan08p/zeroclickinfo-spice,whalenrp/zeroclickinfo-spice,deserted/zeroclickinfo-spice,ColasBroux/zeroclickinfo-spice,rubinovitz/zeroclickinfo-spice,TomBebbington/zeroclickinfo-spice,brianrisk/zeroclickinfo-spice,bigcurl/zeroclickinfo-spice,Kr1tya3/zeroclickinfo-spice,ColasBroux/zeroclickinfo-spice,mr-karan/zeroclickinfo-spice,iambibhas/zeroclickinfo-spice,alexandernext/zeroclickinfo-spice,soleo/zeroclickinfo-spice,timeanddate/zeroclickinfo-spice,ScreapDK/zeroclickinfo-spice,Queeniebee/zeroclickinfo-spice
perl
## Code Before: package DDG::Spice::Plos; use DDG::Spice; name 'PLOS Search'; description 'Search research articles of PLOS journals'; primary_example_queries 'plos dinosaurs', 'plos echinoderm evolution'; secondary_example_queries 'plos dinosaurs title:metabolism'; source 'PLOS'; category 'special'; topics 'science'; icon_url 'http://www.plosone.org/images/favicon.ico'; code_url 'https://github.com/duckduckgo/zeroclickinfo-spice/blob/master/lib/DDG/Spice/Plos.pm'; attribution twitter => 'nelas', github => ['nelas', 'Bruno C. Vellutini'], web => ['http://organelas.com/', 'organelas.com']; triggers startend => 'plos'; spice to => 'http://api.plos.org/search?q=$1&rows=10&wt=json' . '&fl=id,title_display,author_display,journal,volume,issue,publication_date' . '&api_key={{ENV{DDG_SPICE_PLOS_APIKEY}}}'; spice wrap_jsonp_callback => 1; handle remainder => sub { return $_ if $_; return; }; 1; ## Instruction: PLOS: Add additional triggers and skip some words. ## Code After: package DDG::Spice::Plos; use DDG::Spice; name 'PLOS Search'; description 'Search research articles of PLOS journals'; primary_example_queries 'plos dinosaurs', 'plos echinoderm evolution'; secondary_example_queries 'plos dinosaurs title:metabolism'; source 'PLOS'; category 'special'; topics 'science'; icon_url 'http://www.plosone.org/images/favicon.ico'; code_url 'https://github.com/duckduckgo/zeroclickinfo-spice/blob/master/lib/DDG/Spice/Plos.pm'; attribution twitter => 'nelas', github => ['nelas', 'Bruno C. Vellutini'], web => ['http://organelas.com/', 'organelas.com']; triggers startend => 'plos', 'plos one', 'plosone', 'public library of science', 'plos journal', 'plos publications'; spice to => 'http://api.plos.org/search?q=$1&rows=10&wt=json' . '&fl=id,title_display,author_display,journal,volume,issue,publication_date' . '&api_key={{ENV{DDG_SPICE_PLOS_APIKEY}}}'; spice wrap_jsonp_callback => 1; # Skip these queries. # We don't want this instant answer to trigger with "plos one api" and the like. my %skip = map {$_ => 1} ('blog', 'blogs', 'website', 'api'); handle remainder => sub { # Only trigger if the remainder does not exist in the skip hash. return $_ if $_ && !exists $skip{lc $_}; return; }; 1;
ffecc092b4d61b499d94920d5760b38b641f35f2
to.etc.domui/src/main/resources/resources/themes/scss/winter/_buttonbar2.scss
to.etc.domui/src/main/resources/resources/themes/scss/winter/_buttonbar2.scss
/*** ButtonBar2 ***/ .ui-bbar2 { } .ui-bbar2-h { display: flex; flex-direction: row; .ui-bbar2-l { flex: 2; } .ui-bbar2-r { flex: 1; } .ui-bbar2-bc { display: inline-block; padding: 5px; } } .ui-bbar2-v { }
/*** ButtonBar2 ***/ .ui-bbar2 { } .ui-bbar2-h { display: flex; flex-direction: row; .ui-bbar2-l { flex: 2; } .ui-bbar2-r { } .ui-bbar2-bc { display: inline-block; padding: 5px; } } .ui-bbar2-v { }
Make right part of ButtonBar2 scale to required size.
Make right part of ButtonBar2 scale to required size.
SCSS
lgpl-2.1
fjalvingh/domui,fjalvingh/domui,fjalvingh/domui,fjalvingh/domui,fjalvingh/domui,fjalvingh/domui,fjalvingh/domui
scss
## Code Before: /*** ButtonBar2 ***/ .ui-bbar2 { } .ui-bbar2-h { display: flex; flex-direction: row; .ui-bbar2-l { flex: 2; } .ui-bbar2-r { flex: 1; } .ui-bbar2-bc { display: inline-block; padding: 5px; } } .ui-bbar2-v { } ## Instruction: Make right part of ButtonBar2 scale to required size. ## Code After: /*** ButtonBar2 ***/ .ui-bbar2 { } .ui-bbar2-h { display: flex; flex-direction: row; .ui-bbar2-l { flex: 2; } .ui-bbar2-r { } .ui-bbar2-bc { display: inline-block; padding: 5px; } } .ui-bbar2-v { }
85a50ad167a655345d75e79ac8b5e50d946aaa0d
source/scss/atoms/_colorway.scss
source/scss/atoms/_colorway.scss
// ========================================================================== // Colorway // ========================================================================== // Import if Google Fonts URL is defined // Functions and Directives //@if variable-exists($font-url--google) { // @import url($font-url--google); //} $main-colors: ("primary", "accent", "grey", "shadow"); @each $color in $main-colors { $color-list: (); @if $color == "primary" { $color-list: $primary-color--list; } @else if $color == "accent" { $color-list: $accent-color--list; } @else if $color == "grey" { $color-list: $greyscale-color--list; } @else { $color-list: $shadow-color--list; } .#{$color}-colors { flex-grow: 2; $i: 0; @while $i < 6 { .#{$color}-#{$i} { height: 100px; width: 100%; background-color: nth($color-list, $i + 1); $i: $i+1; } } } } div.color-scheme { display: flex; }
// ========================================================================== // Colorway // ========================================================================== // Import if Google Fonts URL is defined // Functions and Directives //@if variable-exists($font-url--google) { // @import url($font-url--google); //} $main-colors: ("primary", "accent", "grey", "shadow"); @each $color in $main-colors { $color-list: (); @if $color == "primary" { $color-list: $pe-primary-color-list; } @else if $color == "accent" { $color-list: $pe-accent-color-list; } @else if $color == "grey" { $color-list: $pe-greyscale-color-list; } @else { $color-list: $pe-shadow-color-list; } .#{$color}-colors { flex-grow: 2; $i: 0; @while $i < 6 { .#{$color}-#{$i} { width: 100%; height: 100px; background-color: nth($color-list, $i + 1); $i: $i + 1; } } } } .color-scheme { display: flex; }
Refactor colorway - Fix formatting, variables, and quiet linter
Refactor colorway - Fix formatting, variables, and quiet linter
SCSS
mit
bantonelli/ProEdify-patternlab,bantonelli/ProEdify-patternlab
scss
## Code Before: // ========================================================================== // Colorway // ========================================================================== // Import if Google Fonts URL is defined // Functions and Directives //@if variable-exists($font-url--google) { // @import url($font-url--google); //} $main-colors: ("primary", "accent", "grey", "shadow"); @each $color in $main-colors { $color-list: (); @if $color == "primary" { $color-list: $primary-color--list; } @else if $color == "accent" { $color-list: $accent-color--list; } @else if $color == "grey" { $color-list: $greyscale-color--list; } @else { $color-list: $shadow-color--list; } .#{$color}-colors { flex-grow: 2; $i: 0; @while $i < 6 { .#{$color}-#{$i} { height: 100px; width: 100%; background-color: nth($color-list, $i + 1); $i: $i+1; } } } } div.color-scheme { display: flex; } ## Instruction: Refactor colorway - Fix formatting, variables, and quiet linter ## Code After: // ========================================================================== // Colorway // ========================================================================== // Import if Google Fonts URL is defined // Functions and Directives //@if variable-exists($font-url--google) { // @import url($font-url--google); //} $main-colors: ("primary", "accent", "grey", "shadow"); @each $color in $main-colors { $color-list: (); @if $color == "primary" { $color-list: $pe-primary-color-list; } @else if $color == "accent" { $color-list: $pe-accent-color-list; } @else if $color == "grey" { $color-list: $pe-greyscale-color-list; } @else { $color-list: $pe-shadow-color-list; } .#{$color}-colors { flex-grow: 2; $i: 0; @while $i < 6 { .#{$color}-#{$i} { width: 100%; height: 100px; background-color: nth($color-list, $i + 1); $i: $i + 1; } } } } .color-scheme { display: flex; }
160572e650c98d5d226f64bcb001961680bc38ff
_includes/news.html
_includes/news.html
<div class="dropdown-container"> <ul> <li class="dropdown-parent"> <h1> current <div class="down-triangle"></div> </h1> <div class="dropdown-submenu"> <ul> <li><a href="">older</a></li> </ul> </div> </li> <li><h1><b>news</b></h1></li> </ul> </div> <div class="col-sm-12"> <ul> {% for news in site.posts %} <div class="news-item"> <div class="news-photo col-md-4"> {% if news.image %} <img src="{{site.baseurl}}/img/post-photos/{{news.image}}" alt="news-image"/> {% endif %} </div> <div class="news-text col-md-8"> <li> <h2> <a href="">{{news.title}}</a> <span> | {{ news.date | date: "%B %-d, %Y" }}</span> </h2> <div class="news-content"> {{news.content}} </div> </li> </div> </div> {% endfor %} </ul> </div>
<!-- Page Title --> <div class="dropdown-container"> <ul> <li class="dropdown-parent"> <h1> recent <div class="down-triangle"></div> </h1> <div class="dropdown-submenu"> <ul> <li><a href="">older</a></li> </ul> </div> </li> <li><h1><b>news</b></h1></li> </ul> </div> <!-- News Section --> <div class="col-sm-12"> <ul> {% for news in site.posts %} <div class="news-item"> <div class="news-photo col-md-4"> {% if news.image %} <img src="{{site.baseurl}}/img/post-photos/{{news.image}}" alt="news-image"/> {% endif %} </div> <div class="news-text col-md-8"> <li> <h2> <a href="">{{news.title}}</a> <span> | {{ news.date | date: "%B %-d, %Y" }}</span> </h2> <div class="news-content"> {{news.content}} </div> </li> </div> </div> {% endfor %} </ul> </div>
Change wording in page title
Change wording in page title
HTML
mit
sfuco/sfuco.github.io,sfuco/sfuco-site,sfuco/sfuco-site,sfuco/sfuco.github.io
html
## Code Before: <div class="dropdown-container"> <ul> <li class="dropdown-parent"> <h1> current <div class="down-triangle"></div> </h1> <div class="dropdown-submenu"> <ul> <li><a href="">older</a></li> </ul> </div> </li> <li><h1><b>news</b></h1></li> </ul> </div> <div class="col-sm-12"> <ul> {% for news in site.posts %} <div class="news-item"> <div class="news-photo col-md-4"> {% if news.image %} <img src="{{site.baseurl}}/img/post-photos/{{news.image}}" alt="news-image"/> {% endif %} </div> <div class="news-text col-md-8"> <li> <h2> <a href="">{{news.title}}</a> <span> | {{ news.date | date: "%B %-d, %Y" }}</span> </h2> <div class="news-content"> {{news.content}} </div> </li> </div> </div> {% endfor %} </ul> </div> ## Instruction: Change wording in page title ## Code After: <!-- Page Title --> <div class="dropdown-container"> <ul> <li class="dropdown-parent"> <h1> recent <div class="down-triangle"></div> </h1> <div class="dropdown-submenu"> <ul> <li><a href="">older</a></li> </ul> </div> </li> <li><h1><b>news</b></h1></li> </ul> </div> <!-- News Section --> <div class="col-sm-12"> <ul> {% for news in site.posts %} <div class="news-item"> <div class="news-photo col-md-4"> {% if news.image %} <img src="{{site.baseurl}}/img/post-photos/{{news.image}}" alt="news-image"/> {% endif %} </div> <div class="news-text col-md-8"> <li> <h2> <a href="">{{news.title}}</a> <span> | {{ news.date | date: "%B %-d, %Y" }}</span> </h2> <div class="news-content"> {{news.content}} </div> </li> </div> </div> {% endfor %} </ul> </div>
874ead2ed9de86eea20c4a67ce7b53cb2766c09e
erpnext/patches/v5_0/link_warehouse_with_account.py
erpnext/patches/v5_0/link_warehouse_with_account.py
from __future__ import unicode_literals import frappe def execute(): frappe.db.sql("""update tabAccount set warehouse=master_name where ifnull(account_type, '') = 'Warehouse' and ifnull(master_name, '') != ''""")
from __future__ import unicode_literals import frappe def execute(): if "master_name" in frappe.db.get_table_columns("Account"): frappe.db.sql("""update tabAccount set warehouse=master_name where ifnull(account_type, '') = 'Warehouse' and ifnull(master_name, '') != ''""")
Update warehouse as per master_name if master_name exists
Update warehouse as per master_name if master_name exists
Python
agpl-3.0
indictranstech/fbd_erpnext,gangadharkadam/saloon_erp_install,mbauskar/helpdesk-erpnext,gmarke/erpnext,Tejal011089/paypal_erpnext,Tejal011089/trufil-erpnext,treejames/erpnext,indictranstech/reciphergroup-erpnext,pombredanne/erpnext,gangadharkadam/saloon_erp,gangadharkadam/vlinkerp,hatwar/buyback-erpnext,shft117/SteckerApp,Drooids/erpnext,treejames/erpnext,mbauskar/omnitech-erpnext,susuchina/ERPNEXT,gmarke/erpnext,shft117/SteckerApp,mbauskar/alec_frappe5_erpnext,indictranstech/reciphergroup-erpnext,mbauskar/omnitech-demo-erpnext,Tejal011089/fbd_erpnext,Tejal011089/fbd_erpnext,sheafferusa/erpnext,mbauskar/alec_frappe5_erpnext,fuhongliang/erpnext,geekroot/erpnext,mahabuber/erpnext,hatwar/buyback-erpnext,saurabh6790/test-erp,gangadharkadam/saloon_erp,Tejal011089/osmosis_erpnext,mbauskar/Das_Erpnext,mbauskar/alec_frappe5_erpnext,gangadharkadam/contributionerp,mbauskar/helpdesk-erpnext,meisterkleister/erpnext,indictranstech/fbd_erpnext,SPKian/Testing2,hanselke/erpnext-1,sheafferusa/erpnext,hatwar/Das_erpnext,indictranstech/trufil-erpnext,mbauskar/omnitech-erpnext,anandpdoshi/erpnext,hatwar/buyback-erpnext,Tejal011089/osmosis_erpnext,susuchina/ERPNEXT,gangadharkadam/vlinkerp,mbauskar/helpdesk-erpnext,indictranstech/tele-erpnext,indictranstech/Das_Erpnext,mbauskar/Das_Erpnext,tmimori/erpnext,Aptitudetech/ERPNext,netfirms/erpnext,gangadharkadam/contributionerp,netfirms/erpnext,rohitwaghchaure/GenieManager-erpnext,ShashaQin/erpnext,pombredanne/erpnext,SPKian/Testing,hanselke/erpnext-1,hernad/erpnext,mbauskar/sapphire-erpnext,hernad/erpnext,mahabuber/erpnext,anandpdoshi/erpnext,Tejal011089/osmosis_erpnext,hanselke/erpnext-1,susuchina/ERPNEXT,rohitwaghchaure/erpnext-receipher,indictranstech/reciphergroup-erpnext,MartinEnder/erpnext-de,Tejal011089/huntercamp_erpnext,ThiagoGarciaAlves/erpnext,shft117/SteckerApp,rohitwaghchaure/GenieManager-erpnext,SPKian/Testing2,shitolepriya/test-erp,saurabh6790/test-erp,Drooids/erpnext,njmube/erpnext,pombredanne/erpnext,gsnbng/erpnext,mbauskar/omnitech-erpnext,gangadharkadam/v6_erp,indictranstech/biggift-erpnext,rohitwaghchaure/GenieManager-erpnext,indictranstech/tele-erpnext,ShashaQin/erpnext,gangadharkadam/saloon_erp_install,tmimori/erpnext,Tejal011089/huntercamp_erpnext,Tejal011089/paypal_erpnext,indictranstech/erpnext,njmube/erpnext,mbauskar/Das_Erpnext,ThiagoGarciaAlves/erpnext,hatwar/Das_erpnext,gangadhar-kadam/helpdesk-erpnext,hernad/erpnext,rohitwaghchaure/GenieManager-erpnext,Drooids/erpnext,indictranstech/reciphergroup-erpnext,shitolepriya/test-erp,fuhongliang/erpnext,dieface/erpnext,indictranstech/osmosis-erpnext,gangadharkadam/contributionerp,Tejal011089/huntercamp_erpnext,mahabuber/erpnext,mbauskar/Das_Erpnext,gmarke/erpnext,indictranstech/tele-erpnext,saurabh6790/test-erp,pombredanne/erpnext,Suninus/erpnext,ShashaQin/erpnext,sheafferusa/erpnext,treejames/erpnext,SPKian/Testing,fuhongliang/erpnext,indictranstech/fbd_erpnext,mahabuber/erpnext,gangadharkadam/saloon_erp_install,MartinEnder/erpnext-de,Suninus/erpnext,ThiagoGarciaAlves/erpnext,Tejal011089/trufil-erpnext,MartinEnder/erpnext-de,Suninus/erpnext,indictranstech/erpnext,rohitwaghchaure/erpnext-receipher,mbauskar/helpdesk-erpnext,indictranstech/biggift-erpnext,indictranstech/Das_Erpnext,gangadharkadam/v6_erp,gmarke/erpnext,gsnbng/erpnext,sagar30051991/ozsmart-erp,indictranstech/erpnext,geekroot/erpnext,susuchina/ERPNEXT,netfirms/erpnext,dieface/erpnext,SPKian/Testing,indictranstech/fbd_erpnext,treejames/erpnext,tmimori/erpnext,gangadharkadam/saloon_erp,indictranstech/tele-erpnext,hatwar/Das_erpnext,aruizramon/alec_erpnext,mbauskar/sapphire-erpnext,ThiagoGarciaAlves/erpnext,mbauskar/omnitech-erpnext,Tejal011089/osmosis_erpnext,Tejal011089/huntercamp_erpnext,indictranstech/osmosis-erpnext,fuhongliang/erpnext,gangadharkadam/v6_erp,gangadharkadam/vlinkerp,aruizramon/alec_erpnext,indictranstech/osmosis-erpnext,SPKian/Testing,sheafferusa/erpnext,gangadhar-kadam/helpdesk-erpnext,Tejal011089/trufil-erpnext,indictranstech/trufil-erpnext,anandpdoshi/erpnext,indictranstech/Das_Erpnext,gangadhar-kadam/helpdesk-erpnext,netfirms/erpnext,mbauskar/sapphire-erpnext,gangadharkadam/saloon_erp_install,dieface/erpnext,aruizramon/alec_erpnext,shft117/SteckerApp,sagar30051991/ozsmart-erp,gangadharkadam/vlinkerp,saurabh6790/test-erp,Drooids/erpnext,indictranstech/biggift-erpnext,SPKian/Testing2,Suninus/erpnext,gsnbng/erpnext,indictranstech/trufil-erpnext,mbauskar/sapphire-erpnext,Tejal011089/fbd_erpnext,ShashaQin/erpnext,shitolepriya/test-erp,njmube/erpnext,MartinEnder/erpnext-de,Tejal011089/paypal_erpnext,aruizramon/alec_erpnext,tmimori/erpnext,Tejal011089/fbd_erpnext,indictranstech/trufil-erpnext,mbauskar/omnitech-demo-erpnext,gangadhar-kadam/helpdesk-erpnext,sagar30051991/ozsmart-erp,indictranstech/Das_Erpnext,hatwar/buyback-erpnext,anandpdoshi/erpnext,indictranstech/osmosis-erpnext,rohitwaghchaure/erpnext-receipher,meisterkleister/erpnext,hanselke/erpnext-1,gangadharkadam/saloon_erp,sagar30051991/ozsmart-erp,mbauskar/alec_frappe5_erpnext,SPKian/Testing2,mbauskar/omnitech-demo-erpnext,geekroot/erpnext,njmube/erpnext,meisterkleister/erpnext,hatwar/Das_erpnext,hernad/erpnext,indictranstech/erpnext,gsnbng/erpnext,gangadharkadam/contributionerp,indictranstech/biggift-erpnext,meisterkleister/erpnext,gangadharkadam/v6_erp,shitolepriya/test-erp,geekroot/erpnext,Tejal011089/paypal_erpnext,dieface/erpnext,mbauskar/omnitech-demo-erpnext,Tejal011089/trufil-erpnext,rohitwaghchaure/erpnext-receipher
python
## Code Before: from __future__ import unicode_literals import frappe def execute(): frappe.db.sql("""update tabAccount set warehouse=master_name where ifnull(account_type, '') = 'Warehouse' and ifnull(master_name, '') != ''""") ## Instruction: Update warehouse as per master_name if master_name exists ## Code After: from __future__ import unicode_literals import frappe def execute(): if "master_name" in frappe.db.get_table_columns("Account"): frappe.db.sql("""update tabAccount set warehouse=master_name where ifnull(account_type, '') = 'Warehouse' and ifnull(master_name, '') != ''""")
678ce29e6a5633f11e0e155790d79623031ad5a2
service.sh
service.sh
. /etc/service.subr prog_dir=`dirname \`realpath $0\`` name=`basename $prog_dir` version="1.0" export pidfile=$prog_dir/$name.pid export logfile=$prog_dir/$name.log . $prog_dir/config.source start() { $prog_dir/tunnel.sh & } kill_ssh() { sshpid=`ps -w | grep "ssh .*:$local_port $remote_server" | grep -v grep | awk '{print $1}'` if [ -n "$sshpid" ] ; then echo "Killing $sshpid" kill $sshpid fi } case "$1" in start) start_service ;; stop) stop_service kill_ssh ;; restart) stop_service kill_ssh sleep 3 start_service ;; status) status ;; *) echo "Usage: $0 [start|stop|restart|status]" exit 1 ;; esac
. /etc/service.subr prog_dir=`dirname \`realpath $0\`` name=`basename $prog_dir` version="1.0" export pidfile=$prog_dir/$name.pid export logfile=$prog_dir/$name.log . $prog_dir/config.source start() { start-stop-daemon -S \ -p $pidfile -m \ -b \ -v \ -x /mnt/DroboFS/Shares/DroboApps/openssh/bin/ssh -- \ -vvvv -C -nNT -R $remote_port:localhost:$local_port $remote_server } case "$1" in start) start_service ;; stop) stop_service ;; restart) stop_service sleep 3 start_service ;; status) status ;; *) echo "Usage: $0 [start|stop|restart|status]" exit 1 ;; esac
Use start-stop-daemon to start ssh
Use start-stop-daemon to start ssh
Shell
mit
tkanemoto/drobofs-reverse-sshfs-service
shell
## Code Before: . /etc/service.subr prog_dir=`dirname \`realpath $0\`` name=`basename $prog_dir` version="1.0" export pidfile=$prog_dir/$name.pid export logfile=$prog_dir/$name.log . $prog_dir/config.source start() { $prog_dir/tunnel.sh & } kill_ssh() { sshpid=`ps -w | grep "ssh .*:$local_port $remote_server" | grep -v grep | awk '{print $1}'` if [ -n "$sshpid" ] ; then echo "Killing $sshpid" kill $sshpid fi } case "$1" in start) start_service ;; stop) stop_service kill_ssh ;; restart) stop_service kill_ssh sleep 3 start_service ;; status) status ;; *) echo "Usage: $0 [start|stop|restart|status]" exit 1 ;; esac ## Instruction: Use start-stop-daemon to start ssh ## Code After: . /etc/service.subr prog_dir=`dirname \`realpath $0\`` name=`basename $prog_dir` version="1.0" export pidfile=$prog_dir/$name.pid export logfile=$prog_dir/$name.log . $prog_dir/config.source start() { start-stop-daemon -S \ -p $pidfile -m \ -b \ -v \ -x /mnt/DroboFS/Shares/DroboApps/openssh/bin/ssh -- \ -vvvv -C -nNT -R $remote_port:localhost:$local_port $remote_server } case "$1" in start) start_service ;; stop) stop_service ;; restart) stop_service sleep 3 start_service ;; status) status ;; *) echo "Usage: $0 [start|stop|restart|status]" exit 1 ;; esac
a40b5278525ebf77799760f29aaa2dcaccffec6d
package.json
package.json
{ "name": "eslint-config-civicsource", "description": "Shareable ESLint configuration to be used in CivicSource client applications", "main": "index.js", "version": "0.0.0", "repository": { "type": "git", "url": "https://github.com/civicsource/eslint-config-civicsource.git" }, "author": "Archon Information Systems", "license": "MIT", "keywords": [ "eslint", "eslintconfig", "civicsource" ], "peerDependencies": { "eslint": "5.x", "prettier": "1.x" }, "dependencies": { "babel-eslint": "10.x", "eslint-plugin-filenames": "1.x", "eslint-plugin-flowtype": "2.x", "eslint-plugin-import": "2.x", "eslint-plugin-jsx-a11y": "6.x", "eslint-plugin-mocha": "5.x", "eslint-plugin-prettier": "3.x", "eslint-plugin-react": "7.x", "eslint-plugin-react-functional-set-state": "1.x" } }
{ "name": "eslint-config-civicsource", "description": "Shareable ESLint configuration to be used in CivicSource client applications", "main": "index.js", "version": "0.0.0", "repository": { "type": "git", "url": "https://github.com/civicsource/eslint-config-civicsource.git" }, "author": "Archon Information Systems", "license": "MIT", "keywords": [ "eslint", "eslintconfig", "civicsource" ], "peerDependencies": { "eslint": "5.x" }, "devDependencies": { "prettier": "1.x" }, "dependencies": { "babel-eslint": "10.x", "eslint-plugin-filenames": "1.x", "eslint-plugin-flowtype": "2.x", "eslint-plugin-import": "2.x", "eslint-plugin-jsx-a11y": "6.x", "eslint-plugin-mocha": "5.x", "eslint-plugin-prettier": "3.x", "eslint-plugin-react": "7.x", "eslint-plugin-react-functional-set-state": "1.x" } }
Make prettier a devDependency not a peerDep
Make prettier a devDependency not a peerDep
JSON
mit
civicsource/eslint-config-civicsource
json
## Code Before: { "name": "eslint-config-civicsource", "description": "Shareable ESLint configuration to be used in CivicSource client applications", "main": "index.js", "version": "0.0.0", "repository": { "type": "git", "url": "https://github.com/civicsource/eslint-config-civicsource.git" }, "author": "Archon Information Systems", "license": "MIT", "keywords": [ "eslint", "eslintconfig", "civicsource" ], "peerDependencies": { "eslint": "5.x", "prettier": "1.x" }, "dependencies": { "babel-eslint": "10.x", "eslint-plugin-filenames": "1.x", "eslint-plugin-flowtype": "2.x", "eslint-plugin-import": "2.x", "eslint-plugin-jsx-a11y": "6.x", "eslint-plugin-mocha": "5.x", "eslint-plugin-prettier": "3.x", "eslint-plugin-react": "7.x", "eslint-plugin-react-functional-set-state": "1.x" } } ## Instruction: Make prettier a devDependency not a peerDep ## Code After: { "name": "eslint-config-civicsource", "description": "Shareable ESLint configuration to be used in CivicSource client applications", "main": "index.js", "version": "0.0.0", "repository": { "type": "git", "url": "https://github.com/civicsource/eslint-config-civicsource.git" }, "author": "Archon Information Systems", "license": "MIT", "keywords": [ "eslint", "eslintconfig", "civicsource" ], "peerDependencies": { "eslint": "5.x" }, "devDependencies": { "prettier": "1.x" }, "dependencies": { "babel-eslint": "10.x", "eslint-plugin-filenames": "1.x", "eslint-plugin-flowtype": "2.x", "eslint-plugin-import": "2.x", "eslint-plugin-jsx-a11y": "6.x", "eslint-plugin-mocha": "5.x", "eslint-plugin-prettier": "3.x", "eslint-plugin-react": "7.x", "eslint-plugin-react-functional-set-state": "1.x" } }
0cee8e7c53e6df73144130e0a3b21510f77453b9
lib/controllers/frontend/spree/users_controller.rb
lib/controllers/frontend/spree/users_controller.rb
class Spree::UsersController < Spree::StoreController skip_before_action :set_current_order, only: :show prepend_before_action :load_object, only: [:show, :edit, :update] prepend_before_action :authorize_actions, only: :new include Spree::Core::ControllerHelpers def show @orders = @user.orders.complete.order('completed_at desc') end def create @user = Spree::User.new(user_params) if @user.save if current_order session[:guest_token] = nil end redirect_back_or_default(root_url) else render :new end end def update if @user.update_attributes(user_params) if params[:user][:password].present? # this logic needed b/c devise wants to log us out after password changes unless Spree::Auth::Config[:signout_after_password_change] bypass_sign_in(@user) end end redirect_to spree.account_url, notice: Spree.t(:account_updated) else render :edit end end private def user_params params.require(:user).permit(Spree::PermittedAttributes.user_attributes | [:email]) end def load_object @user ||= spree_current_user authorize! params[:action].to_sym, @user end def authorize_actions authorize! params[:action].to_sym, Spree::User.new end def accurate_title Spree.t(:my_account) end end
class Spree::UsersController < Spree::StoreController skip_before_action :set_current_order, only: :show, raise: false prepend_before_action :load_object, only: [:show, :edit, :update] prepend_before_action :authorize_actions, only: :new include Spree::Core::ControllerHelpers def show @orders = @user.orders.complete.order('completed_at desc') end def create @user = Spree::User.new(user_params) if @user.save if current_order session[:guest_token] = nil end redirect_back_or_default(root_url) else render :new end end def update if @user.update_attributes(user_params) if params[:user][:password].present? # this logic needed b/c devise wants to log us out after password changes unless Spree::Auth::Config[:signout_after_password_change] bypass_sign_in(@user) end end redirect_to spree.account_url, notice: Spree.t(:account_updated) else render :edit end end private def user_params params.require(:user).permit(Spree::PermittedAttributes.user_attributes | [:email]) end def load_object @user ||= spree_current_user authorize! params[:action].to_sym, @user end def authorize_actions authorize! params[:action].to_sym, Spree::User.new end def accurate_title Spree.t(:my_account) end end
Stop raising exception for undefined callback
Stop raising exception for undefined callback The specs against Solidus master are failing because `set_current_order` is not defined as a process_action callback. This used to be the case but Solidus has removed this and slated it for v2.4. For compatibility with older versions of Solidus, we should not raise an ArgumentError if this callback is not defined but still skip it if it is. PR removing this callback: https://github.com/solidusio/solidus/pull/2185
Ruby
bsd-3-clause
solidusio/solidus_auth_devise,solidusio/solidus_auth_devise,solidusio/solidus_auth_devise
ruby
## Code Before: class Spree::UsersController < Spree::StoreController skip_before_action :set_current_order, only: :show prepend_before_action :load_object, only: [:show, :edit, :update] prepend_before_action :authorize_actions, only: :new include Spree::Core::ControllerHelpers def show @orders = @user.orders.complete.order('completed_at desc') end def create @user = Spree::User.new(user_params) if @user.save if current_order session[:guest_token] = nil end redirect_back_or_default(root_url) else render :new end end def update if @user.update_attributes(user_params) if params[:user][:password].present? # this logic needed b/c devise wants to log us out after password changes unless Spree::Auth::Config[:signout_after_password_change] bypass_sign_in(@user) end end redirect_to spree.account_url, notice: Spree.t(:account_updated) else render :edit end end private def user_params params.require(:user).permit(Spree::PermittedAttributes.user_attributes | [:email]) end def load_object @user ||= spree_current_user authorize! params[:action].to_sym, @user end def authorize_actions authorize! params[:action].to_sym, Spree::User.new end def accurate_title Spree.t(:my_account) end end ## Instruction: Stop raising exception for undefined callback The specs against Solidus master are failing because `set_current_order` is not defined as a process_action callback. This used to be the case but Solidus has removed this and slated it for v2.4. For compatibility with older versions of Solidus, we should not raise an ArgumentError if this callback is not defined but still skip it if it is. PR removing this callback: https://github.com/solidusio/solidus/pull/2185 ## Code After: class Spree::UsersController < Spree::StoreController skip_before_action :set_current_order, only: :show, raise: false prepend_before_action :load_object, only: [:show, :edit, :update] prepend_before_action :authorize_actions, only: :new include Spree::Core::ControllerHelpers def show @orders = @user.orders.complete.order('completed_at desc') end def create @user = Spree::User.new(user_params) if @user.save if current_order session[:guest_token] = nil end redirect_back_or_default(root_url) else render :new end end def update if @user.update_attributes(user_params) if params[:user][:password].present? # this logic needed b/c devise wants to log us out after password changes unless Spree::Auth::Config[:signout_after_password_change] bypass_sign_in(@user) end end redirect_to spree.account_url, notice: Spree.t(:account_updated) else render :edit end end private def user_params params.require(:user).permit(Spree::PermittedAttributes.user_attributes | [:email]) end def load_object @user ||= spree_current_user authorize! params[:action].to_sym, @user end def authorize_actions authorize! params[:action].to_sym, Spree::User.new end def accurate_title Spree.t(:my_account) end end
51ec83894435127c2843453a00fb5c581cc08a79
app/assets/javascripts/controllers/about_controller.js
app/assets/javascripts/controllers/about_controller.js
(function(App) { 'use strict'; App.Controller = App.Controller || {}; App.Controller.About = App.Controller.Page.extend({ index: function() { new App.View.Anchors({}); new App.View.StaffCategories(); if(this.isScreen_s) { this.initSliders(); } else { _.each($('.masonry-layout'), function(element) { if($('.masonry-layout').find('.masonry-column').length === 0) { new App.View.Masonry({ el: element }); } }); } }, initSliders: function() { _.each($('.js_slider'), function(element) { if($(element).find(".js_slide").length > 0) { lory(element, { enableMouseEvents: true }); } }); } }); })(this.App);
(function(App) { 'use strict'; App.Controller = App.Controller || {}; App.Controller.About = App.Controller.Page.extend({ index: function() { new App.View.Anchors({}); new App.View.StaffCategories(); if(this.isScreen_s) { this.initSliders(); } else { _.each($('.masonry-layout'), function(element) { if($(element).find('.masonry-column').length === 0) { new App.View.Masonry({ el: element }); } }); } }, initSliders: function() { _.each($('.js_slider'), function(element) { if($(element).find(".js_slide").length > 0) { lory(element, { enableMouseEvents: true }); } }); } }); })(this.App);
Fix masonry bulk loader in the about page
Fix masonry bulk loader in the about page
JavaScript
mit
Vizzuality/grid-arendal,Vizzuality/grid-arendal,Vizzuality/grid-arendal
javascript
## Code Before: (function(App) { 'use strict'; App.Controller = App.Controller || {}; App.Controller.About = App.Controller.Page.extend({ index: function() { new App.View.Anchors({}); new App.View.StaffCategories(); if(this.isScreen_s) { this.initSliders(); } else { _.each($('.masonry-layout'), function(element) { if($('.masonry-layout').find('.masonry-column').length === 0) { new App.View.Masonry({ el: element }); } }); } }, initSliders: function() { _.each($('.js_slider'), function(element) { if($(element).find(".js_slide").length > 0) { lory(element, { enableMouseEvents: true }); } }); } }); })(this.App); ## Instruction: Fix masonry bulk loader in the about page ## Code After: (function(App) { 'use strict'; App.Controller = App.Controller || {}; App.Controller.About = App.Controller.Page.extend({ index: function() { new App.View.Anchors({}); new App.View.StaffCategories(); if(this.isScreen_s) { this.initSliders(); } else { _.each($('.masonry-layout'), function(element) { if($(element).find('.masonry-column').length === 0) { new App.View.Masonry({ el: element }); } }); } }, initSliders: function() { _.each($('.js_slider'), function(element) { if($(element).find(".js_slide").length > 0) { lory(element, { enableMouseEvents: true }); } }); } }); })(this.App);
97cf5df2c9966e67a7e04e878864d7e9fe621641
spec/listen/turnstile_spec.rb
spec/listen/turnstile_spec.rb
require 'spec_helper' def run_in_two_threads(proc1, proc2) t1 = Thread.new &proc1 sleep test_latency # t1 must run before t2 t2 = Thread.new { proc2.call; Thread.kill t1 } t2.join(test_latency * 2) ensure Thread.kill t1 if t1 Thread.kill t2 if t2 end describe Listen::Turnstile do describe '#wait' do context 'without a signal' do it 'blocks one thread indefinitely' do called = false run_in_two_threads lambda { subject.wait called = true }, lambda { sleep test_latency } called.should be_false end end context 'with a signal' do it 'blocks one thread until it recieves a signal from another thread' do called = false run_in_two_threads lambda { subject.wait called = true }, lambda { subject.signal sleep test_latency } called.should be_true end end end describe '#signal' do context 'without a wait-call before' do it 'does nothing' do called = false run_in_two_threads lambda { subject.signal called = true }, lambda { sleep test_latency } called.should be_true end end end end
require 'spec_helper' def run_in_two_threads(proc1, proc2) t1 = Thread.new &proc1 sleep test_latency # t1 must run before t2 t2 = Thread.new { proc2.call; Thread.kill t1 } t2.join(test_latency * 2) ensure Thread.kill t1 if t1 Thread.kill t2 if t2 end describe Listen::Turnstile do before { @called = false } describe '#wait' do context 'without a signal' do it 'blocks one thread indefinitely' do run_in_two_threads lambda { subject.wait @called = true }, lambda { sleep test_latency } @called.should be_false end end context 'with a signal' do it 'blocks one thread until it recieves a signal from another thread' do run_in_two_threads lambda { subject.wait @called = true }, lambda { subject.signal sleep test_latency } @called.should be_true end end end describe '#signal' do context 'without a wait-call before' do it 'does nothing' do run_in_two_threads lambda { subject.signal @called = true }, lambda { sleep test_latency } @called.should be_true end end end end
Fix turnstile specs on 1.8.7 and ree
Fix turnstile specs on 1.8.7 and ree
Ruby
mit
mbildner/listen,wjordan/listen,angelabier1/listen,strzibny/listen,guard/listen
ruby
## Code Before: require 'spec_helper' def run_in_two_threads(proc1, proc2) t1 = Thread.new &proc1 sleep test_latency # t1 must run before t2 t2 = Thread.new { proc2.call; Thread.kill t1 } t2.join(test_latency * 2) ensure Thread.kill t1 if t1 Thread.kill t2 if t2 end describe Listen::Turnstile do describe '#wait' do context 'without a signal' do it 'blocks one thread indefinitely' do called = false run_in_two_threads lambda { subject.wait called = true }, lambda { sleep test_latency } called.should be_false end end context 'with a signal' do it 'blocks one thread until it recieves a signal from another thread' do called = false run_in_two_threads lambda { subject.wait called = true }, lambda { subject.signal sleep test_latency } called.should be_true end end end describe '#signal' do context 'without a wait-call before' do it 'does nothing' do called = false run_in_two_threads lambda { subject.signal called = true }, lambda { sleep test_latency } called.should be_true end end end end ## Instruction: Fix turnstile specs on 1.8.7 and ree ## Code After: require 'spec_helper' def run_in_two_threads(proc1, proc2) t1 = Thread.new &proc1 sleep test_latency # t1 must run before t2 t2 = Thread.new { proc2.call; Thread.kill t1 } t2.join(test_latency * 2) ensure Thread.kill t1 if t1 Thread.kill t2 if t2 end describe Listen::Turnstile do before { @called = false } describe '#wait' do context 'without a signal' do it 'blocks one thread indefinitely' do run_in_two_threads lambda { subject.wait @called = true }, lambda { sleep test_latency } @called.should be_false end end context 'with a signal' do it 'blocks one thread until it recieves a signal from another thread' do run_in_two_threads lambda { subject.wait @called = true }, lambda { subject.signal sleep test_latency } @called.should be_true end end end describe '#signal' do context 'without a wait-call before' do it 'does nothing' do run_in_two_threads lambda { subject.signal @called = true }, lambda { sleep test_latency } @called.should be_true end end end end
c64f8e1428855d9523e86d94542a7e9224602c0b
.swiftlint.yml
.swiftlint.yml
whitelist_rules: - trailing_newline - trailing_whitespace # Paths to include during linting. included: - ../VimeoNetworking/Sources # Paths to exclude during linting. excluded: - Pods # Configurable rules can be customized from this configuration file, # binary rules can set their severity level. trailing_whitespace: ignores_empty_lines: true
whitelist_rules: - trailing_newline - trailing_whitespace - opening_brace # Paths to include during linting. included: - ../VimeoNetworking/Sources # Paths to exclude during linting. excluded: - Pods # Configurable rules can be customized from this configuration file, # binary rules can set their severity level. trailing_whitespace: ignores_empty_lines: true
Add opening_brace rule to SwiftLint
Add opening_brace rule to SwiftLint
YAML
mit
vimeo/VimeoNetworking,vimeo/VimeoNetworking
yaml
## Code Before: whitelist_rules: - trailing_newline - trailing_whitespace # Paths to include during linting. included: - ../VimeoNetworking/Sources # Paths to exclude during linting. excluded: - Pods # Configurable rules can be customized from this configuration file, # binary rules can set their severity level. trailing_whitespace: ignores_empty_lines: true ## Instruction: Add opening_brace rule to SwiftLint ## Code After: whitelist_rules: - trailing_newline - trailing_whitespace - opening_brace # Paths to include during linting. included: - ../VimeoNetworking/Sources # Paths to exclude during linting. excluded: - Pods # Configurable rules can be customized from this configuration file, # binary rules can set their severity level. trailing_whitespace: ignores_empty_lines: true
5dd81b09db46927cb7710b21ab682a6c3ecc182e
esios/__init__.py
esios/__init__.py
try: VERSION = __import__('pkg_resources') \ .get_distribution(__name__).version except Exception as e: VERSION = 'unknown' from .service import Esios
from __future__ import absolute_import try: VERSION = __import__('pkg_resources') \ .get_distribution(__name__).version except Exception as e: VERSION = 'unknown' from .service import Esios
Enforce absolute imports through __future__
Enforce absolute imports through __future__
Python
mit
gisce/esios
python
## Code Before: try: VERSION = __import__('pkg_resources') \ .get_distribution(__name__).version except Exception as e: VERSION = 'unknown' from .service import Esios ## Instruction: Enforce absolute imports through __future__ ## Code After: from __future__ import absolute_import try: VERSION = __import__('pkg_resources') \ .get_distribution(__name__).version except Exception as e: VERSION = 'unknown' from .service import Esios
a4238623d5b5a98eda6b18cf3b8b4e1d7c9240a8
circle.yml
circle.yml
machine: pre: - sudo add-apt-repository -y ppa:fkrull/deadsnakes - sudo apt-get update - sudo apt-get install libxml2-dev libxslt-dev python3.5 python3.5-dev - git -C .pyenv/ pull test: override: - tox
test: override: - pyenv global 2.7.11 3.5.1 - tox
Test using Circle's Ubuntu 14.04 image
Test using Circle's Ubuntu 14.04 image
YAML
mit
elasticsales/quotequail,closeio/quotequail,closeio/quotequail
yaml
## Code Before: machine: pre: - sudo add-apt-repository -y ppa:fkrull/deadsnakes - sudo apt-get update - sudo apt-get install libxml2-dev libxslt-dev python3.5 python3.5-dev - git -C .pyenv/ pull test: override: - tox ## Instruction: Test using Circle's Ubuntu 14.04 image ## Code After: test: override: - pyenv global 2.7.11 3.5.1 - tox
cfa49fd5c050fe9ba36b22903a4497834f79c0d6
README.md
README.md
.Net Library to access the Authy API
.Net Library to access the Authy API ## Configuration instructions ### 1. Install mercurial Type the following command in the terminal: $ brew install mercurial ### 2. Download and install Mono MDK From this link: [http://www.mono-project.com/download/] (http://www.mono-project.com/download/) 3. Download and install the Xamarin IDE From this link: [http://www.monodevelop.com/download/] (http://www.monodevelop.com/download/) 4. Import the project in Xamarin Studio Open -> Authy.Net.sln
Add instructions to configure the project in Xamarin (MonoDevelop IDE)
Add instructions to configure the project in Xamarin (MonoDevelop IDE)
Markdown
mit
authy/authy.net
markdown
## Code Before: .Net Library to access the Authy API ## Instruction: Add instructions to configure the project in Xamarin (MonoDevelop IDE) ## Code After: .Net Library to access the Authy API ## Configuration instructions ### 1. Install mercurial Type the following command in the terminal: $ brew install mercurial ### 2. Download and install Mono MDK From this link: [http://www.mono-project.com/download/] (http://www.mono-project.com/download/) 3. Download and install the Xamarin IDE From this link: [http://www.monodevelop.com/download/] (http://www.monodevelop.com/download/) 4. Import the project in Xamarin Studio Open -> Authy.Net.sln
ccb611cd1c328f2411f7591c943ec1760831eb70
.travis.yml
.travis.yml
language: node_js node_js: - 4 - node before_install: - if [[ $(npm --version) == 1* ]]; then npm install -g npm@latest-2; fi after_success: - if [[ $(node --version) == v4* ]]; then npm run test:coverage; fi
language: node_js node_js: - 4 - node after_success: - if [[ $(node --version) == v4* ]]; then npm run test:coverage; fi
Remove unnecessary npm 1.x upgrade check
Remove unnecessary npm 1.x upgrade check
YAML
mit
maxdavidson/rollup-plugin-sourcemaps,maxdavidson/rollup-plugin-sourcemaps
yaml
## Code Before: language: node_js node_js: - 4 - node before_install: - if [[ $(npm --version) == 1* ]]; then npm install -g npm@latest-2; fi after_success: - if [[ $(node --version) == v4* ]]; then npm run test:coverage; fi ## Instruction: Remove unnecessary npm 1.x upgrade check ## Code After: language: node_js node_js: - 4 - node after_success: - if [[ $(node --version) == v4* ]]; then npm run test:coverage; fi
49c652b034e8f2c9238282c67e0c3394e6165382
public/javascripts/pages/index.js
public/javascripts/pages/index.js
function proceedSignin() { 'use strict'; event.preventDefault(); var emailField = document.getElementById('email'), passwordField = document.getElementById('password'); var user = { username: emailField.value, password: passwordField.value } var xhr = new XMLHttpRequest(); xhr.onreadystatechange = function () { if (xhr.readyState === 4) { if (this.status === 200) { window.location = '/rooms'; } if (this.status === 401) { document.getElementById('signin-message').innerHTML = 'Le mot de passe ou le pseudonyme est incorrect. <br /> Avez-vous confirmé votre inscription ?'; } } }; xhr.open('POST', '/signin', true); xhr.setRequestHeader('content-type', 'application/json; charset=utf-8'); xhr.send(JSON.stringify(user)); } document.addEventListener('DOMContentLoaded', function () { 'use strict'; var signinSubmit = document.getElementById('signin-submit'); signinSubmit.addEventListener('click', proceedSignin, false); }, false);
function proceedSignin() { 'use strict'; event.preventDefault(); var emailField = document.getElementById('email'), passwordField = document.getElementById('password'); var user = { username: emailField.value, password: passwordField.value } var xhr = new XMLHttpRequest(); xhr.onreadystatechange = function () { if (xhr.readyState === 4) { if (this.status === 200) { window.location = '/rooms'; } if (this.status === 401) { document.getElementById('signin-message').innerHTML = 'Le mot de passe ou le pseudonyme est incorrect. <br /> Avez-vous confirmé votre inscription ?'; } } }; xhr.open('POST', '/signin', true); xhr.setRequestHeader('content-type', 'application/json; charset=utf-8'); xhr.setRequestHeader('x-requested-with', 'XMLHttpRequest'); xhr.send(JSON.stringify(user)); } document.addEventListener('DOMContentLoaded', function () { 'use strict'; var signinSubmit = document.getElementById('signin-submit'); signinSubmit.addEventListener('click', proceedSignin, false); }, false);
Add parameters to /signin (POST) request header
Add parameters to /signin (POST) request header
JavaScript
mit
sea-battle/sea-battle,sea-battle/sea-battle
javascript
## Code Before: function proceedSignin() { 'use strict'; event.preventDefault(); var emailField = document.getElementById('email'), passwordField = document.getElementById('password'); var user = { username: emailField.value, password: passwordField.value } var xhr = new XMLHttpRequest(); xhr.onreadystatechange = function () { if (xhr.readyState === 4) { if (this.status === 200) { window.location = '/rooms'; } if (this.status === 401) { document.getElementById('signin-message').innerHTML = 'Le mot de passe ou le pseudonyme est incorrect. <br /> Avez-vous confirmé votre inscription ?'; } } }; xhr.open('POST', '/signin', true); xhr.setRequestHeader('content-type', 'application/json; charset=utf-8'); xhr.send(JSON.stringify(user)); } document.addEventListener('DOMContentLoaded', function () { 'use strict'; var signinSubmit = document.getElementById('signin-submit'); signinSubmit.addEventListener('click', proceedSignin, false); }, false); ## Instruction: Add parameters to /signin (POST) request header ## Code After: function proceedSignin() { 'use strict'; event.preventDefault(); var emailField = document.getElementById('email'), passwordField = document.getElementById('password'); var user = { username: emailField.value, password: passwordField.value } var xhr = new XMLHttpRequest(); xhr.onreadystatechange = function () { if (xhr.readyState === 4) { if (this.status === 200) { window.location = '/rooms'; } if (this.status === 401) { document.getElementById('signin-message').innerHTML = 'Le mot de passe ou le pseudonyme est incorrect. <br /> Avez-vous confirmé votre inscription ?'; } } }; xhr.open('POST', '/signin', true); xhr.setRequestHeader('content-type', 'application/json; charset=utf-8'); xhr.setRequestHeader('x-requested-with', 'XMLHttpRequest'); xhr.send(JSON.stringify(user)); } document.addEventListener('DOMContentLoaded', function () { 'use strict'; var signinSubmit = document.getElementById('signin-submit'); signinSubmit.addEventListener('click', proceedSignin, false); }, false);
8eb6b437a70a885adf57023c5da3f0b2448fd581
app/views/projects/_project.html.erb
app/views/projects/_project.html.erb
<div class='project' style="border-color: <%= project.color %>;"> <h5> <%= link_to project.name, project_path(project.to_param) %> <small><%= project.latest_version %></small> </h5> <div class=""> <%= truncate project.description, :length => 100 %> </div> <small> <%= link_to project.platform, platform_path(project.platform.downcase) %> - <% if project.language.present? && project.language != project.platform %> <%= link_to project.language, language_path(project.language) %> - <% end %> <% if project.normalized_licenses.present? %> <%= linked_licenses project.normalized_licenses %> - <% end %> <% if project.updated_at > project.created_at + 1.minute %> Updated <%= time_ago_in_words project.updated_at %> ago <% else %> Published <%= time_ago_in_words project.created_at %> ago <% end %> <% if project.stars > 0 %> - <%= number_with_delimiter project.stars %> stars <% end %> </small> </div>
<div class='project' style="border-color: <%= project.color %>;"> <h5> <%= link_to project.name, project_path(project.to_param) %> <small><%= project.latest_version %></small> </h5> <div class=""> <%= truncate project.description, :length => 100 %> </div> <small> <%= link_to project.platform, platform_path(project.platform.downcase) %> - <% if project.language.present? && project.language != project.platform %> <%= link_to project.language, language_path(project.language) %> - <% end %> <% if project.normalized_licenses.present? %> <%= linked_licenses project.normalized_licenses %> - <% end %> <% if project.versions_count > 1 %> Updated <%= time_ago_in_words project.updated_at %> ago <% else %> Published <%= time_ago_in_words project.created_at %> ago <% end %> <% if project.stars > 0 %> - <%= number_with_delimiter project.stars %> stars <% end %> </small> </div>
Use versions count to decide how to show last change date
Use versions count to decide how to show last change date
HTML+ERB
agpl-3.0
librariesio/libraries.io,librariesio/libraries.io,samjacobclift/libraries.io,abrophy/libraries.io,abrophy/libraries.io,abrophy/libraries.io,tomnatt/libraries.io,librariesio/libraries.io,librariesio/libraries.io,tomnatt/libraries.io,samjacobclift/libraries.io,samjacobclift/libraries.io,tomnatt/libraries.io
html+erb
## Code Before: <div class='project' style="border-color: <%= project.color %>;"> <h5> <%= link_to project.name, project_path(project.to_param) %> <small><%= project.latest_version %></small> </h5> <div class=""> <%= truncate project.description, :length => 100 %> </div> <small> <%= link_to project.platform, platform_path(project.platform.downcase) %> - <% if project.language.present? && project.language != project.platform %> <%= link_to project.language, language_path(project.language) %> - <% end %> <% if project.normalized_licenses.present? %> <%= linked_licenses project.normalized_licenses %> - <% end %> <% if project.updated_at > project.created_at + 1.minute %> Updated <%= time_ago_in_words project.updated_at %> ago <% else %> Published <%= time_ago_in_words project.created_at %> ago <% end %> <% if project.stars > 0 %> - <%= number_with_delimiter project.stars %> stars <% end %> </small> </div> ## Instruction: Use versions count to decide how to show last change date ## Code After: <div class='project' style="border-color: <%= project.color %>;"> <h5> <%= link_to project.name, project_path(project.to_param) %> <small><%= project.latest_version %></small> </h5> <div class=""> <%= truncate project.description, :length => 100 %> </div> <small> <%= link_to project.platform, platform_path(project.platform.downcase) %> - <% if project.language.present? && project.language != project.platform %> <%= link_to project.language, language_path(project.language) %> - <% end %> <% if project.normalized_licenses.present? %> <%= linked_licenses project.normalized_licenses %> - <% end %> <% if project.versions_count > 1 %> Updated <%= time_ago_in_words project.updated_at %> ago <% else %> Published <%= time_ago_in_words project.created_at %> ago <% end %> <% if project.stars > 0 %> - <%= number_with_delimiter project.stars %> stars <% end %> </small> </div>
50c56769c3dbffdd52f2df1d25795e262a981811
src/Ojs/JournalBundle/Entity/SectionTranslation.php
src/Ojs/JournalBundle/Entity/SectionTranslation.php
<?php namespace Ojs\JournalBundle\Entity; use Doctrine\ORM\Mapping as ORM; use Ojs\CoreBundle\Entity\DisplayTrait; use Prezent\Doctrine\Translatable\Annotation as Prezent; use Prezent\Doctrine\Translatable\Entity\AbstractTranslation; class SectionTranslation extends AbstractTranslation { use DisplayTrait; /** * @Prezent\Translatable(targetEntity="Ojs\JournalBundle\Entity\Section") */ protected $translatable; /** * @var string */ private $title; /** * @return string */ public function getTitle() { return $this->title; } /** * @param string $title */ public function setTitle($title) { $this->title = $title; } }
<?php namespace Ojs\JournalBundle\Entity; use Doctrine\ORM\Mapping as ORM; use Ojs\CoreBundle\Entity\DisplayTrait; use Prezent\Doctrine\Translatable\Annotation as Prezent; use Prezent\Doctrine\Translatable\Entity\AbstractTranslation; class SectionTranslation extends AbstractTranslation { use DisplayTrait; /** * @Prezent\Translatable(targetEntity="Ojs\JournalBundle\Entity\Section") */ protected $translatable; /** * @var string */ private $title = '-'; /** * @return string */ public function getTitle() { return $this->title; } /** * @param string $title */ public function setTitle($title) { if ($title !== null) { $this->title = $title; } } }
Set default title to single dash character temporarily
Set default title to single dash character temporarily
PHP
mit
beyzakokcan/ojs,okulbilisim/ojs,beyzakokcan/ojs,okulbilisim/ojs,beyzakokcan/ojs,okulbilisim/ojs
php
## Code Before: <?php namespace Ojs\JournalBundle\Entity; use Doctrine\ORM\Mapping as ORM; use Ojs\CoreBundle\Entity\DisplayTrait; use Prezent\Doctrine\Translatable\Annotation as Prezent; use Prezent\Doctrine\Translatable\Entity\AbstractTranslation; class SectionTranslation extends AbstractTranslation { use DisplayTrait; /** * @Prezent\Translatable(targetEntity="Ojs\JournalBundle\Entity\Section") */ protected $translatable; /** * @var string */ private $title; /** * @return string */ public function getTitle() { return $this->title; } /** * @param string $title */ public function setTitle($title) { $this->title = $title; } } ## Instruction: Set default title to single dash character temporarily ## Code After: <?php namespace Ojs\JournalBundle\Entity; use Doctrine\ORM\Mapping as ORM; use Ojs\CoreBundle\Entity\DisplayTrait; use Prezent\Doctrine\Translatable\Annotation as Prezent; use Prezent\Doctrine\Translatable\Entity\AbstractTranslation; class SectionTranslation extends AbstractTranslation { use DisplayTrait; /** * @Prezent\Translatable(targetEntity="Ojs\JournalBundle\Entity\Section") */ protected $translatable; /** * @var string */ private $title = '-'; /** * @return string */ public function getTitle() { return $this->title; } /** * @param string $title */ public function setTitle($title) { if ($title !== null) { $this->title = $title; } } }
eb1700a318335c0f91591ad6a6432283c5890155
app/templates/_featured_row.html
app/templates/_featured_row.html
{% import "_macros.html" as macros %} <div class="col-sm-6"> {% if landing %} <hr> {% for podcast in podcasts %} {% if podcast.Spotlight == "Yes" %} {% include "_podcast_spotlight.html" %} {% endif %} {% endfor %} {% endif %} </div> <div class="col-sm-6"> {% if landing %} <hr> {% for podcast in podcasts %} {% if podcast.Category == "Staff" %} {% include "_staff_spotlight.html" %} {% endif %} {% endfor %} {% endif %} </div>
{% import "_macros.html" as macros %} <div class="col-sm-6"> {% if landing %} <hr> {% for podcast in podcasts %} {% if podcast.Category == "Staff" %} {% include "_staff_spotlight.html" %} {% endif %} {% endfor %} {% endif %} </div> <div class="col-sm-6"> {% if landing %} <hr> {% for podcast in podcasts %} {% if podcast.Spotlight == "Yes" %} {% include "_podcast_spotlight.html" %} {% endif %} {% endfor %} {% endif %} </div>
Swap Staff Pick and Featured Podcast, so info that changes often is closest to the top.
Swap Staff Pick and Featured Podcast, so info that changes often is closest to the top.
HTML
apache-2.0
vprnet/podcast-directory,vprnet/podcast-directory,vprnet/podcast-directory
html
## Code Before: {% import "_macros.html" as macros %} <div class="col-sm-6"> {% if landing %} <hr> {% for podcast in podcasts %} {% if podcast.Spotlight == "Yes" %} {% include "_podcast_spotlight.html" %} {% endif %} {% endfor %} {% endif %} </div> <div class="col-sm-6"> {% if landing %} <hr> {% for podcast in podcasts %} {% if podcast.Category == "Staff" %} {% include "_staff_spotlight.html" %} {% endif %} {% endfor %} {% endif %} </div> ## Instruction: Swap Staff Pick and Featured Podcast, so info that changes often is closest to the top. ## Code After: {% import "_macros.html" as macros %} <div class="col-sm-6"> {% if landing %} <hr> {% for podcast in podcasts %} {% if podcast.Category == "Staff" %} {% include "_staff_spotlight.html" %} {% endif %} {% endfor %} {% endif %} </div> <div class="col-sm-6"> {% if landing %} <hr> {% for podcast in podcasts %} {% if podcast.Spotlight == "Yes" %} {% include "_podcast_spotlight.html" %} {% endif %} {% endfor %} {% endif %} </div>
11ddb68ec3752a7468f11681e12c278f870b8de6
qlazerdriveplayer.cpp
qlazerdriveplayer.cpp
QLazerDrivePlayer::QLazerDrivePlayer(const uint &id, const QString &name, const uint &r, const uint &g, const uint &b, const uint &score) { m_id = id; m_name = name; m_r = r; m_g = g; m_b = b; m_score = score; } uint QLazerDrivePlayer::r() const { return m_r; } void QLazerDrivePlayer::setR(const uint &r) { m_r = r; } uint QLazerDrivePlayer::g() const { return m_g; } void QLazerDrivePlayer::setG(const uint &g) { m_g = g; } uint QLazerDrivePlayer::b() const { return m_b; } void QLazerDrivePlayer::setB(const uint &b) { m_b = b; }
QLazerDrivePlayer::QLazerDrivePlayer(const uint &id, const QString &name, const uint &r, const uint &g, const uint &b, const uint &score) { m_id = id; m_name = name; m_r = r; m_g = g; m_b = b; m_score = score; } uint QLazerDrivePlayer::id() const { return m_id; } void QLazerDrivePlayer::setId(const uint &id) { m_id = id; } uint QLazerDrivePlayer::score() const { return m_score; } void QLazerDrivePlayer::setScore(const uint &score) { m_score = score; } QString QLazerDrivePlayer::name() const { return m_name; } void QLazerDrivePlayer::setName(const QString &name) { m_name = name; } uint QLazerDrivePlayer::r() const { return m_r; } void QLazerDrivePlayer::setR(const uint &r) { m_r = r; } uint QLazerDrivePlayer::g() const { return m_g; } void QLazerDrivePlayer::setG(const uint &g) { m_g = g; } uint QLazerDrivePlayer::b() const { return m_b; } void QLazerDrivePlayer::setB(const uint &b) { m_b = b; }
Add missing getters / setters
Add missing getters / setters
C++
mit
vdechenaux/QLazerDriveClient,vdechenaux/QLazerDriveClient
c++
## Code Before: QLazerDrivePlayer::QLazerDrivePlayer(const uint &id, const QString &name, const uint &r, const uint &g, const uint &b, const uint &score) { m_id = id; m_name = name; m_r = r; m_g = g; m_b = b; m_score = score; } uint QLazerDrivePlayer::r() const { return m_r; } void QLazerDrivePlayer::setR(const uint &r) { m_r = r; } uint QLazerDrivePlayer::g() const { return m_g; } void QLazerDrivePlayer::setG(const uint &g) { m_g = g; } uint QLazerDrivePlayer::b() const { return m_b; } void QLazerDrivePlayer::setB(const uint &b) { m_b = b; } ## Instruction: Add missing getters / setters ## Code After: QLazerDrivePlayer::QLazerDrivePlayer(const uint &id, const QString &name, const uint &r, const uint &g, const uint &b, const uint &score) { m_id = id; m_name = name; m_r = r; m_g = g; m_b = b; m_score = score; } uint QLazerDrivePlayer::id() const { return m_id; } void QLazerDrivePlayer::setId(const uint &id) { m_id = id; } uint QLazerDrivePlayer::score() const { return m_score; } void QLazerDrivePlayer::setScore(const uint &score) { m_score = score; } QString QLazerDrivePlayer::name() const { return m_name; } void QLazerDrivePlayer::setName(const QString &name) { m_name = name; } uint QLazerDrivePlayer::r() const { return m_r; } void QLazerDrivePlayer::setR(const uint &r) { m_r = r; } uint QLazerDrivePlayer::g() const { return m_g; } void QLazerDrivePlayer::setG(const uint &g) { m_g = g; } uint QLazerDrivePlayer::b() const { return m_b; } void QLazerDrivePlayer::setB(const uint &b) { m_b = b; }
7a4e3457ea93da34a658d79fee7581a2d6ea4517
src/app/dashboard/dashboard.component.html
src/app/dashboard/dashboard.component.html
<div class="ipaas-dashboard"> <ipaas-dashboard-empty-state></ipaas-dashboard-empty-state> <ipaas-popular-templates [templates]="templates | async" [loading]="loading | async"></ipaas-popular-templates> </div>
<div class="ipaas-dashboard"> <ipaas-dashboard-empty-state></ipaas-dashboard-empty-state> <!-- <ipaas-popular-templates [templates]="templates | async" [loading]="loading | async"></ipaas-popular-templates> --> </div>
Hide popular templates from Dashboard
Hide popular templates from Dashboard
HTML
apache-2.0
kahboom/ipaas-client,kahboom/ipaas-client,kahboom/ipaas-client,kahboom/ipaas-client
html
## Code Before: <div class="ipaas-dashboard"> <ipaas-dashboard-empty-state></ipaas-dashboard-empty-state> <ipaas-popular-templates [templates]="templates | async" [loading]="loading | async"></ipaas-popular-templates> </div> ## Instruction: Hide popular templates from Dashboard ## Code After: <div class="ipaas-dashboard"> <ipaas-dashboard-empty-state></ipaas-dashboard-empty-state> <!-- <ipaas-popular-templates [templates]="templates | async" [loading]="loading | async"></ipaas-popular-templates> --> </div>
e466f86a763f89a26274cf01cb6bbe79b251c50c
ZUSR_LISP_REPL.abap
ZUSR_LISP_REPL.abap
*&---------------------------------------------------------------------* *& Report ZUSR_LISP_REPL *& https://github.com/mydoghasworms/abap-lisp *& Simple REPL for Lisp Interpreter written in ABAP *& Martin Ceronio, June 2015 *& martin.ceronio@infosize.co.za *&---------------------------------------------------------------------* report zusr_lisp_repl line-size 999. include zlib_lisp. data: lr_int type ref to lcl_lisp_interpreter. "The Lisp interpreter parameters: input type string lower case. parameters: output type string lower case. at selection-screen output. * Make result field output-only loop at screen. if screen-name = 'OUTPUT'. screen-input = 0. modify screen. endif. endloop. at selection-screen. * Initialize interpreter if not done yet if lr_int is not bound. create object lr_int. endif. * Evaluate given code output = lr_int->eval_source( input ). clear input. load-of-program. * Hitting execute gets us back to this event and initializes the interpreter, * so we preferably want to avoid that happening inadvertently: perform insert_into_excl(rsdbrunt) using: 'ONLI', 'SPOS', 'PRIN', 'SJOB'.
*&---------------------------------------------------------------------* *& Report ZUSR_LISP_REPL *& https://github.com/mydoghasworms/abap-lisp *& Simple REPL for Lisp Interpreter written in ABAP *& Martin Ceronio, June 2015 *& martin.ceronio@infosize.co.za *&---------------------------------------------------------------------* report zusr_lisp_repl line-size 999. include zlib_lisp. data: lr_int type ref to lcl_lisp_interpreter. "The Lisp interpreter data: rt_begin type i. data: rt_end type i. parameters: input type string lower case. parameters: output type string lower case. parameters: runtime type string lower case. at selection-screen output. * Make result field output-only loop at screen. if screen-name = 'OUTPUT' or screen-name = 'RUNTIME'. screen-input = 0. if screen-name = 'RUNTIME'. screen-display_3d = 0. endif. modify screen. endif. endloop. at selection-screen. * Initialize interpreter if not done yet if lr_int is not bound. create object lr_int. endif. * Evaluate given code get RUN TIME FIELD rt_begin. output = lr_int->eval_source( input ). get RUN TIME FIELD rt_end. clear input. runtime = |{ rt_end - rt_begin } microseconds|. load-of-program. * Hitting execute gets us back to this event and initializes the interpreter, * so we preferably want to avoid that happening inadvertently: perform insert_into_excl(rsdbrunt) using: 'ONLI', 'SPOS', 'PRIN', 'SJOB'.
Add runtime measurement to REPL
Add runtime measurement to REPL
ABAP
mit
mydoghasworms/abap-lisp,mydoghasworms/abap-lisp,mydoghasworms/abap-lisp
abap
## Code Before: *&---------------------------------------------------------------------* *& Report ZUSR_LISP_REPL *& https://github.com/mydoghasworms/abap-lisp *& Simple REPL for Lisp Interpreter written in ABAP *& Martin Ceronio, June 2015 *& martin.ceronio@infosize.co.za *&---------------------------------------------------------------------* report zusr_lisp_repl line-size 999. include zlib_lisp. data: lr_int type ref to lcl_lisp_interpreter. "The Lisp interpreter parameters: input type string lower case. parameters: output type string lower case. at selection-screen output. * Make result field output-only loop at screen. if screen-name = 'OUTPUT'. screen-input = 0. modify screen. endif. endloop. at selection-screen. * Initialize interpreter if not done yet if lr_int is not bound. create object lr_int. endif. * Evaluate given code output = lr_int->eval_source( input ). clear input. load-of-program. * Hitting execute gets us back to this event and initializes the interpreter, * so we preferably want to avoid that happening inadvertently: perform insert_into_excl(rsdbrunt) using: 'ONLI', 'SPOS', 'PRIN', 'SJOB'. ## Instruction: Add runtime measurement to REPL ## Code After: *&---------------------------------------------------------------------* *& Report ZUSR_LISP_REPL *& https://github.com/mydoghasworms/abap-lisp *& Simple REPL for Lisp Interpreter written in ABAP *& Martin Ceronio, June 2015 *& martin.ceronio@infosize.co.za *&---------------------------------------------------------------------* report zusr_lisp_repl line-size 999. include zlib_lisp. data: lr_int type ref to lcl_lisp_interpreter. "The Lisp interpreter data: rt_begin type i. data: rt_end type i. parameters: input type string lower case. parameters: output type string lower case. parameters: runtime type string lower case. at selection-screen output. * Make result field output-only loop at screen. if screen-name = 'OUTPUT' or screen-name = 'RUNTIME'. screen-input = 0. if screen-name = 'RUNTIME'. screen-display_3d = 0. endif. modify screen. endif. endloop. at selection-screen. * Initialize interpreter if not done yet if lr_int is not bound. create object lr_int. endif. * Evaluate given code get RUN TIME FIELD rt_begin. output = lr_int->eval_source( input ). get RUN TIME FIELD rt_end. clear input. runtime = |{ rt_end - rt_begin } microseconds|. load-of-program. * Hitting execute gets us back to this event and initializes the interpreter, * so we preferably want to avoid that happening inadvertently: perform insert_into_excl(rsdbrunt) using: 'ONLI', 'SPOS', 'PRIN', 'SJOB'.
dd856e76ceebb8975db9c4032964cf048d426e03
organizer/templates/organizer/tag_detail.html
organizer/templates/organizer/tag_detail.html
<h2> </h2> <section> <h3>Startups</h3> <ul> </ul> </section> <section> <h3>Blog Posts</h3> <ul> </ul> </section>
<h2> <!-- name of tag --> </h2> <section> <h3>Startups</h3> <ul> <!-- list of startups related to tag --> </ul> </section> <section> <h3>Blog Posts</h3> <ul> <!-- list of posts related to tag --> </ul> </section>
Clarify Tag detail template with comments.
Ch04: Clarify Tag detail template with comments.
HTML
bsd-2-clause
jambonrose/DjangoUnleashed-1.8,jambonrose/DjangoUnleashed-1.8
html
## Code Before: <h2> </h2> <section> <h3>Startups</h3> <ul> </ul> </section> <section> <h3>Blog Posts</h3> <ul> </ul> </section> ## Instruction: Ch04: Clarify Tag detail template with comments. ## Code After: <h2> <!-- name of tag --> </h2> <section> <h3>Startups</h3> <ul> <!-- list of startups related to tag --> </ul> </section> <section> <h3>Blog Posts</h3> <ul> <!-- list of posts related to tag --> </ul> </section>
63c0cd90ff9e9a721b175cdd4af8dc52ed6412ad
flatkeys/__init__.py
flatkeys/__init__.py
__version__ = '0.1.0' def flatkeys(d, sep="."): """ Flatten a dictionary: build a new dictionary from a given one where all non-dict values are left untouched but nested ``dict``s are recursively merged in the new one with their keys prefixed by their parent key. >>> flatkeys({1: 42, 'foo': 12}) {1: 42, 'foo': 12} >>> flatkeys({1: 42, 'foo': 12, 'bar': {'qux': True}}) {1: 42, 'foo': 12, 'bar.qux': True} >>> flatkeys({1: {2: {3: 4}}}) {'1.2.3': 4} >>> flatkeys({1: {2: {3: 4}, 5: 6}}) {'1.2.3': 4, '1.5': 6} """ flat = {} dicts = [("", d)] while dicts: prefix, d = dicts.pop() for k, v in d.items(): k_s = str(k) if type(v) is dict: dicts.append(("%s%s%s" % (prefix, k_s, sep), v)) else: k_ = prefix + k_s if prefix else k flat[k_] = v return flat
import collections __version__ = '0.1.0' def flatkeys(d, sep="."): """ Flatten a dictionary: build a new dictionary from a given one where all non-dict values are left untouched but nested ``dict``s are recursively merged in the new one with their keys prefixed by their parent key. >>> flatkeys({1: 42, 'foo': 12}) {1: 42, 'foo': 12} >>> flatkeys({1: 42, 'foo': 12, 'bar': {'qux': True}}) {1: 42, 'foo': 12, 'bar.qux': True} >>> flatkeys({1: {2: {3: 4}}}) {'1.2.3': 4} >>> flatkeys({1: {2: {3: 4}, 5: 6}}) {'1.2.3': 4, '1.5': 6} """ flat = {} dicts = [("", d)] while dicts: prefix, d = dicts.pop() for k, v in d.items(): k_s = str(k) if isinstance(v, collections.Mapping): dicts.append(("%s%s%s" % (prefix, k_s, sep), v)) else: k_ = prefix + k_s if prefix else k flat[k_] = v return flat
Use isinstance check so library can be used for more types
Use isinstance check so library can be used for more types
Python
mit
bfontaine/flatkeys
python
## Code Before: __version__ = '0.1.0' def flatkeys(d, sep="."): """ Flatten a dictionary: build a new dictionary from a given one where all non-dict values are left untouched but nested ``dict``s are recursively merged in the new one with their keys prefixed by their parent key. >>> flatkeys({1: 42, 'foo': 12}) {1: 42, 'foo': 12} >>> flatkeys({1: 42, 'foo': 12, 'bar': {'qux': True}}) {1: 42, 'foo': 12, 'bar.qux': True} >>> flatkeys({1: {2: {3: 4}}}) {'1.2.3': 4} >>> flatkeys({1: {2: {3: 4}, 5: 6}}) {'1.2.3': 4, '1.5': 6} """ flat = {} dicts = [("", d)] while dicts: prefix, d = dicts.pop() for k, v in d.items(): k_s = str(k) if type(v) is dict: dicts.append(("%s%s%s" % (prefix, k_s, sep), v)) else: k_ = prefix + k_s if prefix else k flat[k_] = v return flat ## Instruction: Use isinstance check so library can be used for more types ## Code After: import collections __version__ = '0.1.0' def flatkeys(d, sep="."): """ Flatten a dictionary: build a new dictionary from a given one where all non-dict values are left untouched but nested ``dict``s are recursively merged in the new one with their keys prefixed by their parent key. >>> flatkeys({1: 42, 'foo': 12}) {1: 42, 'foo': 12} >>> flatkeys({1: 42, 'foo': 12, 'bar': {'qux': True}}) {1: 42, 'foo': 12, 'bar.qux': True} >>> flatkeys({1: {2: {3: 4}}}) {'1.2.3': 4} >>> flatkeys({1: {2: {3: 4}, 5: 6}}) {'1.2.3': 4, '1.5': 6} """ flat = {} dicts = [("", d)] while dicts: prefix, d = dicts.pop() for k, v in d.items(): k_s = str(k) if isinstance(v, collections.Mapping): dicts.append(("%s%s%s" % (prefix, k_s, sep), v)) else: k_ = prefix + k_s if prefix else k flat[k_] = v return flat
1a1c56caeb8ad010e693a1fa6a0614c2fe308bb9
app/views/orders/_organization_info.html.erb
app/views/orders/_organization_info.html.erb
<p> <strong>County:</strong><br/> <span id="county"><%= order.organization.county %></span> </p> <p> <strong>Organization:</strong><br/> <span id="county"><%= link_to "#{order.organization.name}", edit_organization_path(order.organization, redirect_to: "order", redirect_id: order.id) %></span> </p> <p> <strong>Mailing Address:</strong><br/> <span id="address"><%= order.organization.address %></span> </p>
<p> <strong>County:</strong><br/> <span id="county"><%= order.organization.county %></span> </p> <p> <strong>Organization:</strong><br/> <span id="county"><%= link_to "#{order.organization.name}", edit_organization_path(order.organization, redirect_to: "order", redirect_id: order.id) %></span> </p>
Remove org address from order view as it could be confused for ship to
Remove org address from order view as it could be confused for ship to
HTML+ERB
mit
icodeclean/StockAid,icodeclean/StockAid,on-site/StockAid,icodeclean/StockAid,on-site/StockAid,on-site/StockAid
html+erb
## Code Before: <p> <strong>County:</strong><br/> <span id="county"><%= order.organization.county %></span> </p> <p> <strong>Organization:</strong><br/> <span id="county"><%= link_to "#{order.organization.name}", edit_organization_path(order.organization, redirect_to: "order", redirect_id: order.id) %></span> </p> <p> <strong>Mailing Address:</strong><br/> <span id="address"><%= order.organization.address %></span> </p> ## Instruction: Remove org address from order view as it could be confused for ship to ## Code After: <p> <strong>County:</strong><br/> <span id="county"><%= order.organization.county %></span> </p> <p> <strong>Organization:</strong><br/> <span id="county"><%= link_to "#{order.organization.name}", edit_organization_path(order.organization, redirect_to: "order", redirect_id: order.id) %></span> </p>
7663040a814cf5c942ddf8a63cc3c2e1bf6d7cc8
ceraon/templates/meals/form_edit.html
ceraon/templates/meals/form_edit.html
<form id="mealForm" class="form" method="POST" action="" role="form"> <input type="hidden" name="csrf_token" value="{{ csrf_token() }}"/> <div class="form-group" style="position: relative;"> {{form.scheduled_for.label}} {{form.scheduled_for(placeholder="When", id_="schedule-for", class_="form-control")}} </div> <div class="form-group"> {{form.cost.label}} {{form.cost(placeholder="$4.75", class_="form-control")}} </div> <p><input class="btn btn-default btn-submit" type="submit" value="Submit"></p> </form>
<form id="mealForm" class="form" method="POST" action="" role="form"> <input type="hidden" name="csrf_token" value="{{ csrf_token() }}"/> <div class="form-group" style="position: relative;"> {{form.scheduled_for.label}} {{form.scheduled_for(placeholder="When (MM/DD/YYYY HH:MM [AM|PM])", id_="schedule-for", class_="form-control")}} </div> <div class="form-group"> {{form.cost.label}} {{form.cost(placeholder="$4.75", class_="form-control")}} </div> <p><input class="btn btn-default btn-submit" type="submit" value="Submit"></p> </form>
Add placeholder hint for meal date
Add placeholder hint for meal date
HTML
bsd-3-clause
Rdbaker/Mealbound,Rdbaker/Mealbound,Rdbaker/Mealbound,Rdbaker/Mealbound,Rdbaker/Mealbound
html
## Code Before: <form id="mealForm" class="form" method="POST" action="" role="form"> <input type="hidden" name="csrf_token" value="{{ csrf_token() }}"/> <div class="form-group" style="position: relative;"> {{form.scheduled_for.label}} {{form.scheduled_for(placeholder="When", id_="schedule-for", class_="form-control")}} </div> <div class="form-group"> {{form.cost.label}} {{form.cost(placeholder="$4.75", class_="form-control")}} </div> <p><input class="btn btn-default btn-submit" type="submit" value="Submit"></p> </form> ## Instruction: Add placeholder hint for meal date ## Code After: <form id="mealForm" class="form" method="POST" action="" role="form"> <input type="hidden" name="csrf_token" value="{{ csrf_token() }}"/> <div class="form-group" style="position: relative;"> {{form.scheduled_for.label}} {{form.scheduled_for(placeholder="When (MM/DD/YYYY HH:MM [AM|PM])", id_="schedule-for", class_="form-control")}} </div> <div class="form-group"> {{form.cost.label}} {{form.cost(placeholder="$4.75", class_="form-control")}} </div> <p><input class="btn btn-default btn-submit" type="submit" value="Submit"></p> </form>
60daa277d5c3f1d9ab07ff5beccdaa323996068b
feincmstools/templatetags/feincmstools_tags.py
feincmstools/templatetags/feincmstools_tags.py
import os from django import template register = template.Library() @register.filter def is_parent_of(page1, page2): """ Determines whether a given page is the parent of another page Example: {% if page|is_parent_of:feincms_page %} ... {% endif %} """ if page1 is None: return False return (page1.tree_id == page2.tree_id and page1.lft < page2.lft and page1.rght > page2.rght) @register.filter def is_equal_or_parent_of(page1, page2): return (page1.tree_id == page2.tree_id and page1.lft <= page2.lft and page1.rght >= page2.rght) @register.filter def is_sibling_of(page1, page2): """ Determines whether a given page is a sibling of another page {% if page|is_sibling_of:feincms_page %} ... {% endif %} """ if page1 is None or page2 is None: return False return (page1.parent_id == page2.parent_id) @register.filter def get_extension(filename): """ Return the extension from a file name """ return os.path.splitext(filename)[1][1:]
import os from django import template from feincms.templatetags.feincms_tags import feincms_render_content register = template.Library() @register.filter def is_parent_of(page1, page2): """ Determines whether a given page is the parent of another page Example: {% if page|is_parent_of:feincms_page %} ... {% endif %} """ if page1 is None: return False return (page1.tree_id == page2.tree_id and page1.lft < page2.lft and page1.rght > page2.rght) @register.filter def is_equal_or_parent_of(page1, page2): return (page1.tree_id == page2.tree_id and page1.lft <= page2.lft and page1.rght >= page2.rght) @register.filter def is_sibling_of(page1, page2): """ Determines whether a given page is a sibling of another page {% if page|is_sibling_of:feincms_page %} ... {% endif %} """ if page1 is None or page2 is None: return False return (page1.parent_id == page2.parent_id) @register.filter def get_extension(filename): """ Return the extension from a file name """ return os.path.splitext(filename)[1][1:] @register.assignment_tag(takes_context=True) def feincms_render_content_as(context, content, request=None): return feincms_render_content(context, content, request)
Add assignment tag util for rendering chunks to tpl context
Add assignment tag util for rendering chunks to tpl context
Python
bsd-3-clause
ixc/glamkit-feincmstools,ixc/glamkit-feincmstools
python
## Code Before: import os from django import template register = template.Library() @register.filter def is_parent_of(page1, page2): """ Determines whether a given page is the parent of another page Example: {% if page|is_parent_of:feincms_page %} ... {% endif %} """ if page1 is None: return False return (page1.tree_id == page2.tree_id and page1.lft < page2.lft and page1.rght > page2.rght) @register.filter def is_equal_or_parent_of(page1, page2): return (page1.tree_id == page2.tree_id and page1.lft <= page2.lft and page1.rght >= page2.rght) @register.filter def is_sibling_of(page1, page2): """ Determines whether a given page is a sibling of another page {% if page|is_sibling_of:feincms_page %} ... {% endif %} """ if page1 is None or page2 is None: return False return (page1.parent_id == page2.parent_id) @register.filter def get_extension(filename): """ Return the extension from a file name """ return os.path.splitext(filename)[1][1:] ## Instruction: Add assignment tag util for rendering chunks to tpl context ## Code After: import os from django import template from feincms.templatetags.feincms_tags import feincms_render_content register = template.Library() @register.filter def is_parent_of(page1, page2): """ Determines whether a given page is the parent of another page Example: {% if page|is_parent_of:feincms_page %} ... {% endif %} """ if page1 is None: return False return (page1.tree_id == page2.tree_id and page1.lft < page2.lft and page1.rght > page2.rght) @register.filter def is_equal_or_parent_of(page1, page2): return (page1.tree_id == page2.tree_id and page1.lft <= page2.lft and page1.rght >= page2.rght) @register.filter def is_sibling_of(page1, page2): """ Determines whether a given page is a sibling of another page {% if page|is_sibling_of:feincms_page %} ... {% endif %} """ if page1 is None or page2 is None: return False return (page1.parent_id == page2.parent_id) @register.filter def get_extension(filename): """ Return the extension from a file name """ return os.path.splitext(filename)[1][1:] @register.assignment_tag(takes_context=True) def feincms_render_content_as(context, content, request=None): return feincms_render_content(context, content, request)
395c8bdecbebf3bdea6c0c0acaa7b5807869623f
lib/project/progress_hud/progress_hud.rb
lib/project/progress_hud/progress_hud.rb
class ProgressHUD < Android::App::DialogFragment def initialize(title="Loading") @title = title end def show(activity=rmq.activity) super(activity.fragmentManager, "progress") end def onCreateDialog(saved_instance_state) builder = Android::App::AlertDialog::Builder.new(activity, Android::App::AlertDialog::THEME_HOLO_LIGHT) progress = Android::Widget::ProgressBar.new(activity) progress.setBackgroundColor(Android::Graphics::Color::TRANSPARENT) builder.setView(progress) .setTitle(@title) @created_dialog = builder.create() end def title=(new_title) @created_dialog.title = new_title if @created_dialog end def hide self.dismiss end alias_method :close, :hide end
class ProgressHUD < Android::App::DialogFragment def initialize(title="Loading", opts={}) @title = title @style = convert_style(opts[:style]) @max = opts[:max] end def show(activity=rmq.activity) super(activity.fragmentManager, "progress") end def onCreateDialog(saved_instance_state) builder = Android::App::AlertDialog::Builder.new(activity, Android::App::AlertDialog::THEME_HOLO_LIGHT) if @style @progress = Android::Widget::ProgressBar.new(activity, nil, @style) if @max @progress.setIndeterminate(false) @progress.setMax(@max) end else @progress = Android::Widget::ProgressBar.new(activity) end @progress.setBackgroundColor(Android::Graphics::Color::TRANSPARENT) builder.setView(@progress) .setTitle(@title) @created_dialog = builder.create() end def progress=(value) @progress.setProgress(value) end def increment(inc=1) runnable = HudRun.new @current_progress ||= 0 @current_progress += inc runnable.progress = @current_progress runnable.hud = self # 99.99% of the time, we will use this from within app.async # so we need to be sure to run the progress in the UI thread activity.runOnUiThread(runnable) end def title=(new_title) @created_dialog.title = new_title if @created_dialog end def hide self.dismiss end alias_method :close, :hide protected def convert_style(style) return nil if style.nil? case style when :horizontal Android::R::Attr::ProgressBarStyleHorizontal else style end end end class HudRun attr_accessor :hud, :progress def run hud.progress = progress end end
Add a progressbar to ProgressHUD
Add a progressbar to ProgressHUD
Ruby
mit
infinitered/bluepotion,infinitered/bluepotion
ruby
## Code Before: class ProgressHUD < Android::App::DialogFragment def initialize(title="Loading") @title = title end def show(activity=rmq.activity) super(activity.fragmentManager, "progress") end def onCreateDialog(saved_instance_state) builder = Android::App::AlertDialog::Builder.new(activity, Android::App::AlertDialog::THEME_HOLO_LIGHT) progress = Android::Widget::ProgressBar.new(activity) progress.setBackgroundColor(Android::Graphics::Color::TRANSPARENT) builder.setView(progress) .setTitle(@title) @created_dialog = builder.create() end def title=(new_title) @created_dialog.title = new_title if @created_dialog end def hide self.dismiss end alias_method :close, :hide end ## Instruction: Add a progressbar to ProgressHUD ## Code After: class ProgressHUD < Android::App::DialogFragment def initialize(title="Loading", opts={}) @title = title @style = convert_style(opts[:style]) @max = opts[:max] end def show(activity=rmq.activity) super(activity.fragmentManager, "progress") end def onCreateDialog(saved_instance_state) builder = Android::App::AlertDialog::Builder.new(activity, Android::App::AlertDialog::THEME_HOLO_LIGHT) if @style @progress = Android::Widget::ProgressBar.new(activity, nil, @style) if @max @progress.setIndeterminate(false) @progress.setMax(@max) end else @progress = Android::Widget::ProgressBar.new(activity) end @progress.setBackgroundColor(Android::Graphics::Color::TRANSPARENT) builder.setView(@progress) .setTitle(@title) @created_dialog = builder.create() end def progress=(value) @progress.setProgress(value) end def increment(inc=1) runnable = HudRun.new @current_progress ||= 0 @current_progress += inc runnable.progress = @current_progress runnable.hud = self # 99.99% of the time, we will use this from within app.async # so we need to be sure to run the progress in the UI thread activity.runOnUiThread(runnable) end def title=(new_title) @created_dialog.title = new_title if @created_dialog end def hide self.dismiss end alias_method :close, :hide protected def convert_style(style) return nil if style.nil? case style when :horizontal Android::R::Attr::ProgressBarStyleHorizontal else style end end end class HudRun attr_accessor :hud, :progress def run hud.progress = progress end end
03c27cf947a75ca10abce1980b5365e5b8fab66c
cmd/brew-squash-bottle-pr.rb
cmd/brew-squash-bottle-pr.rb
require "formula" module Homebrew # Squash the last two commits of build-bottle-pr. # Usage: # brew build-bottle-pr foo # brew pull --bottle 123 # brew squash-bottle-pr def squash_bottle_pr head = `git rev-parse HEAD`.chomp formula = `git log -n1 --pretty=format:%s`.split(":").first file = Formula[formula].path marker = "Build a bottle for Linuxbrew" safe_system "git", "reset", "--hard", "HEAD~2" safe_system "git", "merge", "--squash", head # The argument to -i is required for BSD sed. safe_system "sed", "-iorig", "-e", "/^#.*: #{marker}$/d", file rm_f file.to_s + "orig" git_editor = ENV["GIT_EDITOR"] ENV["GIT_EDITOR"] = "sed -n -i -e 's/.*#{marker}//p;s/^ //p'" safe_system "git", "commit", file ENV["GIT_EDITOR"] = git_editor safe_system "git", "show" end end Homebrew.squash_bottle_pr
require "formula" module Homebrew # Squash the last two commits of build-bottle-pr. # Usage: # brew build-bottle-pr foo # brew pull --bottle 123 # brew squash-bottle-pr def squash_bottle_pr head = `git rev-parse HEAD`.chomp formula = `git log -n1 --pretty=format:%s`.split(":").first file = Formula[formula].path marker = "Build a bottle for Linuxbrew" safe_system "git", "reset", "--hard", "HEAD~2" safe_system "git", "merge", "--squash", head # The argument to -i is required for BSD sed. safe_system "sed", "-iorig", "-e", "/^#.*: #{marker}$/d", file rm_f file.to_s + "orig" git_editor = ENV["GIT_EDITOR"] ENV["GIT_EDITOR"] = "sed -n -i -e 's/.*#{marker}//p;s/^ //p'" safe_system "git", "commit", file ENV["GIT_EDITOR"] = git_editor safe_system "git", "show" if ARGV.verbose? end end Homebrew.squash_bottle_pr
Call git show if verbose
squash-bottle-pr: Call git show if verbose
Ruby
mit
Linuxbrew/homebrew-developer
ruby
## Code Before: require "formula" module Homebrew # Squash the last two commits of build-bottle-pr. # Usage: # brew build-bottle-pr foo # brew pull --bottle 123 # brew squash-bottle-pr def squash_bottle_pr head = `git rev-parse HEAD`.chomp formula = `git log -n1 --pretty=format:%s`.split(":").first file = Formula[formula].path marker = "Build a bottle for Linuxbrew" safe_system "git", "reset", "--hard", "HEAD~2" safe_system "git", "merge", "--squash", head # The argument to -i is required for BSD sed. safe_system "sed", "-iorig", "-e", "/^#.*: #{marker}$/d", file rm_f file.to_s + "orig" git_editor = ENV["GIT_EDITOR"] ENV["GIT_EDITOR"] = "sed -n -i -e 's/.*#{marker}//p;s/^ //p'" safe_system "git", "commit", file ENV["GIT_EDITOR"] = git_editor safe_system "git", "show" end end Homebrew.squash_bottle_pr ## Instruction: squash-bottle-pr: Call git show if verbose ## Code After: require "formula" module Homebrew # Squash the last two commits of build-bottle-pr. # Usage: # brew build-bottle-pr foo # brew pull --bottle 123 # brew squash-bottle-pr def squash_bottle_pr head = `git rev-parse HEAD`.chomp formula = `git log -n1 --pretty=format:%s`.split(":").first file = Formula[formula].path marker = "Build a bottle for Linuxbrew" safe_system "git", "reset", "--hard", "HEAD~2" safe_system "git", "merge", "--squash", head # The argument to -i is required for BSD sed. safe_system "sed", "-iorig", "-e", "/^#.*: #{marker}$/d", file rm_f file.to_s + "orig" git_editor = ENV["GIT_EDITOR"] ENV["GIT_EDITOR"] = "sed -n -i -e 's/.*#{marker}//p;s/^ //p'" safe_system "git", "commit", file ENV["GIT_EDITOR"] = git_editor safe_system "git", "show" if ARGV.verbose? end end Homebrew.squash_bottle_pr
b16e795741ee59b2d4d39914aba592ae23b916b0
circle.yml
circle.yml
machine: services: - docker dependencies: pre: - docker pull openaddr/prereqs:`cut -f1 -d. openaddr/VERSION`.x || true override: - docker build -f Dockerfile-prereqs -t openaddr/prereqs:`cut -f1 -d. openaddr/VERSION`.x . - docker build -f Dockerfile-machine -t openaddr/machine:`cut -f1 -d. openaddr/VERSION`.x . test: override: # Postgres needs a little time - docker-compose up -d && sleep 15 - docker-compose run machine python3 /usr/local/src/openaddr/test.py deployment: hub: branch: [6.x] commands: - docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS - docker tag openaddr/prereqs:`cut -f1 -d. openaddr/VERSION`.x openaddr/prereqs:`cat openaddr/VERSION` - docker tag openaddr/machine:`cut -f1 -d. openaddr/VERSION`.x openaddr/machine:`cat openaddr/VERSION` - docker push openaddr/prereqs:`cut -f1 -d. openaddr/VERSION`.x - docker push openaddr/machine:`cut -f1 -d. openaddr/VERSION`.x - docker push openaddr/prereqs:`cat openaddr/VERSION` - docker push openaddr/machine:`cat openaddr/VERSION`
machine: services: - docker dependencies: pre: - docker pull openaddr/prereqs:`cut -f1 -d. openaddr/VERSION`.x || true override: - docker build -f Dockerfile-prereqs -t openaddr/prereqs:`cut -f1 -d. openaddr/VERSION`.x . - docker build -f Dockerfile-machine -t openaddr/machine:`cut -f1 -d. openaddr/VERSION`.x . test: override: # Postgres needs a little time - docker-compose up -d && sleep 15 - docker-compose run machine python3 /usr/local/src/openaddr/test.py deployment: hub: branch: [6.x] commands: - docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS - docker tag openaddr/prereqs:`cut -f1 -d. openaddr/VERSION`.x openaddr/prereqs:`cat openaddr/VERSION` - docker tag openaddr/machine:`cut -f1 -d. openaddr/VERSION`.x openaddr/machine:`cat openaddr/VERSION` - docker tag openaddr/prereqs:`cat openaddr/VERSION` openaddr/prereqs:latest - docker tag openaddr/machine:`cat openaddr/VERSION` openaddr/machine:latest - docker push openaddr/prereqs:`cut -f1 -d. openaddr/VERSION`.x - docker push openaddr/machine:`cut -f1 -d. openaddr/VERSION`.x - docker push openaddr/prereqs:`cat openaddr/VERSION` - docker push openaddr/machine:`cat openaddr/VERSION` - docker push openaddr/prereqs:latest - docker push openaddr/machine:latest
Tag and push the 'latest' tag for published images
Tag and push the 'latest' tag for published images
YAML
isc
openaddresses/machine,openaddresses/machine,openaddresses/machine
yaml
## Code Before: machine: services: - docker dependencies: pre: - docker pull openaddr/prereqs:`cut -f1 -d. openaddr/VERSION`.x || true override: - docker build -f Dockerfile-prereqs -t openaddr/prereqs:`cut -f1 -d. openaddr/VERSION`.x . - docker build -f Dockerfile-machine -t openaddr/machine:`cut -f1 -d. openaddr/VERSION`.x . test: override: # Postgres needs a little time - docker-compose up -d && sleep 15 - docker-compose run machine python3 /usr/local/src/openaddr/test.py deployment: hub: branch: [6.x] commands: - docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS - docker tag openaddr/prereqs:`cut -f1 -d. openaddr/VERSION`.x openaddr/prereqs:`cat openaddr/VERSION` - docker tag openaddr/machine:`cut -f1 -d. openaddr/VERSION`.x openaddr/machine:`cat openaddr/VERSION` - docker push openaddr/prereqs:`cut -f1 -d. openaddr/VERSION`.x - docker push openaddr/machine:`cut -f1 -d. openaddr/VERSION`.x - docker push openaddr/prereqs:`cat openaddr/VERSION` - docker push openaddr/machine:`cat openaddr/VERSION` ## Instruction: Tag and push the 'latest' tag for published images ## Code After: machine: services: - docker dependencies: pre: - docker pull openaddr/prereqs:`cut -f1 -d. openaddr/VERSION`.x || true override: - docker build -f Dockerfile-prereqs -t openaddr/prereqs:`cut -f1 -d. openaddr/VERSION`.x . - docker build -f Dockerfile-machine -t openaddr/machine:`cut -f1 -d. openaddr/VERSION`.x . test: override: # Postgres needs a little time - docker-compose up -d && sleep 15 - docker-compose run machine python3 /usr/local/src/openaddr/test.py deployment: hub: branch: [6.x] commands: - docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS - docker tag openaddr/prereqs:`cut -f1 -d. openaddr/VERSION`.x openaddr/prereqs:`cat openaddr/VERSION` - docker tag openaddr/machine:`cut -f1 -d. openaddr/VERSION`.x openaddr/machine:`cat openaddr/VERSION` - docker tag openaddr/prereqs:`cat openaddr/VERSION` openaddr/prereqs:latest - docker tag openaddr/machine:`cat openaddr/VERSION` openaddr/machine:latest - docker push openaddr/prereqs:`cut -f1 -d. openaddr/VERSION`.x - docker push openaddr/machine:`cut -f1 -d. openaddr/VERSION`.x - docker push openaddr/prereqs:`cat openaddr/VERSION` - docker push openaddr/machine:`cat openaddr/VERSION` - docker push openaddr/prereqs:latest - docker push openaddr/machine:latest
d9041156f999342aab312dfb7ea6dfc21f7cbd08
SWXMLDateMapping.h
SWXMLDateMapping.h
// // SWXMLDateMapping.h // This file is part of the "SWXMLMapping" project, and is distributed under the MIT License. // // Created by Samuel Williams on 13/11/05. // Copyright 2005 Samuel Williams. All rights reserved. // #import "SWXMLMemberMapping.h" @class SWXMLMemberMapping; @interface SWXMLDateMapping : SWXMLMemberMapping { } @end
// // SWXMLDateMapping.h // This file is part of the "SWXMLMapping" project, and is distributed under the MIT License. // // Created by Samuel Williams on 13/11/05. // Copyright 2005 Samuel Williams. All rights reserved. // #import "SWXMLMemberMapping.h" @class SWXMLMemberMapping; // Formats value attribute according to ISO8601 (http://www.w3.org/TR/NOTE-datetime) @interface SWXMLDateMapping : SWXMLMemberMapping { } @end
Comment regarding value serialization of date.
Comment regarding value serialization of date.
C
mit
oriontransfer/SWXMLMapping
c
## Code Before: // // SWXMLDateMapping.h // This file is part of the "SWXMLMapping" project, and is distributed under the MIT License. // // Created by Samuel Williams on 13/11/05. // Copyright 2005 Samuel Williams. All rights reserved. // #import "SWXMLMemberMapping.h" @class SWXMLMemberMapping; @interface SWXMLDateMapping : SWXMLMemberMapping { } @end ## Instruction: Comment regarding value serialization of date. ## Code After: // // SWXMLDateMapping.h // This file is part of the "SWXMLMapping" project, and is distributed under the MIT License. // // Created by Samuel Williams on 13/11/05. // Copyright 2005 Samuel Williams. All rights reserved. // #import "SWXMLMemberMapping.h" @class SWXMLMemberMapping; // Formats value attribute according to ISO8601 (http://www.w3.org/TR/NOTE-datetime) @interface SWXMLDateMapping : SWXMLMemberMapping { } @end
70efbd90d9d5601d368ddb5ea20a3b9910539b78
members/urls.py
members/urls.py
from django.conf.urls import patterns, url from django.contrib import auth urlpatterns = patterns('', url(r'^login/$', 'django.contrib.auth.views.login',{'template_name': 'members/login_form.html'}, name='login'), url(r'^logout/$', 'django.contrib.auth.views.logout', {'next_page': '/'}, name='logout'), url(r'^search/(?P<name>.*)/$', 'members.views.search', name='search'), url(r'^archive/$', 'members.views.archive_student_council', name='archive_student_council'), url(r'^profile/$', 'members.views.user_projects', name='user-projects'), )
from django.conf.urls import patterns, url urlpatterns = patterns('', url(r'^login/$', 'django.contrib.auth.views.login',{'template_name': 'members/login_form.html'}, name='login'), url(r'^logout/$', 'django.contrib.auth.views.logout', {'next_page': '/'}, name='logout'), url(r'^search/(?P<name>.*)/$', 'members.views.search', name='search'), url(r'^archive/$', 'members.views.archive_student_council', name='archive_student_council'), url(r'^profile/$', 'members.views.user_projects', name='user-projects'), )
Change url and views for login/logout to django Defaults
Change url and views for login/logout to django Defaults
Python
mit
Hackfmi/Diaphanum,Hackfmi/Diaphanum
python
## Code Before: from django.conf.urls import patterns, url from django.contrib import auth urlpatterns = patterns('', url(r'^login/$', 'django.contrib.auth.views.login',{'template_name': 'members/login_form.html'}, name='login'), url(r'^logout/$', 'django.contrib.auth.views.logout', {'next_page': '/'}, name='logout'), url(r'^search/(?P<name>.*)/$', 'members.views.search', name='search'), url(r'^archive/$', 'members.views.archive_student_council', name='archive_student_council'), url(r'^profile/$', 'members.views.user_projects', name='user-projects'), ) ## Instruction: Change url and views for login/logout to django Defaults ## Code After: from django.conf.urls import patterns, url urlpatterns = patterns('', url(r'^login/$', 'django.contrib.auth.views.login',{'template_name': 'members/login_form.html'}, name='login'), url(r'^logout/$', 'django.contrib.auth.views.logout', {'next_page': '/'}, name='logout'), url(r'^search/(?P<name>.*)/$', 'members.views.search', name='search'), url(r'^archive/$', 'members.views.archive_student_council', name='archive_student_council'), url(r'^profile/$', 'members.views.user_projects', name='user-projects'), )
ea12c92da2b449caa0ee5a9fe5202657df1bfa5f
composer.json
composer.json
{ "name": "datachore/datachore", "type": "library", "description": "Datachore is a Query Builder and ORM for Google Appengine's Datastore", "keywords": ["appengine", "datastore"], "homepage": "http://pwhelan.github.io", "license": "MIT", "authors": [ { "name": "Phillip Whelan", "email": "pwhelan@mixxx.org" } ], "require": { "php": ">=5.4.0", "illuminate/support": "~4.2" }, "require-dev": { "phpunit/phpunit": "4.4.*", "slim/slim": "2.3.5", "guzzlehttp/guzzle": "4.2", "satooshi/php-coveralls": "dev-master" }, "autoload": { "psr-4": { "Datachore\\": "src/" } } }
{ "name": "datachore/datachore", "type": "library", "description": "Datachore is a Query Builder and ORM for Google Appengine's Datastore", "keywords": ["appengine", "datastore"], "homepage": "http://pwhelan.github.io", "license": "MIT", "authors": [ { "name": "Phillip Whelan", "email": "pwhelan@mixxx.org" } ], "require": { "php": ">=5.4.0", "illuminate/support": "~4.2|~5.1" }, "require-dev": { "phpunit/phpunit": "4.4.*", "slim/slim": "2.3.5", "guzzlehttp/guzzle": "4.2", "satooshi/php-coveralls": "dev-master" }, "autoload": { "psr-4": { "Datachore\\": "src/" } } }
Allow usage of illuminate v5 components
[TASK] Allow usage of illuminate v5 components
JSON
mit
pwhelan/datachore
json
## Code Before: { "name": "datachore/datachore", "type": "library", "description": "Datachore is a Query Builder and ORM for Google Appengine's Datastore", "keywords": ["appengine", "datastore"], "homepage": "http://pwhelan.github.io", "license": "MIT", "authors": [ { "name": "Phillip Whelan", "email": "pwhelan@mixxx.org" } ], "require": { "php": ">=5.4.0", "illuminate/support": "~4.2" }, "require-dev": { "phpunit/phpunit": "4.4.*", "slim/slim": "2.3.5", "guzzlehttp/guzzle": "4.2", "satooshi/php-coveralls": "dev-master" }, "autoload": { "psr-4": { "Datachore\\": "src/" } } } ## Instruction: [TASK] Allow usage of illuminate v5 components ## Code After: { "name": "datachore/datachore", "type": "library", "description": "Datachore is a Query Builder and ORM for Google Appengine's Datastore", "keywords": ["appengine", "datastore"], "homepage": "http://pwhelan.github.io", "license": "MIT", "authors": [ { "name": "Phillip Whelan", "email": "pwhelan@mixxx.org" } ], "require": { "php": ">=5.4.0", "illuminate/support": "~4.2|~5.1" }, "require-dev": { "phpunit/phpunit": "4.4.*", "slim/slim": "2.3.5", "guzzlehttp/guzzle": "4.2", "satooshi/php-coveralls": "dev-master" }, "autoload": { "psr-4": { "Datachore\\": "src/" } } }
9ef5162e9e3005791b83cdd5150532eae398aadd
src/Common/EventListener/ResponseSecurer.php
src/Common/EventListener/ResponseSecurer.php
<?php namespace Common\EventListener; use Symfony\Component\HttpKernel\Event\FilterResponseEvent; class ResponseSecurer { /** * Add some headers to the response to make our application more secure * see https://www.owasp.org/index.php/List_of_useful_HTTP_headers * * @param FilterResponseEvent $event */ public function onKernelResponse(FilterResponseEvent $event) { // provides clickjacking protection $event->getResponse()->headers->set('X-Frame-Options', 'deny'); // enables the XSS filter built into most recent browsers $event->getResponse()->headers->set('X-XSS-Protection', '1; mode=block'); // prevents IE and Chrome from MIME-sniffing $event->getResponse()->headers->set('X-Content-Type-Options', 'nosniff'); } }
<?php namespace Common\EventListener; use Symfony\Component\HttpKernel\Event\FilterResponseEvent; class ResponseSecurer { /** * Add some headers to the response to make our application more secure * see https://www.owasp.org/index.php/List_of_useful_HTTP_headers * * @param FilterResponseEvent $event */ public function onKernelResponse(FilterResponseEvent $event) { $headers = [ 'X-Frame-Options' => 'deny', 'X-XSS-Protection' => '1; mode=block', 'X-Content-Type-Options' => 'nosniff', ]; foreach ($headers as $header => $value) { if (!$event->getResponse()->headers->has($header)) { $event->getResponse()->headers->set($header, $value); } } } }
Make it possible to define other values for the headers X-Frame-Options, X-XSS-Protection, X-Content-Type-Options if you realy want to
Make it possible to define other values for the headers X-Frame-Options, X-XSS-Protection, X-Content-Type-Options if you realy want to The current implementation uses an iframe this change makes it possible to use that again
PHP
mit
Thijzer/forkcms,Katrienvh/forkcms,Thijzer/forkcms,sumocoders/forkcms,vytsci/forkcms,forkcms/forkcms,mathiashelin/forkcms,forkcms/forkcms,justcarakas/forkcms,bartdc/forkcms,carakas/forkcms,jonasdekeukelaere/forkcms,jonasdekeukelaere/forkcms,bartdc/forkcms,Katrienvh/forkcms,riadvice/forkcms,DegradationOfMankind/forkcms,riadvice/forkcms,carakas/forkcms,carakas/forkcms,Katrienvh/forkcms,mathiashelin/forkcms,vytenizs/forkcms,jeroendesloovere/forkcms,DegradationOfMankind/forkcms,vytsci/forkcms,sumocoders/forkcms,jeroendesloovere/forkcms,tommyvdv/forkcms,jeroendesloovere/forkcms,Thijzer/forkcms,carakas/forkcms,jonasdekeukelaere/forkcms,mathiashelin/forkcms,mathiashelin/forkcms,vytsci/forkcms,vytenizs/forkcms,jessedobbelaere/forkcms,riadvice/forkcms,sumocoders/forkcms,jonasdekeukelaere/forkcms,jessedobbelaere/forkcms,carakas/forkcms,sumocoders/forkcms,tommyvdv/forkcms,DegradationOfMankind/forkcms,riadvice/forkcms,Katrienvh/forkcms,bartdc/forkcms,jacob-v-dam/forkcms,sumocoders/forkcms,forkcms/forkcms,jessedobbelaere/forkcms,jessedobbelaere/forkcms,justcarakas/forkcms,jeroendesloovere/forkcms,vytenizs/forkcms,jacob-v-dam/forkcms,jonasdekeukelaere/forkcms,tommyvdv/forkcms,jacob-v-dam/forkcms,tommyvdv/forkcms,justcarakas/forkcms,DegradationOfMankind/forkcms,jacob-v-dam/forkcms,forkcms/forkcms
php
## Code Before: <?php namespace Common\EventListener; use Symfony\Component\HttpKernel\Event\FilterResponseEvent; class ResponseSecurer { /** * Add some headers to the response to make our application more secure * see https://www.owasp.org/index.php/List_of_useful_HTTP_headers * * @param FilterResponseEvent $event */ public function onKernelResponse(FilterResponseEvent $event) { // provides clickjacking protection $event->getResponse()->headers->set('X-Frame-Options', 'deny'); // enables the XSS filter built into most recent browsers $event->getResponse()->headers->set('X-XSS-Protection', '1; mode=block'); // prevents IE and Chrome from MIME-sniffing $event->getResponse()->headers->set('X-Content-Type-Options', 'nosniff'); } } ## Instruction: Make it possible to define other values for the headers X-Frame-Options, X-XSS-Protection, X-Content-Type-Options if you realy want to The current implementation uses an iframe this change makes it possible to use that again ## Code After: <?php namespace Common\EventListener; use Symfony\Component\HttpKernel\Event\FilterResponseEvent; class ResponseSecurer { /** * Add some headers to the response to make our application more secure * see https://www.owasp.org/index.php/List_of_useful_HTTP_headers * * @param FilterResponseEvent $event */ public function onKernelResponse(FilterResponseEvent $event) { $headers = [ 'X-Frame-Options' => 'deny', 'X-XSS-Protection' => '1; mode=block', 'X-Content-Type-Options' => 'nosniff', ]; foreach ($headers as $header => $value) { if (!$event->getResponse()->headers->has($header)) { $event->getResponse()->headers->set($header, $value); } } } }
8c53d511eccc0820bdb920be343ade93473ac5e4
cla_public/assets-src/javascripts/modules/moj.LabelSelect.js
cla_public/assets-src/javascripts/modules/moj.LabelSelect.js
(function () { 'use strict'; moj.Modules.LabelSelect = { el: '.js-LabelSelect', init: function () { this.cacheEls(); this.bindEvents(); // keep current state this.$options.each(function () { var $el = $(this); if($el.is(':checked')){ $el.parent().addClass('is-selected'); } }); }, bindEvents: function () { this.$options .on('change', function () { var $el = $(this), $parent = $el.parent('label'); // clear out all other selections on radio elements if ($el.attr('type') === 'radio') { $('[name=' + $el.attr('name') + ']').parent('label').removeClass('is-selected'); } // set is-selected state on check if($el.is(':checked')){ $parent.addClass('is-selected'); } else { $parent.removeClass('is-selected'); } }); }, cacheEls: function () { this.$options = $(this.el).find('input[type=radio], input[type=checkbox]'); } }; }());
(function () { 'use strict'; moj.Modules.LabelSelect = { el: '.js-LabelSelect', init: function () { _.bindAll(this, 'render'); this.cacheEls(); this.bindEvents(); }, bindEvents: function () { this.$options .on('change', function () { var $el = $(this), $parent = $el.parent('label'); // clear out all other selections on radio elements if ($el.attr('type') === 'radio') { $('[name=' + $el.attr('name') + ']').parent('label').removeClass('is-selected'); } // set is-selected state on check if($el.is(':checked')){ $parent.addClass('is-selected'); } else { $parent.removeClass('is-selected'); } }); moj.Events.on('render LabelSelect.render', this.render); }, cacheEls: function () { this.$options = $(this.el).find('input[type=radio], input[type=checkbox]'); }, render: function () { // keep current state this.$options.each(function () { var $el = $(this); if($el.is(':checked')){ $el.parent().addClass('is-selected'); } }); } }; }());
Add render function to label select js module
Add render function to label select js module
JavaScript
mit
ministryofjustice/cla_public,ministryofjustice/cla_public,ministryofjustice/cla_public,ministryofjustice/cla_public
javascript
## Code Before: (function () { 'use strict'; moj.Modules.LabelSelect = { el: '.js-LabelSelect', init: function () { this.cacheEls(); this.bindEvents(); // keep current state this.$options.each(function () { var $el = $(this); if($el.is(':checked')){ $el.parent().addClass('is-selected'); } }); }, bindEvents: function () { this.$options .on('change', function () { var $el = $(this), $parent = $el.parent('label'); // clear out all other selections on radio elements if ($el.attr('type') === 'radio') { $('[name=' + $el.attr('name') + ']').parent('label').removeClass('is-selected'); } // set is-selected state on check if($el.is(':checked')){ $parent.addClass('is-selected'); } else { $parent.removeClass('is-selected'); } }); }, cacheEls: function () { this.$options = $(this.el).find('input[type=radio], input[type=checkbox]'); } }; }()); ## Instruction: Add render function to label select js module ## Code After: (function () { 'use strict'; moj.Modules.LabelSelect = { el: '.js-LabelSelect', init: function () { _.bindAll(this, 'render'); this.cacheEls(); this.bindEvents(); }, bindEvents: function () { this.$options .on('change', function () { var $el = $(this), $parent = $el.parent('label'); // clear out all other selections on radio elements if ($el.attr('type') === 'radio') { $('[name=' + $el.attr('name') + ']').parent('label').removeClass('is-selected'); } // set is-selected state on check if($el.is(':checked')){ $parent.addClass('is-selected'); } else { $parent.removeClass('is-selected'); } }); moj.Events.on('render LabelSelect.render', this.render); }, cacheEls: function () { this.$options = $(this.el).find('input[type=radio], input[type=checkbox]'); }, render: function () { // keep current state this.$options.each(function () { var $el = $(this); if($el.is(':checked')){ $el.parent().addClass('is-selected'); } }); } }; }());
4a3c1e09198afd49f7f886e36056a221dbccbe97
Casks/scansnap-manager.rb
Casks/scansnap-manager.rb
class ScansnapManager < Cask url 'http://www.fujitsu.com/downloads/IMAGE/driver/ss/mgr/m-sv600/MacScanSnapV62L10WW.dmg' homepage 'http://www.fujitsu.com/global/support/computing/peripheral/scanners/software/' version '6.2L10' no_checksum install 'ScanSnap Manager.pkg' uninstall :pkgutil => 'jp.co.pfu.ScanSnap.*' end
class ScansnapManager < Cask url 'http://www.fujitsu.com/downloads/IMAGE/driver/ss/mgr/m-sv600/MacScanSnapV62L10WW.dmg' homepage 'http://www.fujitsu.com/global/support/computing/peripheral/scanners/software/' version '6.2L10' sha256 '7273034398e9a57eb0fa89167c9e801ad2bf9fe56b52b3d9591628e978168afb' install 'ScanSnap Manager.pkg' uninstall :pkgutil => 'jp.co.pfu.ScanSnap.*' end
Update sha256 for ScanSnap Manager
Update sha256 for ScanSnap Manager
Ruby
bsd-2-clause
fwiesel/homebrew-cask,jeroenseegers/homebrew-cask,SentinelWarren/homebrew-cask,casidiablo/homebrew-cask,brianshumate/homebrew-cask,tolbkni/homebrew-cask,gguillotte/homebrew-cask,mwek/homebrew-cask,MatzFan/homebrew-cask,kiliankoe/homebrew-cask,vitorgalvao/homebrew-cask,joschi/homebrew-cask,Ketouem/homebrew-cask,doits/homebrew-cask,valepert/homebrew-cask,bcaceiro/homebrew-cask,devmynd/homebrew-cask,shoichiaizawa/homebrew-cask,optikfluffel/homebrew-cask,flaviocamilo/homebrew-cask,santoshsahoo/homebrew-cask,0rax/homebrew-cask,jtriley/homebrew-cask,donbobka/homebrew-cask,BenjaminHCCarr/homebrew-cask,ashishb/homebrew-cask,donbobka/homebrew-cask,tjt263/homebrew-cask,mkozjak/homebrew-cask,thomanq/homebrew-cask,qnm/homebrew-cask,fazo96/homebrew-cask,jonathanwiesel/homebrew-cask,christer155/homebrew-cask,blainesch/homebrew-cask,jmeridth/homebrew-cask,fly19890211/homebrew-cask,rhendric/homebrew-cask,nicholsn/homebrew-cask,sideci-sample/sideci-sample-homebrew-cask,katoquro/homebrew-cask,exherb/homebrew-cask,rajiv/homebrew-cask,AnastasiaSulyagina/homebrew-cask,artdevjs/homebrew-cask,rogeriopradoj/homebrew-cask,MicTech/homebrew-cask,aguynamedryan/homebrew-cask,jpodlech/homebrew-cask,epmatsw/homebrew-cask,joshka/homebrew-cask,cliffcotino/homebrew-cask,ohammersmith/homebrew-cask,catap/homebrew-cask,JacopKane/homebrew-cask,ahbeng/homebrew-cask,inz/homebrew-cask,kamilboratynski/homebrew-cask,xakraz/homebrew-cask,jellyfishcoder/homebrew-cask,dictcp/homebrew-cask,nrlquaker/homebrew-cask,lantrix/homebrew-cask,otzy007/homebrew-cask,hvisage/homebrew-cask,FredLackeyOfficial/homebrew-cask,phpwutz/homebrew-cask,singingwolfboy/homebrew-cask,ptb/homebrew-cask,Bombenleger/homebrew-cask,cliffcotino/homebrew-cask,troyxmccall/homebrew-cask,schneidmaster/homebrew-cask,fazo96/homebrew-cask,jacobdam/homebrew-cask,anbotero/homebrew-cask,jeanregisser/homebrew-cask,freeslugs/homebrew-cask,alexg0/homebrew-cask,optikfluffel/homebrew-cask,ianyh/homebrew-cask,gustavoavellar/homebrew-cask,gmkey/homebrew-cask,kongslund/homebrew-cask,skyyuan/homebrew-cask,hanxue/caskroom,jacobdam/homebrew-cask,epardee/homebrew-cask,claui/homebrew-cask,kkdd/homebrew-cask,FinalDes/homebrew-cask,leonmachadowilcox/homebrew-cask,chino/homebrew-cask,13k/homebrew-cask,cobyism/homebrew-cask,freeslugs/homebrew-cask,unasuke/homebrew-cask,kirikiriyamama/homebrew-cask,amatos/homebrew-cask,vigosan/homebrew-cask,markhuber/homebrew-cask,xakraz/homebrew-cask,greg5green/homebrew-cask,cblecker/homebrew-cask,nickpellant/homebrew-cask,xyb/homebrew-cask,neil-ca-moore/homebrew-cask,yumitsu/homebrew-cask,MerelyAPseudonym/homebrew-cask,wayou/homebrew-cask,daften/homebrew-cask,joaocc/homebrew-cask,sparrc/homebrew-cask,Cottser/homebrew-cask,theoriginalgri/homebrew-cask,cblecker/homebrew-cask,andrewdisley/homebrew-cask,chuanxd/homebrew-cask,ptb/homebrew-cask,andyshinn/homebrew-cask,cobyism/homebrew-cask,coeligena/homebrew-customized,gilesdring/homebrew-cask,JikkuJose/homebrew-cask,nickpellant/homebrew-cask,robbiethegeek/homebrew-cask,lvicentesanchez/homebrew-cask,jhowtan/homebrew-cask,JacopKane/homebrew-cask,tarwich/homebrew-cask,chrisfinazzo/homebrew-cask,codeurge/homebrew-cask,My2ndAngelic/homebrew-cask,rkJun/homebrew-cask,cedwardsmedia/homebrew-cask,christophermanning/homebrew-cask,kingthorin/homebrew-cask,chino/homebrew-cask,hackhandslabs/homebrew-cask,zchee/homebrew-cask,fanquake/homebrew-cask,williamboman/homebrew-cask,gyugyu/homebrew-cask,guerrero/homebrew-cask,yurrriq/homebrew-cask,rajiv/homebrew-cask,koenrh/homebrew-cask,gregkare/homebrew-cask,gregkare/homebrew-cask,tyage/homebrew-cask,elnappo/homebrew-cask,theoriginalgri/homebrew-cask,arranubels/homebrew-cask,claui/homebrew-cask,jedahan/homebrew-cask,mazehall/homebrew-cask,gerrymiller/homebrew-cask,stevenmaguire/homebrew-cask,coneman/homebrew-cask,howie/homebrew-cask,dustinblackman/homebrew-cask,dlackty/homebrew-cask,AndreTheHunter/homebrew-cask,My2ndAngelic/homebrew-cask,nanoxd/homebrew-cask,paulombcosta/homebrew-cask,leipert/homebrew-cask,cohei/homebrew-cask,yutarody/homebrew-cask,nicholsn/homebrew-cask,thii/homebrew-cask,mahori/homebrew-cask,chadcatlett/caskroom-homebrew-cask,sideci-sample/sideci-sample-homebrew-cask,mchlrmrz/homebrew-cask,tedski/homebrew-cask,pablote/homebrew-cask,ericbn/homebrew-cask,bcomnes/homebrew-cask,jbeagley52/homebrew-cask,Ngrd/homebrew-cask,bendoerr/homebrew-cask,carlmod/homebrew-cask,otzy007/homebrew-cask,ajbw/homebrew-cask,cblecker/homebrew-cask,andrewdisley/homebrew-cask,danielgomezrico/homebrew-cask,sebcode/homebrew-cask,a1russell/homebrew-cask,deanmorin/homebrew-cask,julienlavergne/homebrew-cask,KosherBacon/homebrew-cask,n0ts/homebrew-cask,paulbreslin/homebrew-cask,nrlquaker/homebrew-cask,markhuber/homebrew-cask,mwilmer/homebrew-cask,MisumiRize/homebrew-cask,katoquro/homebrew-cask,3van/homebrew-cask,arronmabrey/homebrew-cask,dwihn0r/homebrew-cask,boecko/homebrew-cask,mwean/homebrew-cask,janlugt/homebrew-cask,alexg0/homebrew-cask,psibre/homebrew-cask,deanmorin/homebrew-cask,danielgomezrico/homebrew-cask,seanzxx/homebrew-cask,dwihn0r/homebrew-cask,fharbe/homebrew-cask,sgnh/homebrew-cask,lalyos/homebrew-cask,Ibuprofen/homebrew-cask,johan/homebrew-cask,dezon/homebrew-cask,unasuke/homebrew-cask,tsparber/homebrew-cask,skyyuan/homebrew-cask,Saklad5/homebrew-cask,cfillion/homebrew-cask,mikem/homebrew-cask,nightscape/homebrew-cask,dictcp/homebrew-cask,gibsjose/homebrew-cask,jeroenj/homebrew-cask,mwean/homebrew-cask,nrlquaker/homebrew-cask,samdoran/homebrew-cask,Ephemera/homebrew-cask,josa42/homebrew-cask,tangestani/homebrew-cask,corbt/homebrew-cask,opsdev-ws/homebrew-cask,sosedoff/homebrew-cask,bkono/homebrew-cask,wickles/homebrew-cask,kongslund/homebrew-cask,asins/homebrew-cask,greg5green/homebrew-cask,lifepillar/homebrew-cask,mAAdhaTTah/homebrew-cask,uetchy/homebrew-cask,paour/homebrew-cask,jacobbednarz/homebrew-cask,thehunmonkgroup/homebrew-cask,larseggert/homebrew-cask,mingzhi22/homebrew-cask,BahtiyarB/homebrew-cask,seanorama/homebrew-cask,0xadada/homebrew-cask,ch3n2k/homebrew-cask,corbt/homebrew-cask,jeanregisser/homebrew-cask,supriyantomaftuh/homebrew-cask,crzrcn/homebrew-cask,atsuyim/homebrew-cask,mishari/homebrew-cask,underyx/homebrew-cask,rednoah/homebrew-cask,samnung/homebrew-cask,RickWong/homebrew-cask,hellosky806/homebrew-cask,ingorichter/homebrew-cask,deizel/homebrew-cask,kamilboratynski/homebrew-cask,bosr/homebrew-cask,robertgzr/homebrew-cask,stevehedrick/homebrew-cask,JosephViolago/homebrew-cask,mattrobenolt/homebrew-cask,tedski/homebrew-cask,gguillotte/homebrew-cask,rcuza/homebrew-cask,mfpierre/homebrew-cask,sachin21/homebrew-cask,jeroenj/homebrew-cask,thehunmonkgroup/homebrew-cask,jalaziz/homebrew-cask,chrisRidgers/homebrew-cask,FinalDes/homebrew-cask,FranklinChen/homebrew-cask,bchatard/homebrew-cask,pkq/homebrew-cask,ksato9700/homebrew-cask,gord1anknot/homebrew-cask,ahbeng/homebrew-cask,malford/homebrew-cask,caskroom/homebrew-cask,dvdoliveira/homebrew-cask,kTitan/homebrew-cask,hvisage/homebrew-cask,scottsuch/homebrew-cask,johnste/homebrew-cask,arronmabrey/homebrew-cask,alebcay/homebrew-cask,dvdoliveira/homebrew-cask,sohtsuka/homebrew-cask,mhubig/homebrew-cask,miguelfrde/homebrew-cask,delphinus35/homebrew-cask,m3nu/homebrew-cask,casidiablo/homebrew-cask,perfide/homebrew-cask,a-x-/homebrew-cask,colindunn/homebrew-cask,joschi/homebrew-cask,joaocc/homebrew-cask,jspahrsummers/homebrew-cask,mwek/homebrew-cask,frapposelli/homebrew-cask,amatos/homebrew-cask,doits/homebrew-cask,squid314/homebrew-cask,timsutton/homebrew-cask,neil-ca-moore/homebrew-cask,ywfwj2008/homebrew-cask,sysbot/homebrew-cask,spruceb/homebrew-cask,dustinblackman/homebrew-cask,johnste/homebrew-cask,boecko/homebrew-cask,Amorymeltzer/homebrew-cask,dcondrey/homebrew-cask,esebastian/homebrew-cask,tjt263/homebrew-cask,imgarylai/homebrew-cask,hristozov/homebrew-cask,scw/homebrew-cask,0rax/homebrew-cask,dezon/homebrew-cask,gurghet/homebrew-cask,colindean/homebrew-cask,kryhear/homebrew-cask,kei-yamazaki/homebrew-cask,samnung/homebrew-cask,kostasdizas/homebrew-cask,franklouwers/homebrew-cask,Amorymeltzer/homebrew-cask,squid314/homebrew-cask,wesen/homebrew-cask,illusionfield/homebrew-cask,norio-nomura/homebrew-cask,petmoo/homebrew-cask,jawshooah/homebrew-cask,af/homebrew-cask,ebraminio/homebrew-cask,kpearson/homebrew-cask,jamesmlees/homebrew-cask,Ketouem/homebrew-cask,miccal/homebrew-cask,scw/homebrew-cask,kingthorin/homebrew-cask,lukeadams/homebrew-cask,rhendric/homebrew-cask,fharbe/homebrew-cask,mokagio/homebrew-cask,albertico/homebrew-cask,qbmiller/homebrew-cask,englishm/homebrew-cask,joschi/homebrew-cask,y00rb/homebrew-cask,AndreTheHunter/homebrew-cask,coeligena/homebrew-customized,feigaochn/homebrew-cask,victorpopkov/homebrew-cask,af/homebrew-cask,a1russell/homebrew-cask,devmynd/homebrew-cask,valepert/homebrew-cask,muan/homebrew-cask,nicolas-brousse/homebrew-cask,bric3/homebrew-cask,otaran/homebrew-cask,wmorin/homebrew-cask,astorije/homebrew-cask,3van/homebrew-cask,mingzhi22/homebrew-cask,ayohrling/homebrew-cask,sirodoht/homebrew-cask,bosr/homebrew-cask,uetchy/homebrew-cask,retbrown/homebrew-cask,andyli/homebrew-cask,andrewschleifer/homebrew-cask,royalwang/homebrew-cask,diguage/homebrew-cask,RickWong/homebrew-cask,Nitecon/homebrew-cask,mattrobenolt/homebrew-cask,SamiHiltunen/homebrew-cask,lumaxis/homebrew-cask,hyuna917/homebrew-cask,xtian/homebrew-cask,johndbritton/homebrew-cask,decrement/homebrew-cask,nanoxd/homebrew-cask,nathansgreen/homebrew-cask,mwilmer/homebrew-cask,RogerThiede/homebrew-cask,tmoreira2020/homebrew,feigaochn/homebrew-cask,dieterdemeyer/homebrew-cask,scribblemaniac/homebrew-cask,Ephemera/homebrew-cask,nightscape/homebrew-cask,ohammersmith/homebrew-cask,mishari/homebrew-cask,lieuwex/homebrew-cask,bric3/homebrew-cask,syscrusher/homebrew-cask,guerrero/homebrew-cask,lucasmezencio/homebrew-cask,okket/homebrew-cask,julienlavergne/homebrew-cask,lukasbestle/homebrew-cask,helloIAmPau/homebrew-cask,pkq/homebrew-cask,forevergenin/homebrew-cask,markthetech/homebrew-cask,kei-yamazaki/homebrew-cask,ksato9700/homebrew-cask,supriyantomaftuh/homebrew-cask,renard/homebrew-cask,slack4u/homebrew-cask,puffdad/homebrew-cask,ashishb/homebrew-cask,nelsonjchen/homebrew-cask,josa42/homebrew-cask,haha1903/homebrew-cask,jangalinski/homebrew-cask,yuhki50/homebrew-cask,ayohrling/homebrew-cask,scribblemaniac/homebrew-cask,mathbunnyru/homebrew-cask,nathanielvarona/homebrew-cask,adriweb/homebrew-cask,iAmGhost/homebrew-cask,napaxton/homebrew-cask,hovancik/homebrew-cask,jgarber623/homebrew-cask,vin047/homebrew-cask,retbrown/homebrew-cask,jmeridth/homebrew-cask,djakarta-trap/homebrew-myCask,n0ts/homebrew-cask,nathanielvarona/homebrew-cask,exherb/homebrew-cask,bchatard/homebrew-cask,sgnh/homebrew-cask,franklouwers/homebrew-cask,bsiddiqui/homebrew-cask,pacav69/homebrew-cask,antogg/homebrew-cask,sjackman/homebrew-cask,goxberry/homebrew-cask,okket/homebrew-cask,mariusbutuc/homebrew-cask,linc01n/homebrew-cask,vin047/homebrew-cask,jiashuw/homebrew-cask,paulbreslin/homebrew-cask,kryhear/homebrew-cask,imgarylai/homebrew-cask,lifepillar/homebrew-cask,reitermarkus/homebrew-cask,samdoran/homebrew-cask,neverfox/homebrew-cask,paulombcosta/homebrew-cask,farmerchris/homebrew-cask,flada-auxv/homebrew-cask,rickychilcott/homebrew-cask,shonjir/homebrew-cask,xight/homebrew-cask,Keloran/homebrew-cask,hristozov/homebrew-cask,ahvigil/homebrew-cask,guylabs/homebrew-cask,lcasey001/homebrew-cask,chrisRidgers/homebrew-cask,6uclz1/homebrew-cask,jasmas/homebrew-cask,malob/homebrew-cask,wolflee/homebrew-cask,gerrymiller/homebrew-cask,zorosteven/homebrew-cask,kirikiriyamama/homebrew-cask,sscotth/homebrew-cask,sanyer/homebrew-cask,malob/homebrew-cask,adriweb/homebrew-cask,AdamCmiel/homebrew-cask,blogabe/homebrew-cask,forevergenin/homebrew-cask,albertico/homebrew-cask,syscrusher/homebrew-cask,alexg0/homebrew-cask,6uclz1/homebrew-cask,wolflee/homebrew-cask,bsiddiqui/homebrew-cask,kassi/homebrew-cask,shorshe/homebrew-cask,shanonvl/homebrew-cask,stigkj/homebrew-caskroom-cask,mrmachine/homebrew-cask,miccal/homebrew-cask,iamso/homebrew-cask,reitermarkus/homebrew-cask,djmonta/homebrew-cask,deiga/homebrew-cask,paour/homebrew-cask,CameronGarrett/homebrew-cask,ftiff/homebrew-cask,ftiff/homebrew-cask,bgandon/homebrew-cask,kesara/homebrew-cask,catap/homebrew-cask,stevenmaguire/homebrew-cask,gustavoavellar/homebrew-cask,coeligena/homebrew-customized,akiomik/homebrew-cask,akiomik/homebrew-cask,johntrandall/homebrew-cask,axodys/homebrew-cask,cfillion/homebrew-cask,kevyau/homebrew-cask,hellosky806/homebrew-cask,Saklad5/homebrew-cask,pgr0ss/homebrew-cask,daften/homebrew-cask,shonjir/homebrew-cask,troyxmccall/homebrew-cask,victorpopkov/homebrew-cask,joaoponceleao/homebrew-cask,taherio/homebrew-cask,ahundt/homebrew-cask,claui/homebrew-cask,leonmachadowilcox/homebrew-cask,wKovacs64/homebrew-cask,MoOx/homebrew-cask,delphinus35/homebrew-cask,julionc/homebrew-cask,lcasey001/homebrew-cask,sjackman/homebrew-cask,elyscape/homebrew-cask,barravi/homebrew-cask,andersonba/homebrew-cask,d/homebrew-cask,danielbayley/homebrew-cask,xcezx/homebrew-cask,MircoT/homebrew-cask,zerrot/homebrew-cask,vmrob/homebrew-cask,inz/homebrew-cask,wickedsp1d3r/homebrew-cask,renard/homebrew-cask,sanyer/homebrew-cask,flaviocamilo/homebrew-cask,nathancahill/homebrew-cask,boydj/homebrew-cask,enriclluelles/homebrew-cask,zerrot/homebrew-cask,paour/homebrew-cask,jconley/homebrew-cask,slnovak/homebrew-cask,riyad/homebrew-cask,JacopKane/homebrew-cask,wmorin/homebrew-cask,ksylvan/homebrew-cask,usami-k/homebrew-cask,sparrc/homebrew-cask,chrisfinazzo/homebrew-cask,inta/homebrew-cask,pinut/homebrew-cask,wastrachan/homebrew-cask,rajiv/homebrew-cask,anbotero/homebrew-cask,xyb/homebrew-cask,shoichiaizawa/homebrew-cask,jalaziz/homebrew-cask,zmwangx/homebrew-cask,kkdd/homebrew-cask,adrianchia/homebrew-cask,bcaceiro/homebrew-cask,drostron/homebrew-cask,michelegera/homebrew-cask,optikfluffel/homebrew-cask,farmerchris/homebrew-cask,underyx/homebrew-cask,danielbayley/homebrew-cask,renaudguerin/homebrew-cask,dunn/homebrew-cask,puffdad/homebrew-cask,d/homebrew-cask,asbachb/homebrew-cask,pablote/homebrew-cask,helloIAmPau/homebrew-cask,Ephemera/homebrew-cask,MichaelPei/homebrew-cask,johntrandall/homebrew-cask,slnovak/homebrew-cask,slack4u/homebrew-cask,RJHsiao/homebrew-cask,mahori/homebrew-cask,retrography/homebrew-cask,lolgear/homebrew-cask,alebcay/homebrew-cask,moimikey/homebrew-cask,kesara/homebrew-cask,crzrcn/homebrew-cask,bcomnes/homebrew-cask,tarwich/homebrew-cask,n8henrie/homebrew-cask,huanzhang/homebrew-cask,jawshooah/homebrew-cask,nshemonsky/homebrew-cask,imgarylai/homebrew-cask,kronicd/homebrew-cask,johnjelinek/homebrew-cask,ponychicken/homebrew-customcask,sachin21/homebrew-cask,shishi/homebrew-cask,stigkj/homebrew-caskroom-cask,onlynone/homebrew-cask,afdnlw/homebrew-cask,ddm/homebrew-cask,haha1903/homebrew-cask,cclauss/homebrew-cask,diogodamiani/homebrew-cask,gerrypower/homebrew-cask,andyli/homebrew-cask,jrwesolo/homebrew-cask,chuanxd/homebrew-cask,AdamCmiel/homebrew-cask,wesen/homebrew-cask,BahtiyarB/homebrew-cask,jacobbednarz/homebrew-cask,kievechua/homebrew-cask,julionc/homebrew-cask,lukeadams/homebrew-cask,andersonba/homebrew-cask,kpearson/homebrew-cask,jasmas/homebrew-cask,toonetown/homebrew-cask,scottsuch/homebrew-cask,frapposelli/homebrew-cask,Keloran/homebrew-cask,hanxue/caskroom,tangestani/homebrew-cask,thii/homebrew-cask,vuquoctuan/homebrew-cask,faun/homebrew-cask,CameronGarrett/homebrew-cask,giannitm/homebrew-cask,tmoreira2020/homebrew,Whoaa512/homebrew-cask,toonetown/homebrew-cask,lieuwex/homebrew-cask,RogerThiede/homebrew-cask,rogeriopradoj/homebrew-cask,mgryszko/homebrew-cask,mathbunnyru/homebrew-cask,BenjaminHCCarr/homebrew-cask,mrmachine/homebrew-cask,athrunsun/homebrew-cask,colindunn/homebrew-cask,esebastian/homebrew-cask,Philosoft/homebrew-cask,vigosan/homebrew-cask,muan/homebrew-cask,xyb/homebrew-cask,qnm/homebrew-cask,n8henrie/homebrew-cask,buo/homebrew-cask,ch3n2k/homebrew-cask,moimikey/homebrew-cask,Hywan/homebrew-cask,garborg/homebrew-cask,FredLackeyOfficial/homebrew-cask,illusionfield/homebrew-cask,Fedalto/homebrew-cask,morganestes/homebrew-cask,dunn/homebrew-cask,zorosteven/homebrew-cask,kevyau/homebrew-cask,0xadada/homebrew-cask,reitermarkus/homebrew-cask,drostron/homebrew-cask,wKovacs64/homebrew-cask,FranklinChen/homebrew-cask,lauantai/homebrew-cask,tolbkni/homebrew-cask,aktau/homebrew-cask,leipert/homebrew-cask,christer155/homebrew-cask,jen20/homebrew-cask,ctrevino/homebrew-cask,opsdev-ws/homebrew-cask,winkelsdorf/homebrew-cask,ninjahoahong/homebrew-cask,mfpierre/homebrew-cask,sebcode/homebrew-cask,elseym/homebrew-cask,a1russell/homebrew-cask,nelsonjchen/homebrew-cask,afh/homebrew-cask,epmatsw/homebrew-cask,JikkuJose/homebrew-cask,mindriot101/homebrew-cask,morsdyce/homebrew-cask,remko/homebrew-cask,mattrobenolt/homebrew-cask,asbachb/homebrew-cask,mkozjak/homebrew-cask,hswong3i/homebrew-cask,tjnycum/homebrew-cask,mchlrmrz/homebrew-cask,gabrielizaias/homebrew-cask,ahundt/homebrew-cask,xalep/homebrew-cask,ingorichter/homebrew-cask,BenjaminHCCarr/homebrew-cask,scottsuch/homebrew-cask,mlocher/homebrew-cask,cprecioso/homebrew-cask,zmwangx/homebrew-cask,nicolas-brousse/homebrew-cask,dcondrey/homebrew-cask,jayshao/homebrew-cask,j13k/homebrew-cask,thomanq/homebrew-cask,cclauss/homebrew-cask,zhuzihhhh/homebrew-cask,Gasol/homebrew-cask,ddm/homebrew-cask,michelegera/homebrew-cask,guylabs/homebrew-cask,Amorymeltzer/homebrew-cask,robbiethegeek/homebrew-cask,linc01n/homebrew-cask,christophermanning/homebrew-cask,shishi/homebrew-cask,lucasmezencio/homebrew-cask,sirodoht/homebrew-cask,aguynamedryan/homebrew-cask,LaurentFough/homebrew-cask,koenrh/homebrew-cask,blogabe/homebrew-cask,tranc99/homebrew-cask,shanonvl/homebrew-cask,tdsmith/homebrew-cask,skatsuta/homebrew-cask,iAmGhost/homebrew-cask,gabrielizaias/homebrew-cask,phpwutz/homebrew-cask,carlmod/homebrew-cask,stevehedrick/homebrew-cask,nysthee/homebrew-cask,singingwolfboy/homebrew-cask,genewoo/homebrew-cask,xiongchiamiov/homebrew-cask,diogodamiani/homebrew-cask,mauricerkelly/homebrew-cask,fkrone/homebrew-cask,williamboman/homebrew-cask,santoshsahoo/homebrew-cask,sscotth/homebrew-cask,stonehippo/homebrew-cask,vitorgalvao/homebrew-cask,jspahrsummers/homebrew-cask,zeusdeux/homebrew-cask,gurghet/homebrew-cask,norio-nomura/homebrew-cask,tan9/homebrew-cask,joaoponceleao/homebrew-cask,jedahan/homebrew-cask,athrunsun/homebrew-cask,goxberry/homebrew-cask,barravi/homebrew-cask,yurikoles/homebrew-cask,kievechua/homebrew-cask,cprecioso/homebrew-cask,iamso/homebrew-cask,jconley/homebrew-cask,deiga/homebrew-cask,stephenwade/homebrew-cask,joshka/homebrew-cask,sanyer/homebrew-cask,singingwolfboy/homebrew-cask,JoelLarson/homebrew-cask,elnappo/homebrew-cask,nathansgreen/homebrew-cask,ahvigil/homebrew-cask,wizonesolutions/homebrew-cask,tranc99/homebrew-cask,qbmiller/homebrew-cask,jangalinski/homebrew-cask,huanzhang/homebrew-cask,MatzFan/homebrew-cask,alebcay/homebrew-cask,miku/homebrew-cask,sanchezm/homebrew-cask,pkq/homebrew-cask,sanchezm/homebrew-cask,JosephViolago/homebrew-cask,mhubig/homebrew-cask,johnjelinek/homebrew-cask,jpmat296/homebrew-cask,djmonta/homebrew-cask,patresi/homebrew-cask,elseym/homebrew-cask,klane/homebrew-cask,MerelyAPseudonym/homebrew-cask,a-x-/homebrew-cask,fly19890211/homebrew-cask,adrianchia/homebrew-cask,lukasbestle/homebrew-cask,fkrone/homebrew-cask,13k/homebrew-cask,Bombenleger/homebrew-cask,mjgardner/homebrew-cask,malob/homebrew-cask,ponychicken/homebrew-customcask,hakamadare/homebrew-cask,ldong/homebrew-cask,adelinofaria/homebrew-cask,jeroenseegers/homebrew-cask,afh/homebrew-cask,seanzxx/homebrew-cask,rednoah/homebrew-cask,antogg/homebrew-cask,stonehippo/homebrew-cask,ebraminio/homebrew-cask,deiga/homebrew-cask,yutarody/homebrew-cask,gyndav/homebrew-cask,gerrypower/homebrew-cask,psibre/homebrew-cask,skatsuta/homebrew-cask,renaudguerin/homebrew-cask,garborg/homebrew-cask,asins/homebrew-cask,riyad/homebrew-cask,moonboots/homebrew-cask,mindriot101/homebrew-cask,nysthee/homebrew-cask,prime8/homebrew-cask,feniix/homebrew-cask,ericbn/homebrew-cask,adrianchia/homebrew-cask,reelsense/homebrew-cask,sscotth/homebrew-cask,joshka/homebrew-cask,hyuna917/homebrew-cask,napaxton/homebrew-cask,nathanielvarona/homebrew-cask,taherio/homebrew-cask,zhuzihhhh/homebrew-cask,aki77/homebrew-cask,wmorin/homebrew-cask,Cottser/homebrew-cask,ninjahoahong/homebrew-cask,stonehippo/homebrew-cask,hovancik/homebrew-cask,rubenerd/homebrew-cask,tan9/homebrew-cask,rickychilcott/homebrew-cask,sysbot/homebrew-cask,dictcp/homebrew-cask,mjdescy/homebrew-cask,kronicd/homebrew-cask,JosephViolago/homebrew-cask,kteru/homebrew-cask,miguelfrde/homebrew-cask,adelinofaria/homebrew-cask,kiliankoe/homebrew-cask,remko/homebrew-cask,tdsmith/homebrew-cask,jonathanwiesel/homebrew-cask,miccal/homebrew-cask,bdhess/homebrew-cask,hswong3i/homebrew-cask,janlugt/homebrew-cask,csmith-palantir/homebrew-cask,nivanchikov/homebrew-cask,askl56/homebrew-cask,aki77/homebrew-cask,gilesdring/homebrew-cask,tedbundyjr/homebrew-cask,buo/homebrew-cask,bendoerr/homebrew-cask,usami-k/homebrew-cask,ky0615/homebrew-cask-1,jalaziz/homebrew-cask,wayou/homebrew-cask,jayshao/homebrew-cask,ajbw/homebrew-cask,tedbundyjr/homebrew-cask,markthetech/homebrew-cask,otaran/homebrew-cask,jellyfishcoder/homebrew-cask,moimikey/homebrew-cask,xight/homebrew-cask,L2G/homebrew-cask,spruceb/homebrew-cask,xalep/homebrew-cask,axodys/homebrew-cask,inta/homebrew-cask,yumitsu/homebrew-cask,maxnordlund/homebrew-cask,caskroom/homebrew-cask,wickedsp1d3r/homebrew-cask,Gasol/homebrew-cask,faun/homebrew-cask,RJHsiao/homebrew-cask,y00rb/homebrew-cask,kesara/homebrew-cask,crmne/homebrew-cask,hackhandslabs/homebrew-cask,astorije/homebrew-cask,csmith-palantir/homebrew-cask,wizonesolutions/homebrew-cask,samshadwell/homebrew-cask,scribblemaniac/homebrew-cask,gibsjose/homebrew-cask,mchlrmrz/homebrew-cask,colindean/homebrew-cask,crmne/homebrew-cask,mjdescy/homebrew-cask,Dremora/homebrew-cask,bkono/homebrew-cask,mazehall/homebrew-cask,hanxue/caskroom,Philosoft/homebrew-cask,gmkey/homebrew-cask,petmoo/homebrew-cask,dwkns/homebrew-cask,lolgear/homebrew-cask,yurrriq/homebrew-cask,rkJun/homebrew-cask,rcuza/homebrew-cask,yuhki50/homebrew-cask,royalwang/homebrew-cask,flada-auxv/homebrew-cask,Labutin/homebrew-cask,gwaldo/homebrew-cask,hakamadare/homebrew-cask,kostasdizas/homebrew-cask,bgandon/homebrew-cask,tjnycum/homebrew-cask,dspeckhard/homebrew-cask,jpmat296/homebrew-cask,mathbunnyru/homebrew-cask,kolomiichenko/homebrew-cask,jtriley/homebrew-cask,dlackty/homebrew-cask,mikem/homebrew-cask,githubutilities/homebrew-cask,onlynone/homebrew-cask,uetchy/homebrew-cask,AnastasiaSulyagina/homebrew-cask,stephenwade/homebrew-cask,moogar0880/homebrew-cask,aktau/homebrew-cask,Nitecon/homebrew-cask,ctrevino/homebrew-cask,epardee/homebrew-cask,timsutton/homebrew-cask,jgarber623/homebrew-cask,shorshe/homebrew-cask,mattfelsen/homebrew-cask,jaredsampson/homebrew-cask,cobyism/homebrew-cask,elyscape/homebrew-cask,xtian/homebrew-cask,prime8/homebrew-cask,Labutin/homebrew-cask,josa42/homebrew-cask,tyage/homebrew-cask,retrography/homebrew-cask,afdnlw/homebrew-cask,artdevjs/homebrew-cask,feniix/homebrew-cask,kingthorin/homebrew-cask,sosedoff/homebrew-cask,Ngrd/homebrew-cask,mariusbutuc/homebrew-cask,mahori/homebrew-cask,mokagio/homebrew-cask,SamiHiltunen/homebrew-cask,arranubels/homebrew-cask,klane/homebrew-cask,brianshumate/homebrew-cask,zeusdeux/homebrew-cask,jgarber623/homebrew-cask,reelsense/homebrew-cask,rubenerd/homebrew-cask,perfide/homebrew-cask,jaredsampson/homebrew-cask,pinut/homebrew-cask,alloy/homebrew-cask,yurikoles/homebrew-cask,tonyseek/homebrew-cask,segiddins/homebrew-cask,johndbritton/homebrew-cask,codeurge/homebrew-cask,mlocher/homebrew-cask,askl56/homebrew-cask,dlovitch/homebrew-cask,blogabe/homebrew-cask,lvicentesanchez/homebrew-cask,morsdyce/homebrew-cask,nathancahill/homebrew-cask,ldong/homebrew-cask,moonboots/homebrew-cask,patresi/homebrew-cask,xiongchiamiov/homebrew-cask,SentinelWarren/homebrew-cask,nivanchikov/homebrew-cask,jppelteret/homebrew-cask,jamesmlees/homebrew-cask,fanquake/homebrew-cask,genewoo/homebrew-cask,j13k/homebrew-cask,schneidmaster/homebrew-cask,jen20/homebrew-cask,johan/homebrew-cask,LaurentFough/homebrew-cask,neverfox/homebrew-cask,pacav69/homebrew-cask,andrewdisley/homebrew-cask,lauantai/homebrew-cask,coneman/homebrew-cask,mattfelsen/homebrew-cask,Dremora/homebrew-cask,Hywan/homebrew-cask,danielbayley/homebrew-cask,stephenwade/homebrew-cask,antogg/homebrew-cask,Whoaa512/homebrew-cask,howie/homebrew-cask,pgr0ss/homebrew-cask,lalyos/homebrew-cask,dieterdemeyer/homebrew-cask,mgryszko/homebrew-cask,bdhess/homebrew-cask,atsuyim/homebrew-cask,MicTech/homebrew-cask,xight/homebrew-cask,tangestani/homebrew-cask,ky0615/homebrew-cask-1,MichaelPei/homebrew-cask,decrement/homebrew-cask,englishm/homebrew-cask,gord1anknot/homebrew-cask,ericbn/homebrew-cask,julionc/homebrew-cask,morganestes/homebrew-cask,diguage/homebrew-cask,jbeagley52/homebrew-cask,mjgardner/homebrew-cask,ywfwj2008/homebrew-cask,deizel/homebrew-cask,mAAdhaTTah/homebrew-cask,wuman/homebrew-cask,esebastian/homebrew-cask,kolomiichenko/homebrew-cask,tjnycum/homebrew-cask,MircoT/homebrew-cask,shoichiaizawa/homebrew-cask,wuman/homebrew-cask,larseggert/homebrew-cask,tsparber/homebrew-cask,gyndav/homebrew-cask,chadcatlett/caskroom-homebrew-cask,alloy/homebrew-cask,gyugyu/homebrew-cask,dspeckhard/homebrew-cask,zchee/homebrew-cask,shonjir/homebrew-cask,vuquoctuan/homebrew-cask,boydj/homebrew-cask,malford/homebrew-cask,mauricerkelly/homebrew-cask,ksylvan/homebrew-cask,cedwardsmedia/homebrew-cask,blainesch/homebrew-cask,moogar0880/homebrew-cask,jhowtan/homebrew-cask,kuno/homebrew-cask,kTitan/homebrew-cask,bric3/homebrew-cask,robertgzr/homebrew-cask,cohei/homebrew-cask,jppelteret/homebrew-cask,MisumiRize/homebrew-cask,kuno/homebrew-cask,seanorama/homebrew-cask,miku/homebrew-cask,neverfox/homebrew-cask,giannitm/homebrew-cask,dwkns/homebrew-cask,yutarody/homebrew-cask,kassi/homebrew-cask,rogeriopradoj/homebrew-cask,yurikoles/homebrew-cask,xcezx/homebrew-cask,chrisfinazzo/homebrew-cask,lantrix/homebrew-cask,kteru/homebrew-cask,enriclluelles/homebrew-cask,vmrob/homebrew-cask,L2G/homebrew-cask,maxnordlund/homebrew-cask,KosherBacon/homebrew-cask,andrewschleifer/homebrew-cask,ianyh/homebrew-cask,winkelsdorf/homebrew-cask,Fedalto/homebrew-cask,tonyseek/homebrew-cask,djakarta-trap/homebrew-myCask,dlovitch/homebrew-cask,lumaxis/homebrew-cask,Ibuprofen/homebrew-cask,fwiesel/homebrew-cask,githubutilities/homebrew-cask,segiddins/homebrew-cask,gyndav/homebrew-cask,winkelsdorf/homebrew-cask,jrwesolo/homebrew-cask,jpodlech/homebrew-cask,jiashuw/homebrew-cask,MoOx/homebrew-cask,samshadwell/homebrew-cask,wickles/homebrew-cask,nshemonsky/homebrew-cask,JoelLarson/homebrew-cask,m3nu/homebrew-cask,mjgardner/homebrew-cask,wastrachan/homebrew-cask,m3nu/homebrew-cask,timsutton/homebrew-cask,gwaldo/homebrew-cask,sohtsuka/homebrew-cask,andyshinn/homebrew-cask
ruby
## Code Before: class ScansnapManager < Cask url 'http://www.fujitsu.com/downloads/IMAGE/driver/ss/mgr/m-sv600/MacScanSnapV62L10WW.dmg' homepage 'http://www.fujitsu.com/global/support/computing/peripheral/scanners/software/' version '6.2L10' no_checksum install 'ScanSnap Manager.pkg' uninstall :pkgutil => 'jp.co.pfu.ScanSnap.*' end ## Instruction: Update sha256 for ScanSnap Manager ## Code After: class ScansnapManager < Cask url 'http://www.fujitsu.com/downloads/IMAGE/driver/ss/mgr/m-sv600/MacScanSnapV62L10WW.dmg' homepage 'http://www.fujitsu.com/global/support/computing/peripheral/scanners/software/' version '6.2L10' sha256 '7273034398e9a57eb0fa89167c9e801ad2bf9fe56b52b3d9591628e978168afb' install 'ScanSnap Manager.pkg' uninstall :pkgutil => 'jp.co.pfu.ScanSnap.*' end
8b0bfa3a62475298f5c860fb5cee406f8c4f7d0e
requirements-test.txt
requirements-test.txt
pyyaml==5.1 dateutils==0.6.6 # Unit testing pytest==4.4.0 pytest-mock==1.10.3 pytest-benchmark==3.2.2 coverage==4.5.3 mock==2.0.0 # Code style flake8==3.7.7 # black isort==4.3.16 pre-commit==1.15.1
pyyaml==5.1 dateutils==0.6.6 # Unit testing pytest==4.4.0 pytest-mock==1.10.3 pytest-benchmark==3.2.2 coverage==4.5.3 mock==2.0.0 # Code style flake8==3.7.7 # black isort==4.3.16 pre-commit==1.15.1 # For advanced unittesting secp256k1
Add a requirement for testing
Add a requirement for testing
Text
mit
xeroc/python-graphenelib
text
## Code Before: pyyaml==5.1 dateutils==0.6.6 # Unit testing pytest==4.4.0 pytest-mock==1.10.3 pytest-benchmark==3.2.2 coverage==4.5.3 mock==2.0.0 # Code style flake8==3.7.7 # black isort==4.3.16 pre-commit==1.15.1 ## Instruction: Add a requirement for testing ## Code After: pyyaml==5.1 dateutils==0.6.6 # Unit testing pytest==4.4.0 pytest-mock==1.10.3 pytest-benchmark==3.2.2 coverage==4.5.3 mock==2.0.0 # Code style flake8==3.7.7 # black isort==4.3.16 pre-commit==1.15.1 # For advanced unittesting secp256k1
3cfaa8f21064974435c5cf1772b2c8090d1093e0
KwfBundle/Serializer/KwfModel/ColumnNormalizer/ChildRows.php
KwfBundle/Serializer/KwfModel/ColumnNormalizer/ChildRows.php
<?php namespace KwfBundle\Serializer\KwfModel\ColumnNormalizer; use Kwf_Model_Row_Interface; use Symfony\Component\Serializer\SerializerInterface; use Symfony\Component\Serializer\SerializerAwareInterface; class ChildRows implements ColumnNormalizerInterface, SerializerAwareInterface { /** * @var SerializerInterface */ protected $serializer; /** * {@inheritdoc} */ public function setSerializer(SerializerInterface $serializer) { $this->serializer = $serializer; } public function normalize(Kwf_Model_Row_Interface $row, $column, array $settings, $format = null, array $context = array()) { if (!isset($settings['rule'])) { throw new \Exception("rule setting is required"); } $rows = $row->getChildRows($settings['rule']); if (isset($settings['child_groups'])) { $context['groups'] = $settings['child_groups']; } else if (isset($settings['groups'])) { $context['groups'] = $settings['groups']; } return $this->serializer->normalize($rows, $format, $context); } }
<?php namespace KwfBundle\Serializer\KwfModel\ColumnNormalizer; use Kwf_Model_Row_Interface; use Symfony\Component\Serializer\SerializerInterface; use Symfony\Component\Serializer\SerializerAwareInterface; class ChildRows implements ColumnNormalizerInterface, SerializerAwareInterface { /** * @var SerializerInterface */ protected $serializer; /** * {@inheritdoc} */ public function setSerializer(SerializerInterface $serializer) { $this->serializer = $serializer; } public function normalize(Kwf_Model_Row_Interface $row, $column, array $settings, $format = null, array $context = array()) { if (!isset($settings['rule'])) { throw new \Exception("rule setting is required"); } $select = new \Kwf_Model_Select(isset($settings['where']) ? $settings['where'] : array()); $rows = $row->getChildRows($settings['rule'], $select); if (isset($settings['child_groups'])) { $context['groups'] = $settings['child_groups']; } else if (isset($settings['groups'])) { $context['groups'] = $settings['groups']; } return $this->serializer->normalize($rows, $format, $context); } }
Allow adding a select-where to symfony child-rows-serializer
Allow adding a select-where to symfony child-rows-serializer
PHP
bsd-2-clause
koala-framework/koala-framework,koala-framework/koala-framework
php
## Code Before: <?php namespace KwfBundle\Serializer\KwfModel\ColumnNormalizer; use Kwf_Model_Row_Interface; use Symfony\Component\Serializer\SerializerInterface; use Symfony\Component\Serializer\SerializerAwareInterface; class ChildRows implements ColumnNormalizerInterface, SerializerAwareInterface { /** * @var SerializerInterface */ protected $serializer; /** * {@inheritdoc} */ public function setSerializer(SerializerInterface $serializer) { $this->serializer = $serializer; } public function normalize(Kwf_Model_Row_Interface $row, $column, array $settings, $format = null, array $context = array()) { if (!isset($settings['rule'])) { throw new \Exception("rule setting is required"); } $rows = $row->getChildRows($settings['rule']); if (isset($settings['child_groups'])) { $context['groups'] = $settings['child_groups']; } else if (isset($settings['groups'])) { $context['groups'] = $settings['groups']; } return $this->serializer->normalize($rows, $format, $context); } } ## Instruction: Allow adding a select-where to symfony child-rows-serializer ## Code After: <?php namespace KwfBundle\Serializer\KwfModel\ColumnNormalizer; use Kwf_Model_Row_Interface; use Symfony\Component\Serializer\SerializerInterface; use Symfony\Component\Serializer\SerializerAwareInterface; class ChildRows implements ColumnNormalizerInterface, SerializerAwareInterface { /** * @var SerializerInterface */ protected $serializer; /** * {@inheritdoc} */ public function setSerializer(SerializerInterface $serializer) { $this->serializer = $serializer; } public function normalize(Kwf_Model_Row_Interface $row, $column, array $settings, $format = null, array $context = array()) { if (!isset($settings['rule'])) { throw new \Exception("rule setting is required"); } $select = new \Kwf_Model_Select(isset($settings['where']) ? $settings['where'] : array()); $rows = $row->getChildRows($settings['rule'], $select); if (isset($settings['child_groups'])) { $context['groups'] = $settings['child_groups']; } else if (isset($settings['groups'])) { $context['groups'] = $settings['groups']; } return $this->serializer->normalize($rows, $format, $context); } }
a1efb64a48ff87ebb310ef1558d2709937de2300
example.php
example.php
<?php require_once 'swedbankJson.php'; $username = 198903060000; // Personnummer $password = 'fakePW'; // Personlig kod try { $bankConn = new SwedbankJson($username, $password); $accounts = $bankConn->accountList(); $accountInfo = $bankConn->accountDetails($accounts->transactionAccounts[0]->id); // Hämtar från första kontot, sannolikt lönekontot $bankConn->terminate(); } catch (Exception $e) { echo 'Swedbank-fel: ' . $e->getMessage() . ' (Err #' . $e->getCode() . ")\r\n" . $e->getTraceAsString(); exit; } #### echo '<pre> Konton '; print_r($accounts); #### echo ' Kontoutdrag '; print_r($accountInfo); #### echo ' Auth-nyckel: '; $bankConn = new SwedbankJson($username, $password); echo $bankConn->getAuthorizationKey();
<?php require_once 'swedbankJson.php'; // Inställningar define('USERNAME', 198903060000); // Personnummer define('PASSWORD', 'fakePW'); // Personlig kod echo ' Auth-nyckel: '; try { $bankConn = new SwedbankJson(USERNAME, PASSWORD); echo $bankConn->getAuthorizationKey(); } catch (Exception $e) { echo 'Swedbank-fel: ' . $e->getMessage() . ' (Err #' . $e->getCode() . ")\r\n" . $e->getTraceAsString(); exit; } try { $bankConn = new SwedbankJson(USERNAME, PASSWORD, AUTH_KEY); $accounts = $bankConn->accountList(); $accountInfo = $bankConn->accountDetails($accounts->transactionAccounts[0]->id); // Hämtar från första kontot, sannolikt lönekontot $bankConn->terminate(); } catch (Exception $e) { echo 'Swedbank-fel: ' . $e->getMessage() . ' (Err #' . $e->getCode() . ")\r\n" . $e->getTraceAsString(); exit; } #### echo '<strong>Konton<strong><pre>'; print_r($accounts); #### echo ' <strong>Kontoutdrag</strong> '; print_r($accountInfo); ####
Define istället för variabler för inställningar.
Define istället för variabler för inställningar.
PHP
mit
walle89/SwedbankJson
php
## Code Before: <?php require_once 'swedbankJson.php'; $username = 198903060000; // Personnummer $password = 'fakePW'; // Personlig kod try { $bankConn = new SwedbankJson($username, $password); $accounts = $bankConn->accountList(); $accountInfo = $bankConn->accountDetails($accounts->transactionAccounts[0]->id); // Hämtar från första kontot, sannolikt lönekontot $bankConn->terminate(); } catch (Exception $e) { echo 'Swedbank-fel: ' . $e->getMessage() . ' (Err #' . $e->getCode() . ")\r\n" . $e->getTraceAsString(); exit; } #### echo '<pre> Konton '; print_r($accounts); #### echo ' Kontoutdrag '; print_r($accountInfo); #### echo ' Auth-nyckel: '; $bankConn = new SwedbankJson($username, $password); echo $bankConn->getAuthorizationKey(); ## Instruction: Define istället för variabler för inställningar. ## Code After: <?php require_once 'swedbankJson.php'; // Inställningar define('USERNAME', 198903060000); // Personnummer define('PASSWORD', 'fakePW'); // Personlig kod echo ' Auth-nyckel: '; try { $bankConn = new SwedbankJson(USERNAME, PASSWORD); echo $bankConn->getAuthorizationKey(); } catch (Exception $e) { echo 'Swedbank-fel: ' . $e->getMessage() . ' (Err #' . $e->getCode() . ")\r\n" . $e->getTraceAsString(); exit; } try { $bankConn = new SwedbankJson(USERNAME, PASSWORD, AUTH_KEY); $accounts = $bankConn->accountList(); $accountInfo = $bankConn->accountDetails($accounts->transactionAccounts[0]->id); // Hämtar från första kontot, sannolikt lönekontot $bankConn->terminate(); } catch (Exception $e) { echo 'Swedbank-fel: ' . $e->getMessage() . ' (Err #' . $e->getCode() . ")\r\n" . $e->getTraceAsString(); exit; } #### echo '<strong>Konton<strong><pre>'; print_r($accounts); #### echo ' <strong>Kontoutdrag</strong> '; print_r($accountInfo); ####
060f46be0bb339537ac1be8a4e4e542702baa9ff
app/assets/javascripts/startups.js.coffee
app/assets/javascripts/startups.js.coffee
initialize = () -> $markets = $("#startup_market_list") $markets.tokenInput "http://api.angel.co/1/search?type=MarketTag", crossDomain: true, queryParam: "query", prePopulate: $markets.data('pre'), theme: "facebook", tokenLimit: 3, tokenValue: "name" $ -> $body = $('body') routes = ['startups-new', 'startups-edit'] if _.some(routes, (route) -> $body.hasClass route) initialize()
$ -> $body = $('body') bodyClass = $body.attr 'class' routes = ['startups-new', 'startups-edit'] if bodyClass in ['startups-new', 'startups-edit'] $markets = $("#startup_market_list") $markets.tokenInput "http://api.angel.co/1/search?type=MarketTag", crossDomain: true, queryParam: "query", prePopulate: $markets.data('pre'), theme: "facebook", tokenLimit: 3, tokenValue: "name" else if bodyClass is 'startups-index' $(".startupcard").equalHeights()
Add equalHeights to Startup cards
Add equalHeights to Startup cards
CoffeeScript
mit
SoPR/sopr-platform,SoPR/sopr-platform
coffeescript
## Code Before: initialize = () -> $markets = $("#startup_market_list") $markets.tokenInput "http://api.angel.co/1/search?type=MarketTag", crossDomain: true, queryParam: "query", prePopulate: $markets.data('pre'), theme: "facebook", tokenLimit: 3, tokenValue: "name" $ -> $body = $('body') routes = ['startups-new', 'startups-edit'] if _.some(routes, (route) -> $body.hasClass route) initialize() ## Instruction: Add equalHeights to Startup cards ## Code After: $ -> $body = $('body') bodyClass = $body.attr 'class' routes = ['startups-new', 'startups-edit'] if bodyClass in ['startups-new', 'startups-edit'] $markets = $("#startup_market_list") $markets.tokenInput "http://api.angel.co/1/search?type=MarketTag", crossDomain: true, queryParam: "query", prePopulate: $markets.data('pre'), theme: "facebook", tokenLimit: 3, tokenValue: "name" else if bodyClass is 'startups-index' $(".startupcard").equalHeights()
6049c07dfbc4cca4957c702aeca37e41f3b81587
_posts/2016-04-08-Wurst-3-0pre3.md
_posts/2016-04-08-Wurst-3-0pre3.md
--- title: Wurst 3.0pre3 - Bugfixes & More category: Wurst Update video-id: jnlOxMzoP1Y --- ## Changelog - NameTags will now allow you to see the nametags of sneaking players - Added tutorial for TP-Aura - Added tutorial for Trajectories - Fixed AntiKnockback - Fixed AutoBuild - Fixed AutoSign - Fixed BaseFinder - Fixed BowAimbot - Fixed BuildRandom - Fixed ChestESP - Fixed FastBreak - Fixed Freecam - Fixed HighJump - Fixed Jesus - Fixed NameTags - Fixed InstantBunker - Fixed NoSlowdown - Fixed Overlay - Fixed ProphuntESP - Fixed SafeWalk - Fixed Search - Fixed X-Ray - Fixed AutoReconnect, etc. - Fixed the Steal/Store buttons - Fixed Wurst Capes - Fixed the Wurst Options button - Removed the default keybind for FastPlace ## Troubleshooting **If you get a crash:** Delete `modules.json` in your Wurst folder (default location: `%appdata%\.minecraft\wurst`). If that doesn't help, update to the latest version of [Java 8](https://java.com/download). ## Links **Download here:** [Wurst-Client-v3.0pre3.zip](https://github.com/Wurst-Imperium/Wurst-Client-for-MC-1.9.X/releases/download/v3.0pre3/Wurst-Client-v3.0pre3.zip)
--- title: Wurst 3.0pre3 - Bugfixes & More category: Wurst Update video-id: jnlOxMzoP1Y --- ## Changelog - NameTags will now allow you to see the nametags of sneaking players - Added tutorial for TP-Aura - Added tutorial for Trajectories - Fixed AntiKnockback - Fixed AutoBuild - Fixed AutoSign - Fixed BaseFinder - Fixed BowAimbot - Fixed BuildRandom - Fixed ChestESP - Fixed FastBreak - Fixed Freecam - Fixed HighJump - Fixed Jesus<!--read more--> - Fixed NameTags - Fixed InstantBunker - Fixed NoSlowdown - Fixed Overlay - Fixed ProphuntESP - Fixed SafeWalk - Fixed Search - Fixed X-Ray - Fixed AutoReconnect, etc. - Fixed the Steal/Store buttons - Fixed Wurst Capes - Fixed the Wurst Options button - Removed the default keybind for FastPlace ## Troubleshooting **If you get a crash:** Delete `modules.json` in your Wurst folder (default location: `%appdata%\.minecraft\wurst`). If that doesn't help, update to the latest version of [Java 8](https://java.com/download). ## Links **Download here:** [Wurst-Client-v3.0pre3.zip](https://github.com/Wurst-Imperium/Wurst-Client-for-MC-1.9.X/releases/download/v3.0pre3/Wurst-Client-v3.0pre3.zip)
Add read more tag to Wurst 3.0pre3 post
Add read more tag to Wurst 3.0pre3 post
Markdown
mpl-2.0
Voldemart/voldemart.github.io
markdown
## Code Before: --- title: Wurst 3.0pre3 - Bugfixes & More category: Wurst Update video-id: jnlOxMzoP1Y --- ## Changelog - NameTags will now allow you to see the nametags of sneaking players - Added tutorial for TP-Aura - Added tutorial for Trajectories - Fixed AntiKnockback - Fixed AutoBuild - Fixed AutoSign - Fixed BaseFinder - Fixed BowAimbot - Fixed BuildRandom - Fixed ChestESP - Fixed FastBreak - Fixed Freecam - Fixed HighJump - Fixed Jesus - Fixed NameTags - Fixed InstantBunker - Fixed NoSlowdown - Fixed Overlay - Fixed ProphuntESP - Fixed SafeWalk - Fixed Search - Fixed X-Ray - Fixed AutoReconnect, etc. - Fixed the Steal/Store buttons - Fixed Wurst Capes - Fixed the Wurst Options button - Removed the default keybind for FastPlace ## Troubleshooting **If you get a crash:** Delete `modules.json` in your Wurst folder (default location: `%appdata%\.minecraft\wurst`). If that doesn't help, update to the latest version of [Java 8](https://java.com/download). ## Links **Download here:** [Wurst-Client-v3.0pre3.zip](https://github.com/Wurst-Imperium/Wurst-Client-for-MC-1.9.X/releases/download/v3.0pre3/Wurst-Client-v3.0pre3.zip) ## Instruction: Add read more tag to Wurst 3.0pre3 post ## Code After: --- title: Wurst 3.0pre3 - Bugfixes & More category: Wurst Update video-id: jnlOxMzoP1Y --- ## Changelog - NameTags will now allow you to see the nametags of sneaking players - Added tutorial for TP-Aura - Added tutorial for Trajectories - Fixed AntiKnockback - Fixed AutoBuild - Fixed AutoSign - Fixed BaseFinder - Fixed BowAimbot - Fixed BuildRandom - Fixed ChestESP - Fixed FastBreak - Fixed Freecam - Fixed HighJump - Fixed Jesus<!--read more--> - Fixed NameTags - Fixed InstantBunker - Fixed NoSlowdown - Fixed Overlay - Fixed ProphuntESP - Fixed SafeWalk - Fixed Search - Fixed X-Ray - Fixed AutoReconnect, etc. - Fixed the Steal/Store buttons - Fixed Wurst Capes - Fixed the Wurst Options button - Removed the default keybind for FastPlace ## Troubleshooting **If you get a crash:** Delete `modules.json` in your Wurst folder (default location: `%appdata%\.minecraft\wurst`). If that doesn't help, update to the latest version of [Java 8](https://java.com/download). ## Links **Download here:** [Wurst-Client-v3.0pre3.zip](https://github.com/Wurst-Imperium/Wurst-Client-for-MC-1.9.X/releases/download/v3.0pre3/Wurst-Client-v3.0pre3.zip)
c56e221540c4df6e33abb3e55bd92ab9f719a37c
src/lib.rs
src/lib.rs
//! # Keyring library //! //! Allows for setting and getting passwords on Linux, OSX, and Windows // Configure for Linux #[cfg(target_os = "linux")] extern crate secret_service; #[cfg(target_os = "linux")] mod linux; #[cfg(target_os = "linux")] pub use linux::Keyring; // Configure for Windows #[cfg(target_os = "windows")] extern crate winapi; #[cfg(target_os = "windows")] extern crate advapi32; #[cfg(target_os = "windows")] mod windows; #[cfg(target_os = "windows")] pub use windows::Keyring; // Configure for OSX #[cfg(target_os = "macos")] extern crate rustc_serialize; #[cfg(target_os = "macos")] mod macos; #[cfg(target_os = "macos")] pub use macos::Keyring; mod error; pub use error::{KeyringError, Result};
//! # Keyring library //! //! Allows for setting and getting passwords on Linux, OSX, and Windows // Configure for Linux #[cfg(target_os = "linux")] extern crate secret_service; #[cfg(target_os = "linux")] mod linux; #[cfg(target_os = "linux")] pub use linux::Keyring; // Configure for Windows #[cfg(target_os = "windows")] extern crate winapi; #[cfg(target_os = "windows")] extern crate advapi32; #[cfg(target_os = "windows")] mod windows; #[cfg(target_os = "windows")] pub use windows::Keyring; // Configure for OSX #[cfg(target_os = "macos")] extern crate rustc_serialize; #[cfg(target_os = "macos")] mod macos; #[cfg(target_os = "macos")] pub use macos::Keyring; mod error; pub use error::{KeyringError, Result}; #[cfg(test)] mod tests { use super::*; #[test] #[should_panic] fn test_empty_password_input() { let pass = ""; let keyring = Keyring::new("test", "test"); match keyring.set_password(pass) { Ok(_) => (), Err(_) => { keyring.get_password().unwrap(); }, } } }
Add test for empty password
Add test for empty password Handling empty passwords properly. I don't have an explicit check for empty passwords in the keyring library (front-end or any of the backends). Instead, I rely on the system vaults (or as close as possible to that interface) to report back errors. I don't want to up-front assume that blank passwords are invalid (although I thought about doing it this way... and would have missed a bug). In the keyring library, the set_password fn for linux has a try! around every single function call which returns a result (all of which are basically wrappers around dbus secret-service calls). So, I was a bit surprised to find that fuzzing the keyring library caught a panic on empty string input! I expected a propagated error. Turns out it was an error in the secret-service library, in a non-IO call formatting the secret. I assumed that because there was no IO it could safely be unwrapped, but it turns out that the dbus library would return an empty array error when construting from an empty string! A very unexpected error! Anyways, now that error is no longer unwrapped, and is instead propogated up. This error was caught while fuzzing, although it would have been easy enough if I had more basic tests.
Rust
apache-2.0
hwchen/keyring-rs,hwchen/keyring-rs
rust
## Code Before: //! # Keyring library //! //! Allows for setting and getting passwords on Linux, OSX, and Windows // Configure for Linux #[cfg(target_os = "linux")] extern crate secret_service; #[cfg(target_os = "linux")] mod linux; #[cfg(target_os = "linux")] pub use linux::Keyring; // Configure for Windows #[cfg(target_os = "windows")] extern crate winapi; #[cfg(target_os = "windows")] extern crate advapi32; #[cfg(target_os = "windows")] mod windows; #[cfg(target_os = "windows")] pub use windows::Keyring; // Configure for OSX #[cfg(target_os = "macos")] extern crate rustc_serialize; #[cfg(target_os = "macos")] mod macos; #[cfg(target_os = "macos")] pub use macos::Keyring; mod error; pub use error::{KeyringError, Result}; ## Instruction: Add test for empty password Handling empty passwords properly. I don't have an explicit check for empty passwords in the keyring library (front-end or any of the backends). Instead, I rely on the system vaults (or as close as possible to that interface) to report back errors. I don't want to up-front assume that blank passwords are invalid (although I thought about doing it this way... and would have missed a bug). In the keyring library, the set_password fn for linux has a try! around every single function call which returns a result (all of which are basically wrappers around dbus secret-service calls). So, I was a bit surprised to find that fuzzing the keyring library caught a panic on empty string input! I expected a propagated error. Turns out it was an error in the secret-service library, in a non-IO call formatting the secret. I assumed that because there was no IO it could safely be unwrapped, but it turns out that the dbus library would return an empty array error when construting from an empty string! A very unexpected error! Anyways, now that error is no longer unwrapped, and is instead propogated up. This error was caught while fuzzing, although it would have been easy enough if I had more basic tests. ## Code After: //! # Keyring library //! //! Allows for setting and getting passwords on Linux, OSX, and Windows // Configure for Linux #[cfg(target_os = "linux")] extern crate secret_service; #[cfg(target_os = "linux")] mod linux; #[cfg(target_os = "linux")] pub use linux::Keyring; // Configure for Windows #[cfg(target_os = "windows")] extern crate winapi; #[cfg(target_os = "windows")] extern crate advapi32; #[cfg(target_os = "windows")] mod windows; #[cfg(target_os = "windows")] pub use windows::Keyring; // Configure for OSX #[cfg(target_os = "macos")] extern crate rustc_serialize; #[cfg(target_os = "macos")] mod macos; #[cfg(target_os = "macos")] pub use macos::Keyring; mod error; pub use error::{KeyringError, Result}; #[cfg(test)] mod tests { use super::*; #[test] #[should_panic] fn test_empty_password_input() { let pass = ""; let keyring = Keyring::new("test", "test"); match keyring.set_password(pass) { Ok(_) => (), Err(_) => { keyring.get_password().unwrap(); }, } } }
1bc7bf9998183d61f218d934b8235c6cc79a1db1
templates/tiki-login.tpl
templates/tiki-login.tpl
<div align="center"> {assign value=1 var='display_login'} {* Hack to display the login module only once if it is also actually used as a module *} {assign value=1 var='display_module'} {include file='modules/mod-login_box.tpl'} </div>
<div align="center"> {assign value=1 var='display_login'} {* Hack to display the login module only once if it is also actually used as a module *} {include file='modules/mod-login_box.tpl'} </div>
Revert r25525, the fix did not work
[ROLLBACK] Revert r25525, the fix did not work git-svn-id: a7fabbc6a7c54ea5c67cbd16bd322330fd10cc35@25526 b456876b-0849-0410-b77d-98878d47e9d5
Smarty
lgpl-2.1
oregional/tiki,tikiorg/tiki,tikiorg/tiki,changi67/tiki,changi67/tiki,oregional/tiki,tikiorg/tiki,tikiorg/tiki,oregional/tiki,changi67/tiki,changi67/tiki,oregional/tiki,changi67/tiki
smarty
## Code Before: <div align="center"> {assign value=1 var='display_login'} {* Hack to display the login module only once if it is also actually used as a module *} {assign value=1 var='display_module'} {include file='modules/mod-login_box.tpl'} </div> ## Instruction: [ROLLBACK] Revert r25525, the fix did not work git-svn-id: a7fabbc6a7c54ea5c67cbd16bd322330fd10cc35@25526 b456876b-0849-0410-b77d-98878d47e9d5 ## Code After: <div align="center"> {assign value=1 var='display_login'} {* Hack to display the login module only once if it is also actually used as a module *} {include file='modules/mod-login_box.tpl'} </div>