commit
stringlengths
40
40
old_file
stringlengths
4
184
new_file
stringlengths
4
184
old_contents
stringlengths
1
3.6k
new_contents
stringlengths
5
3.38k
subject
stringlengths
15
778
message
stringlengths
16
6.74k
lang
stringclasses
201 values
license
stringclasses
13 values
repos
stringlengths
6
116k
config
stringclasses
201 values
content
stringlengths
137
7.24k
diff
stringlengths
26
5.55k
diff_length
int64
1
123
relative_diff_length
float64
0.01
89
n_lines_added
int64
0
108
n_lines_deleted
int64
0
106
56f7bd78ca69550d1b98f76366f09c5a32564450
app/views/search/_sellers_form.html.erb
app/views/search/_sellers_form.html.erb
<h3><%= title %></h3> <%= form_tag({:controller => 'search', :action => 'assets', :class => 'form-inline'}, {:method => 'get'}) do %> <div class="search-in-opt"><%= _('Search in:') %> <%= labelled_radio_button _('Enterprises'), 'asset', 'enterprises', true %><br /> <%= labelled_radio_button _('Products'), 'asset', 'products', false %> <div class="formfield form-group search-from-opt"> <%= select_city(true) %> </div> <div class="formfield form-group search-distance-opt"> <%= labelled_select(_('Distance:'), 'radius', :first, :last, nil, [15, 30, 50, 100, 150, 200, 300, 400, 500, 1000].map{|n|[n, n.to_s + 'km']}) %> </div> <%= submit_button :search, _('Search') %> </div> <% end %>
<h3><%= title %></h3> <%= form_tag({:controller => 'search', :action => 'assets'}, {:method => 'get'}, :class => 'form-inline') do %> <div class="search-in-opt"><%= _('Search in:') %> <%= labelled_radio_button _('Enterprises'), 'asset', 'enterprises', true %><br /> <%= labelled_radio_button _('Products'), 'asset', 'products', false %> <div class="formfield form-group search-from-opt"> <%= select_city(true) %> </div> <div class="formfield form-group search-distance-opt"> <%= labelled_select(_('Distance:'), 'radius', :first, :last, nil, [15, 30, 50, 100, 150, 200, 300, 400, 500, 1000].map{|n|[n, n.to_s + 'km']}) %> </div> <%= submit_button :search, _('Search') %> </div> <% end %>
Put class in correct place
Put class in correct place
HTML+ERB
agpl-3.0
EcoAlternative/noosfero-ecosol,samasti/noosfero,samasti/noosfero,EcoAlternative/noosfero-ecosol,coletivoEITA/noosfero-ecosol,samasti/noosfero,EcoAlternative/noosfero-ecosol,EcoAlternative/noosfero-ecosol,blogoosfero/noosfero,CIRANDAS/noosfero-ecosol,coletivoEITA/noosfero-ecosol,CIRANDAS/noosfero-ecosol,blogoosfero/noosfero,blogoosfero/noosfero,coletivoEITA/noosfero-ecosol,coletivoEITA/noosfero-ecosol,blogoosfero/noosfero,samasti/noosfero,blogoosfero/noosfero,EcoAlternative/noosfero-ecosol,EcoAlternative/noosfero-ecosol,CIRANDAS/noosfero-ecosol,blogoosfero/noosfero,coletivoEITA/noosfero-ecosol,CIRANDAS/noosfero-ecosol,samasti/noosfero,blogoosfero/noosfero,coletivoEITA/noosfero-ecosol,samasti/noosfero,CIRANDAS/noosfero-ecosol,EcoAlternative/noosfero-ecosol
html+erb
## Code Before: <h3><%= title %></h3> <%= form_tag({:controller => 'search', :action => 'assets', :class => 'form-inline'}, {:method => 'get'}) do %> <div class="search-in-opt"><%= _('Search in:') %> <%= labelled_radio_button _('Enterprises'), 'asset', 'enterprises', true %><br /> <%= labelled_radio_button _('Products'), 'asset', 'products', false %> <div class="formfield form-group search-from-opt"> <%= select_city(true) %> </div> <div class="formfield form-group search-distance-opt"> <%= labelled_select(_('Distance:'), 'radius', :first, :last, nil, [15, 30, 50, 100, 150, 200, 300, 400, 500, 1000].map{|n|[n, n.to_s + 'km']}) %> </div> <%= submit_button :search, _('Search') %> </div> <% end %> ## Instruction: Put class in correct place ## Code After: <h3><%= title %></h3> <%= form_tag({:controller => 'search', :action => 'assets'}, {:method => 'get'}, :class => 'form-inline') do %> <div class="search-in-opt"><%= _('Search in:') %> <%= labelled_radio_button _('Enterprises'), 'asset', 'enterprises', true %><br /> <%= labelled_radio_button _('Products'), 'asset', 'products', false %> <div class="formfield form-group search-from-opt"> <%= select_city(true) %> </div> <div class="formfield form-group search-distance-opt"> <%= labelled_select(_('Distance:'), 'radius', :first, :last, nil, [15, 30, 50, 100, 150, 200, 300, 400, 500, 1000].map{|n|[n, n.to_s + 'km']}) %> </div> <%= submit_button :search, _('Search') %> </div> <% end %>
<h3><%= title %></h3> - <%= form_tag({:controller => 'search', :action => 'assets', :class => 'form-inline'}, {:method => 'get'}) do %> ? --------------------- + <%= form_tag({:controller => 'search', :action => 'assets'}, {:method => 'get'}, :class => 'form-inline') do %> ? +++++++++++++++++++++ <div class="search-in-opt"><%= _('Search in:') %> <%= labelled_radio_button _('Enterprises'), 'asset', 'enterprises', true %><br /> <%= labelled_radio_button _('Products'), 'asset', 'products', false %> <div class="formfield form-group search-from-opt"> <%= select_city(true) %> </div> <div class="formfield form-group search-distance-opt"> <%= labelled_select(_('Distance:'), 'radius', :first, :last, nil, [15, 30, 50, 100, 150, 200, 300, 400, 500, 1000].map{|n|[n, n.to_s + 'km']}) %> </div> <%= submit_button :search, _('Search') %> </div> <% end %>
2
0.095238
1
1
ceb123e78b4d15c0cfe30198aa3fbbe71603472d
project/forms.py
project/forms.py
from django import forms from django.utils.translation import ugettext_lazy as _ from django.contrib.auth import authenticate class LoginForm(forms.Form): username = forms.CharField(label=_('Naudotojo vardas'), max_length=100, help_text=_('VU MIF uosis.mif.vu.lt serverio.')) password = forms.CharField(label=_(u'Slaptažodis'), max_length=128, widget=forms.PasswordInput(render_value=False)) def clean(self): cleaned_data = super(LoginForm, self).clean() if self.errors: return cleaned_data user = authenticate(**cleaned_data) if not user: raise forms.ValidationError(_(u'Naudotojo vardas arba slaptažodis ' 'yra neteisingi')) return {'user': user}
from django import forms from django.utils.translation import ugettext_lazy as _ from django.contrib.auth import authenticate class LoginForm(forms.Form): username = forms.CharField(label=_('Naudotojo vardas'), max_length=100, help_text=_('VU MIF uosis.mif.vu.lt serverio.')) password = forms.CharField(label=_(u'Slaptažodis'), max_length=128, widget=forms.PasswordInput(render_value=False)) def clean(self): cleaned_data = super(LoginForm, self).clean() if self.errors: return cleaned_data user = authenticate(**cleaned_data) if not user: raise forms.ValidationError(_(u'Naudotojo vardas arba slaptažodis ' 'yra neteisingi')) cleaned_data['user'] = user return cleaned_data
Update login form clean method to return full cleaned data.
Update login form clean method to return full cleaned data.
Python
agpl-3.0
InScience/DAMIS-old,InScience/DAMIS-old
python
## Code Before: from django import forms from django.utils.translation import ugettext_lazy as _ from django.contrib.auth import authenticate class LoginForm(forms.Form): username = forms.CharField(label=_('Naudotojo vardas'), max_length=100, help_text=_('VU MIF uosis.mif.vu.lt serverio.')) password = forms.CharField(label=_(u'Slaptažodis'), max_length=128, widget=forms.PasswordInput(render_value=False)) def clean(self): cleaned_data = super(LoginForm, self).clean() if self.errors: return cleaned_data user = authenticate(**cleaned_data) if not user: raise forms.ValidationError(_(u'Naudotojo vardas arba slaptažodis ' 'yra neteisingi')) return {'user': user} ## Instruction: Update login form clean method to return full cleaned data. ## Code After: from django import forms from django.utils.translation import ugettext_lazy as _ from django.contrib.auth import authenticate class LoginForm(forms.Form): username = forms.CharField(label=_('Naudotojo vardas'), max_length=100, help_text=_('VU MIF uosis.mif.vu.lt serverio.')) password = forms.CharField(label=_(u'Slaptažodis'), max_length=128, widget=forms.PasswordInput(render_value=False)) def clean(self): cleaned_data = super(LoginForm, self).clean() if self.errors: return cleaned_data user = authenticate(**cleaned_data) if not user: raise forms.ValidationError(_(u'Naudotojo vardas arba slaptažodis ' 'yra neteisingi')) cleaned_data['user'] = user return cleaned_data
from django import forms from django.utils.translation import ugettext_lazy as _ from django.contrib.auth import authenticate class LoginForm(forms.Form): username = forms.CharField(label=_('Naudotojo vardas'), max_length=100, help_text=_('VU MIF uosis.mif.vu.lt serverio.')) password = forms.CharField(label=_(u'Slaptažodis'), max_length=128, widget=forms.PasswordInput(render_value=False)) def clean(self): cleaned_data = super(LoginForm, self).clean() if self.errors: return cleaned_data user = authenticate(**cleaned_data) if not user: raise forms.ValidationError(_(u'Naudotojo vardas arba slaptažodis ' 'yra neteisingi')) - return {'user': user} + cleaned_data['user'] = user + return cleaned_data
3
0.142857
2
1
c6f395171ebaaf008bc8a6fc6d94408b092bb4b0
.travis.yml
.travis.yml
language: android android: components: - platform-tools - tools - build-tools-24.0.2 - android-24 - sys-img-armeabi-v7a-android-24 - extra-android-m2repository #compileSdkVersion 'android-24' requires JDK 1.8 or later to compile. jdk: - oraclejdk8 #Only CI for master & dev branches: only: - master - dev before_cache: - rm -f $HOME/.gradle/caches/modules-2/modules-2.lock cache: directories: - $HOME/.gradle/caches/ - $HOME/.gradle/wrapper/ before_script: # Create and start emulator - echo no | android create avd --force -n test -t android-24 --abi armeabi-v7a - emulator -avd test -no-skin -no-audio -no-window & - android-wait-for-emulator - adb shell input keyevent 82 & script: - ./gradlew clean connectAndroidTest assembleRelease --stacktrace
language: android android: components: - platform-tools - tools - build-tools-25.0.2 - android-25 # - sys-img-armeabi-v7a-android-24 - extra-android-m2repository licenses: - 'android-sdk-license.*' #compileSdkVersion 'android-24' requires JDK 1.8 or later to compile. jdk: - oraclejdk8 #Only CI for master & dev branches: only: - master - dev before_cache: - rm -f $HOME/.gradle/caches/modules-2/modules-2.lock cache: directories: - $HOME/.gradle/caches/ - $HOME/.gradle/wrapper/ #before_script: # # Create and start emulator # - echo no | android create avd --force -n test -t android-24 --abi armeabi-v7a # - emulator -avd test -no-skin -no-audio -no-window & # - android-wait-for-emulator # - adb shell input keyevent 82 & #script: # - ./gradlew clean connectAndroidTest assembleRelease --stacktrace script: ./gradlew clean build
Fix CI licence issue and remove instrumentation test script.
Fix CI licence issue and remove instrumentation test script.
YAML
apache-2.0
Muyangmin/Android-PLog
yaml
## Code Before: language: android android: components: - platform-tools - tools - build-tools-24.0.2 - android-24 - sys-img-armeabi-v7a-android-24 - extra-android-m2repository #compileSdkVersion 'android-24' requires JDK 1.8 or later to compile. jdk: - oraclejdk8 #Only CI for master & dev branches: only: - master - dev before_cache: - rm -f $HOME/.gradle/caches/modules-2/modules-2.lock cache: directories: - $HOME/.gradle/caches/ - $HOME/.gradle/wrapper/ before_script: # Create and start emulator - echo no | android create avd --force -n test -t android-24 --abi armeabi-v7a - emulator -avd test -no-skin -no-audio -no-window & - android-wait-for-emulator - adb shell input keyevent 82 & script: - ./gradlew clean connectAndroidTest assembleRelease --stacktrace ## Instruction: Fix CI licence issue and remove instrumentation test script. ## Code After: language: android android: components: - platform-tools - tools - build-tools-25.0.2 - android-25 # - sys-img-armeabi-v7a-android-24 - extra-android-m2repository licenses: - 'android-sdk-license.*' #compileSdkVersion 'android-24' requires JDK 1.8 or later to compile. jdk: - oraclejdk8 #Only CI for master & dev branches: only: - master - dev before_cache: - rm -f $HOME/.gradle/caches/modules-2/modules-2.lock cache: directories: - $HOME/.gradle/caches/ - $HOME/.gradle/wrapper/ #before_script: # # Create and start emulator # - echo no | android create avd --force -n test -t android-24 --abi armeabi-v7a # - emulator -avd test -no-skin -no-audio -no-window & # - android-wait-for-emulator # - adb shell input keyevent 82 & #script: # - ./gradlew clean connectAndroidTest assembleRelease --stacktrace script: ./gradlew clean build
language: android android: components: - platform-tools - tools - - build-tools-24.0.2 ? ^ + - build-tools-25.0.2 ? ^ - - android-24 ? ^ + - android-25 ? ^ - - sys-img-armeabi-v7a-android-24 + # - sys-img-armeabi-v7a-android-24 ? + - extra-android-m2repository + + licenses: + - 'android-sdk-license.*' #compileSdkVersion 'android-24' requires JDK 1.8 or later to compile. jdk: - oraclejdk8 #Only CI for master & dev branches: only: - master - dev before_cache: - rm -f $HOME/.gradle/caches/modules-2/modules-2.lock cache: directories: - $HOME/.gradle/caches/ - $HOME/.gradle/wrapper/ - before_script: + #before_script: ? + - # Create and start emulator + # # Create and start emulator ? + - - echo no | android create avd --force -n test -t android-24 --abi armeabi-v7a + # - echo no | android create avd --force -n test -t android-24 --abi armeabi-v7a ? + - - emulator -avd test -no-skin -no-audio -no-window & + # - emulator -avd test -no-skin -no-audio -no-window & ? + - - android-wait-for-emulator + # - android-wait-for-emulator ? + - - adb shell input keyevent 82 & + # - adb shell input keyevent 82 & ? + + #script: + # - ./gradlew clean connectAndroidTest assembleRelease --stacktrace + script: - - ./gradlew clean connectAndroidTest assembleRelease --stacktrace + ./gradlew clean build
26
0.764706
16
10
91f338c954d6ab49f370a54ba839bd309313a6d3
index.js
index.js
'use strict' var purify = require('purify-css') var extend = require('extend') exports.name = 'purifycss' exports.outputFormat = 'css' var defaults = { content: '' } exports.render = function (str, options, locals) { options = extend({}, defaults, options, locals) var content = options.content delete options.content return purify(content, str, options) } exports.renderAsync = function (str, options, locals) { return new Promise(function (fulfill, reject) { options = extend({}, defaults, options, locals) var content = options.content delete options.content purify(content, str, options, fulfill) }) }
'use strict' var purify = require('purify-css') var extend = require('extend') var Promise = require('promise') exports.name = 'purifycss' exports.outputFormat = 'css' var defaults = { content: '' } exports.render = function (str, options, locals) { options = extend({}, defaults, options, locals) var content = options.content delete options.content return purify(content, str, options) } exports.renderAsync = function (str, options, locals) { return new Promise(function (fulfill, reject) { options = extend({}, defaults, options, locals) var content = options.content delete options.content purify(content, str, options, fulfill) }) }
Add Promise for node 0.10 compatibility
Add Promise for node 0.10 compatibility
JavaScript
mit
jstransformers/jstransformer-purifycss,jstransformers/jstransformer-purifycss
javascript
## Code Before: 'use strict' var purify = require('purify-css') var extend = require('extend') exports.name = 'purifycss' exports.outputFormat = 'css' var defaults = { content: '' } exports.render = function (str, options, locals) { options = extend({}, defaults, options, locals) var content = options.content delete options.content return purify(content, str, options) } exports.renderAsync = function (str, options, locals) { return new Promise(function (fulfill, reject) { options = extend({}, defaults, options, locals) var content = options.content delete options.content purify(content, str, options, fulfill) }) } ## Instruction: Add Promise for node 0.10 compatibility ## Code After: 'use strict' var purify = require('purify-css') var extend = require('extend') var Promise = require('promise') exports.name = 'purifycss' exports.outputFormat = 'css' var defaults = { content: '' } exports.render = function (str, options, locals) { options = extend({}, defaults, options, locals) var content = options.content delete options.content return purify(content, str, options) } exports.renderAsync = function (str, options, locals) { return new Promise(function (fulfill, reject) { options = extend({}, defaults, options, locals) var content = options.content delete options.content purify(content, str, options, fulfill) }) }
'use strict' var purify = require('purify-css') var extend = require('extend') + var Promise = require('promise') exports.name = 'purifycss' exports.outputFormat = 'css' var defaults = { content: '' } exports.render = function (str, options, locals) { options = extend({}, defaults, options, locals) var content = options.content delete options.content return purify(content, str, options) } exports.renderAsync = function (str, options, locals) { return new Promise(function (fulfill, reject) { options = extend({}, defaults, options, locals) var content = options.content delete options.content purify(content, str, options, fulfill) }) }
1
0.037037
1
0
f5c8ae6bd69bfd24832b784b37341664fa949327
src/CMakeLists.txt
src/CMakeLists.txt
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -pedantic -std=c++0x") include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CORRADE_INCLUDE_DIR}) add_subdirectory(Math) add_subdirectory(MeshTools) add_subdirectory(Primitives) set(Magnum_SRCS Object.cpp AbstractTexture.cpp AbstractShaderProgram.cpp Camera.cpp IndexedMesh.cpp Light.cpp Mesh.cpp Scene.cpp Shader.cpp SizeTraits.cpp Texture.cpp Trade/AbstractImporter.cpp Math/Math.cpp ) add_library(Magnum SHARED ${Magnum_SRCS}) if(WIN32) set_target_properties(Magnum PROPERTIES COMPILE_FLAGS -DMAGNUM_EXPORTING) endif() target_link_libraries(Magnum CorradePluginManager CorradeUtility ${OPENGL_gl_LIBRARY} ${GLEW_LIBRARY}) install(TARGETS Magnum DESTINATION ${MAGNUM_LIBRARY_INSTALL_DIR}) if(BUILD_TESTS) enable_testing() add_subdirectory(Test) endif()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -pedantic -std=c++0x") include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CORRADE_INCLUDE_DIR}) add_subdirectory(Math) add_subdirectory(MeshTools) add_subdirectory(Primitives) set(Magnum_SRCS Object.cpp AbstractTexture.cpp AbstractShaderProgram.cpp Camera.cpp IndexedMesh.cpp Light.cpp Mesh.cpp Scene.cpp Shader.cpp SizeTraits.cpp Texture.cpp Trade/AbstractImporter.cpp Math/Math.cpp ) add_library(Magnum SHARED ${Magnum_SRCS}) if(WIN32) set_target_properties(Magnum PROPERTIES COMPILE_FLAGS -DMAGNUM_EXPORTING) endif() target_link_libraries(Magnum CorradePluginManager CorradeUtility ${OPENGL_gl_LIBRARY} ${GLEW_LIBRARY}) install(TARGETS Magnum DESTINATION ${MAGNUM_LIBRARY_INSTALL_DIR}) if(BUILD_TESTS) enable_testing() include_directories(${QT_INCLUDE_DIR}) add_subdirectory(Test) endif()
Include Qt include dir for building tests.
Include Qt include dir for building tests.
Text
mit
DerThorsten/magnum,ashimidashajia/magnum,MiUishadow/magnum,MiUishadow/magnum,MiUishadow/magnum,MiUishadow/magnum,ashimidashajia/magnum,DerThorsten/magnum,DerThorsten/magnum,DerThorsten/magnum,MiUishadow/magnum,MiUishadow/magnum,ashimidashajia/magnum,ashimidashajia/magnum,ashimidashajia/magnum,DerThorsten/magnum
text
## Code Before: set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -pedantic -std=c++0x") include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CORRADE_INCLUDE_DIR}) add_subdirectory(Math) add_subdirectory(MeshTools) add_subdirectory(Primitives) set(Magnum_SRCS Object.cpp AbstractTexture.cpp AbstractShaderProgram.cpp Camera.cpp IndexedMesh.cpp Light.cpp Mesh.cpp Scene.cpp Shader.cpp SizeTraits.cpp Texture.cpp Trade/AbstractImporter.cpp Math/Math.cpp ) add_library(Magnum SHARED ${Magnum_SRCS}) if(WIN32) set_target_properties(Magnum PROPERTIES COMPILE_FLAGS -DMAGNUM_EXPORTING) endif() target_link_libraries(Magnum CorradePluginManager CorradeUtility ${OPENGL_gl_LIBRARY} ${GLEW_LIBRARY}) install(TARGETS Magnum DESTINATION ${MAGNUM_LIBRARY_INSTALL_DIR}) if(BUILD_TESTS) enable_testing() add_subdirectory(Test) endif() ## Instruction: Include Qt include dir for building tests. ## Code After: set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -pedantic -std=c++0x") include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CORRADE_INCLUDE_DIR}) add_subdirectory(Math) add_subdirectory(MeshTools) add_subdirectory(Primitives) set(Magnum_SRCS Object.cpp AbstractTexture.cpp AbstractShaderProgram.cpp Camera.cpp IndexedMesh.cpp Light.cpp Mesh.cpp Scene.cpp Shader.cpp SizeTraits.cpp Texture.cpp Trade/AbstractImporter.cpp Math/Math.cpp ) add_library(Magnum SHARED ${Magnum_SRCS}) if(WIN32) set_target_properties(Magnum PROPERTIES COMPILE_FLAGS -DMAGNUM_EXPORTING) endif() target_link_libraries(Magnum CorradePluginManager CorradeUtility ${OPENGL_gl_LIBRARY} ${GLEW_LIBRARY}) install(TARGETS Magnum DESTINATION ${MAGNUM_LIBRARY_INSTALL_DIR}) if(BUILD_TESTS) enable_testing() include_directories(${QT_INCLUDE_DIR}) add_subdirectory(Test) endif()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -pedantic -std=c++0x") include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CORRADE_INCLUDE_DIR}) add_subdirectory(Math) add_subdirectory(MeshTools) add_subdirectory(Primitives) set(Magnum_SRCS Object.cpp AbstractTexture.cpp AbstractShaderProgram.cpp Camera.cpp IndexedMesh.cpp Light.cpp Mesh.cpp Scene.cpp Shader.cpp SizeTraits.cpp Texture.cpp Trade/AbstractImporter.cpp Math/Math.cpp ) add_library(Magnum SHARED ${Magnum_SRCS}) if(WIN32) set_target_properties(Magnum PROPERTIES COMPILE_FLAGS -DMAGNUM_EXPORTING) endif() target_link_libraries(Magnum CorradePluginManager CorradeUtility ${OPENGL_gl_LIBRARY} ${GLEW_LIBRARY}) install(TARGETS Magnum DESTINATION ${MAGNUM_LIBRARY_INSTALL_DIR}) if(BUILD_TESTS) enable_testing() + include_directories(${QT_INCLUDE_DIR}) add_subdirectory(Test) endif()
1
0.025
1
0
29fc342d7e2740a3ab2f6607f47ee7e0d5cceebf
content/talks/5-impossible-things-before-breakfast.md
content/talks/5-impossible-things-before-breakfast.md
type: session title: "5 impossible things before breakfast" slug: "5-impossible-things-before-breakfast" url: "talks/5-impossible-things-before-breakfast/index.html" body_class_hack: talks --- ### Michael Sparks Sometimes you're asked to deliver the impossible in a given timeframe. Sometimes it's several seemingly impossible things. This talk covers a project like that, which has python involved at all layers - from microcontroller, through a Django website, through to a QT (PySide) client side application, resulting in a python programmable child friendly device. It'll be a brief overview of the various parts involved, including the python to C++ compiler developed over a period of 3-4 weeks.
type: session title: "5 impossible things before breakfast" slug: "5-impossible-things-before-breakfast" url: "talks/5-impossible-things-before-breakfast/index.html" body_class_hack: talks --- ### Michael Sparks Sometimes you're asked to deliver something that seems impossible, but necessary in a given timeframe. Sometimes it's several seemingly impossible things. Developing the prototype for the BBC Micro:bit - a pocket sized, child programmable computer - was very much like this. It had 3 months to be delivered in a form sufficiently robust and usable to be used by children in schools across the country; to be sufficiently documented to be completely understood from scratch by others; and to be a sufficiently open and flexible design to allow any and all parts of the system to change, while retaining its core principles. There was about 3 months to develop the entire stack from scratch. This included a microcontroller based hardware stack, through firmware, a python to C++ compiler (3-4 weeks), through django website, through to a QT (PySide) client side application, through to publication of the device as a network connected and controllable device via REST. Python was involved in all layers - including at microcontroller level on a device too small to run any python interpreter. The bulk of the development period had just one developer for hardware and software. For just 1 month there were 2 extra developers brought on board, part time to assist. This talk will be a detailed overview of the various subsystems, and the strategies taken to deliver a complete, mass produce-able, and sufficiently scalable product such an aggressive timescale. The talk title is a nod to the idea that while each of the various layers is doable alone in 3 months, doing all the layers simultaneously using one developer is ... challenging. It should be of interest to those interested in developing hardware and software products, and especially those developing products that have both a hardware and software element.
Update to bbc microbit talk description
Update to bbc microbit talk description
Markdown
mit
wjt/pyconuk.org,sixty-north/pyconuk.org,BjarniRunar/pyconuk.org,zeth/pyconuk.org,evildmp/pyconuk.org,zeth/pyconuk.org,snim2/pyconuk.org,PyconUK/2015.pyconuk.org,helenst/pyconuk.org,mojones/pyconuk.org,PyconUK/pyconuk.org,moreati/pyconuk.org,lordmauve/pyconuk.org,VishvajitP/pyconuk.org,jamesbroadhead/pyconuk.org,BjarniRunar/pyconuk.org,Avaren/pyconuk.org,jrobinson-uk/pyconuk.org,tomviner/pyconuk.org,helenst/pyconuk.org,jneves/pyconuk.org,moreati/pyconuk.org,Avaren/pyconuk.org,PyconUK/2015.pyconuk.org,ntoll/pyconuk.org,jneves/pyconuk.org,jamesbroadhead/pyconuk.org,zeth/pyconuk.org,tomviner/pyconuk.org,VishvajitP/pyconuk.org,VishvajitP/pyconuk.org,snim2/pyconuk.org,BjarniRunar/pyconuk.org,ntoll/pyconuk.org,wjt/pyconuk.org,sparkslabs/pyconuk.org,mojones/pyconuk.org,grimpunch/pyconuk.org,jamesbroadhead/pyconuk.org,mojones/pyconuk.org,sixty-north/pyconuk.org,jrobinson-uk/pyconuk.org,PyconUK/pyconuk.org,tomviner/pyconuk.org,grimpunch/pyconuk.org,jrobinson-uk/pyconuk.org,evildmp/pyconuk.org,Avaren/pyconuk.org,helenst/pyconuk.org,snim2/pyconuk.org,PyconUK/2015.pyconuk.org,PyconUK/pyconuk.org,grimpunch/pyconuk.org,evildmp/pyconuk.org,sparkslabs/pyconuk.org,jneves/pyconuk.org,sixty-north/pyconuk.org,lordmauve/pyconuk.org,wjt/pyconuk.org,moreati/pyconuk.org
markdown
## Code Before: type: session title: "5 impossible things before breakfast" slug: "5-impossible-things-before-breakfast" url: "talks/5-impossible-things-before-breakfast/index.html" body_class_hack: talks --- ### Michael Sparks Sometimes you're asked to deliver the impossible in a given timeframe. Sometimes it's several seemingly impossible things. This talk covers a project like that, which has python involved at all layers - from microcontroller, through a Django website, through to a QT (PySide) client side application, resulting in a python programmable child friendly device. It'll be a brief overview of the various parts involved, including the python to C++ compiler developed over a period of 3-4 weeks. ## Instruction: Update to bbc microbit talk description ## Code After: type: session title: "5 impossible things before breakfast" slug: "5-impossible-things-before-breakfast" url: "talks/5-impossible-things-before-breakfast/index.html" body_class_hack: talks --- ### Michael Sparks Sometimes you're asked to deliver something that seems impossible, but necessary in a given timeframe. Sometimes it's several seemingly impossible things. Developing the prototype for the BBC Micro:bit - a pocket sized, child programmable computer - was very much like this. It had 3 months to be delivered in a form sufficiently robust and usable to be used by children in schools across the country; to be sufficiently documented to be completely understood from scratch by others; and to be a sufficiently open and flexible design to allow any and all parts of the system to change, while retaining its core principles. There was about 3 months to develop the entire stack from scratch. This included a microcontroller based hardware stack, through firmware, a python to C++ compiler (3-4 weeks), through django website, through to a QT (PySide) client side application, through to publication of the device as a network connected and controllable device via REST. Python was involved in all layers - including at microcontroller level on a device too small to run any python interpreter. The bulk of the development period had just one developer for hardware and software. For just 1 month there were 2 extra developers brought on board, part time to assist. This talk will be a detailed overview of the various subsystems, and the strategies taken to deliver a complete, mass produce-able, and sufficiently scalable product such an aggressive timescale. The talk title is a nod to the idea that while each of the various layers is doable alone in 3 months, doing all the layers simultaneously using one developer is ... challenging. It should be of interest to those interested in developing hardware and software products, and especially those developing products that have both a hardware and software element.
type: session title: "5 impossible things before breakfast" slug: "5-impossible-things-before-breakfast" url: "talks/5-impossible-things-before-breakfast/index.html" body_class_hack: talks --- ### Michael Sparks - Sometimes you're asked to deliver the impossible in a given timeframe. Sometimes it's several seemingly impossible things. This talk covers a project like that, which has python involved at all layers - from microcontroller, through a Django website, through to a QT (PySide) client side application, resulting in a python programmable child friendly device. It'll be a brief overview of the various parts involved, including the python to C++ compiler developed over a period of 3-4 weeks. + Sometimes you're asked to deliver something that seems impossible, but + necessary in a given timeframe. Sometimes it's several seemingly impossible + things. + + Developing the prototype for the BBC Micro:bit - a pocket sized, child + programmable computer - was very much like this. It had 3 months to be + delivered in a form sufficiently robust and usable to be used by children in + schools across the country; to be sufficiently documented to be completely + understood from scratch by others; and to be a sufficiently open and + flexible design to allow any and all parts of the system to change, while + retaining its core principles. + + There was about 3 months to develop the entire stack from scratch. This + included a microcontroller based hardware stack, through firmware, a python + to C++ compiler (3-4 weeks), through django website, through to a QT + (PySide) client side application, through to publication of the device as a + network connected and controllable device via REST. Python was involved in + all layers - including at microcontroller level on a device too small to run + any python interpreter. + + The bulk of the development period had just one developer for hardware + and software. For just 1 month there were 2 extra developers brought on + board, part time to assist. + + This talk will be a detailed overview of the various subsystems, and the + strategies taken to deliver a complete, mass produce-able, and sufficiently + scalable product such an aggressive timescale. The talk title is a nod to + the idea that while each of the various layers is doable alone in 3 months, + doing all the layers simultaneously using one developer is ... challenging. + + It should be of interest to those interested in developing hardware and + software products, and especially those developing products that have both a + hardware and software element.
34
3.4
33
1
6d78aa23b6eeeaaa95490dd66db0dfdb9211651d
.travis.yml
.travis.yml
language: ruby rvm: - 1.9.3 - 2.0.0 - jruby-19mode script: bundle exec rake
language: ruby sudo: false cache: bundler rvm: - 2.1 - 2.2 script: bundle exec rake
Test modern Rubies and use Travis's new container infrastructure
Test modern Rubies and use Travis's new container infrastructure
YAML
mit
psu-stewardship/noid,microservices/noid
yaml
## Code Before: language: ruby rvm: - 1.9.3 - 2.0.0 - jruby-19mode script: bundle exec rake ## Instruction: Test modern Rubies and use Travis's new container infrastructure ## Code After: language: ruby sudo: false cache: bundler rvm: - 2.1 - 2.2 script: bundle exec rake
language: ruby + sudo: false + cache: bundler rvm: - - 1.9.3 - - 2.0.0 ? ^^^ + - 2.1 ? ^ - - jruby-19mode + - 2.2 script: bundle exec rake
7
1.166667
4
3
2ab2d0d68fc7190c9bfd593a7e6ee4be779bd32a
.travis.yml
.travis.yml
language: go go: - 1.7.x notifications: email: on_success: never on_failure: never before_install: - source /etc/lsb-release && echo "deb http://download.rethinkdb.com/apt $DISTRIB_CODENAME main" | sudo tee /etc/apt/sources.list.d/rethinkdb.list - wget -qO- https://download.rethinkdb.com/apt/pubkey.gpg | sudo apt-key add - - sudo apt-get update -qq - sudo apt-get install -qq rethinkdb install: - go get -u github.com/boatilus/peppercorn before_script: - rethinkdb --daemon
language: go go: - 1.7.x notifications: email: on_success: never on_failure: never before_install: - source /etc/lsb-release && echo "deb http://download.rethinkdb.com/apt $DISTRIB_CODENAME main" | sudo tee /etc/apt/sources.list.d/rethinkdb.list - wget -qO- https://download.rethinkdb.com/apt/pubkey.gpg | sudo apt-key add - - sudo apt-get update -qq - sudo apt-get install -qq rethinkdb install: - go get -u github.com/stretchr/testify/assert - go get -u github.com/boatilus/peppercorn before_script: - rethinkdb --daemon
Add Testify to Travis install
Add Testify to Travis install
YAML
cc0-1.0
boatilus/peppercorn,boatilus/peppercorn,boatilus/peppercorn,boatilus/peppercorn
yaml
## Code Before: language: go go: - 1.7.x notifications: email: on_success: never on_failure: never before_install: - source /etc/lsb-release && echo "deb http://download.rethinkdb.com/apt $DISTRIB_CODENAME main" | sudo tee /etc/apt/sources.list.d/rethinkdb.list - wget -qO- https://download.rethinkdb.com/apt/pubkey.gpg | sudo apt-key add - - sudo apt-get update -qq - sudo apt-get install -qq rethinkdb install: - go get -u github.com/boatilus/peppercorn before_script: - rethinkdb --daemon ## Instruction: Add Testify to Travis install ## Code After: language: go go: - 1.7.x notifications: email: on_success: never on_failure: never before_install: - source /etc/lsb-release && echo "deb http://download.rethinkdb.com/apt $DISTRIB_CODENAME main" | sudo tee /etc/apt/sources.list.d/rethinkdb.list - wget -qO- https://download.rethinkdb.com/apt/pubkey.gpg | sudo apt-key add - - sudo apt-get update -qq - sudo apt-get install -qq rethinkdb install: - go get -u github.com/stretchr/testify/assert - go get -u github.com/boatilus/peppercorn before_script: - rethinkdb --daemon
language: go go: - 1.7.x notifications: email: on_success: never on_failure: never before_install: - source /etc/lsb-release && echo "deb http://download.rethinkdb.com/apt $DISTRIB_CODENAME main" | sudo tee /etc/apt/sources.list.d/rethinkdb.list - wget -qO- https://download.rethinkdb.com/apt/pubkey.gpg | sudo apt-key add - - sudo apt-get update -qq - sudo apt-get install -qq rethinkdb install: + - go get -u github.com/stretchr/testify/assert - go get -u github.com/boatilus/peppercorn before_script: - rethinkdb --daemon
1
0.047619
1
0
18980188aa9bb834cfbecfb1ed2f6b5a7353ac28
CHANGELOG.md
CHANGELOG.md
- Allow empty content type for multipart form fields. - Fail aborted requests correctly. - Apply transfer timeouts correctly (was previously a header timeout only). - Check for incomplete response bodies and error out in case of an incomplete body. - Close sockets if response body is not consumed instead of trying to silently consume it in the background, which might hang indefinitely (depending on the timeout). ## 3.0.5 - Fixed multipart body bounaries not ending in `\r\n`. ## 3.0.4 - Fixed GC issues if request bodies mismatches the specified content-length. ## 3.0.3 - Read the public suffix list only once instead of once per check. This was supposed to work previously, but failed to set the `$initialized` flag. ## 3.0.2 - Fixed issues with cookies when IDN support is not available. ## 3.0.1 - Enforce body size limit also for compressed responses. This is a protection measure against malicious servers as described [here](https://blog.haschek.at/2017/how-to-defend-your-website-with-zip-bombs.html). ## 3.0.0 - Upgrade to Amp v2. - Major refactoring for streamed response bodies. - Updated redirect policy to use a new `Request` if the host changes.
- Clean references correctly, so unused bodies aren't consumed and the connection is closed. ## 3.0.6 - Allow empty content type for multipart form fields. - Fail aborted requests correctly. - Apply transfer timeouts correctly (was previously a header timeout only). - Check for incomplete response bodies and error out in case of an incomplete body. - Close sockets if response body is not consumed instead of trying to silently consume it in the background, which might hang indefinitely (depending on the timeout). ## 3.0.5 - Fixed multipart body bounaries not ending in `\r\n`. ## 3.0.4 - Fixed GC issues if request bodies mismatches the specified content-length. ## 3.0.3 - Read the public suffix list only once instead of once per check. This was supposed to work previously, but failed to set the `$initialized` flag. ## 3.0.2 - Fixed issues with cookies when IDN support is not available. ## 3.0.1 - Enforce body size limit also for compressed responses. This is a protection measure against malicious servers as described [here](https://blog.haschek.at/2017/how-to-defend-your-website-with-zip-bombs.html). ## 3.0.0 - Upgrade to Amp v2. - Major refactoring for streamed response bodies. - Updated redirect policy to use a new `Request` if the host changes.
Add changelog entry for unconsumed body fix
Add changelog entry for unconsumed body fix
Markdown
mit
amphp/artax,amphp/artax
markdown
## Code Before: - Allow empty content type for multipart form fields. - Fail aborted requests correctly. - Apply transfer timeouts correctly (was previously a header timeout only). - Check for incomplete response bodies and error out in case of an incomplete body. - Close sockets if response body is not consumed instead of trying to silently consume it in the background, which might hang indefinitely (depending on the timeout). ## 3.0.5 - Fixed multipart body bounaries not ending in `\r\n`. ## 3.0.4 - Fixed GC issues if request bodies mismatches the specified content-length. ## 3.0.3 - Read the public suffix list only once instead of once per check. This was supposed to work previously, but failed to set the `$initialized` flag. ## 3.0.2 - Fixed issues with cookies when IDN support is not available. ## 3.0.1 - Enforce body size limit also for compressed responses. This is a protection measure against malicious servers as described [here](https://blog.haschek.at/2017/how-to-defend-your-website-with-zip-bombs.html). ## 3.0.0 - Upgrade to Amp v2. - Major refactoring for streamed response bodies. - Updated redirect policy to use a new `Request` if the host changes. ## Instruction: Add changelog entry for unconsumed body fix ## Code After: - Clean references correctly, so unused bodies aren't consumed and the connection is closed. ## 3.0.6 - Allow empty content type for multipart form fields. - Fail aborted requests correctly. - Apply transfer timeouts correctly (was previously a header timeout only). - Check for incomplete response bodies and error out in case of an incomplete body. - Close sockets if response body is not consumed instead of trying to silently consume it in the background, which might hang indefinitely (depending on the timeout). ## 3.0.5 - Fixed multipart body bounaries not ending in `\r\n`. ## 3.0.4 - Fixed GC issues if request bodies mismatches the specified content-length. ## 3.0.3 - Read the public suffix list only once instead of once per check. This was supposed to work previously, but failed to set the `$initialized` flag. ## 3.0.2 - Fixed issues with cookies when IDN support is not available. ## 3.0.1 - Enforce body size limit also for compressed responses. This is a protection measure against malicious servers as described [here](https://blog.haschek.at/2017/how-to-defend-your-website-with-zip-bombs.html). ## 3.0.0 - Upgrade to Amp v2. - Major refactoring for streamed response bodies. - Updated redirect policy to use a new `Request` if the host changes.
+ + - Clean references correctly, so unused bodies aren't consumed and the connection is closed. + + ## 3.0.6 - Allow empty content type for multipart form fields. - Fail aborted requests correctly. - Apply transfer timeouts correctly (was previously a header timeout only). - Check for incomplete response bodies and error out in case of an incomplete body. - Close sockets if response body is not consumed instead of trying to silently consume it in the background, which might hang indefinitely (depending on the timeout). ## 3.0.5 - Fixed multipart body bounaries not ending in `\r\n`. ## 3.0.4 - Fixed GC issues if request bodies mismatches the specified content-length. ## 3.0.3 - Read the public suffix list only once instead of once per check. This was supposed to work previously, but failed to set the `$initialized` flag. ## 3.0.2 - Fixed issues with cookies when IDN support is not available. ## 3.0.1 - Enforce body size limit also for compressed responses. This is a protection measure against malicious servers as described [here](https://blog.haschek.at/2017/how-to-defend-your-website-with-zip-bombs.html). ## 3.0.0 - Upgrade to Amp v2. - Major refactoring for streamed response bodies. - Updated redirect policy to use a new `Request` if the host changes.
4
0.129032
4
0
03d7d8ca962da92c695bacc91672308c242d11b1
src/Regex/P6Regex/Actions.pm
src/Regex/P6Regex/Actions.pm
class Regex::P6Regex::Actions; method TOP($/) { my $past := PAST::Regex.new( $<nibbler>.ast, PAST::Regex.new( :pasttype('pass') ), :pasttype('concat') ); make $past; } method nibbler($/) { make $<termish>[0].ast; } method termish($/) { my $past := PAST::Regex.new( :pasttype('concat') ); for $<noun> { $past.push($_.ast); } make $past; } method quantified_atom($/) { my $past := $<atom>.ast; if $<quantifier> { $<quantifier>[0].ast.unshift($past); $past := $<quantifier>[0].ast; } make $past; } method atom($/) { my $past := PAST::Regex.new( ~$/ , :pasttype('literal') ); make $past; } method quantifier:sym<*>($/) { my $past := PAST::Regex.new( :pasttype('quant') ); make $past; }
class Regex::P6Regex::Actions; method TOP($/) { my $past := PAST::Regex.new( $<nibbler>.ast, PAST::Regex.new( :pasttype('pass') ), :pasttype('concat') ); make $past; } method nibbler($/) { make $<termish>[0].ast; } method termish($/) { my $past := PAST::Regex.new( :pasttype('concat') ); for $<noun> { $past.push($_.ast); } make $past; } method quantified_atom($/) { my $past := $<atom>.ast; if $<quantifier> { $<quantifier>[0].ast.unshift($past); $past := $<quantifier>[0].ast; } make $past; } method atom($/) { my $past := PAST::Regex.new( ~$/ , :pasttype('literal') ); make $past; } method quantifier:sym<*>($/) { my $past := PAST::Regex.new( :pasttype('quant') ); make $past; } method quantifier:sym<+>($/) { my $past := PAST::Regex.new( :pasttype('quant'), :min(1) ); make $past; } method quantifier:sym<?>($/) { my $past := PAST::Regex.new( :pasttype('quant'), :min(0), :max(1) ); make $past; }
Add + and ? quantifiers.
Add + and ? quantifiers.
Perl
artistic-2.0
cygx/nqp,cygx/nqp,cygx/nqp,perl6/nqp-rx,cygx/nqp,perl6/nqp-rx,cygx/nqp,cygx/nqp,cygx/nqp,cygx/nqp
perl
## Code Before: class Regex::P6Regex::Actions; method TOP($/) { my $past := PAST::Regex.new( $<nibbler>.ast, PAST::Regex.new( :pasttype('pass') ), :pasttype('concat') ); make $past; } method nibbler($/) { make $<termish>[0].ast; } method termish($/) { my $past := PAST::Regex.new( :pasttype('concat') ); for $<noun> { $past.push($_.ast); } make $past; } method quantified_atom($/) { my $past := $<atom>.ast; if $<quantifier> { $<quantifier>[0].ast.unshift($past); $past := $<quantifier>[0].ast; } make $past; } method atom($/) { my $past := PAST::Regex.new( ~$/ , :pasttype('literal') ); make $past; } method quantifier:sym<*>($/) { my $past := PAST::Regex.new( :pasttype('quant') ); make $past; } ## Instruction: Add + and ? quantifiers. ## Code After: class Regex::P6Regex::Actions; method TOP($/) { my $past := PAST::Regex.new( $<nibbler>.ast, PAST::Regex.new( :pasttype('pass') ), :pasttype('concat') ); make $past; } method nibbler($/) { make $<termish>[0].ast; } method termish($/) { my $past := PAST::Regex.new( :pasttype('concat') ); for $<noun> { $past.push($_.ast); } make $past; } method quantified_atom($/) { my $past := $<atom>.ast; if $<quantifier> { $<quantifier>[0].ast.unshift($past); $past := $<quantifier>[0].ast; } make $past; } method atom($/) { my $past := PAST::Regex.new( ~$/ , :pasttype('literal') ); make $past; } method quantifier:sym<*>($/) { my $past := PAST::Regex.new( :pasttype('quant') ); make $past; } method quantifier:sym<+>($/) { my $past := PAST::Regex.new( :pasttype('quant'), :min(1) ); make $past; } method quantifier:sym<?>($/) { my $past := PAST::Regex.new( :pasttype('quant'), :min(0), :max(1) ); make $past; }
class Regex::P6Regex::Actions; method TOP($/) { my $past := PAST::Regex.new( $<nibbler>.ast, PAST::Regex.new( :pasttype('pass') ), :pasttype('concat') ); make $past; } method nibbler($/) { make $<termish>[0].ast; } method termish($/) { my $past := PAST::Regex.new( :pasttype('concat') ); for $<noun> { $past.push($_.ast); } make $past; } method quantified_atom($/) { my $past := $<atom>.ast; if $<quantifier> { $<quantifier>[0].ast.unshift($past); $past := $<quantifier>[0].ast; } make $past; } method atom($/) { my $past := PAST::Regex.new( ~$/ , :pasttype('literal') ); make $past; } method quantifier:sym<*>($/) { my $past := PAST::Regex.new( :pasttype('quant') ); make $past; } + + method quantifier:sym<+>($/) { + my $past := PAST::Regex.new( :pasttype('quant'), :min(1) ); + make $past; + } + + method quantifier:sym<?>($/) { + my $past := PAST::Regex.new( :pasttype('quant'), :min(0), :max(1) ); + make $past; + }
10
0.243902
10
0
23026393efdf2c1900734793bd9c2cdb4da722eb
README.md
README.md
This tool makes it possible for you to serve the content of your Github wiki pages using gh-pages. This allows you to customize the UI and aggregate information (ie. localized versions) within the same site. ## Dependencies * [marked](https://github.com/chjj/marked) * [Mu](https://github.com/raycmorgan/Mu) * [commander.js](https://github.com/visionmedia/commander.js) * [wrench.js](https://github.com/ryanmcgrath/wrench-js) You can use "sudo npm install marked mu2 commander" to install these. Note that you won't need commander.js if you use ghw as a module. ## Thanks Big thanks to [guille](https://github.com/guille) for motivating the project! The [Node](https://github.com/joyent/node) guys deserve thanks too.
This tool makes it possible for you to serve the content of your Github wiki pages using gh-pages. This allows you to customize the UI and aggregate information (ie. localized versions) within the same site. ## Dependencies * [marked](https://github.com/chjj/marked) * [Mu](https://github.com/raycmorgan/Mu) * [commander.js](https://github.com/visionmedia/commander.js) * [wrench.js](https://github.com/ryanmcgrath/wrench-js) You can use "sudo npm install marked mu2 commander" to install these. Note that you won't need commander.js if you use ghw as a module. ## Thanks Big thanks to [guille](https://github.com/guille) for motivating the project! The [Node](https://github.com/joyent/node) guys deserve thanks too. ## License ghw is available under MIT. See LICENSE for more details.
Add licensing info to readme
Add licensing info to readme
Markdown
mit
bebraw/ghw,bebraw/ghw,bebraw/ghw
markdown
## Code Before: This tool makes it possible for you to serve the content of your Github wiki pages using gh-pages. This allows you to customize the UI and aggregate information (ie. localized versions) within the same site. ## Dependencies * [marked](https://github.com/chjj/marked) * [Mu](https://github.com/raycmorgan/Mu) * [commander.js](https://github.com/visionmedia/commander.js) * [wrench.js](https://github.com/ryanmcgrath/wrench-js) You can use "sudo npm install marked mu2 commander" to install these. Note that you won't need commander.js if you use ghw as a module. ## Thanks Big thanks to [guille](https://github.com/guille) for motivating the project! The [Node](https://github.com/joyent/node) guys deserve thanks too. ## Instruction: Add licensing info to readme ## Code After: This tool makes it possible for you to serve the content of your Github wiki pages using gh-pages. This allows you to customize the UI and aggregate information (ie. localized versions) within the same site. ## Dependencies * [marked](https://github.com/chjj/marked) * [Mu](https://github.com/raycmorgan/Mu) * [commander.js](https://github.com/visionmedia/commander.js) * [wrench.js](https://github.com/ryanmcgrath/wrench-js) You can use "sudo npm install marked mu2 commander" to install these. Note that you won't need commander.js if you use ghw as a module. ## Thanks Big thanks to [guille](https://github.com/guille) for motivating the project! The [Node](https://github.com/joyent/node) guys deserve thanks too. ## License ghw is available under MIT. See LICENSE for more details.
This tool makes it possible for you to serve the content of your Github wiki pages using gh-pages. This allows you to customize the UI and aggregate information (ie. localized versions) within the same site. ## Dependencies * [marked](https://github.com/chjj/marked) * [Mu](https://github.com/raycmorgan/Mu) * [commander.js](https://github.com/visionmedia/commander.js) * [wrench.js](https://github.com/ryanmcgrath/wrench-js) You can use "sudo npm install marked mu2 commander" to install these. Note that you won't need commander.js if you use ghw as a module. ## Thanks Big thanks to [guille](https://github.com/guille) for motivating the project! The [Node](https://github.com/joyent/node) guys deserve thanks too. + ## License + + ghw is available under MIT. See LICENSE for more details. +
4
0.25
4
0
46a14e279ca94b3fe1ad7b79bf2e639fc870fa2b
docs/releases.rst
docs/releases.rst
Releases ======== Version 1.9, In Development --------------------------- * Initial release as stand-alone plugin. The version number aligns with tappy.
Releases ======== Version 1.9, Released June 19, 2016 ----------------------------------- * Initial release as stand-alone plugin. The version number aligns with tappy.
Set the release date for 1.9.
Set the release date for 1.9.
reStructuredText
bsd-2-clause
python-tap/nose-tap
restructuredtext
## Code Before: Releases ======== Version 1.9, In Development --------------------------- * Initial release as stand-alone plugin. The version number aligns with tappy. ## Instruction: Set the release date for 1.9. ## Code After: Releases ======== Version 1.9, Released June 19, 2016 ----------------------------------- * Initial release as stand-alone plugin. The version number aligns with tappy.
Releases ======== - Version 1.9, In Development + Version 1.9, Released June 19, 2016 - --------------------------- + ----------------------------------- ? ++++++++ * Initial release as stand-alone plugin. The version number aligns with tappy.
4
0.5
2
2
ed5dd3e9271dfb148835892ba909dbc1a364e097
Site/layouts/xhtml/xmlrpcserver.php
Site/layouts/xhtml/xmlrpcserver.php
<?php // Set content type to XML header('Content-type: text/xml'); // Disable any caching with HTTP headers // Any date in the past will do here header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); // Set always modified // for HTTP/1.1 header('Cache-Control: no-cache, must-revalidate max-age=0'); // for HTTP/1.0 header('Pragma: no-cache'); echo $this->response; ?>
<?php // Set content type to XML header('Content-type: text/xml; charset=UTF-8'); // Disable any caching with HTTP headers // Any date in the past will do here header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); // Set always modified // for HTTP/1.1 header('Cache-Control: no-cache, must-revalidate max-age=0'); // for HTTP/1.0 header('Pragma: no-cache'); echo $this->response; ?>
Send XML_-RPC responses in UTF-8
Send XML_-RPC responses in UTF-8 svn commit r10953
PHP
lgpl-2.1
nburka/site,nburka/site,silverorange/site,silverorange/site
php
## Code Before: <?php // Set content type to XML header('Content-type: text/xml'); // Disable any caching with HTTP headers // Any date in the past will do here header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); // Set always modified // for HTTP/1.1 header('Cache-Control: no-cache, must-revalidate max-age=0'); // for HTTP/1.0 header('Pragma: no-cache'); echo $this->response; ?> ## Instruction: Send XML_-RPC responses in UTF-8 svn commit r10953 ## Code After: <?php // Set content type to XML header('Content-type: text/xml; charset=UTF-8'); // Disable any caching with HTTP headers // Any date in the past will do here header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); // Set always modified // for HTTP/1.1 header('Cache-Control: no-cache, must-revalidate max-age=0'); // for HTTP/1.0 header('Pragma: no-cache'); echo $this->response; ?>
<?php // Set content type to XML - header('Content-type: text/xml'); + header('Content-type: text/xml; charset=UTF-8'); ? +++++++++++++++ // Disable any caching with HTTP headers // Any date in the past will do here header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); // Set always modified // for HTTP/1.1 header('Cache-Control: no-cache, must-revalidate max-age=0'); // for HTTP/1.0 header('Pragma: no-cache'); echo $this->response; ?>
2
0.111111
1
1
8550698549e9ef5667fc8c9af3808883a34a146f
watirspec_helper.rb
watirspec_helper.rb
$LOAD_PATH.unshift File.dirname(__FILE__) $LOAD_PATH.unshift File.expand_path('../../lib', __FILE__) require 'rspec' require 'guards' require 'server' require 'operawatir/helper' OperaWatir.newandshinyplease! RSpec.configure do |config| config.mock_with :rr end module WatirSpec extend self attr_accessor :args, :guarded def host "http://#{Server.bind}:#{Server.port}" end alias_method :files, :host def guards @guards ||= [] end def guarded? !!@guarded end module Helpers def browser OperaWatir::Helper.browser end def fixture(*paths) [WatirSpec.host, *paths].join('/') end end end include OperaWatir::Exceptions include WatirSpec::Guard::Helpers RSpec.configure do |config| config.include WatirSpec::Helpers config.before(:suite) do Thread.new { WatirSpec::Server.run! } end end
$LOAD_PATH.unshift File.dirname(__FILE__) $LOAD_PATH.unshift File.expand_path('../../lib', __FILE__) require 'rspec' require 'guards' require 'server' require 'operawatir/helper' OperaWatir.use_version 2 RSpec.configure do |config| config.mock_with :rr end module WatirSpec extend self attr_accessor :args, :guarded def host "http://#{Server.bind}:#{Server.port}" end alias_method :files, :host def guards @guards ||= [] end def guarded? !!@guarded end module Helpers def browser OperaWatir::Helper.browser end def window browser.active_window end def fixture(*paths) [WatirSpec.host, *paths].join('/') end end end include OperaWatir::Exceptions include WatirSpec::Guard::Helpers RSpec.configure do |config| config.include WatirSpec::Helpers config.before(:suite) do Thread.new { WatirSpec::Server.run! } end end
Use version 2, and provide a window
Use version 2, and provide a window
Ruby
mit
operasoftware/watir3-spec,operasoftware/watir3-spec
ruby
## Code Before: $LOAD_PATH.unshift File.dirname(__FILE__) $LOAD_PATH.unshift File.expand_path('../../lib', __FILE__) require 'rspec' require 'guards' require 'server' require 'operawatir/helper' OperaWatir.newandshinyplease! RSpec.configure do |config| config.mock_with :rr end module WatirSpec extend self attr_accessor :args, :guarded def host "http://#{Server.bind}:#{Server.port}" end alias_method :files, :host def guards @guards ||= [] end def guarded? !!@guarded end module Helpers def browser OperaWatir::Helper.browser end def fixture(*paths) [WatirSpec.host, *paths].join('/') end end end include OperaWatir::Exceptions include WatirSpec::Guard::Helpers RSpec.configure do |config| config.include WatirSpec::Helpers config.before(:suite) do Thread.new { WatirSpec::Server.run! } end end ## Instruction: Use version 2, and provide a window ## Code After: $LOAD_PATH.unshift File.dirname(__FILE__) $LOAD_PATH.unshift File.expand_path('../../lib', __FILE__) require 'rspec' require 'guards' require 'server' require 'operawatir/helper' OperaWatir.use_version 2 RSpec.configure do |config| config.mock_with :rr end module WatirSpec extend self attr_accessor :args, :guarded def host "http://#{Server.bind}:#{Server.port}" end alias_method :files, :host def guards @guards ||= [] end def guarded? !!@guarded end module Helpers def browser OperaWatir::Helper.browser end def window browser.active_window end def fixture(*paths) [WatirSpec.host, *paths].join('/') end end end include OperaWatir::Exceptions include WatirSpec::Guard::Helpers RSpec.configure do |config| config.include WatirSpec::Helpers config.before(:suite) do Thread.new { WatirSpec::Server.run! } end end
$LOAD_PATH.unshift File.dirname(__FILE__) $LOAD_PATH.unshift File.expand_path('../../lib', __FILE__) require 'rspec' require 'guards' require 'server' require 'operawatir/helper' - OperaWatir.newandshinyplease! + OperaWatir.use_version 2 RSpec.configure do |config| config.mock_with :rr end module WatirSpec extend self attr_accessor :args, :guarded def host "http://#{Server.bind}:#{Server.port}" end alias_method :files, :host def guards @guards ||= [] end def guarded? !!@guarded end module Helpers def browser OperaWatir::Helper.browser end + def window + browser.active_window + end + def fixture(*paths) [WatirSpec.host, *paths].join('/') end end end include OperaWatir::Exceptions include WatirSpec::Guard::Helpers RSpec.configure do |config| config.include WatirSpec::Helpers config.before(:suite) do Thread.new { WatirSpec::Server.run! } end end
6
0.105263
5
1
d08e6e48b4282150feda8eb319a874c6de3591e7
packages/pciutils/pciutils_2.1.11.bb
packages/pciutils/pciutils_2.1.11.bb
SECTION = "console/utils" DESCRIPTION = 'The PCI Utilities package contains a library for portable access \ to PCI bus configuration space and several utilities based on this library.' HOMEPAGE = "http://atrey.karlin.mff.cuni.cz/~mj/pciutils.shtml" LICENSE = "GPLv2" PR="r1" PARALLEL_MAKE = "" SRC_URI = "ftp://ftp.kernel.org/pub/software/utils/pciutils/pciutils-${PV}.tar.bz2 \ file://configure.patch;patch=1 \ file://configure-uclibc.patch;patch=1 \ file://pcimodules-pciutils-2.1.11.diff;patch=1" do_configure () { (cd lib && ./configure ${datadir} ${PV} ${TARGET_OS} 2.4.21 ${TARGET_ARCH}) } export PREFIX = "${D}${prefix}" export SBINDIR = "${D}${sbindir}" export SHAREDIR = "${D}${datadir}" export MANDIR = "${D}${mandir}" do_install () { oe_runmake install }
SECTION = "console/utils" DESCRIPTION = 'The PCI Utilities package contains a library for portable access \ to PCI bus configuration space and several utilities based on this library.' HOMEPAGE = "http://atrey.karlin.mff.cuni.cz/~mj/pciutils.shtml" LICENSE = "GPLv2" PR="r2" PARALLEL_MAKE = "" FILES_pciutils-ids="${prefix}/share/pci.ids" PACKAGES =+ "pciutils-ids" SRC_URI = "ftp://ftp.kernel.org/pub/software/utils/pciutils/pciutils-${PV}.tar.bz2 \ file://configure.patch;patch=1 \ file://configure-uclibc.patch;patch=1 \ file://pcimodules-pciutils-2.1.11.diff;patch=1" do_configure () { (cd lib && ./configure ${datadir} ${PV} ${TARGET_OS} 2.4.21 ${TARGET_ARCH}) } export PREFIX = "${D}${prefix}" export SBINDIR = "${D}${sbindir}" export SHAREDIR = "${D}${datadir}" export MANDIR = "${D}${mandir}" do_install () { oe_runmake install } do_install_append () { install -d ${D}/${prefix}/share install -m 6440 ${WORKDIR}/${PN}-${PV}/pci.ids ${D}/${prefix}/share }
Add pci.ids, in a separate package
Add pci.ids, in a separate package
BitBake
mit
John-NY/overo-oe,thebohemian/openembedded,buglabs/oe-buglabs,dellysunnymtech/sakoman-oe,openembedded/openembedded,demsey/openenigma2,JamesAng/oe,nlebedenco/mini2440,nx111/openembeded_openpli2.1_nx111,trini/openembedded,sentient-energy/emsw-oe-mirror,BlackPole/bp-openembedded,nlebedenco/mini2440,sampov2/audio-openembedded,scottellis/overo-oe,philb/pbcl-oe-2010,BlackPole/bp-openembedded,JrCs/opendreambox,bticino/openembedded,rascalmicro/openembedded-rascal,giobauermeister/openembedded,rascalmicro/openembedded-rascal,xifengchuo/openembedded,demsey/openenigma2,trini/openembedded,nvl1109/openembeded,Martix/Eonos,nvl1109/openembeded,sledz/oe,dellysunnymtech/sakoman-oe,nlebedenco/mini2440,anguslees/openembedded-android,sentient-energy/emsw-oe-mirror,YtvwlD/od-oe,sutajiokousagi/openembedded,buglabs/oe-buglabs,xifengchuo/openembedded,sutajiokousagi/openembedded,buglabs/oe-buglabs,hulifox008/openembedded,popazerty/openembedded-cuberevo,John-NY/overo-oe,crystalfontz/openembedded,buglabs/oe-buglabs,xifengchuo/openembedded,mrchapp/arago-oe-dev,popazerty/openembedded-cuberevo,mrchapp/arago-oe-dev,nvl1109/openembeded,demsey/openembedded,demsey/openembedded,JamesAng/goe,mrchapp/arago-oe-dev,rascalmicro/openembedded-rascal,dave-billin/overo-ui-moos-auv,JamesAng/oe,openembedded/openembedded,nx111/openembeded_openpli2.1_nx111,hulifox008/openembedded,philb/pbcl-oe-2010,scottellis/overo-oe,SIFTeam/openembedded,xifengchuo/openembedded,sentient-energy/emsw-oe-mirror,dave-billin/overo-ui-moos-auv,trini/openembedded,bticino/openembedded,nx111/openembeded_openpli2.1_nx111,troth/oe-ts7xxx,BlackPole/bp-openembedded,buglabs/oe-buglabs,demsey/openenigma2,SIFTeam/openembedded,crystalfontz/openembedded,hulifox008/openembedded,BlackPole/bp-openembedded,YtvwlD/od-oe,sampov2/audio-openembedded,scottellis/overo-oe,nx111/openembeded_openpli2.1_nx111,openembedded/openembedded,yyli/overo-oe,sentient-energy/emsw-oe-mirror,giobauermeister/openembedded,JrCs/opendreambox,openembedded/openembedded,JamesAng/goe,philb/pbcl-oe-2010,YtvwlD/od-oe,sampov2/audio-openembedded,sutajiokousagi/openembedded,JrCs/opendreambox,dave-billin/overo-ui-moos-auv,bticino/openembedded,rascalmicro/openembedded-rascal,dave-billin/overo-ui-moos-auv,troth/oe-ts7xxx,demsey/openembedded,sampov2/audio-openembedded,trini/openembedded,buglabs/oe-buglabs,yyli/overo-oe,sampov2/audio-openembedded,JamesAng/oe,openpli-arm/openembedded,YtvwlD/od-oe,YtvwlD/od-oe,nvl1109/openembeded,openembedded/openembedded,dellysunnymtech/sakoman-oe,xifengchuo/openembedded,yyli/overo-oe,rascalmicro/openembedded-rascal,nx111/openembeded_openpli2.1_nx111,openpli-arm/openembedded,thebohemian/openembedded,nlebedenco/mini2440,mrchapp/arago-oe-dev,anguslees/openembedded-android,dellysunnymtech/sakoman-oe,KDAB/OpenEmbedded-Archos,bticino/openembedded,SIFTeam/openembedded,KDAB/OpenEmbedded-Archos,buglabs/oe-buglabs,KDAB/OpenEmbedded-Archos,John-NY/overo-oe,yyli/overo-oe,giobauermeister/openembedded,KDAB/OpenEmbedded-Archos,xifengchuo/openembedded,JrCs/opendreambox,libo/openembedded,SIFTeam/openembedded,Martix/Eonos,libo/openembedded,sledz/oe,giobauermeister/openembedded,openembedded/openembedded,sledz/oe,bticino/openembedded,JrCs/opendreambox,demsey/openembedded,sentient-energy/emsw-oe-mirror,anguslees/openembedded-android,openembedded/openembedded,openpli-arm/openembedded,philb/pbcl-oe-2010,libo/openembedded,JrCs/opendreambox,anguslees/openembedded-android,BlackPole/bp-openembedded,openpli-arm/openembedded,libo/openembedded,sampov2/audio-openembedded,demsey/openenigma2,sledz/oe,demsey/openenigma2,yyli/overo-oe,xifengchuo/openembedded,yyli/overo-oe,scottellis/overo-oe,JamesAng/goe,sledz/oe,Martix/Eonos,hulifox008/openembedded,KDAB/OpenEmbedded-Archos,scottellis/overo-oe,nzjrs/overo-openembedded,nx111/openembeded_openpli2.1_nx111,sampov2/audio-openembedded,popazerty/openembedded-cuberevo,dellysunnymtech/sakoman-oe,nvl1109/openembeded,anguslees/openembedded-android,nx111/openembeded_openpli2.1_nx111,libo/openembedded,BlackPole/bp-openembedded,sledz/oe,demsey/openenigma2,popazerty/openembedded-cuberevo,nzjrs/overo-openembedded,yyli/overo-oe,JrCs/opendreambox,sentient-energy/emsw-oe-mirror,mrchapp/arago-oe-dev,trini/openembedded,rascalmicro/openembedded-rascal,KDAB/OpenEmbedded-Archos,troth/oe-ts7xxx,popazerty/openembedded-cuberevo,sentient-energy/emsw-oe-mirror,openembedded/openembedded,libo/openembedded,dave-billin/overo-ui-moos-auv,giobauermeister/openembedded,Martix/Eonos,YtvwlD/od-oe,JamesAng/goe,nx111/openembeded_openpli2.1_nx111,troth/oe-ts7xxx,trini/openembedded,anguslees/openembedded-android,hulifox008/openembedded,mrchapp/arago-oe-dev,crystalfontz/openembedded,giobauermeister/openembedded,SIFTeam/openembedded,nzjrs/overo-openembedded,scottellis/overo-oe,JamesAng/goe,giobauermeister/openembedded,xifengchuo/openembedded,demsey/openenigma2,troth/oe-ts7xxx,openembedded/openembedded,John-NY/overo-oe,nzjrs/overo-openembedded,JamesAng/oe,philb/pbcl-oe-2010,popazerty/openembedded-cuberevo,rascalmicro/openembedded-rascal,sutajiokousagi/openembedded,openpli-arm/openembedded,trini/openembedded,nvl1109/openembeded,YtvwlD/od-oe,sutajiokousagi/openembedded,JrCs/opendreambox,anguslees/openembedded-android,nlebedenco/mini2440,demsey/openembedded,thebohemian/openembedded,John-NY/overo-oe,troth/oe-ts7xxx,hulifox008/openembedded,thebohemian/openembedded,nlebedenco/mini2440,KDAB/OpenEmbedded-Archos,sutajiokousagi/openembedded,Martix/Eonos,JamesAng/oe,scottellis/overo-oe,nzjrs/overo-openembedded,dave-billin/overo-ui-moos-auv,dave-billin/overo-ui-moos-auv,YtvwlD/od-oe,philb/pbcl-oe-2010,crystalfontz/openembedded,buglabs/oe-buglabs,sutajiokousagi/openembedded,hulifox008/openembedded,JamesAng/oe,crystalfontz/openembedded,xifengchuo/openembedded,thebohemian/openembedded,Martix/Eonos,openembedded/openembedded,JamesAng/goe,crystalfontz/openembedded,openembedded/openembedded,giobauermeister/openembedded,troth/oe-ts7xxx,JamesAng/goe,dellysunnymtech/sakoman-oe,demsey/openembedded,BlackPole/bp-openembedded,popazerty/openembedded-cuberevo,giobauermeister/openembedded,openpli-arm/openembedded,nlebedenco/mini2440,SIFTeam/openembedded,sledz/oe,openpli-arm/openembedded,dellysunnymtech/sakoman-oe,JrCs/opendreambox,John-NY/overo-oe,dellysunnymtech/sakoman-oe,thebohemian/openembedded,Martix/Eonos,philb/pbcl-oe-2010,JamesAng/oe,bticino/openembedded,dellysunnymtech/sakoman-oe,crystalfontz/openembedded,nzjrs/overo-openembedded,bticino/openembedded,libo/openembedded,nzjrs/overo-openembedded,popazerty/openembedded-cuberevo,nvl1109/openembeded,yyli/overo-oe,mrchapp/arago-oe-dev,demsey/openembedded,thebohemian/openembedded,SIFTeam/openembedded,rascalmicro/openembedded-rascal,John-NY/overo-oe
bitbake
## Code Before: SECTION = "console/utils" DESCRIPTION = 'The PCI Utilities package contains a library for portable access \ to PCI bus configuration space and several utilities based on this library.' HOMEPAGE = "http://atrey.karlin.mff.cuni.cz/~mj/pciutils.shtml" LICENSE = "GPLv2" PR="r1" PARALLEL_MAKE = "" SRC_URI = "ftp://ftp.kernel.org/pub/software/utils/pciutils/pciutils-${PV}.tar.bz2 \ file://configure.patch;patch=1 \ file://configure-uclibc.patch;patch=1 \ file://pcimodules-pciutils-2.1.11.diff;patch=1" do_configure () { (cd lib && ./configure ${datadir} ${PV} ${TARGET_OS} 2.4.21 ${TARGET_ARCH}) } export PREFIX = "${D}${prefix}" export SBINDIR = "${D}${sbindir}" export SHAREDIR = "${D}${datadir}" export MANDIR = "${D}${mandir}" do_install () { oe_runmake install } ## Instruction: Add pci.ids, in a separate package ## Code After: SECTION = "console/utils" DESCRIPTION = 'The PCI Utilities package contains a library for portable access \ to PCI bus configuration space and several utilities based on this library.' HOMEPAGE = "http://atrey.karlin.mff.cuni.cz/~mj/pciutils.shtml" LICENSE = "GPLv2" PR="r2" PARALLEL_MAKE = "" FILES_pciutils-ids="${prefix}/share/pci.ids" PACKAGES =+ "pciutils-ids" SRC_URI = "ftp://ftp.kernel.org/pub/software/utils/pciutils/pciutils-${PV}.tar.bz2 \ file://configure.patch;patch=1 \ file://configure-uclibc.patch;patch=1 \ file://pcimodules-pciutils-2.1.11.diff;patch=1" do_configure () { (cd lib && ./configure ${datadir} ${PV} ${TARGET_OS} 2.4.21 ${TARGET_ARCH}) } export PREFIX = "${D}${prefix}" export SBINDIR = "${D}${sbindir}" export SHAREDIR = "${D}${datadir}" export MANDIR = "${D}${mandir}" do_install () { oe_runmake install } do_install_append () { install -d ${D}/${prefix}/share install -m 6440 ${WORKDIR}/${PN}-${PV}/pci.ids ${D}/${prefix}/share }
SECTION = "console/utils" DESCRIPTION = 'The PCI Utilities package contains a library for portable access \ to PCI bus configuration space and several utilities based on this library.' HOMEPAGE = "http://atrey.karlin.mff.cuni.cz/~mj/pciutils.shtml" LICENSE = "GPLv2" - PR="r1" ? ^ + PR="r2" ? ^ PARALLEL_MAKE = "" - + FILES_pciutils-ids="${prefix}/share/pci.ids" + PACKAGES =+ "pciutils-ids" SRC_URI = "ftp://ftp.kernel.org/pub/software/utils/pciutils/pciutils-${PV}.tar.bz2 \ file://configure.patch;patch=1 \ file://configure-uclibc.patch;patch=1 \ file://pcimodules-pciutils-2.1.11.diff;patch=1" do_configure () { (cd lib && ./configure ${datadir} ${PV} ${TARGET_OS} 2.4.21 ${TARGET_ARCH}) } export PREFIX = "${D}${prefix}" export SBINDIR = "${D}${sbindir}" export SHAREDIR = "${D}${datadir}" export MANDIR = "${D}${mandir}" do_install () { oe_runmake install } + do_install_append () { + install -d ${D}/${prefix}/share + install -m 6440 ${WORKDIR}/${PN}-${PV}/pci.ids ${D}/${prefix}/share + } +
10
0.37037
8
2
c7b85c55569d65966601ba3fc1cdc709d1693fe7
src/qt/logging/messageboxlogger.h
src/qt/logging/messageboxlogger.h
/*Copyright 2010-2015 George Karagoulis Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.*/ #ifndef GUTIL_NO_GUI_FUNCTIONALITY #ifndef GUTIL_MESSAGEBOXLOGGER_H #define GUTIL_MESSAGEBOXLOGGER_H #include <gutil/ilog.h> #include <QObject> class QWidget; namespace GUtil{ namespace Qt{ /** A logger implementation which displays the message in a modal dialog box. */ class MessageBoxLogger : public QObject, public GUtil::ILog { Q_OBJECT QWidget *m_parentWidget; public: explicit MessageBoxLogger(QWidget *parent = 0); virtual ~MessageBoxLogger() {} /** Displays a modal dialog box with the title and message, with the appropriate severity. */ virtual void Log(const LoggingData &) noexcept; private slots: void _log(const LoggingData &); }; }} #endif // GUTIL_MESSAGEBOXLOGGER_H #endif // GUI_FUNCTIONALITY
/*Copyright 2010-2015 George Karagoulis Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.*/ #ifndef GUTIL_NO_GUI_FUNCTIONALITY #ifndef GUTIL_MESSAGEBOXLOGGER_H #define GUTIL_MESSAGEBOXLOGGER_H #include <gutil/ilog.h> #include <QObject> class QWidget; namespace GUtil{ namespace Qt{ /** A logger implementation which displays the message in a modal dialog box. */ class MessageBoxLogger : public QObject, public GUtil::ILog { Q_OBJECT QWidget *m_parentWidget; public: explicit MessageBoxLogger(QWidget *parent = 0); virtual ~MessageBoxLogger() {} void SetParentWidget(QWidget *parent){ m_parentWidget = parent; } QWidget *GetParentWidget() const{ return m_parentWidget; } /** Displays a modal dialog box with the title and message, with the appropriate severity. */ virtual void Log(const LoggingData &) noexcept; private slots: void _log(const LoggingData &); }; }} #endif // GUTIL_MESSAGEBOXLOGGER_H #endif // GUI_FUNCTIONALITY
Allow to change the parent widget after construction. Sometimes your main widget changes and you don't want to make a new logger.
Allow to change the parent widget after construction. Sometimes your main widget changes and you don't want to make a new logger.
C
apache-2.0
karagog/gutil,karagog/gutil,karagog/gutil
c
## Code Before: /*Copyright 2010-2015 George Karagoulis Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.*/ #ifndef GUTIL_NO_GUI_FUNCTIONALITY #ifndef GUTIL_MESSAGEBOXLOGGER_H #define GUTIL_MESSAGEBOXLOGGER_H #include <gutil/ilog.h> #include <QObject> class QWidget; namespace GUtil{ namespace Qt{ /** A logger implementation which displays the message in a modal dialog box. */ class MessageBoxLogger : public QObject, public GUtil::ILog { Q_OBJECT QWidget *m_parentWidget; public: explicit MessageBoxLogger(QWidget *parent = 0); virtual ~MessageBoxLogger() {} /** Displays a modal dialog box with the title and message, with the appropriate severity. */ virtual void Log(const LoggingData &) noexcept; private slots: void _log(const LoggingData &); }; }} #endif // GUTIL_MESSAGEBOXLOGGER_H #endif // GUI_FUNCTIONALITY ## Instruction: Allow to change the parent widget after construction. Sometimes your main widget changes and you don't want to make a new logger. ## Code After: /*Copyright 2010-2015 George Karagoulis Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.*/ #ifndef GUTIL_NO_GUI_FUNCTIONALITY #ifndef GUTIL_MESSAGEBOXLOGGER_H #define GUTIL_MESSAGEBOXLOGGER_H #include <gutil/ilog.h> #include <QObject> class QWidget; namespace GUtil{ namespace Qt{ /** A logger implementation which displays the message in a modal dialog box. */ class MessageBoxLogger : public QObject, public GUtil::ILog { Q_OBJECT QWidget *m_parentWidget; public: explicit MessageBoxLogger(QWidget *parent = 0); virtual ~MessageBoxLogger() {} void SetParentWidget(QWidget *parent){ m_parentWidget = parent; } QWidget *GetParentWidget() const{ return m_parentWidget; } /** Displays a modal dialog box with the title and message, with the appropriate severity. */ virtual void Log(const LoggingData &) noexcept; private slots: void _log(const LoggingData &); }; }} #endif // GUTIL_MESSAGEBOXLOGGER_H #endif // GUI_FUNCTIONALITY
/*Copyright 2010-2015 George Karagoulis Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.*/ #ifndef GUTIL_NO_GUI_FUNCTIONALITY #ifndef GUTIL_MESSAGEBOXLOGGER_H #define GUTIL_MESSAGEBOXLOGGER_H #include <gutil/ilog.h> #include <QObject> class QWidget; namespace GUtil{ namespace Qt{ /** A logger implementation which displays the message in a modal dialog box. */ class MessageBoxLogger : public QObject, public GUtil::ILog { Q_OBJECT QWidget *m_parentWidget; public: explicit MessageBoxLogger(QWidget *parent = 0); virtual ~MessageBoxLogger() {} + void SetParentWidget(QWidget *parent){ m_parentWidget = parent; } + QWidget *GetParentWidget() const{ return m_parentWidget; } + /** Displays a modal dialog box with the title and message, with the appropriate severity. */ virtual void Log(const LoggingData &) noexcept; private slots: void _log(const LoggingData &); }; }} #endif // GUTIL_MESSAGEBOXLOGGER_H #endif // GUI_FUNCTIONALITY
3
0.055556
3
0
aed755d3ca601425ba527f5ce179421d9ad29ece
config/application.rb
config/application.rb
require_relative "boot" require_relative "../app/lib/oauth_state_middleware" require "rails/all" # Require the gems listed in Gemfile, including any gems # you've limited to :test, :development, or :production. Bundler.require(*Rails.groups) module ReactRailsStarterApp class Application < Rails::Application config.autoload_paths << "#{config.root}/lib" config.action_dispatch.default_headers.delete("X-Frame-Options") config.middleware.insert_before 0, Rack::Cors do allow do origins "*" resource "*", headers: :any, methods: [:get, :post, :options] end end # Middleware that can restore state after an OAuth request config.middleware.insert_before 0, OauthStateMiddleware config.active_job.queue_adapter = :que config.webpack = { use_manifest: false, asset_manifest: {}, common_manifest: {}, } # Initialize configuration defaults for originally generated Rails version. config.load_defaults 6.1 # Configuration for the application, engines, and railties goes here. # # These settings can be overridden in specific environments using the files # in config/environments, which are processed later. # # config.time_zone = "Central Time (US & Canada)" # config.eager_load_paths << Rails.root.join("extras") end end
require_relative "boot" require_relative "../app/lib/oauth_state_middleware" require "rails/all" # Require the gems listed in Gemfile, including any gems # you've limited to :test, :development, or :production. Bundler.require(*Rails.groups) module ReactRailsStarterApp class Application < Rails::Application # Initialize configuration defaults for originally generated Rails version. config.load_defaults 6.1 # Configuration for the application, engines, and railties goes here. # # These settings can be overridden in specific environments using the files # in config/environments, which are processed later. # # config.time_zone = "Central Time (US & Canada)" # config.eager_load_paths << Rails.root.join("extras") # ### Custom # config.autoload_paths << "#{config.root}/lib" config.action_dispatch.default_headers.delete("X-Frame-Options") config.middleware.insert_before 0, Rack::Cors do allow do origins "*" resource "*", headers: :any, methods: [:get, :post, :options] end end # Middleware that can restore state after an OAuth request config.middleware.insert_before 0, OauthStateMiddleware config.active_job.queue_adapter = :que config.webpack = { use_manifest: false, asset_manifest: {}, common_manifest: {}, } end end
Move the auto generated config to top of file
Move the auto generated config to top of file Keep our custom modifications at the bottom
Ruby
mit
atomicjolt/adhesion,atomicjolt/adhesion,atomicjolt/lti_starter_app,atomicjolt/adhesion,atomicjolt/adhesion,atomicjolt/lti_starter_app,atomicjolt/lti_starter_app,atomicjolt/lti_starter_app
ruby
## Code Before: require_relative "boot" require_relative "../app/lib/oauth_state_middleware" require "rails/all" # Require the gems listed in Gemfile, including any gems # you've limited to :test, :development, or :production. Bundler.require(*Rails.groups) module ReactRailsStarterApp class Application < Rails::Application config.autoload_paths << "#{config.root}/lib" config.action_dispatch.default_headers.delete("X-Frame-Options") config.middleware.insert_before 0, Rack::Cors do allow do origins "*" resource "*", headers: :any, methods: [:get, :post, :options] end end # Middleware that can restore state after an OAuth request config.middleware.insert_before 0, OauthStateMiddleware config.active_job.queue_adapter = :que config.webpack = { use_manifest: false, asset_manifest: {}, common_manifest: {}, } # Initialize configuration defaults for originally generated Rails version. config.load_defaults 6.1 # Configuration for the application, engines, and railties goes here. # # These settings can be overridden in specific environments using the files # in config/environments, which are processed later. # # config.time_zone = "Central Time (US & Canada)" # config.eager_load_paths << Rails.root.join("extras") end end ## Instruction: Move the auto generated config to top of file Keep our custom modifications at the bottom ## Code After: require_relative "boot" require_relative "../app/lib/oauth_state_middleware" require "rails/all" # Require the gems listed in Gemfile, including any gems # you've limited to :test, :development, or :production. Bundler.require(*Rails.groups) module ReactRailsStarterApp class Application < Rails::Application # Initialize configuration defaults for originally generated Rails version. config.load_defaults 6.1 # Configuration for the application, engines, and railties goes here. # # These settings can be overridden in specific environments using the files # in config/environments, which are processed later. # # config.time_zone = "Central Time (US & Canada)" # config.eager_load_paths << Rails.root.join("extras") # ### Custom # config.autoload_paths << "#{config.root}/lib" config.action_dispatch.default_headers.delete("X-Frame-Options") config.middleware.insert_before 0, Rack::Cors do allow do origins "*" resource "*", headers: :any, methods: [:get, :post, :options] end end # Middleware that can restore state after an OAuth request config.middleware.insert_before 0, OauthStateMiddleware config.active_job.queue_adapter = :que config.webpack = { use_manifest: false, asset_manifest: {}, common_manifest: {}, } end end
require_relative "boot" require_relative "../app/lib/oauth_state_middleware" require "rails/all" # Require the gems listed in Gemfile, including any gems # you've limited to :test, :development, or :production. Bundler.require(*Rails.groups) module ReactRailsStarterApp class Application < Rails::Application + # Initialize configuration defaults for originally generated Rails version. + config.load_defaults 6.1 + + # Configuration for the application, engines, and railties goes here. + # + # These settings can be overridden in specific environments using the files + # in config/environments, which are processed later. + # + # config.time_zone = "Central Time (US & Canada)" + # config.eager_load_paths << Rails.root.join("extras") + + # + ### Custom + # config.autoload_paths << "#{config.root}/lib" config.action_dispatch.default_headers.delete("X-Frame-Options") config.middleware.insert_before 0, Rack::Cors do allow do origins "*" resource "*", headers: :any, methods: [:get, :post, :options] end end # Middleware that can restore state after an OAuth request config.middleware.insert_before 0, OauthStateMiddleware config.active_job.queue_adapter = :que config.webpack = { use_manifest: false, asset_manifest: {}, common_manifest: {}, } - - # Initialize configuration defaults for originally generated Rails version. - config.load_defaults 6.1 - - # Configuration for the application, engines, and railties goes here. - # - # These settings can be overridden in specific environments using the files - # in config/environments, which are processed later. - # - # config.time_zone = "Central Time (US & Canada)" - # config.eager_load_paths << Rails.root.join("extras") end end
25
0.543478
14
11
2cb09394c739f59429f57ac2e3ce32ccd1296069
VoteSystem/src/test/resources/application.properties
VoteSystem/src/test/resources/application.properties
spring.main.banner_mode=off spring.thymeleaf.cache=false spring.datasource.url= jdbc:h2:mem:test;DB_CLOSE_DELAY=-1 server.port=8080 spring.datasource.username=sa spring.datasource.password= spring.jpa.hibernate.ddl-auto=create-drop spring.datasource.driverClassName=org.h2.Driver spring.jpa.database-platform=org.hibernate.dialect.H2Dialect
spring.main.banner_mode=off spring.thymeleaf.cache=false spring.datasource.url= jdbc:h2:mem:test;DB_CLOSE_DELAY=-1 server.port=8080 spring.datasource.username=sa spring.datasource.password= spring.jpa.hibernate.ddl-auto=create-drop spring.datasource.driverClassName=org.h2.Driver spring.jpa.database-platform=org.hibernate.dialect.H2Dialect spring.jpa.generate-ddl=true
Test login prueba BBDD H2
Test login prueba BBDD H2
INI
unlicense
Arquisoft/VotingSystem_1a,Arquisoft/VotingSystem_1a
ini
## Code Before: spring.main.banner_mode=off spring.thymeleaf.cache=false spring.datasource.url= jdbc:h2:mem:test;DB_CLOSE_DELAY=-1 server.port=8080 spring.datasource.username=sa spring.datasource.password= spring.jpa.hibernate.ddl-auto=create-drop spring.datasource.driverClassName=org.h2.Driver spring.jpa.database-platform=org.hibernate.dialect.H2Dialect ## Instruction: Test login prueba BBDD H2 ## Code After: spring.main.banner_mode=off spring.thymeleaf.cache=false spring.datasource.url= jdbc:h2:mem:test;DB_CLOSE_DELAY=-1 server.port=8080 spring.datasource.username=sa spring.datasource.password= spring.jpa.hibernate.ddl-auto=create-drop spring.datasource.driverClassName=org.h2.Driver spring.jpa.database-platform=org.hibernate.dialect.H2Dialect spring.jpa.generate-ddl=true
spring.main.banner_mode=off spring.thymeleaf.cache=false spring.datasource.url= jdbc:h2:mem:test;DB_CLOSE_DELAY=-1 server.port=8080 spring.datasource.username=sa spring.datasource.password= spring.jpa.hibernate.ddl-auto=create-drop spring.datasource.driverClassName=org.h2.Driver spring.jpa.database-platform=org.hibernate.dialect.H2Dialect + spring.jpa.generate-ddl=true
1
0.111111
1
0
06d878b49cf0b76a79dc6488227f23931166085d
ehriportal/templates/homepage.html
ehriportal/templates/homepage.html
{% extends "site_base.html" %} {% load i18n %} {% load ifsetting_tag %} {% block head_title %}{% trans "Welcome" %}{% endblock %} {% block body_class %}home{% endblock %} {% block body_base %} <center> <h1 style="padding-top:5em">{% trans "Welcome to EHRI" %}</h1> <form action="{% url collection_search %}"> <input name="q" class="span5" style="font-size:1.3em;" type="text" /> <input type="submit" value="Search Collections" /> </form> </center> {% endblock %}
{% extends "site_base.html" %} {% load i18n %} {% load ifsetting_tag %} {% block head_title %}{% trans "Welcome" %}{% endblock %} {% block body_class %}home{% endblock %} {% block body_base %} <center> <h1 style="padding-top:5em">{% trans "Welcome to EHRI" %}</h1> <form action="{% url search %}"> <input name="q" class="span5" style="font-size:1.3em;" type="text" /> <input type="submit" value="Search Collections" /> </form> </center> {% endblock %}
Make all-entity search the default (even though it's far from finished yet.)
Make all-entity search the default (even though it's far from finished yet.)
HTML
mit
mikesname/ehri-collections,mikesname/ehri-collections,mikesname/ehri-collections
html
## Code Before: {% extends "site_base.html" %} {% load i18n %} {% load ifsetting_tag %} {% block head_title %}{% trans "Welcome" %}{% endblock %} {% block body_class %}home{% endblock %} {% block body_base %} <center> <h1 style="padding-top:5em">{% trans "Welcome to EHRI" %}</h1> <form action="{% url collection_search %}"> <input name="q" class="span5" style="font-size:1.3em;" type="text" /> <input type="submit" value="Search Collections" /> </form> </center> {% endblock %} ## Instruction: Make all-entity search the default (even though it's far from finished yet.) ## Code After: {% extends "site_base.html" %} {% load i18n %} {% load ifsetting_tag %} {% block head_title %}{% trans "Welcome" %}{% endblock %} {% block body_class %}home{% endblock %} {% block body_base %} <center> <h1 style="padding-top:5em">{% trans "Welcome to EHRI" %}</h1> <form action="{% url search %}"> <input name="q" class="span5" style="font-size:1.3em;" type="text" /> <input type="submit" value="Search Collections" /> </form> </center> {% endblock %}
{% extends "site_base.html" %} {% load i18n %} {% load ifsetting_tag %} {% block head_title %}{% trans "Welcome" %}{% endblock %} {% block body_class %}home{% endblock %} {% block body_base %} <center> <h1 style="padding-top:5em">{% trans "Welcome to EHRI" %}</h1> - <form action="{% url collection_search %}"> ? ----------- + <form action="{% url search %}"> <input name="q" class="span5" style="font-size:1.3em;" type="text" /> <input type="submit" value="Search Collections" /> </form> </center> {% endblock %}
2
0.1
1
1
9b3698c4b30a346ed95e0093ef0450f5376f1f3a
docker/aliases.zsh
docker/aliases.zsh
alias d='docker' alias dc='docker-compose' alias drm='docker-rm' alias dcl='docker-clean' alias dcd='dc down' alias dcb='dc build' alias db='dc up -d db' # Produce a .env file from the Docker Compose environment config of the dev service dc-env() { ruby -r yaml -e ' YAML .load_file(Dir.glob("docker-compose.y*ml")[0]) .fetch("services") .fetch("dev") .fetch("environment") .map do |k,v| val = v .to_s .gsub(/\${[^-]*-(.*)}/, "\\1") .gsub("/work/", "") (val.length == 0 ? "# " : "") + [k, val].join("=") end .compact .join("\n") .then(&method(:puts)) ' | tee -a .env }
alias d='docker' alias dc='log_and_run_command docker-compose' alias drm='log_and_run_command docker-rm' alias dcl='docker-clean' alias dcd='dc down' alias dcb='dc build' alias db='dc up -d db' # Produce a .env file from the Docker Compose environment config of the dev service dc-env() { ruby -r yaml -e ' YAML .load_file(Dir.glob("docker-compose.y*ml")[0]) .fetch("services") .fetch("dev") .fetch("environment") .map do |k,v| val = v .to_s .gsub(/\${[^-]*-(.*)}/, "\\1") .gsub("/work/", "") (val.length == 0 ? "# " : "") + [k, val].join("=") end .compact .join("\n") .then(&method(:puts)) ' | tee -a .env }
Use log_and_run_command for dc and drm
Use log_and_run_command for dc and drm
Shell
mit
ZimbiX/dotfiles,ZimbiX/dotfiles
shell
## Code Before: alias d='docker' alias dc='docker-compose' alias drm='docker-rm' alias dcl='docker-clean' alias dcd='dc down' alias dcb='dc build' alias db='dc up -d db' # Produce a .env file from the Docker Compose environment config of the dev service dc-env() { ruby -r yaml -e ' YAML .load_file(Dir.glob("docker-compose.y*ml")[0]) .fetch("services") .fetch("dev") .fetch("environment") .map do |k,v| val = v .to_s .gsub(/\${[^-]*-(.*)}/, "\\1") .gsub("/work/", "") (val.length == 0 ? "# " : "") + [k, val].join("=") end .compact .join("\n") .then(&method(:puts)) ' | tee -a .env } ## Instruction: Use log_and_run_command for dc and drm ## Code After: alias d='docker' alias dc='log_and_run_command docker-compose' alias drm='log_and_run_command docker-rm' alias dcl='docker-clean' alias dcd='dc down' alias dcb='dc build' alias db='dc up -d db' # Produce a .env file from the Docker Compose environment config of the dev service dc-env() { ruby -r yaml -e ' YAML .load_file(Dir.glob("docker-compose.y*ml")[0]) .fetch("services") .fetch("dev") .fetch("environment") .map do |k,v| val = v .to_s .gsub(/\${[^-]*-(.*)}/, "\\1") .gsub("/work/", "") (val.length == 0 ? "# " : "") + [k, val].join("=") end .compact .join("\n") .then(&method(:puts)) ' | tee -a .env }
alias d='docker' - alias dc='docker-compose' - alias drm='docker-rm' + alias dc='log_and_run_command docker-compose' + alias drm='log_and_run_command docker-rm' alias dcl='docker-clean' alias dcd='dc down' alias dcb='dc build' alias db='dc up -d db' # Produce a .env file from the Docker Compose environment config of the dev service dc-env() { ruby -r yaml -e ' YAML .load_file(Dir.glob("docker-compose.y*ml")[0]) .fetch("services") .fetch("dev") .fetch("environment") .map do |k,v| val = v .to_s .gsub(/\${[^-]*-(.*)}/, "\\1") .gsub("/work/", "") (val.length == 0 ? "# " : "") + [k, val].join("=") end .compact .join("\n") .then(&method(:puts)) ' | tee -a .env }
4
0.137931
2
2
290468ae96dca61b8c2c6c3b49e9e22ea69dfea7
bin/install/python.sh
bin/install/python.sh
if [ ! -x /usr/local/bin/brew ]; then echo "ERROR: Homebrew must be installed to run the python.sh installer script" exit 1 fi if [ ! -x /usr/local/bin/python ]; then echo "Installing python..." brew install python --framework --with-brewed-openssl fi echo "Current python: `which python`" echo "Installing python packages..." pip2 install --user neovim if [ -x $CONFIGS_DIR/python_local.sh ]; then $CONFIGS_DIR/python_local.sh fi exit 0
if [ ! -x /usr/local/bin/brew ]; then echo "ERROR: Homebrew must be installed to run the python.sh installer script" exit 1 fi if [ ! -x /usr/local/bin/python ]; then echo "Installing python..." brew install python --framework --with-brewed-openssl fi echo "Current python: `which python`" echo "Installing python packages..." pip2 install --user neovim pip install beets if [ -x $CONFIGS_DIR/python_local.sh ]; then $CONFIGS_DIR/python_local.sh fi exit 0
Add beets music library manager
Add beets music library manager
Shell
mit
mjgs/dotfiles
shell
## Code Before: if [ ! -x /usr/local/bin/brew ]; then echo "ERROR: Homebrew must be installed to run the python.sh installer script" exit 1 fi if [ ! -x /usr/local/bin/python ]; then echo "Installing python..." brew install python --framework --with-brewed-openssl fi echo "Current python: `which python`" echo "Installing python packages..." pip2 install --user neovim if [ -x $CONFIGS_DIR/python_local.sh ]; then $CONFIGS_DIR/python_local.sh fi exit 0 ## Instruction: Add beets music library manager ## Code After: if [ ! -x /usr/local/bin/brew ]; then echo "ERROR: Homebrew must be installed to run the python.sh installer script" exit 1 fi if [ ! -x /usr/local/bin/python ]; then echo "Installing python..." brew install python --framework --with-brewed-openssl fi echo "Current python: `which python`" echo "Installing python packages..." pip2 install --user neovim pip install beets if [ -x $CONFIGS_DIR/python_local.sh ]; then $CONFIGS_DIR/python_local.sh fi exit 0
if [ ! -x /usr/local/bin/brew ]; then echo "ERROR: Homebrew must be installed to run the python.sh installer script" exit 1 fi if [ ! -x /usr/local/bin/python ]; then echo "Installing python..." brew install python --framework --with-brewed-openssl fi echo "Current python: `which python`" echo "Installing python packages..." pip2 install --user neovim + pip install beets if [ -x $CONFIGS_DIR/python_local.sh ]; then $CONFIGS_DIR/python_local.sh fi exit 0
1
0.047619
1
0
0727684cc702bf950ee64b25eb0d64a72c13feeb
app/views/users/show.html.erb
app/views/users/show.html.erb
<h1><%= @user.name %>'s Profile</h1> <h4>Current Savings: $<%= @user.savings.total_savings %></h4> <br> <h4>Planned Purchases: </h4> <% @user.purchases.each do |purchase| %> <p><%= purchase.title %> for <%= purchase.cost %></p> <br> <h4><%= link_to "Add savings", new_saving_path %></h4> <h4><%= link_to "Add a new purchase", new_purchase_path %></h4>
<h1><%= @user.name %>'s Profile</h1> <h4>Current Savings: $<%= @user.savings.total_savings %></h4> <br> <h4>Planned Purchases: </h4> <% @user.purchases.each do |purchase| %> <p><%= purchase.title %> for <%= purchase.cost %></p> <br> <% end %> <br> <h4><%= link_to "Add savings", new_saving_path %></h4> <h4><%= link_to "Add a new purchase", new_purchase_path %></h4>
Fix ruby error to profile view
Fix ruby error to profile view
HTML+ERB
mit
nyc-cicadas-2015/Can-I-Afford-This,nyc-cicadas-2015/Can-I-Afford-This,nyc-cicadas-2015/Can-I-Afford-This
html+erb
## Code Before: <h1><%= @user.name %>'s Profile</h1> <h4>Current Savings: $<%= @user.savings.total_savings %></h4> <br> <h4>Planned Purchases: </h4> <% @user.purchases.each do |purchase| %> <p><%= purchase.title %> for <%= purchase.cost %></p> <br> <h4><%= link_to "Add savings", new_saving_path %></h4> <h4><%= link_to "Add a new purchase", new_purchase_path %></h4> ## Instruction: Fix ruby error to profile view ## Code After: <h1><%= @user.name %>'s Profile</h1> <h4>Current Savings: $<%= @user.savings.total_savings %></h4> <br> <h4>Planned Purchases: </h4> <% @user.purchases.each do |purchase| %> <p><%= purchase.title %> for <%= purchase.cost %></p> <br> <% end %> <br> <h4><%= link_to "Add savings", new_saving_path %></h4> <h4><%= link_to "Add a new purchase", new_purchase_path %></h4>
<h1><%= @user.name %>'s Profile</h1> <h4>Current Savings: $<%= @user.savings.total_savings %></h4> <br> <h4>Planned Purchases: </h4> <% @user.purchases.each do |purchase| %> <p><%= purchase.title %> for <%= purchase.cost %></p> <br> + <% end %> + <br> <h4><%= link_to "Add savings", new_saving_path %></h4> <h4><%= link_to "Add a new purchase", new_purchase_path %></h4>
2
0.153846
2
0
e7d8744641f228306bf6c1c992212c877d1ab536
spec/javascripts/notes/components/issue_discussion_spec.js
spec/javascripts/notes/components/issue_discussion_spec.js
import Vue from 'vue'; import store from '~/notes/stores'; import issueDiscussion from '~/notes/components/issue_discussion.vue'; import { issueDataMock, discussionMock } from '../mock_data'; describe('issue_discussion component', () => { let vm; beforeEach(() => { const Component = Vue.extend(issueDiscussion); store.dispatch('setIssueData', issueDataMock); vm = new Component({ store, propsData: { note: discussionMock, }, }).$mount(); }); it('should render user avatar', () => { console.log('vm', vm.$el); }); it('should render discussion header', () => { }); describe('updated note', () => { it('should show information about update', () => { }); }); describe('with open discussion', () => { it('should render system note', () => { }); it('should render placeholder note', () => { }); it('should render regular note', () => { }); describe('actions', () => { it('should render reply button', () => { }); it('should toggle reply form', () => { }); it('should render signout widget when user is logged out', () => { }); }); }); });
describe('issue_discussion component', () => { it('should render user avatar', () => { }); it('should render discussion header', () => { }); describe('updated note', () => { it('should show information about update', () => { }); }); describe('with open discussion', () => { it('should render system note', () => { }); it('should render placeholder note', () => { }); it('should render regular note', () => { }); describe('actions', () => { it('should render reply button', () => { }); it('should toggle reply form', () => { }); it('should render signout widget when user is logged out', () => { }); }); }); });
Remove issue discussion started spec
Remove issue discussion started spec
JavaScript
mit
jirutka/gitlabhq,stoplightio/gitlabhq,iiet/iiet-git,axilleas/gitlabhq,stoplightio/gitlabhq,jirutka/gitlabhq,mmkassem/gitlabhq,iiet/iiet-git,stoplightio/gitlabhq,dreampet/gitlab,iiet/iiet-git,axilleas/gitlabhq,dreampet/gitlab,mmkassem/gitlabhq,dreampet/gitlab,mmkassem/gitlabhq,jirutka/gitlabhq,jirutka/gitlabhq,iiet/iiet-git,axilleas/gitlabhq,axilleas/gitlabhq,stoplightio/gitlabhq,mmkassem/gitlabhq,dreampet/gitlab
javascript
## Code Before: import Vue from 'vue'; import store from '~/notes/stores'; import issueDiscussion from '~/notes/components/issue_discussion.vue'; import { issueDataMock, discussionMock } from '../mock_data'; describe('issue_discussion component', () => { let vm; beforeEach(() => { const Component = Vue.extend(issueDiscussion); store.dispatch('setIssueData', issueDataMock); vm = new Component({ store, propsData: { note: discussionMock, }, }).$mount(); }); it('should render user avatar', () => { console.log('vm', vm.$el); }); it('should render discussion header', () => { }); describe('updated note', () => { it('should show information about update', () => { }); }); describe('with open discussion', () => { it('should render system note', () => { }); it('should render placeholder note', () => { }); it('should render regular note', () => { }); describe('actions', () => { it('should render reply button', () => { }); it('should toggle reply form', () => { }); it('should render signout widget when user is logged out', () => { }); }); }); }); ## Instruction: Remove issue discussion started spec ## Code After: describe('issue_discussion component', () => { it('should render user avatar', () => { }); it('should render discussion header', () => { }); describe('updated note', () => { it('should show information about update', () => { }); }); describe('with open discussion', () => { it('should render system note', () => { }); it('should render placeholder note', () => { }); it('should render regular note', () => { }); describe('actions', () => { it('should render reply button', () => { }); it('should toggle reply form', () => { }); it('should render signout widget when user is logged out', () => { }); }); }); });
- import Vue from 'vue'; - import store from '~/notes/stores'; - import issueDiscussion from '~/notes/components/issue_discussion.vue'; - import { issueDataMock, discussionMock } from '../mock_data'; describe('issue_discussion component', () => { - let vm; - - beforeEach(() => { - const Component = Vue.extend(issueDiscussion); - - store.dispatch('setIssueData', issueDataMock); - - vm = new Component({ - store, - propsData: { - note: discussionMock, - }, - }).$mount(); - }); - it('should render user avatar', () => { - console.log('vm', vm.$el); - }); it('should render discussion header', () => { }); describe('updated note', () => { it('should show information about update', () => { }); }); describe('with open discussion', () => { it('should render system note', () => { }); it('should render placeholder note', () => { }); it('should render regular note', () => { }); describe('actions', () => { it('should render reply button', () => { }); it('should toggle reply form', () => { }); it('should render signout widget when user is logged out', () => { }); }); }); });
21
0.328125
0
21
cfd4ae8c4cb66b66070f05880e5fafbdcf521f60
katas/es6/language/symbol/keyFor.js
katas/es6/language/symbol/keyFor.js
// 36: Symbol.keyFor - retrieves a shared symbol key from the global symbol registry // To do: make all tests pass, leave the assert lines unchanged! describe('`Symbol.keyFor` gets the symbol key for a given symbol', function() { it('pass the symbol to `keyFor()` and you get it`s key', function() { const sym = Symbol.for('foo'); const key = Symbol.keyFor(sym); assert.equal(key, 'foo'); }); it('local symbols are not in the runtime-wide registry', function() { const localSymbol = Symbol('foo'); const key = Symbol.keyFor(localSymbol); assert.equal(key, void 0); }); it('well-known symbols are not in the runtime-wide registry either', function() { const key = Symbol.keyFor(Symbol.iterator); assert.equal(key, void 0); }); it('for non-Symbols throws an error', function() { function fn() { Symbol.keyFor(null); } assert.throws(fn); }); });
// 36: Symbol.keyFor - retrieves a shared symbol key from the global symbol registry // To do: make all tests pass, leave the assert lines unchanged! describe('`Symbol.keyFor` gets the symbol key for a given symbol', function() { const sym = Symbol.for('foo'); it('pass the symbol to `keyFor()` and you get it`s key', function() { const key = Symbol.____(sym); assert.equal(key, 'foo'); }); it('local symbols are not in the runtime-wide registry', function() { // hint: `Symbol()` creates a local symbol! const localSymbol = Symbol.for('foo'); const key = Symbol.keyFor(localSymbol); assert.equal(key, void 0); }); it('well-known symbols are not in the runtime-wide registry either', function() { const key = Symbol.keyFor(Symbol.iteraTor); assert.equal(key, void 0); }); it('for non-Symbols throws an error', function() { function fn() { Symbol.keyFor(sym); } assert.throws(fn); }); });
Make it a kata, all tests fail.
Make it a kata, all tests fail.
JavaScript
mit
tddbin/katas,tddbin/katas,ehpc/katas,cmisenas/katas,cmisenas/katas,ehpc/katas,rafaelrocha/katas,rafaelrocha/katas,JonathanPrince/katas,Semigradsky/katas,JonathanPrince/katas,JonathanPrince/katas,tddbin/katas,ehpc/katas,Semigradsky/katas,rafaelrocha/katas,cmisenas/katas,Semigradsky/katas
javascript
## Code Before: // 36: Symbol.keyFor - retrieves a shared symbol key from the global symbol registry // To do: make all tests pass, leave the assert lines unchanged! describe('`Symbol.keyFor` gets the symbol key for a given symbol', function() { it('pass the symbol to `keyFor()` and you get it`s key', function() { const sym = Symbol.for('foo'); const key = Symbol.keyFor(sym); assert.equal(key, 'foo'); }); it('local symbols are not in the runtime-wide registry', function() { const localSymbol = Symbol('foo'); const key = Symbol.keyFor(localSymbol); assert.equal(key, void 0); }); it('well-known symbols are not in the runtime-wide registry either', function() { const key = Symbol.keyFor(Symbol.iterator); assert.equal(key, void 0); }); it('for non-Symbols throws an error', function() { function fn() { Symbol.keyFor(null); } assert.throws(fn); }); }); ## Instruction: Make it a kata, all tests fail. ## Code After: // 36: Symbol.keyFor - retrieves a shared symbol key from the global symbol registry // To do: make all tests pass, leave the assert lines unchanged! describe('`Symbol.keyFor` gets the symbol key for a given symbol', function() { const sym = Symbol.for('foo'); it('pass the symbol to `keyFor()` and you get it`s key', function() { const key = Symbol.____(sym); assert.equal(key, 'foo'); }); it('local symbols are not in the runtime-wide registry', function() { // hint: `Symbol()` creates a local symbol! const localSymbol = Symbol.for('foo'); const key = Symbol.keyFor(localSymbol); assert.equal(key, void 0); }); it('well-known symbols are not in the runtime-wide registry either', function() { const key = Symbol.keyFor(Symbol.iteraTor); assert.equal(key, void 0); }); it('for non-Symbols throws an error', function() { function fn() { Symbol.keyFor(sym); } assert.throws(fn); }); });
// 36: Symbol.keyFor - retrieves a shared symbol key from the global symbol registry // To do: make all tests pass, leave the assert lines unchanged! describe('`Symbol.keyFor` gets the symbol key for a given symbol', function() { + const sym = Symbol.for('foo'); + it('pass the symbol to `keyFor()` and you get it`s key', function() { - const sym = Symbol.for('foo'); - const key = Symbol.keyFor(sym); ? ^^^^^^ + const key = Symbol.____(sym); ? ^^^^ assert.equal(key, 'foo'); }); it('local symbols are not in the runtime-wide registry', function() { + // hint: `Symbol()` creates a local symbol! - const localSymbol = Symbol('foo'); + const localSymbol = Symbol.for('foo'); ? ++++ const key = Symbol.keyFor(localSymbol); assert.equal(key, void 0); }); it('well-known symbols are not in the runtime-wide registry either', function() { - const key = Symbol.keyFor(Symbol.iterator); ? ^ + const key = Symbol.keyFor(Symbol.iteraTor); ? ^ assert.equal(key, void 0); }); it('for non-Symbols throws an error', function() { function fn() { - Symbol.keyFor(null); ? ^^^^ + Symbol.keyFor(sym); ? ^^^ } assert.throws(fn); }); });
12
0.352941
7
5
bd2f6cc51af014ca2547b963a3b9c934ce69b12d
markdown-test.rb
markdown-test.rb
puts "Maruku:" puts `bin/maruku -o - --html-frag #{ARGV[0]}` puts "\n\nRedcarpet:" puts `redcarpet #{ARGV[0]}` puts "\n\nKramdown:" puts `kramdown #{ARGV[0]}` puts "\n\nBluecloth:" puts `bluecloth #{ARGV[0]}` puts "\n\nRDiscount:" puts `rdiscount #{ARGV[0]}`
puts "Maruku:" puts `bin/maruku -o - --html-frag #{ARGV[0]}` puts "Old Maruku:" puts `maruku -o - --html-frag #{ARGV[0]}` puts "\n\nRedcarpet:" puts `redcarpet #{ARGV[0]}` puts "\n\nKramdown:" puts `kramdown #{ARGV[0]}` puts "\n\nBluecloth:" puts `bluecloth #{ARGV[0]}` puts "\n\nRDiscount:" puts `rdiscount #{ARGV[0]}`
Include old maruku in comparison script
Include old maruku in comparison script
Ruby
mit
distler/maruku,bhollis/maruku,distler/maruku
ruby
## Code Before: puts "Maruku:" puts `bin/maruku -o - --html-frag #{ARGV[0]}` puts "\n\nRedcarpet:" puts `redcarpet #{ARGV[0]}` puts "\n\nKramdown:" puts `kramdown #{ARGV[0]}` puts "\n\nBluecloth:" puts `bluecloth #{ARGV[0]}` puts "\n\nRDiscount:" puts `rdiscount #{ARGV[0]}` ## Instruction: Include old maruku in comparison script ## Code After: puts "Maruku:" puts `bin/maruku -o - --html-frag #{ARGV[0]}` puts "Old Maruku:" puts `maruku -o - --html-frag #{ARGV[0]}` puts "\n\nRedcarpet:" puts `redcarpet #{ARGV[0]}` puts "\n\nKramdown:" puts `kramdown #{ARGV[0]}` puts "\n\nBluecloth:" puts `bluecloth #{ARGV[0]}` puts "\n\nRDiscount:" puts `rdiscount #{ARGV[0]}`
puts "Maruku:" puts `bin/maruku -o - --html-frag #{ARGV[0]}` + + puts "Old Maruku:" + puts `maruku -o - --html-frag #{ARGV[0]}` puts "\n\nRedcarpet:" puts `redcarpet #{ARGV[0]}` puts "\n\nKramdown:" puts `kramdown #{ARGV[0]}` puts "\n\nBluecloth:" puts `bluecloth #{ARGV[0]}` puts "\n\nRDiscount:" puts `rdiscount #{ARGV[0]}`
3
0.2
3
0
829e7e056487e438a2d58bb2ac33d486caca5915
package.json
package.json
{ "name": "tsutils", "version": "2.0.0", "description": "utilities for working with typescript's AST", "scripts": { "compile": "tsc -p .", "lint": "tslint -p .", "prepublish": "npm run compile" }, "repository": { "type": "git", "url": "https://github.com/ajafff/tsutils" }, "keywords": [ "typescript", "ts", "ast", "typeguard", "utils", "helper", "node" ], "author": "Klaus Meinhardt", "license": "MIT", "devDependencies": { "tslint": "^5.2.0", "tslint-consistent-codestyle": "^1.2.0", "typescript": "^2.3.0" }, "peerDependencies": { "typescript": ">=2.1.0 || >=2.1.0-dev || >=2.2.0-dev || >=2.3.0-dev || >= 2.4.0-dev || >= 2.5.0-dev" } }
{ "name": "tsutils", "version": "2.0.0", "description": "utilities for working with typescript's AST", "scripts": { "compile": "rm -rf {,util,typeguard,src}/*.js; tsc -p .", "lint": "tslint -p .", "prepublish": "npm run compile" }, "repository": { "type": "git", "url": "https://github.com/ajafff/tsutils" }, "keywords": [ "typescript", "ts", "ast", "typeguard", "utils", "helper", "node" ], "author": "Klaus Meinhardt", "license": "MIT", "devDependencies": { "tslint": "^5.2.0", "tslint-consistent-codestyle": "^1.2.0", "typescript": "^2.3.0" }, "peerDependencies": { "typescript": ">=2.1.0 || >=2.1.0-dev || >=2.2.0-dev || >=2.3.0-dev || >= 2.4.0-dev || >= 2.5.0-dev" } }
Remove old js files before compile
Remove old js files before compile
JSON
mit
ajafff/tsutils,ajafff/tsutils
json
## Code Before: { "name": "tsutils", "version": "2.0.0", "description": "utilities for working with typescript's AST", "scripts": { "compile": "tsc -p .", "lint": "tslint -p .", "prepublish": "npm run compile" }, "repository": { "type": "git", "url": "https://github.com/ajafff/tsutils" }, "keywords": [ "typescript", "ts", "ast", "typeguard", "utils", "helper", "node" ], "author": "Klaus Meinhardt", "license": "MIT", "devDependencies": { "tslint": "^5.2.0", "tslint-consistent-codestyle": "^1.2.0", "typescript": "^2.3.0" }, "peerDependencies": { "typescript": ">=2.1.0 || >=2.1.0-dev || >=2.2.0-dev || >=2.3.0-dev || >= 2.4.0-dev || >= 2.5.0-dev" } } ## Instruction: Remove old js files before compile ## Code After: { "name": "tsutils", "version": "2.0.0", "description": "utilities for working with typescript's AST", "scripts": { "compile": "rm -rf {,util,typeguard,src}/*.js; tsc -p .", "lint": "tslint -p .", "prepublish": "npm run compile" }, "repository": { "type": "git", "url": "https://github.com/ajafff/tsutils" }, "keywords": [ "typescript", "ts", "ast", "typeguard", "utils", "helper", "node" ], "author": "Klaus Meinhardt", "license": "MIT", "devDependencies": { "tslint": "^5.2.0", "tslint-consistent-codestyle": "^1.2.0", "typescript": "^2.3.0" }, "peerDependencies": { "typescript": ">=2.1.0 || >=2.1.0-dev || >=2.2.0-dev || >=2.3.0-dev || >= 2.4.0-dev || >= 2.5.0-dev" } }
{ "name": "tsutils", "version": "2.0.0", "description": "utilities for working with typescript's AST", "scripts": { - "compile": "tsc -p .", + "compile": "rm -rf {,util,typeguard,src}/*.js; tsc -p .", "lint": "tslint -p .", "prepublish": "npm run compile" }, "repository": { "type": "git", "url": "https://github.com/ajafff/tsutils" }, "keywords": [ "typescript", "ts", "ast", "typeguard", "utils", "helper", "node" ], "author": "Klaus Meinhardt", "license": "MIT", "devDependencies": { "tslint": "^5.2.0", "tslint-consistent-codestyle": "^1.2.0", "typescript": "^2.3.0" }, "peerDependencies": { "typescript": ">=2.1.0 || >=2.1.0-dev || >=2.2.0-dev || >=2.3.0-dev || >= 2.4.0-dev || >= 2.5.0-dev" } }
2
0.060606
1
1
89a1d80e981c147c87c892384afd8411dccfd8a1
packages/package_metaphlan_2_0/tool_dependencies.xml
packages/package_metaphlan_2_0/tool_dependencies.xml
<?xml version="1.0"?> <tool_dependency> <package name="metaphlan2" version="2.0"> <install version="1.0"> <actions> <action sha256sum="17b090bcd8dc98531639455176607efd2fb76ecab1f6eedfd5ec70e7d92cf375" type="download_by_url">https://bitbucket.org/biobakery/metaphlan2/get/default.zip</action> <action type="move_directory_files"> <source_directory>.</source_directory> <destination_directory>$INSTALL_DIR/</destination_directory> </action> <action type="set_environment"> <environment_variable name="METAPHLAN2_DIR" action="set_to">$INSTALL_DIR/</environment_variable> <environment_variable name="PATH" action="prepend_to">$INSTALL_DIR/bin</environment_variable> </action> </actions> </install> <readme></readme> </package> </tool_dependency>
<?xml version="1.0"?> <tool_dependency> <package name="metaphlan2" version="2.0"> <install version="1.0"> <actions> <action type="download_by_url">https://bitbucket.org/biobakery/metaphlan2/get/default.zip</action> <action type="move_directory_files"> <source_directory>.</source_directory> <destination_directory>$INSTALL_DIR/</destination_directory> </action> <action type="set_environment"> <environment_variable name="METAPHLAN2_DIR" action="set_to">$INSTALL_DIR/</environment_variable> <environment_variable name="PATH" action="prepend_to">$INSTALL_DIR/bin</environment_variable> </action> </actions> </install> <readme></readme> </package> </tool_dependency>
Remove sha256sum for metaphlan2 package
Remove sha256sum for metaphlan2 package
XML
apache-2.0
ASaiM/galaxytools,ASaiM/galaxytools
xml
## Code Before: <?xml version="1.0"?> <tool_dependency> <package name="metaphlan2" version="2.0"> <install version="1.0"> <actions> <action sha256sum="17b090bcd8dc98531639455176607efd2fb76ecab1f6eedfd5ec70e7d92cf375" type="download_by_url">https://bitbucket.org/biobakery/metaphlan2/get/default.zip</action> <action type="move_directory_files"> <source_directory>.</source_directory> <destination_directory>$INSTALL_DIR/</destination_directory> </action> <action type="set_environment"> <environment_variable name="METAPHLAN2_DIR" action="set_to">$INSTALL_DIR/</environment_variable> <environment_variable name="PATH" action="prepend_to">$INSTALL_DIR/bin</environment_variable> </action> </actions> </install> <readme></readme> </package> </tool_dependency> ## Instruction: Remove sha256sum for metaphlan2 package ## Code After: <?xml version="1.0"?> <tool_dependency> <package name="metaphlan2" version="2.0"> <install version="1.0"> <actions> <action type="download_by_url">https://bitbucket.org/biobakery/metaphlan2/get/default.zip</action> <action type="move_directory_files"> <source_directory>.</source_directory> <destination_directory>$INSTALL_DIR/</destination_directory> </action> <action type="set_environment"> <environment_variable name="METAPHLAN2_DIR" action="set_to">$INSTALL_DIR/</environment_variable> <environment_variable name="PATH" action="prepend_to">$INSTALL_DIR/bin</environment_variable> </action> </actions> </install> <readme></readme> </package> </tool_dependency>
<?xml version="1.0"?> <tool_dependency> <package name="metaphlan2" version="2.0"> <install version="1.0"> <actions> - <action sha256sum="17b090bcd8dc98531639455176607efd2fb76ecab1f6eedfd5ec70e7d92cf375" type="download_by_url">https://bitbucket.org/biobakery/metaphlan2/get/default.zip</action> + <action type="download_by_url">https://bitbucket.org/biobakery/metaphlan2/get/default.zip</action> <action type="move_directory_files"> <source_directory>.</source_directory> <destination_directory>$INSTALL_DIR/</destination_directory> </action> <action type="set_environment"> <environment_variable name="METAPHLAN2_DIR" action="set_to">$INSTALL_DIR/</environment_variable> <environment_variable name="PATH" action="prepend_to">$INSTALL_DIR/bin</environment_variable> </action> </actions> </install> <readme></readme> </package> </tool_dependency>
2
0.105263
1
1
260f9fee341d9b6316c253de1c154c2330915e74
Tests/features/support/env.rb
Tests/features/support/env.rb
require 'aruba/cucumber'
require 'aruba/cucumber' %x'rm -rf ../Build/log' %x'mkdir ../Build/log' After do |scenario| %x'cp -R ../Build/tmp ../Build/log/"#{scenario.name}"' end
Add output logging to Aruba tests.
Add output logging to Aruba tests.
Ruby
mit
SwiftKit/CuckooGenerator,SwiftKit/CuckooGenerator,SwiftKit/CuckooGenerator
ruby
## Code Before: require 'aruba/cucumber' ## Instruction: Add output logging to Aruba tests. ## Code After: require 'aruba/cucumber' %x'rm -rf ../Build/log' %x'mkdir ../Build/log' After do |scenario| %x'cp -R ../Build/tmp ../Build/log/"#{scenario.name}"' end
require 'aruba/cucumber' + %x'rm -rf ../Build/log' + %x'mkdir ../Build/log' + + After do |scenario| + %x'cp -R ../Build/tmp ../Build/log/"#{scenario.name}"' + end
6
6
6
0
0dd4168d1d3620b65596fab567d0827dac65c39e
test/Lily/Test/Usage/DescribeTestingTest.php
test/Lily/Test/Usage/DescribeTestingTest.php
<?php namespace Lily\Test\Usage; use Symfony\Component\DomCrawler\Crawler; use Lily\Application\MiddlewareApplication; use Lily\Application\RoutedApplication; use Lily\Util\Request; use Lily\Util\Response; class DescribeTestingTest extends \PHPUnit_Framework_TestCase { private function applicationToTest() { $html = file_get_contents(dirname(__FILE__).'/example.html'); return new MiddlewareApplication( array( new RoutedApplication( array( array('POST', '/form', $html))))); } private function applicationResponse($request) { $application = $this->applicationToTest(); return $application($request); } private function filterNotEmpty($html, $filter) { $crawler = new Crawler($html); return $crawler->filter($filter)->count() > 0; } private function responseBodyHasClass($response, $class) { return $this->filterNotEmpty($response['body'], $class); } public function testFormErrorShouldBeShown() { $response = $this->applicationResponse(Request::post('/form')); $this->assertTrue($this->responseBodyHasClass($response, '.error')); } public function testFormShouldSuccessfullySubmit() { $response = $this->applicationResponse(Request::post('/form')); $this->assertTrue($this->responseBodyHasClass($response, 'h1.success')); } }
<?php namespace Lily\Test\Usage; use Symfony\Component\DomCrawler\Crawler; use Lily\Application\MiddlewareApplication; use Lily\Application\RoutedApplication; use Lily\Util\Request; use Lily\Util\Response; class DescribeTestingTest extends \PHPUnit_Framework_TestCase { private function applicationToTest() { $html = file_get_contents(dirname(__FILE__).'/example.html'); return new MiddlewareApplication( array( new RoutedApplication( array( array('POST', '/form', $html))))); } private function applicationResponse($request) { $application = $this->applicationToTest(); return $application($request); } private function htmlHasClass($html, $class) { $crawler = new Crawler($html); return $crawler->filter($class)->count() > 0; } private function responseBodyHasClass($response, $class) { return $this->htmlHasClass($response['body'], $class); } public function testFormErrorShouldBeShown() { $response = $this->applicationResponse(Request::post('/form')); $this->assertTrue($this->responseBodyHasClass($response, '.error')); } public function testFormShouldSuccessfullySubmit() { $response = $this->applicationResponse(Request::post('/form')); $this->assertTrue($this->responseBodyHasClass($response, 'h1.success')); } }
Rename method and param to better describe what is happening
Rename method and param to better describe what is happening
PHP
mit
DrPheltRight/lily,DrPheltRight/lily,lukemorton/lily,lukemorton/lily
php
## Code Before: <?php namespace Lily\Test\Usage; use Symfony\Component\DomCrawler\Crawler; use Lily\Application\MiddlewareApplication; use Lily\Application\RoutedApplication; use Lily\Util\Request; use Lily\Util\Response; class DescribeTestingTest extends \PHPUnit_Framework_TestCase { private function applicationToTest() { $html = file_get_contents(dirname(__FILE__).'/example.html'); return new MiddlewareApplication( array( new RoutedApplication( array( array('POST', '/form', $html))))); } private function applicationResponse($request) { $application = $this->applicationToTest(); return $application($request); } private function filterNotEmpty($html, $filter) { $crawler = new Crawler($html); return $crawler->filter($filter)->count() > 0; } private function responseBodyHasClass($response, $class) { return $this->filterNotEmpty($response['body'], $class); } public function testFormErrorShouldBeShown() { $response = $this->applicationResponse(Request::post('/form')); $this->assertTrue($this->responseBodyHasClass($response, '.error')); } public function testFormShouldSuccessfullySubmit() { $response = $this->applicationResponse(Request::post('/form')); $this->assertTrue($this->responseBodyHasClass($response, 'h1.success')); } } ## Instruction: Rename method and param to better describe what is happening ## Code After: <?php namespace Lily\Test\Usage; use Symfony\Component\DomCrawler\Crawler; use Lily\Application\MiddlewareApplication; use Lily\Application\RoutedApplication; use Lily\Util\Request; use Lily\Util\Response; class DescribeTestingTest extends \PHPUnit_Framework_TestCase { private function applicationToTest() { $html = file_get_contents(dirname(__FILE__).'/example.html'); return new MiddlewareApplication( array( new RoutedApplication( array( array('POST', '/form', $html))))); } private function applicationResponse($request) { $application = $this->applicationToTest(); return $application($request); } private function htmlHasClass($html, $class) { $crawler = new Crawler($html); return $crawler->filter($class)->count() > 0; } private function responseBodyHasClass($response, $class) { return $this->htmlHasClass($response['body'], $class); } public function testFormErrorShouldBeShown() { $response = $this->applicationResponse(Request::post('/form')); $this->assertTrue($this->responseBodyHasClass($response, '.error')); } public function testFormShouldSuccessfullySubmit() { $response = $this->applicationResponse(Request::post('/form')); $this->assertTrue($this->responseBodyHasClass($response, 'h1.success')); } }
<?php namespace Lily\Test\Usage; use Symfony\Component\DomCrawler\Crawler; use Lily\Application\MiddlewareApplication; use Lily\Application\RoutedApplication; use Lily\Util\Request; use Lily\Util\Response; class DescribeTestingTest extends \PHPUnit_Framework_TestCase { private function applicationToTest() { $html = file_get_contents(dirname(__FILE__).'/example.html'); return new MiddlewareApplication( array( new RoutedApplication( array( array('POST', '/form', $html))))); } private function applicationResponse($request) { $application = $this->applicationToTest(); return $application($request); } - private function filterNotEmpty($html, $filter) + private function htmlHasClass($html, $class) { $crawler = new Crawler($html); - return $crawler->filter($filter)->count() > 0; ? ^^ ^^^ + return $crawler->filter($class)->count() > 0; ? ^ ^^^ } private function responseBodyHasClass($response, $class) { - return $this->filterNotEmpty($response['body'], $class); ? ^^ ^^^^^^^^^^^ + return $this->htmlHasClass($response['body'], $class); ? ^^^ ^^^^^^^^ } public function testFormErrorShouldBeShown() { $response = $this->applicationResponse(Request::post('/form')); $this->assertTrue($this->responseBodyHasClass($response, '.error')); } public function testFormShouldSuccessfullySubmit() { $response = $this->applicationResponse(Request::post('/form')); $this->assertTrue($this->responseBodyHasClass($response, 'h1.success')); } }
6
0.111111
3
3
59bf9eca217ef8ef3011124d1ff9e1570e8ff76d
plugins/clue/clue.py
plugins/clue/clue.py
from __future__ import unicode_literals # don't convert to ascii in py2.7 when creating string to return crontable = [] outputs = [] def process_message(data): outputs.append([data['channel'], "from repeat1 \"{}\" in channel {}".format( data['text'], data['channel'])] )
from __future__ import unicode_literals # don't convert to ascii in py2.7 when creating string to return crontable = [] outputs = [] def process_message(data): outputs.append([data['channel'], data['text']])
Simplify stony's response to exactly what the user sent
Simplify stony's response to exactly what the user sent Rather than providing the "from repeat1" and "in channel D???????" noise.
Python
mit
cworth-gh/stony
python
## Code Before: from __future__ import unicode_literals # don't convert to ascii in py2.7 when creating string to return crontable = [] outputs = [] def process_message(data): outputs.append([data['channel'], "from repeat1 \"{}\" in channel {}".format( data['text'], data['channel'])] ) ## Instruction: Simplify stony's response to exactly what the user sent Rather than providing the "from repeat1" and "in channel D???????" noise. ## Code After: from __future__ import unicode_literals # don't convert to ascii in py2.7 when creating string to return crontable = [] outputs = [] def process_message(data): outputs.append([data['channel'], data['text']])
from __future__ import unicode_literals # don't convert to ascii in py2.7 when creating string to return crontable = [] outputs = [] def process_message(data): + outputs.append([data['channel'], data['text']]) - outputs.append([data['channel'], "from repeat1 \"{}\" in channel {}".format( - data['text'], data['channel'])] - )
4
0.363636
1
3
a5f03199973fbf2ee82a9dde3149f6e403394b8e
app/views/bills/index.html.erb
app/views/bills/index.html.erb
<!---debug><h2>Hello, <%= if @all_bills then @all_bills else "world" end %> !</h2><---> <div class='all-bills'> <ul class='bill-list'> <% @all_bills.map do |bill| %> <li class='block-bill'> <% y = bill[:link].match(/bills\/(.*).json/)[1] %> <a href="/bills/<%= y %>"><%= bill[:number] %></a> <p><%= bill[:title] %></p> <p><%= bill[:link] %></p> <p><%= y = bill[:link].match(/bills\/(.*).json/)[1] %></p> </li> <% end %> </ul> <nav> <a href="/">Home</a> </nav> </div>
<div class='all-bills'> <ul class='bill-list'> <% @all_bills.map do |bill| %> <li class='block-bill'> <% y = bill[:link].match(/bills\/(.*).json/)[1] %> <a href="/bills/<%= y %>"><%= bill[:number] %></a> <p><%= bill[:title] %></p> </li> <% end %> </ul> <nav> <a href="/">Home</a> </nav> </div>
Remove link to json file and debugger display in index page
Remove link to json file and debugger display in index page
HTML+ERB
mit
omarchaeopteryx/civic-social,omarchaeopteryx/civic-social,omarchaeopteryx/civic-social
html+erb
## Code Before: <!---debug><h2>Hello, <%= if @all_bills then @all_bills else "world" end %> !</h2><---> <div class='all-bills'> <ul class='bill-list'> <% @all_bills.map do |bill| %> <li class='block-bill'> <% y = bill[:link].match(/bills\/(.*).json/)[1] %> <a href="/bills/<%= y %>"><%= bill[:number] %></a> <p><%= bill[:title] %></p> <p><%= bill[:link] %></p> <p><%= y = bill[:link].match(/bills\/(.*).json/)[1] %></p> </li> <% end %> </ul> <nav> <a href="/">Home</a> </nav> </div> ## Instruction: Remove link to json file and debugger display in index page ## Code After: <div class='all-bills'> <ul class='bill-list'> <% @all_bills.map do |bill| %> <li class='block-bill'> <% y = bill[:link].match(/bills\/(.*).json/)[1] %> <a href="/bills/<%= y %>"><%= bill[:number] %></a> <p><%= bill[:title] %></p> </li> <% end %> </ul> <nav> <a href="/">Home</a> </nav> </div>
- <!---debug><h2>Hello, <%= if @all_bills then @all_bills else "world" end %> !</h2><---> <div class='all-bills'> <ul class='bill-list'> <% @all_bills.map do |bill| %> <li class='block-bill'> <% y = bill[:link].match(/bills\/(.*).json/)[1] %> <a href="/bills/<%= y %>"><%= bill[:number] %></a> <p><%= bill[:title] %></p> - <p><%= bill[:link] %></p> - <p><%= y = bill[:link].match(/bills\/(.*).json/)[1] %></p> </li> <% end %> </ul> <nav> <a href="/">Home</a> </nav> </div>
3
0.166667
0
3
bdc916837dde4d41a5501dba177b5599774fa4f2
tasks/configuration.yml
tasks/configuration.yml
--- - name: Ensure the PowerDNS configuration directory exists file: name={{pdns_rec_config_dir | default('/etc/powerdns')}} state=directory owner="root" group="root" - name: grab pdns_recursor version shell: "pdns_recursor --version 2>&1 | awk '/PowerDNS Recursor/ { print $6 }'" register: pdns_recursor_version_result - set_fact: pdns_recursor_version="{{ pdns_recursor_version_result.stdout }}" - name: Add configuration for the PowerDNS Recursor template: src=recursor.conf.j2 dest={{pdns_rec_config_dir | default('/etc/powerdns')}}/recursor.conf notify: Restart PowerDNS Recursor
--- - name: Ensure the PowerDNS configuration directory exists file: name={{pdns_rec_config_dir | default('/etc/powerdns')}} state=directory owner="root" group="root" - name: grab pdns_recursor version shell: "pdns_recursor --version 2>&1 | awk '/PowerDNS Recursor/ { print $6 }'" register: pdns_recursor_version_result changed_when: false - set_fact: pdns_recursor_version="{{ pdns_recursor_version_result.stdout }}" - name: Add configuration for the PowerDNS Recursor template: src=recursor.conf.j2 dest={{pdns_rec_config_dir | default('/etc/powerdns')}}/recursor.conf notify: Restart PowerDNS Recursor
Mark a task a never changing
Mark a task a never changing
YAML
mit
PowerDNS/pdns_recursor-ansible
yaml
## Code Before: --- - name: Ensure the PowerDNS configuration directory exists file: name={{pdns_rec_config_dir | default('/etc/powerdns')}} state=directory owner="root" group="root" - name: grab pdns_recursor version shell: "pdns_recursor --version 2>&1 | awk '/PowerDNS Recursor/ { print $6 }'" register: pdns_recursor_version_result - set_fact: pdns_recursor_version="{{ pdns_recursor_version_result.stdout }}" - name: Add configuration for the PowerDNS Recursor template: src=recursor.conf.j2 dest={{pdns_rec_config_dir | default('/etc/powerdns')}}/recursor.conf notify: Restart PowerDNS Recursor ## Instruction: Mark a task a never changing ## Code After: --- - name: Ensure the PowerDNS configuration directory exists file: name={{pdns_rec_config_dir | default('/etc/powerdns')}} state=directory owner="root" group="root" - name: grab pdns_recursor version shell: "pdns_recursor --version 2>&1 | awk '/PowerDNS Recursor/ { print $6 }'" register: pdns_recursor_version_result changed_when: false - set_fact: pdns_recursor_version="{{ pdns_recursor_version_result.stdout }}" - name: Add configuration for the PowerDNS Recursor template: src=recursor.conf.j2 dest={{pdns_rec_config_dir | default('/etc/powerdns')}}/recursor.conf notify: Restart PowerDNS Recursor
--- - name: Ensure the PowerDNS configuration directory exists file: name={{pdns_rec_config_dir | default('/etc/powerdns')}} state=directory owner="root" group="root" - name: grab pdns_recursor version shell: "pdns_recursor --version 2>&1 | awk '/PowerDNS Recursor/ { print $6 }'" register: pdns_recursor_version_result + changed_when: false - set_fact: pdns_recursor_version="{{ pdns_recursor_version_result.stdout }}" - name: Add configuration for the PowerDNS Recursor template: src=recursor.conf.j2 dest={{pdns_rec_config_dir | default('/etc/powerdns')}}/recursor.conf notify: Restart PowerDNS Recursor
1
0.076923
1
0
797d10950bcf4c74f6967d965308dfc9c71bbfde
package/vagrant-scripts/centos.sh
package/vagrant-scripts/centos.sh
yum install -y nc curl zip unzip REPO_RPM_URL="http://yum.puppetlabs.com/puppetlabs-release-el-5.noarch.rpm" rm -f /tmp/puppet.rpm curl -o /tmp/puppet.rpm -L $REPO_RPM_URL rpm -i /tmp/puppet.rpm yum install -y puppet ruby-devel yum groupinstall -yq "Development Tools" gem install json -v '~> 1.8.6' --no-ri --no-rdoc gem install fpm -v '~> 0.4.0' --no-ri --no-rdoc # if the proxy is around, use it nc -z -w3 192.168.1.1 8123 && export http_proxy="http://192.168.1.1:8123" mkdir -p /vagrant/substrate-assets chmod 755 /vagrant/package/package.sh /vagrant/package/package.sh /vagrant/substrate-assets/substrate_centos_$(uname -m).zip master mkdir -p /vagrant/pkg cp *.rpm /vagrant/pkg/
sed -i 's/mirror.centos/vault.centos/g' /etc/yum.repos.d/CentOS-Base.repo sed -i 's/#baseurl/baseurl/g' /etc/yum.repos.d/CentOS-Base.repo sed -i 's/mirrorlist=.*$//g' /etc/yum.repos.d/CentOS-Base.repo echo $(awk '{print $3}' /etc/redhat-release) > /etc/yum/vars/releasever yum install -y nc curl zip unzip REPO_RPM_URL="http://yum.puppetlabs.com/puppetlabs-release-el-5.noarch.rpm" rm -f /tmp/puppet.rpm curl -o /tmp/puppet.rpm -L $REPO_RPM_URL rpm -i /tmp/puppet.rpm yum install -y puppet ruby-devel yum groupinstall -yq "Development Tools" gem install json -v '~> 1.8.6' --no-ri --no-rdoc gem install fpm -v '~> 0.4.0' --no-ri --no-rdoc # if the proxy is around, use it nc -z -w3 192.168.1.1 8123 && export http_proxy="http://192.168.1.1:8123" mkdir -p /vagrant/substrate-assets chmod 755 /vagrant/package/package.sh /vagrant/package/package.sh /vagrant/substrate-assets/substrate_centos_$(uname -m).zip master mkdir -p /vagrant/pkg cp *.rpm /vagrant/pkg/
Configure yum to use vault
Configure yum to use vault
Shell
mit
chrisroberts/vagrant-installers,mitchellh/vagrant-installers,mitchellh/vagrant-installers,chrisroberts/vagrant-installers,chrisroberts/vagrant-installers,mitchellh/vagrant-installers,chrisroberts/vagrant-installers,chrisroberts/vagrant-installers,mitchellh/vagrant-installers,mitchellh/vagrant-installers,chrisroberts/vagrant-installers,mitchellh/vagrant-installers
shell
## Code Before: yum install -y nc curl zip unzip REPO_RPM_URL="http://yum.puppetlabs.com/puppetlabs-release-el-5.noarch.rpm" rm -f /tmp/puppet.rpm curl -o /tmp/puppet.rpm -L $REPO_RPM_URL rpm -i /tmp/puppet.rpm yum install -y puppet ruby-devel yum groupinstall -yq "Development Tools" gem install json -v '~> 1.8.6' --no-ri --no-rdoc gem install fpm -v '~> 0.4.0' --no-ri --no-rdoc # if the proxy is around, use it nc -z -w3 192.168.1.1 8123 && export http_proxy="http://192.168.1.1:8123" mkdir -p /vagrant/substrate-assets chmod 755 /vagrant/package/package.sh /vagrant/package/package.sh /vagrant/substrate-assets/substrate_centos_$(uname -m).zip master mkdir -p /vagrant/pkg cp *.rpm /vagrant/pkg/ ## Instruction: Configure yum to use vault ## Code After: sed -i 's/mirror.centos/vault.centos/g' /etc/yum.repos.d/CentOS-Base.repo sed -i 's/#baseurl/baseurl/g' /etc/yum.repos.d/CentOS-Base.repo sed -i 's/mirrorlist=.*$//g' /etc/yum.repos.d/CentOS-Base.repo echo $(awk '{print $3}' /etc/redhat-release) > /etc/yum/vars/releasever yum install -y nc curl zip unzip REPO_RPM_URL="http://yum.puppetlabs.com/puppetlabs-release-el-5.noarch.rpm" rm -f /tmp/puppet.rpm curl -o /tmp/puppet.rpm -L $REPO_RPM_URL rpm -i /tmp/puppet.rpm yum install -y puppet ruby-devel yum groupinstall -yq "Development Tools" gem install json -v '~> 1.8.6' --no-ri --no-rdoc gem install fpm -v '~> 0.4.0' --no-ri --no-rdoc # if the proxy is around, use it nc -z -w3 192.168.1.1 8123 && export http_proxy="http://192.168.1.1:8123" mkdir -p /vagrant/substrate-assets chmod 755 /vagrant/package/package.sh /vagrant/package/package.sh /vagrant/substrate-assets/substrate_centos_$(uname -m).zip master mkdir -p /vagrant/pkg cp *.rpm /vagrant/pkg/
+ sed -i 's/mirror.centos/vault.centos/g' /etc/yum.repos.d/CentOS-Base.repo + sed -i 's/#baseurl/baseurl/g' /etc/yum.repos.d/CentOS-Base.repo + sed -i 's/mirrorlist=.*$//g' /etc/yum.repos.d/CentOS-Base.repo + + echo $(awk '{print $3}' /etc/redhat-release) > /etc/yum/vars/releasever yum install -y nc curl zip unzip REPO_RPM_URL="http://yum.puppetlabs.com/puppetlabs-release-el-5.noarch.rpm" rm -f /tmp/puppet.rpm curl -o /tmp/puppet.rpm -L $REPO_RPM_URL rpm -i /tmp/puppet.rpm yum install -y puppet ruby-devel yum groupinstall -yq "Development Tools" gem install json -v '~> 1.8.6' --no-ri --no-rdoc gem install fpm -v '~> 0.4.0' --no-ri --no-rdoc # if the proxy is around, use it nc -z -w3 192.168.1.1 8123 && export http_proxy="http://192.168.1.1:8123" mkdir -p /vagrant/substrate-assets chmod 755 /vagrant/package/package.sh /vagrant/package/package.sh /vagrant/substrate-assets/substrate_centos_$(uname -m).zip master mkdir -p /vagrant/pkg cp *.rpm /vagrant/pkg/
5
0.238095
5
0
645437ba40c61db4705a7d57082f4f258c00ff4b
client/templates/map-show.html
client/templates/map-show.html
<template name="map"> <div id="map"></div> <div data-js="first-territory"></div> <div data-js="second-territory"></div> </template>
<template name="map"> <div data-js="first-territory"></div> <div data-js="second-territory"></div> <div id="map"></div> </template>
Move labels above map to see them
Move labels above map to see them
HTML
mit
iwz/risk-in-meteor
html
## Code Before: <template name="map"> <div id="map"></div> <div data-js="first-territory"></div> <div data-js="second-territory"></div> </template> ## Instruction: Move labels above map to see them ## Code After: <template name="map"> <div data-js="first-territory"></div> <div data-js="second-territory"></div> <div id="map"></div> </template>
<template name="map"> - <div id="map"></div> <div data-js="first-territory"></div> <div data-js="second-territory"></div> + <div id="map"></div> </template>
2
0.4
1
1
60b4c072379bfe5e613ee81c3119d5ddca1ab370
.travis.yml
.travis.yml
sudo: false language: java node_js: - "0.10" before_script: - cd www - npm install -g bower - rm -rf /home/travis/.npm/* - npm install - bower install -f - cd .. script: gradle build notifications: email: recipients: - os-v20-devs@krishagni.com on_success: always on_failure: always branches: only: - OS_v20
language: java node_js: - "0.10" before_script: - cd www - npm install -g bower - npm install - bower install -f - cd .. script: gradle build notifications: email: recipients: - os-v20-devs@krishagni.com on_success: always on_failure: always branches: only: - OS_v20
Move back build to pre-container infra
Move back build to pre-container infra
YAML
bsd-3-clause
krishagni/openspecimen,krishagni/openspecimen,krishagni/openspecimen
yaml
## Code Before: sudo: false language: java node_js: - "0.10" before_script: - cd www - npm install -g bower - rm -rf /home/travis/.npm/* - npm install - bower install -f - cd .. script: gradle build notifications: email: recipients: - os-v20-devs@krishagni.com on_success: always on_failure: always branches: only: - OS_v20 ## Instruction: Move back build to pre-container infra ## Code After: language: java node_js: - "0.10" before_script: - cd www - npm install -g bower - npm install - bower install -f - cd .. script: gradle build notifications: email: recipients: - os-v20-devs@krishagni.com on_success: always on_failure: always branches: only: - OS_v20
- sudo: false - language: java node_js: - "0.10" before_script: - cd www - npm install -g bower - - rm -rf /home/travis/.npm/* - npm install - bower install -f - cd .. script: gradle build notifications: email: recipients: - os-v20-devs@krishagni.com on_success: always on_failure: always branches: only: - OS_v20
3
0.111111
0
3
641d602498b7cfbf38e7c6f48a2e9f45f98c4039
.travis.yml
.travis.yml
sudo: false branches: only: - master language: python python: - 2.6 - 2.7 install: - python setup.py -q install - pip install --use-mirrors simplejson coverage script: python build.py analyse notifications: email: false irc: channels: - "irc.freenode.org#aspen" on_success: change on_failure: always template: - "%{repository} (%{branch}:%{commit} by %{author}): %{message} (%{build_url})" skip_join: true
sudo: false branches: only: - master language: python python: - 2.6 - 2.7 - 3.2 - 3.3 - 3.4 install: - python setup.py -q install - pip install --use-mirrors simplejson coverage script: python build.py analyse notifications: email: false irc: channels: - "irc.freenode.org#aspen" on_success: change on_failure: always template: - "%{repository} (%{branch}:%{commit} by %{author}): %{message} (%{build_url})" skip_join: true
Test Python 3.* at Travis
Test Python 3.* at Travis
YAML
mit
gratipay/aspen.py,gratipay/aspen.py
yaml
## Code Before: sudo: false branches: only: - master language: python python: - 2.6 - 2.7 install: - python setup.py -q install - pip install --use-mirrors simplejson coverage script: python build.py analyse notifications: email: false irc: channels: - "irc.freenode.org#aspen" on_success: change on_failure: always template: - "%{repository} (%{branch}:%{commit} by %{author}): %{message} (%{build_url})" skip_join: true ## Instruction: Test Python 3.* at Travis ## Code After: sudo: false branches: only: - master language: python python: - 2.6 - 2.7 - 3.2 - 3.3 - 3.4 install: - python setup.py -q install - pip install --use-mirrors simplejson coverage script: python build.py analyse notifications: email: false irc: channels: - "irc.freenode.org#aspen" on_success: change on_failure: always template: - "%{repository} (%{branch}:%{commit} by %{author}): %{message} (%{build_url})" skip_join: true
sudo: false branches: only: - master language: python python: - 2.6 - 2.7 + - 3.2 + - 3.3 + - 3.4 install: - python setup.py -q install - pip install --use-mirrors simplejson coverage script: python build.py analyse notifications: email: false irc: channels: - "irc.freenode.org#aspen" on_success: change on_failure: always template: - "%{repository} (%{branch}:%{commit} by %{author}): %{message} (%{build_url})" skip_join: true
3
0.136364
3
0
435f43ae71d546fad6f3bb22c8bd027ac1abc15a
Crawl/BananaUtils.hs
Crawl/BananaUtils.hs
module Crawl.BananaUtils ( filterBy, randomize ) where import System.Random (mkStdGen, Random, randomR) import qualified Reactive.Banana as R filterBy :: (a -> Maybe b) -> R.Event t a -> R.Event t b filterBy f = R.filterJust . fmap f randomize :: (Random a) => (a, a) -> R.Event t b -> R.Event t a randomize range clock = fst $ R.mapAccum (mkStdGen 17) (fmap (const $ randomR range) clock)
module Crawl.BananaUtils ( filterBy, randomize ) where import System.Random (mkStdGen, Random, randomR) import qualified Reactive.Banana as R filterBy :: (a -> Maybe b) -> R.Event t a -> R.Event t b filterBy f = R.filterJust . fmap f randomize :: (Random a) => (a, a) -> R.Event t b -> R.Event t a randomize range clock = fst $ R.mapAccum (mkStdGen 17) (fmap (const $ fp . randomR range) clock) where fp p = fst p `seq` snd p `seq` p
Fix a small leak in randomize
Fix a small leak in randomize
Haskell
bsd-3-clause
rwbarton/rw
haskell
## Code Before: module Crawl.BananaUtils ( filterBy, randomize ) where import System.Random (mkStdGen, Random, randomR) import qualified Reactive.Banana as R filterBy :: (a -> Maybe b) -> R.Event t a -> R.Event t b filterBy f = R.filterJust . fmap f randomize :: (Random a) => (a, a) -> R.Event t b -> R.Event t a randomize range clock = fst $ R.mapAccum (mkStdGen 17) (fmap (const $ randomR range) clock) ## Instruction: Fix a small leak in randomize ## Code After: module Crawl.BananaUtils ( filterBy, randomize ) where import System.Random (mkStdGen, Random, randomR) import qualified Reactive.Banana as R filterBy :: (a -> Maybe b) -> R.Event t a -> R.Event t b filterBy f = R.filterJust . fmap f randomize :: (Random a) => (a, a) -> R.Event t b -> R.Event t a randomize range clock = fst $ R.mapAccum (mkStdGen 17) (fmap (const $ fp . randomR range) clock) where fp p = fst p `seq` snd p `seq` p
module Crawl.BananaUtils ( filterBy, randomize ) where import System.Random (mkStdGen, Random, randomR) import qualified Reactive.Banana as R filterBy :: (a -> Maybe b) -> R.Event t a -> R.Event t b filterBy f = R.filterJust . fmap f randomize :: (Random a) => (a, a) -> R.Event t b -> R.Event t a - randomize range clock = fst $ R.mapAccum (mkStdGen 17) (fmap (const $ randomR range) clock) + randomize range clock = fst $ R.mapAccum (mkStdGen 17) (fmap (const $ fp . randomR range) clock) ? +++++ + where fp p = fst p `seq` snd p `seq` p
3
0.214286
2
1
fa466ebed1be0c5bf9181e8b87fcd43516df52cf
lemon/extradmin/templates/admin/index.html
lemon/extradmin/templates/admin/index.html
{% extends "admin/base_site.html" %} {% load i18n dashboard %} {% block main-menu-status %}{% endblock %} {% block content %} <h1>{% trans "Control Panel" %}</h1> <ul class="tools"> <li><a href="{% url admin:dashboard:available_widgets %}">{% trans "Available Widgets" %}</a></li> </ul> {% dashboard %} {% admin_app_list app_list %} {% endblock %}
{% extends "admin/base_site.html" %} {% load i18n dashboard %} {% load url from future %} {% block main-menu-status %}{% endblock %} {% block content %} <h1>{% trans "Control Panel" %}</h1> <ul class="tools"> <li><a href="{% url 'admin:dashboard:available_widgets' %}">{% trans "Available Widgets" %}</a></li> </ul> {% dashboard %} {% admin_app_list app_list %} {% endblock %}
Use url tag from future
Use url tag from future
HTML
bsd-3-clause
trilan/lemon,trilan/lemon,trilan/lemon
html
## Code Before: {% extends "admin/base_site.html" %} {% load i18n dashboard %} {% block main-menu-status %}{% endblock %} {% block content %} <h1>{% trans "Control Panel" %}</h1> <ul class="tools"> <li><a href="{% url admin:dashboard:available_widgets %}">{% trans "Available Widgets" %}</a></li> </ul> {% dashboard %} {% admin_app_list app_list %} {% endblock %} ## Instruction: Use url tag from future ## Code After: {% extends "admin/base_site.html" %} {% load i18n dashboard %} {% load url from future %} {% block main-menu-status %}{% endblock %} {% block content %} <h1>{% trans "Control Panel" %}</h1> <ul class="tools"> <li><a href="{% url 'admin:dashboard:available_widgets' %}">{% trans "Available Widgets" %}</a></li> </ul> {% dashboard %} {% admin_app_list app_list %} {% endblock %}
{% extends "admin/base_site.html" %} {% load i18n dashboard %} + {% load url from future %} {% block main-menu-status %}{% endblock %} {% block content %} <h1>{% trans "Control Panel" %}</h1> <ul class="tools"> - <li><a href="{% url admin:dashboard:available_widgets %}">{% trans "Available Widgets" %}</a></li> + <li><a href="{% url 'admin:dashboard:available_widgets' %}">{% trans "Available Widgets" %}</a></li> ? + + </ul> {% dashboard %} {% admin_app_list app_list %} {% endblock %}
3
0.230769
2
1
5f6ff7335b22a764fb799028192b387d9d9e541e
README.md
README.md
UIButton subclass that allows assigning blocks of CoreGraphics code to draw their content. Great for creating widgets that scale to different screens without having to constantly regenerate PNG's. ![alt tag](https://cloud.githubusercontent.com/assets/193383/14548659/eb65d2de-0286-11e6-9bd9-98d953458b8f.png) ## Create a new Button ```swift let roundedButton = SPLBlockButton() roundedButton.setBlockForState( .Normal ) { (rect, tintColor) in let inset:CGFloat = stroke / 2.0 let drawRect = CGRectInset(rect, inset, inset) let rectPath = UIBezierPath(roundedRect: drawRect, cornerRadius: stroke) rectPath.lineWidth = stroke if (shadowOffset != 0.0) { let context = UIGraphicsGetCurrentContext() let offsetSize = CGSize(width: shadowOffset, height: shadowOffset) CGContextSetShadow(context, offsetSize, 3.0) } tintColor.setStroke() rectPath.stroke() } ``` ## FAQ ### Hey, they're not called blocks in Swift. I originally made this in Obj-C and SPLClosureButton just doesn't roll off the tounge.
UIButton subclass that allows assigning blocks of CoreGraphics code to draw their content. Great for creating widgets that scale to different screens without having to constantly regenerate PNG's. ![alt tag](https://cloud.githubusercontent.com/assets/193383/14549024/300e675e-028a-11e6-97f3-ebe3d1cbd80f.png) ## Create a new Button ```swift let roundedButton = SPLBlockButton() roundedButton.setBlockForState( .Normal ) { (rect, tintColor) in let context = UIGraphicsGetCurrentContext() let stroke:CGFloat = 4.0 let inset:CGFloat = stroke / 2.0 let shadowInset:CGFloat = 4.0 let drawRect = CGRectInset(rect, inset, inset) let rectPath = UIBezierPath(roundedRect: drawRect, cornerRadius: stroke) rectPath.lineWidth = stroke let offsetSize = CGSize(width: shadowOffset, height: shadowOffset) CGContextSetShadow(context, offsetSize, 3.0) tintColor.setStroke() rectPath.stroke() } ``` ## FAQ ### Hey, they're not called blocks in Swift. I originally made this in Obj-C and SPLClosureButton just doesn't roll off the tounge.
Make smaller image in ready.md
Make smaller image in ready.md
Markdown
mit
SkilpaddeLabs/SPLBlockButton
markdown
## Code Before: UIButton subclass that allows assigning blocks of CoreGraphics code to draw their content. Great for creating widgets that scale to different screens without having to constantly regenerate PNG's. ![alt tag](https://cloud.githubusercontent.com/assets/193383/14548659/eb65d2de-0286-11e6-9bd9-98d953458b8f.png) ## Create a new Button ```swift let roundedButton = SPLBlockButton() roundedButton.setBlockForState( .Normal ) { (rect, tintColor) in let inset:CGFloat = stroke / 2.0 let drawRect = CGRectInset(rect, inset, inset) let rectPath = UIBezierPath(roundedRect: drawRect, cornerRadius: stroke) rectPath.lineWidth = stroke if (shadowOffset != 0.0) { let context = UIGraphicsGetCurrentContext() let offsetSize = CGSize(width: shadowOffset, height: shadowOffset) CGContextSetShadow(context, offsetSize, 3.0) } tintColor.setStroke() rectPath.stroke() } ``` ## FAQ ### Hey, they're not called blocks in Swift. I originally made this in Obj-C and SPLClosureButton just doesn't roll off the tounge. ## Instruction: Make smaller image in ready.md ## Code After: UIButton subclass that allows assigning blocks of CoreGraphics code to draw their content. Great for creating widgets that scale to different screens without having to constantly regenerate PNG's. ![alt tag](https://cloud.githubusercontent.com/assets/193383/14549024/300e675e-028a-11e6-97f3-ebe3d1cbd80f.png) ## Create a new Button ```swift let roundedButton = SPLBlockButton() roundedButton.setBlockForState( .Normal ) { (rect, tintColor) in let context = UIGraphicsGetCurrentContext() let stroke:CGFloat = 4.0 let inset:CGFloat = stroke / 2.0 let shadowInset:CGFloat = 4.0 let drawRect = CGRectInset(rect, inset, inset) let rectPath = UIBezierPath(roundedRect: drawRect, cornerRadius: stroke) rectPath.lineWidth = stroke let offsetSize = CGSize(width: shadowOffset, height: shadowOffset) CGContextSetShadow(context, offsetSize, 3.0) tintColor.setStroke() rectPath.stroke() } ``` ## FAQ ### Hey, they're not called blocks in Swift. I originally made this in Obj-C and SPLClosureButton just doesn't roll off the tounge.
UIButton subclass that allows assigning blocks of CoreGraphics code to draw their content. Great for creating widgets that scale to different screens without having to constantly regenerate PNG's. - ![alt tag](https://cloud.githubusercontent.com/assets/193383/14548659/eb65d2de-0286-11e6-9bd9-98d953458b8f.png) ? ^ --------- ^ --- ^^^^^^^^^ + ![alt tag](https://cloud.githubusercontent.com/assets/193383/14549024/300e675e-028a-11e6-97f3-ebe3d1cbd80f.png) ? ^^^^^^^^^ + ^ +++++++++++ ^ ## Create a new Button ```swift let roundedButton = SPLBlockButton() roundedButton.setBlockForState( .Normal ) { (rect, tintColor) in + let context = UIGraphicsGetCurrentContext() - let inset:CGFloat = stroke / 2.0 - let drawRect = CGRectInset(rect, inset, inset) - let rectPath = UIBezierPath(roundedRect: drawRect, cornerRadius: stroke) - rectPath.lineWidth = stroke - if (shadowOffset != 0.0) { - let context = UIGraphicsGetCurrentContext() + let stroke:CGFloat = 4.0 + let inset:CGFloat = stroke / 2.0 + let shadowInset:CGFloat = 4.0 + let drawRect = CGRectInset(rect, inset, inset) + let rectPath = UIBezierPath(roundedRect: drawRect, cornerRadius: stroke) + rectPath.lineWidth = stroke + - let offsetSize = CGSize(width: shadowOffset, height: shadowOffset) + let offsetSize = CGSize(width: shadowOffset, height: shadowOffset) ? ++++ - CGContextSetShadow(context, offsetSize, 3.0) + CGContextSetShadow(context, offsetSize, 3.0) ? ++++ + + tintColor.setStroke() + rectPath.stroke() } - tintColor.setStroke() - rectPath.stroke() - } ``` - ## FAQ ### Hey, they're not called blocks in Swift. I originally made this in Obj-C and SPLClosureButton just doesn't roll off the tounge.
27
0.771429
14
13
d0e6b393b2e758790232a291757861f46f3992f3
public/less/tweaks.less
public/less/tweaks.less
@import url('https://fonts.googleapis.com/css?family=Raleway'); html { position: relative; min-height: 100%; } p, li, dt, dd, td, th, details, button, form, a, div, details { font-family: Raleway, sans-serif; } h1 { margin-top: 0; } img { max-width: 100%; height: auto; border: none; } header.navbar.navbar-inverse { background-color: @brand-primary; } select.form-control.styled-select { appearance: none; -moz-appearance: none; -webkit-appearance: none; background: transparent url('/images/dropdown.png') right @padding-small-horizontal center no-repeat; padding-right: @padding-small-horizontal * 2; } select.form-control.styled-select::-ms-expand { display: none; }
@import url('https://fonts.googleapis.com/css?family=Raleway'); html { position: relative; min-height: 100%; } p, li, dt, dd, td, th, details, button, form, a, div, details { font-family: Raleway, sans-serif; } h1 { margin-top: 0; } img { max-width: 100%; height: auto; border: none; } header.navbar.navbar-inverse { background-color: @brand-primary; } select.form-control.styled-select { appearance: none; -moz-appearance: none; -webkit-appearance: none; background: transparent url('/images/dropdown.png') right @padding-small-horizontal center no-repeat; padding-left: @padding-small-horizontal; padding-right: @padding-small-horizontal * 2; } select.form-control.styled-select::-ms-expand { display: none; }
Fix padding issue in `styled-select`.
Fix padding issue in `styled-select`.
Less
mit
rwahs/research-frontend,rwahs/research-frontend
less
## Code Before: @import url('https://fonts.googleapis.com/css?family=Raleway'); html { position: relative; min-height: 100%; } p, li, dt, dd, td, th, details, button, form, a, div, details { font-family: Raleway, sans-serif; } h1 { margin-top: 0; } img { max-width: 100%; height: auto; border: none; } header.navbar.navbar-inverse { background-color: @brand-primary; } select.form-control.styled-select { appearance: none; -moz-appearance: none; -webkit-appearance: none; background: transparent url('/images/dropdown.png') right @padding-small-horizontal center no-repeat; padding-right: @padding-small-horizontal * 2; } select.form-control.styled-select::-ms-expand { display: none; } ## Instruction: Fix padding issue in `styled-select`. ## Code After: @import url('https://fonts.googleapis.com/css?family=Raleway'); html { position: relative; min-height: 100%; } p, li, dt, dd, td, th, details, button, form, a, div, details { font-family: Raleway, sans-serif; } h1 { margin-top: 0; } img { max-width: 100%; height: auto; border: none; } header.navbar.navbar-inverse { background-color: @brand-primary; } select.form-control.styled-select { appearance: none; -moz-appearance: none; -webkit-appearance: none; background: transparent url('/images/dropdown.png') right @padding-small-horizontal center no-repeat; padding-left: @padding-small-horizontal; padding-right: @padding-small-horizontal * 2; } select.form-control.styled-select::-ms-expand { display: none; }
@import url('https://fonts.googleapis.com/css?family=Raleway'); html { position: relative; min-height: 100%; } p, li, dt, dd, td, th, details, button, form, a, div, details { font-family: Raleway, sans-serif; } h1 { margin-top: 0; } img { max-width: 100%; height: auto; border: none; } header.navbar.navbar-inverse { background-color: @brand-primary; } select.form-control.styled-select { appearance: none; -moz-appearance: none; -webkit-appearance: none; background: transparent url('/images/dropdown.png') right @padding-small-horizontal center no-repeat; + padding-left: @padding-small-horizontal; padding-right: @padding-small-horizontal * 2; } select.form-control.styled-select::-ms-expand { display: none; }
1
0.027778
1
0
576f95a01a81b50d305162c9f935a18fc4c51bec
Readme.md
Readme.md
Rack::Csrf is my personal version of CSRF for Rack. It implements only a skip list where everything else must be run through the validator. It does not allow you to be explicit in what you validate, only explicit in what you do not validate. The goal is to increase security and make you think about what you are doing before you decide to do it.
Rack::Csrf is my personal version of CSRF for Rack. It implements only a skip list where everything else must be run through the validator. It does not allow you to be explicit in what you validate, only explicit in what you do not validate. The goal is to increase security and make you think about what you are doing before you decide to do it. # Usage Rack::Csrf has a default output of "Denied", the example belows shows you passing your own caller for us. ```ruby require "sinatra/base" require "rack/csrf" require "logger" class MyApp < Sinatra::Base set(:logger, Logger.new($stdout)) CSRF_SKIP_LIST = [ "/my-path", "POST:/my-other-path" ] class << self def denied!(exception) MyApp.logger.error { exception } [403, {}, ["Nice try asshole"]] end end post "/" do puts "Hello World" end helpers Rack::Csrf::Helpers use Rack::Csrf, skip: CSRF_SKIP_LIST, render_with: proc { |*a| denied!(*a) } end ``` # Options Defaults: [lib/rack-csrf#L6](https://github.com/envygeeks/rack-csrf/blob/master/lib/rack-csrf.rb#L6)<br /> `Rack::Csrf.header` or `:header` The header key<br /> `Rack::Csrf.key` or `:key` -- The cookie key<br /> `Rack::Csrf.field` or `:field` -- The auth_field token (meta and form)<br /> `Rack::Csrf.raise` or `:raise` -- Raise so it can trickle down to catch `Rack::Csrf::CSRFFailedToValidateError` <br /><br /> Skip supports an array with values as "METHOD:/url" or "/url".<br /><br /> If you chose not to raise you can optionally set `:render_with` with a callback. The callback will always recieve the `env` for you to call `Rack::Lint` or `Sinatra::Request` yourself. It is done this way so that people who wish to log can log since I don't accept a logger directly, you might also want to do other shit that I don't care about, so rather than giving a shit I might as well just accept a callback and let you do whatever the hell you want. # Helpers Default opts: [lib/rack-csrf#L15](https://github.com/envygeeks/rack-csrf/blob/master/lib/rack-csrf.rb#L15) ```ruby csrf_meta_tag csrf_form_tag(tag: "div") ```
Update readme.md and provide examples.
Update readme.md and provide examples.
Markdown
mit
envygeeks/ruby-rack-simple_csrf
markdown
## Code Before: Rack::Csrf is my personal version of CSRF for Rack. It implements only a skip list where everything else must be run through the validator. It does not allow you to be explicit in what you validate, only explicit in what you do not validate. The goal is to increase security and make you think about what you are doing before you decide to do it. ## Instruction: Update readme.md and provide examples. ## Code After: Rack::Csrf is my personal version of CSRF for Rack. It implements only a skip list where everything else must be run through the validator. It does not allow you to be explicit in what you validate, only explicit in what you do not validate. The goal is to increase security and make you think about what you are doing before you decide to do it. # Usage Rack::Csrf has a default output of "Denied", the example belows shows you passing your own caller for us. ```ruby require "sinatra/base" require "rack/csrf" require "logger" class MyApp < Sinatra::Base set(:logger, Logger.new($stdout)) CSRF_SKIP_LIST = [ "/my-path", "POST:/my-other-path" ] class << self def denied!(exception) MyApp.logger.error { exception } [403, {}, ["Nice try asshole"]] end end post "/" do puts "Hello World" end helpers Rack::Csrf::Helpers use Rack::Csrf, skip: CSRF_SKIP_LIST, render_with: proc { |*a| denied!(*a) } end ``` # Options Defaults: [lib/rack-csrf#L6](https://github.com/envygeeks/rack-csrf/blob/master/lib/rack-csrf.rb#L6)<br /> `Rack::Csrf.header` or `:header` The header key<br /> `Rack::Csrf.key` or `:key` -- The cookie key<br /> `Rack::Csrf.field` or `:field` -- The auth_field token (meta and form)<br /> `Rack::Csrf.raise` or `:raise` -- Raise so it can trickle down to catch `Rack::Csrf::CSRFFailedToValidateError` <br /><br /> Skip supports an array with values as "METHOD:/url" or "/url".<br /><br /> If you chose not to raise you can optionally set `:render_with` with a callback. The callback will always recieve the `env` for you to call `Rack::Lint` or `Sinatra::Request` yourself. It is done this way so that people who wish to log can log since I don't accept a logger directly, you might also want to do other shit that I don't care about, so rather than giving a shit I might as well just accept a callback and let you do whatever the hell you want. # Helpers Default opts: [lib/rack-csrf#L15](https://github.com/envygeeks/rack-csrf/blob/master/lib/rack-csrf.rb#L15) ```ruby csrf_meta_tag csrf_form_tag(tag: "div") ```
Rack::Csrf is my personal version of CSRF for Rack. It implements only a skip list where everything else must be run through the validator. It does not allow you to be explicit in what you validate, only explicit in what you do not validate. The goal is to increase security and make you think about what you are doing before you decide to do it. + + # Usage + + Rack::Csrf has a default output of "Denied", the example belows shows you passing your own caller for us. + + ```ruby + require "sinatra/base" + require "rack/csrf" + require "logger" + + class MyApp < Sinatra::Base + set(:logger, Logger.new($stdout)) + + CSRF_SKIP_LIST = [ + "/my-path", + "POST:/my-other-path" + ] + + class << self + def denied!(exception) + MyApp.logger.error { exception } + [403, {}, ["Nice try asshole"]] + end + end + + post "/" do + puts "Hello World" + end + + helpers Rack::Csrf::Helpers + use Rack::Csrf, skip: CSRF_SKIP_LIST, render_with: proc { |*a| denied!(*a) } + end + ``` + + # Options + + Defaults: [lib/rack-csrf#L6](https://github.com/envygeeks/rack-csrf/blob/master/lib/rack-csrf.rb#L6)<br /> + `Rack::Csrf.header` or `:header` The header key<br /> + `Rack::Csrf.key` or `:key` -- The cookie key<br /> + `Rack::Csrf.field` or `:field` -- The auth_field token (meta and form)<br /> + `Rack::Csrf.raise` or `:raise` -- Raise so it can trickle down to catch `Rack::Csrf::CSRFFailedToValidateError` + <br /><br /> + Skip supports an array with values as "METHOD:/url" or "/url".<br /><br /> + + If you chose not to raise you can optionally set `:render_with` with a callback. The callback will always recieve the `env` for you to call `Rack::Lint` or `Sinatra::Request` yourself. It is done this way so that people who wish to log can log since I don't accept a logger directly, you might also want to do other shit that I don't care about, so rather than giving a shit I might as well just accept a callback and let you do whatever the hell you want. + + # Helpers + + Default opts: [lib/rack-csrf#L15](https://github.com/envygeeks/rack-csrf/blob/master/lib/rack-csrf.rb#L15) + + ```ruby + csrf_meta_tag + csrf_form_tag(tag: "div") + ```
54
27
54
0
df8efcc0f86fa9a311ec444da7e6488de2e86d8a
tests/test_repr.py
tests/test_repr.py
import pytest import numpy as np from parameters import T_VALUES, KPT @pytest.mark.parametrize('t', T_VALUES) def test_repr_reload(t, get_model): m1 = get_model(*t) m2 = eval(repr(m1)) for k in KPT: assert np.isclose(m1.hamilton(k), m2.hamilton(k)).all()
import pytest import tbmodels # pylint: disable=unused-import import numpy as np from tbmodels._ptools.sparse_matrix import csr # pylint: disable=unused-import from parameters import T_VALUES, KPT @pytest.mark.parametrize('t', T_VALUES) def test_repr_reload(t, get_model): m1 = get_model(*t) m2 = eval(repr(m1)) for k in KPT: assert np.isclose(m1.hamilton(k), m2.hamilton(k)).all()
Add back imports to repr test.
Add back imports to repr test.
Python
apache-2.0
Z2PackDev/TBmodels,Z2PackDev/TBmodels
python
## Code Before: import pytest import numpy as np from parameters import T_VALUES, KPT @pytest.mark.parametrize('t', T_VALUES) def test_repr_reload(t, get_model): m1 = get_model(*t) m2 = eval(repr(m1)) for k in KPT: assert np.isclose(m1.hamilton(k), m2.hamilton(k)).all() ## Instruction: Add back imports to repr test. ## Code After: import pytest import tbmodels # pylint: disable=unused-import import numpy as np from tbmodels._ptools.sparse_matrix import csr # pylint: disable=unused-import from parameters import T_VALUES, KPT @pytest.mark.parametrize('t', T_VALUES) def test_repr_reload(t, get_model): m1 = get_model(*t) m2 = eval(repr(m1)) for k in KPT: assert np.isclose(m1.hamilton(k), m2.hamilton(k)).all()
import pytest + import tbmodels # pylint: disable=unused-import import numpy as np + + from tbmodels._ptools.sparse_matrix import csr # pylint: disable=unused-import from parameters import T_VALUES, KPT @pytest.mark.parametrize('t', T_VALUES) def test_repr_reload(t, get_model): m1 = get_model(*t) m2 = eval(repr(m1)) for k in KPT: assert np.isclose(m1.hamilton(k), m2.hamilton(k)).all()
3
0.214286
3
0
61fe9a201af1b54da9eb4d2c748698c9e1f1ef38
lib/ex_twilio/resources/notification.ex
lib/ex_twilio/resources/notification.ex
defmodule ExTwilio.Notification do @moduledoc """ Represents an Notification resource in the Twilio API. - [Twilio docs](https://www.twilio.com/docs/api/rest/notifications) """ defstruct sid: nil, date_created: nil, date_updated: nil, account_sid: nil, call_sid: nil, api_version: nil, log: nil, error_code: nil, more_info: nil, message_text: nil, message_date: nil, request_url: nil, request_method: nil, request_variables: nil, response_headers: nil, response_body: nil, uri: nil use ExTwilio.Resource, import: [:stream, :all, :find, :destroy] def parents, do: [:account, :call] end
defmodule ExTwilio.Notification do @moduledoc """ Represents an Notification resource in the Twilio API. - [Twilio docs](https://www.twilio.com/docs/notify/api/notification-resource) """ defstruct sid: nil, date_created: nil, date_updated: nil, account_sid: nil, call_sid: nil, api_version: nil, log: nil, error_code: nil, more_info: nil, message_text: nil, message_date: nil, request_url: nil, request_method: nil, request_variables: nil, response_headers: nil, response_body: nil, uri: nil use ExTwilio.Resource, import: [:stream, :all, :find, :destroy] def parents, do: [:account, :call] end
Update broken link to Notification API
Update broken link to Notification API
Elixir
mit
danielberkompas/ex_twilio,danielberkompas/ex_twilio
elixir
## Code Before: defmodule ExTwilio.Notification do @moduledoc """ Represents an Notification resource in the Twilio API. - [Twilio docs](https://www.twilio.com/docs/api/rest/notifications) """ defstruct sid: nil, date_created: nil, date_updated: nil, account_sid: nil, call_sid: nil, api_version: nil, log: nil, error_code: nil, more_info: nil, message_text: nil, message_date: nil, request_url: nil, request_method: nil, request_variables: nil, response_headers: nil, response_body: nil, uri: nil use ExTwilio.Resource, import: [:stream, :all, :find, :destroy] def parents, do: [:account, :call] end ## Instruction: Update broken link to Notification API ## Code After: defmodule ExTwilio.Notification do @moduledoc """ Represents an Notification resource in the Twilio API. - [Twilio docs](https://www.twilio.com/docs/notify/api/notification-resource) """ defstruct sid: nil, date_created: nil, date_updated: nil, account_sid: nil, call_sid: nil, api_version: nil, log: nil, error_code: nil, more_info: nil, message_text: nil, message_date: nil, request_url: nil, request_method: nil, request_variables: nil, response_headers: nil, response_body: nil, uri: nil use ExTwilio.Resource, import: [:stream, :all, :find, :destroy] def parents, do: [:account, :call] end
defmodule ExTwilio.Notification do @moduledoc """ Represents an Notification resource in the Twilio API. - - [Twilio docs](https://www.twilio.com/docs/api/rest/notifications) ? ----- + - [Twilio docs](https://www.twilio.com/docs/notify/api/notification-resource) ? +++++++ +++ +++++ """ defstruct sid: nil, date_created: nil, date_updated: nil, account_sid: nil, call_sid: nil, api_version: nil, log: nil, error_code: nil, more_info: nil, message_text: nil, message_date: nil, request_url: nil, request_method: nil, request_variables: nil, response_headers: nil, response_body: nil, uri: nil use ExTwilio.Resource, import: [:stream, :all, :find, :destroy] def parents, do: [:account, :call] end
2
0.068966
1
1
8a6ef1a837929cd1b64550c0a4e8eb8b5cf3f688
source/jquery.singlemask.js
source/jquery.singlemask.js
/* Character mask for jQuery. https://github.com/sobrinho/jquery.singlemask Copyright (c) 2011-2013 Gabriel Sobrinho (http://gabrielsobrinho.com/). Released under the MIT license */ (function ($) { function getPasteEvent() { var el = document.createElement('input'), name = 'onpaste'; el.setAttribute(name, ''); return (typeof el[name] === 'function') ? 'paste' : 'input'; } var pasteEventName = getPasteEvent(); $.fn.singlemask = function (mask) { $(this).keydown(function (event) { var key = event.keyCode; if (key < 16 || (key > 16 && key < 32) || (key > 32 && key < 41)) { return; } return String.fromCharCode(key).match(mask); }).bind(pasteEventName, function () { this.value = $.grep(this.value, function (character) { return character.match(mask); }).join(''); }); } })(jQuery);
/* Character mask for jQuery. https://github.com/sobrinho/jquery.singlemask Copyright (c) 2011-2013 Gabriel Sobrinho (http://gabrielsobrinho.com/). Released under the MIT license */ (function ($) { function getPasteEvent() { var el = document.createElement('input'), name = 'onpaste'; el.setAttribute(name, ''); return (typeof el[name] === 'function') ? 'paste' : 'input'; } var pasteEventName = getPasteEvent(); $.fn.singlemask = function (mask) { $(this).keydown(function (event) { var key = event.keyCode; if (key < 16 || (key > 16 && key < 32) || (key > 32 && key < 41)) { return; } // Numpad key numbers starts on 96 (0) and ends on 105 (9) // Somehow the String.fromCharCode doesn't knows that // Subtracting 48 we have the 'standard' number code if (key >= 96 && key <= 105) { key = key - 48; } return String.fromCharCode(key).match(mask); }).bind(pasteEventName, function () { this.value = $.grep(this.value, function (character) { return character.match(mask); }).join(''); }); } })(jQuery);
Fix problem when using the numpad
Fix problem when using the numpad The numpad numbers' code are different from the standard numbers. The code number starts in 96 (number 0) and ends in 105 (number 9). The problem is in the String.fromCharCode function because it doesn't recognize the numpad code numbers. To fix that this commit was made to calculate the 'correct' key code to be used in the String.fromCharCode function. Keyboard keys code: http://www.cambiaresearch.com/articles/15/javascript-char-codes-key-codes
JavaScript
mit
sobrinho/jquery.singlemask
javascript
## Code Before: /* Character mask for jQuery. https://github.com/sobrinho/jquery.singlemask Copyright (c) 2011-2013 Gabriel Sobrinho (http://gabrielsobrinho.com/). Released under the MIT license */ (function ($) { function getPasteEvent() { var el = document.createElement('input'), name = 'onpaste'; el.setAttribute(name, ''); return (typeof el[name] === 'function') ? 'paste' : 'input'; } var pasteEventName = getPasteEvent(); $.fn.singlemask = function (mask) { $(this).keydown(function (event) { var key = event.keyCode; if (key < 16 || (key > 16 && key < 32) || (key > 32 && key < 41)) { return; } return String.fromCharCode(key).match(mask); }).bind(pasteEventName, function () { this.value = $.grep(this.value, function (character) { return character.match(mask); }).join(''); }); } })(jQuery); ## Instruction: Fix problem when using the numpad The numpad numbers' code are different from the standard numbers. The code number starts in 96 (number 0) and ends in 105 (number 9). The problem is in the String.fromCharCode function because it doesn't recognize the numpad code numbers. To fix that this commit was made to calculate the 'correct' key code to be used in the String.fromCharCode function. Keyboard keys code: http://www.cambiaresearch.com/articles/15/javascript-char-codes-key-codes ## Code After: /* Character mask for jQuery. https://github.com/sobrinho/jquery.singlemask Copyright (c) 2011-2013 Gabriel Sobrinho (http://gabrielsobrinho.com/). Released under the MIT license */ (function ($) { function getPasteEvent() { var el = document.createElement('input'), name = 'onpaste'; el.setAttribute(name, ''); return (typeof el[name] === 'function') ? 'paste' : 'input'; } var pasteEventName = getPasteEvent(); $.fn.singlemask = function (mask) { $(this).keydown(function (event) { var key = event.keyCode; if (key < 16 || (key > 16 && key < 32) || (key > 32 && key < 41)) { return; } // Numpad key numbers starts on 96 (0) and ends on 105 (9) // Somehow the String.fromCharCode doesn't knows that // Subtracting 48 we have the 'standard' number code if (key >= 96 && key <= 105) { key = key - 48; } return String.fromCharCode(key).match(mask); }).bind(pasteEventName, function () { this.value = $.grep(this.value, function (character) { return character.match(mask); }).join(''); }); } })(jQuery);
/* Character mask for jQuery. https://github.com/sobrinho/jquery.singlemask Copyright (c) 2011-2013 Gabriel Sobrinho (http://gabrielsobrinho.com/). Released under the MIT license */ (function ($) { function getPasteEvent() { var el = document.createElement('input'), name = 'onpaste'; el.setAttribute(name, ''); return (typeof el[name] === 'function') ? 'paste' : 'input'; } var pasteEventName = getPasteEvent(); $.fn.singlemask = function (mask) { $(this).keydown(function (event) { var key = event.keyCode; if (key < 16 || (key > 16 && key < 32) || (key > 32 && key < 41)) { return; } + // Numpad key numbers starts on 96 (0) and ends on 105 (9) + // Somehow the String.fromCharCode doesn't knows that + // Subtracting 48 we have the 'standard' number code + if (key >= 96 && key <= 105) { + key = key - 48; + } + return String.fromCharCode(key).match(mask); }).bind(pasteEventName, function () { this.value = $.grep(this.value, function (character) { return character.match(mask); }).join(''); }); } })(jQuery);
7
0.205882
7
0
6732c4705caf7816423bc42c6f9b7db9079e61d6
routes/login/index.js
routes/login/index.js
var express = require('express'); var router = express.Router(); // Login a user with basic auth router.post('/', function (req, res, next) {}); module.exports = router;
var express = require('express'); var router = express.Router(); var auth = require('../../utils/auth'); var _ = require('lodash'); var JsonDB = require('node-json-db'); var crypto = require('crypto'); // Login a user with basic auth router.post('/', auth.basic, function (req, res, next) { var db = new JsonDB('db', false, true); var users = db.getData('/users'); function sendError() { res.status(500).json({ success: false, message: 'Unable to authenticate user.' }); } // Find the auth user to update last login var i = _.findIndex(users, {username: req.user.username}); crypto.randomBytes(16, function(err, buf) { if (!err) { var ret = _.attempt(db.push.bind(db), '/users['+i+']', { last_login: _.now(), token: buf.toString('hex') }, false); if (!_.isError(ret)) { res.json({ success: true, message: 'Successfully authenticated user.', token: buf.toString('hex') }); } else { sendError(); } } else { sendError(); } }); }); module.exports = router;
Add section 6.1 code to provide login for users
Add section 6.1 code to provide login for users
JavaScript
mit
adamsea/recipes-api
javascript
## Code Before: var express = require('express'); var router = express.Router(); // Login a user with basic auth router.post('/', function (req, res, next) {}); module.exports = router; ## Instruction: Add section 6.1 code to provide login for users ## Code After: var express = require('express'); var router = express.Router(); var auth = require('../../utils/auth'); var _ = require('lodash'); var JsonDB = require('node-json-db'); var crypto = require('crypto'); // Login a user with basic auth router.post('/', auth.basic, function (req, res, next) { var db = new JsonDB('db', false, true); var users = db.getData('/users'); function sendError() { res.status(500).json({ success: false, message: 'Unable to authenticate user.' }); } // Find the auth user to update last login var i = _.findIndex(users, {username: req.user.username}); crypto.randomBytes(16, function(err, buf) { if (!err) { var ret = _.attempt(db.push.bind(db), '/users['+i+']', { last_login: _.now(), token: buf.toString('hex') }, false); if (!_.isError(ret)) { res.json({ success: true, message: 'Successfully authenticated user.', token: buf.toString('hex') }); } else { sendError(); } } else { sendError(); } }); }); module.exports = router;
var express = require('express'); var router = express.Router(); + var auth = require('../../utils/auth'); + var _ = require('lodash'); + var JsonDB = require('node-json-db'); + var crypto = require('crypto'); // Login a user with basic auth - router.post('/', function (req, res, next) {}); ? --- + router.post('/', auth.basic, function (req, res, next) { ? ++++++++++++ + var db = new JsonDB('db', false, true); + var users = db.getData('/users'); + + function sendError() { + res.status(500).json({ + success: false, + message: 'Unable to authenticate user.' + }); + } + + // Find the auth user to update last login + var i = _.findIndex(users, {username: req.user.username}); + crypto.randomBytes(16, function(err, buf) { + if (!err) { + var ret = _.attempt(db.push.bind(db), '/users['+i+']', { + last_login: _.now(), + token: buf.toString('hex') + }, false); + + if (!_.isError(ret)) { + res.json({ + success: true, + message: 'Successfully authenticated user.', + token: buf.toString('hex') + }); + } + else { + sendError(); + } + } + else { + sendError(); + } + }); + }); module.exports = router;
41
5.857143
40
1
4873469225a9d0b2cfca473daadd168a17271c58
lib/pay/engine.rb
lib/pay/engine.rb
module Pay class Engine < ::Rails::Engine isolate_namespace Pay config.autoload_paths += Dir["#{config.root}/lib/**/"] initializer 'pay.processors' do # Include processor backends if defined? Stripe Dir[File.join(__dir__, 'pay/stripe', '**', '*.rb')].each { |file| require file } Pay.charge_model.include Pay::Stripe::Charge Pay.subscription_model.include Pay::Stripe::Subscription Pay.user_model.include Pay::Stripe::Billable Pay::Stripe::Api.set_api_keys end if defined? Braintree Dir[File.join(__dir__, 'pay/braintree', '**', '*.rb')].each { |file| require file } Pay.charge_model.include Pay::Braintree::Charge Pay.subscription_model.include Pay::Braintree::Subscription Pay.user_model.include Pay::Braintree::Billable Pay::Braintree::Api.set_api_keys end if defined?(Receipts::Receipt) Pay.charge_model.include Pay::Receipts end end end end
module Pay class Engine < ::Rails::Engine isolate_namespace Pay config.autoload_paths += Dir["#{config.root}/lib/**/"] initializer 'pay.processors' do ActiveSupport::Reloader.to_prepare do # Include processor backends if defined? Stripe Dir[File.join(__dir__, 'pay/stripe', '**', '*.rb')].each { |file| require file } Pay.charge_model.include Pay::Stripe::Charge Pay.subscription_model.include Pay::Stripe::Subscription Pay.user_model.include Pay::Stripe::Billable Pay::Stripe::Api.set_api_keys end if defined? Braintree Dir[File.join(__dir__, 'pay/braintree', '**', '*.rb')].each { |file| require file } Pay.charge_model.include Pay::Braintree::Charge Pay.subscription_model.include Pay::Braintree::Subscription Pay.user_model.include Pay::Braintree::Billable Pay::Braintree::Api.set_api_keys end if defined?(Receipts::Receipt) Pay.charge_model.include Pay::Receipts end end end end end
Use ActiveSupport Reloader to continuously include modules on reloads
Use ActiveSupport Reloader to continuously include modules on reloads
Ruby
mit
jasoncharnes/pay,jasoncharnes/pay,jasoncharnes/pay
ruby
## Code Before: module Pay class Engine < ::Rails::Engine isolate_namespace Pay config.autoload_paths += Dir["#{config.root}/lib/**/"] initializer 'pay.processors' do # Include processor backends if defined? Stripe Dir[File.join(__dir__, 'pay/stripe', '**', '*.rb')].each { |file| require file } Pay.charge_model.include Pay::Stripe::Charge Pay.subscription_model.include Pay::Stripe::Subscription Pay.user_model.include Pay::Stripe::Billable Pay::Stripe::Api.set_api_keys end if defined? Braintree Dir[File.join(__dir__, 'pay/braintree', '**', '*.rb')].each { |file| require file } Pay.charge_model.include Pay::Braintree::Charge Pay.subscription_model.include Pay::Braintree::Subscription Pay.user_model.include Pay::Braintree::Billable Pay::Braintree::Api.set_api_keys end if defined?(Receipts::Receipt) Pay.charge_model.include Pay::Receipts end end end end ## Instruction: Use ActiveSupport Reloader to continuously include modules on reloads ## Code After: module Pay class Engine < ::Rails::Engine isolate_namespace Pay config.autoload_paths += Dir["#{config.root}/lib/**/"] initializer 'pay.processors' do ActiveSupport::Reloader.to_prepare do # Include processor backends if defined? Stripe Dir[File.join(__dir__, 'pay/stripe', '**', '*.rb')].each { |file| require file } Pay.charge_model.include Pay::Stripe::Charge Pay.subscription_model.include Pay::Stripe::Subscription Pay.user_model.include Pay::Stripe::Billable Pay::Stripe::Api.set_api_keys end if defined? Braintree Dir[File.join(__dir__, 'pay/braintree', '**', '*.rb')].each { |file| require file } Pay.charge_model.include Pay::Braintree::Charge Pay.subscription_model.include Pay::Braintree::Subscription Pay.user_model.include Pay::Braintree::Billable Pay::Braintree::Api.set_api_keys end if defined?(Receipts::Receipt) Pay.charge_model.include Pay::Receipts end end end end end
module Pay class Engine < ::Rails::Engine isolate_namespace Pay config.autoload_paths += Dir["#{config.root}/lib/**/"] + initializer 'pay.processors' do + ActiveSupport::Reloader.to_prepare do + # Include processor backends + if defined? Stripe + Dir[File.join(__dir__, 'pay/stripe', '**', '*.rb')].each { |file| require file } + Pay.charge_model.include Pay::Stripe::Charge + Pay.subscription_model.include Pay::Stripe::Subscription + Pay.user_model.include Pay::Stripe::Billable - initializer 'pay.processors' do - # Include processor backends - if defined? Stripe - Dir[File.join(__dir__, 'pay/stripe', '**', '*.rb')].each { |file| require file } + Pay::Stripe::Api.set_api_keys + end - Pay.charge_model.include Pay::Stripe::Charge - Pay.subscription_model.include Pay::Stripe::Subscription - Pay.user_model.include Pay::Stripe::Billable - Pay::Stripe::Api.set_api_keys - end + if defined? Braintree + Dir[File.join(__dir__, 'pay/braintree', '**', '*.rb')].each { |file| require file } - if defined? Braintree - Dir[File.join(__dir__, 'pay/braintree', '**', '*.rb')].each { |file| require file } + Pay.charge_model.include Pay::Braintree::Charge + Pay.subscription_model.include Pay::Braintree::Subscription + Pay.user_model.include Pay::Braintree::Billable + Pay::Braintree::Api.set_api_keys + end - Pay.charge_model.include Pay::Braintree::Charge - Pay.subscription_model.include Pay::Braintree::Subscription - Pay.user_model.include Pay::Braintree::Billable - Pay::Braintree::Api.set_api_keys - end - - if defined?(Receipts::Receipt) + if defined?(Receipts::Receipt) ? ++ - Pay.charge_model.include Pay::Receipts + Pay.charge_model.include Pay::Receipts ? ++ + end end end end end
39
1.114286
20
19
ce1c5ee0155b47403c63232a5e073929e6243897
ruby/ext/bson/native.c
ruby/ext/bson/native.c
static VALUE rb_integer_to_bson(VALUE self) { const int32_t v = NUM2INT(self); const char bytes[4] = { v & 255, (v >> 8) & 255, (v >> 16) & 255, (v >> 24) & 255 }; return rb_str_new(bytes, 4); } void Init_native() { VALUE bson = rb_const_get(rb_cObject, rb_intern("BSON")); VALUE integer = rb_const_get(bson, rb_intern("Integer")); rb_remove_method(integer, "to_bson"); rb_define_method(integer, "to_bson", rb_integer_to_bson, 0); }
static VALUE rb_integer_to_bson(VALUE self) { /* const int32_t v = NUM2INT(self); */ /* const char bytes[4] = { v & 255, (v >> 8) & 255, (v >> 16) & 255, (v >> 24) & 255 }; */ /* return rb_str_new(bytes, 4); */ } void Init_native() { /* VALUE bson = rb_const_get(rb_cObject, rb_intern("BSON")); */ /* VALUE integer = rb_const_get(bson, rb_intern("Integer")); */ /* rb_remove_method(integer, "to_bson"); */ /* rb_define_method(integer, "to_bson", rb_integer_to_bson, 0); */ }
Comment out the c for now
Comment out the c for now
C
apache-2.0
johnsimon/bson-ruby,agis-/bson-ruby,hudon/bson-ruby,mongodb/bson-ruby,mongodb/bson-ruby,mongodb/bson-ruby,estolfo/bson-ruby,ukblewis/bson-ruby,agis-/bson-ruby,johnsimon/bson-ruby,hudon/bson-ruby,ukblewis/bson-ruby,estolfo/bson-ruby,agis-/bson-ruby,ukblewis/bson-ruby,mongodb/bson-ruby,estolfo/bson-ruby,ukblewis/bson-ruby,hudon/bson-ruby,johnsimon/bson-ruby,estolfo/bson-ruby
c
## Code Before: static VALUE rb_integer_to_bson(VALUE self) { const int32_t v = NUM2INT(self); const char bytes[4] = { v & 255, (v >> 8) & 255, (v >> 16) & 255, (v >> 24) & 255 }; return rb_str_new(bytes, 4); } void Init_native() { VALUE bson = rb_const_get(rb_cObject, rb_intern("BSON")); VALUE integer = rb_const_get(bson, rb_intern("Integer")); rb_remove_method(integer, "to_bson"); rb_define_method(integer, "to_bson", rb_integer_to_bson, 0); } ## Instruction: Comment out the c for now ## Code After: static VALUE rb_integer_to_bson(VALUE self) { /* const int32_t v = NUM2INT(self); */ /* const char bytes[4] = { v & 255, (v >> 8) & 255, (v >> 16) & 255, (v >> 24) & 255 }; */ /* return rb_str_new(bytes, 4); */ } void Init_native() { /* VALUE bson = rb_const_get(rb_cObject, rb_intern("BSON")); */ /* VALUE integer = rb_const_get(bson, rb_intern("Integer")); */ /* rb_remove_method(integer, "to_bson"); */ /* rb_define_method(integer, "to_bson", rb_integer_to_bson, 0); */ }
static VALUE rb_integer_to_bson(VALUE self) { - const int32_t v = NUM2INT(self); + /* const int32_t v = NUM2INT(self); */ ? +++ +++ - const char bytes[4] = { v & 255, (v >> 8) & 255, (v >> 16) & 255, (v >> 24) & 255 }; + /* const char bytes[4] = { v & 255, (v >> 8) & 255, (v >> 16) & 255, (v >> 24) & 255 }; */ ? +++ +++ - return rb_str_new(bytes, 4); + /* return rb_str_new(bytes, 4); */ ? +++ +++ } void Init_native() { - VALUE bson = rb_const_get(rb_cObject, rb_intern("BSON")); + /* VALUE bson = rb_const_get(rb_cObject, rb_intern("BSON")); */ ? +++ +++ - VALUE integer = rb_const_get(bson, rb_intern("Integer")); + /* VALUE integer = rb_const_get(bson, rb_intern("Integer")); */ ? +++ +++ - rb_remove_method(integer, "to_bson"); + /* rb_remove_method(integer, "to_bson"); */ ? +++ +++ - rb_define_method(integer, "to_bson", rb_integer_to_bson, 0); + /* rb_define_method(integer, "to_bson", rb_integer_to_bson, 0); */ ? +++ +++ }
14
0.875
7
7
dbbed9fad9e3ba87ba91f7208c1a8cd7c97a51dc
assets/stylesheets/views/_login.scss
assets/stylesheets/views/_login.scss
/* =LOGIN ------------------------------------ */ .main-col h1 { text-align: center; } .login { text-align: center; p { margin-bottom: $lineheight; } label { display: block; margin-bottom: .5em; &[for="rememberme"] { display: inline; } } input[type="submit"] { font-size: 1.3em; } } .tml-action-links { list-style: none; border-top: 1px solid #e2e2e2; padding-top: $lineheight; width: 50%; margin: $lineheight auto; a { color: $grey; } } .message { @extend .message-notice; }
/* =LOGIN ------------------------------------ */ .page-login .main-col h1 { text-align: center; } .login { text-align: center; p { margin-bottom: $lineheight; } label { display: block; margin-bottom: .5em; &[for="rememberme"] { display: inline; } } input[type="submit"] { font-size: 1.3em; } } .tml-action-links { list-style: none; border-top: 1px solid #e2e2e2; padding-top: $lineheight; width: 50%; margin: $lineheight auto; a { color: $grey; } } .message { @extend .message-notice; }
Fix accidental centering of all headings
Fix accidental centering of all headings
SCSS
mit
cthit/wordpress,cthit/wordpress,cthit/wordpress,cthit/wordpress
scss
## Code Before: /* =LOGIN ------------------------------------ */ .main-col h1 { text-align: center; } .login { text-align: center; p { margin-bottom: $lineheight; } label { display: block; margin-bottom: .5em; &[for="rememberme"] { display: inline; } } input[type="submit"] { font-size: 1.3em; } } .tml-action-links { list-style: none; border-top: 1px solid #e2e2e2; padding-top: $lineheight; width: 50%; margin: $lineheight auto; a { color: $grey; } } .message { @extend .message-notice; } ## Instruction: Fix accidental centering of all headings ## Code After: /* =LOGIN ------------------------------------ */ .page-login .main-col h1 { text-align: center; } .login { text-align: center; p { margin-bottom: $lineheight; } label { display: block; margin-bottom: .5em; &[for="rememberme"] { display: inline; } } input[type="submit"] { font-size: 1.3em; } } .tml-action-links { list-style: none; border-top: 1px solid #e2e2e2; padding-top: $lineheight; width: 50%; margin: $lineheight auto; a { color: $grey; } } .message { @extend .message-notice; }
/* =LOGIN ------------------------------------ */ - .main-col h1 { + .page-login .main-col h1 { text-align: center; } .login { text-align: center; p { margin-bottom: $lineheight; } label { display: block; margin-bottom: .5em; &[for="rememberme"] { display: inline; } } input[type="submit"] { font-size: 1.3em; } } .tml-action-links { list-style: none; border-top: 1px solid #e2e2e2; padding-top: $lineheight; width: 50%; margin: $lineheight auto; a { color: $grey; } } .message { @extend .message-notice; }
2
0.046512
1
1
5c029ff54ee8da9da93d491dda52e7efab293f0a
start.sh
start.sh
echo "Rendering image" if [ -z "$ROTATE" ]; then ROTATE=0 fi convert images/image.png -rotate $ROTATE images/rotated.png fbi -d /dev/fb1 -T 1 -noverbose -a images/rotated.png while true; do sleep 1 done
IMAGE=${IMAGE:-"image.png"} echo "Rendering image" ROTATE=${ROTATE:-0} convert images/"$IMAGE" -rotate $ROTATE images/rotated.png fbi -d /dev/fb1 -T 1 -noverbose -a images/rotated.png while true; do sleep 1 done
Allow setting of image as Resin environment variable
Allow setting of image as Resin environment variable * Parameterize image filename * Allow setting of image as Resin environment variable (thanks Page-!) * Use cleaner defaulting for ROTATE variable
Shell
apache-2.0
resin-io-projects/beast
shell
## Code Before: echo "Rendering image" if [ -z "$ROTATE" ]; then ROTATE=0 fi convert images/image.png -rotate $ROTATE images/rotated.png fbi -d /dev/fb1 -T 1 -noverbose -a images/rotated.png while true; do sleep 1 done ## Instruction: Allow setting of image as Resin environment variable * Parameterize image filename * Allow setting of image as Resin environment variable (thanks Page-!) * Use cleaner defaulting for ROTATE variable ## Code After: IMAGE=${IMAGE:-"image.png"} echo "Rendering image" ROTATE=${ROTATE:-0} convert images/"$IMAGE" -rotate $ROTATE images/rotated.png fbi -d /dev/fb1 -T 1 -noverbose -a images/rotated.png while true; do sleep 1 done
+ + IMAGE=${IMAGE:-"image.png"} echo "Rendering image" + ROTATE=${ROTATE:-0} - if [ -z "$ROTATE" ]; then - ROTATE=0 - fi - convert images/image.png -rotate $ROTATE images/rotated.png ? ^^^^^^^^^ + convert images/"$IMAGE" -rotate $ROTATE images/rotated.png ? ^^^^^^^^ fbi -d /dev/fb1 -T 1 -noverbose -a images/rotated.png while true; do sleep 1 done
8
0.615385
4
4
d0806c40ab5d9a3a08676ba345ef479182b23d03
.travis.yml
.travis.yml
language: python python: - "2.6" - "2.7" - "3.3" - "3.4" - "3.5" install: - if [[ $TRAVIS_PYTHON_VERSION == 2.6* ]]; then export PYTEST_ADDOPTS='-p no:pylint'; fi - pip install -r requirements.txt script: py.test
language: python env: - REQUESTS_VERSION=2.2.1 - REQUESTS_VERSION=2.8.1 - REQUESTS_VERSION=2.9.1 python: - "2.6" - "2.7" - "3.3" - "3.4" - "3.5" install: - if [[ $TRAVIS_PYTHON_VERSION == 2.6* ]]; then export PYTEST_ADDOPTS='-p no:pylint'; fi - pip install -r requirements.txt - pip install --upgrade --force-reinstall requests==$REQUESTS_VERSION script: py.test
Add different requests versions to test builds
Add different requests versions to test builds
YAML
bsd-3-clause
john-kurkowski/tldextract,jvanasco/tldextract
yaml
## Code Before: language: python python: - "2.6" - "2.7" - "3.3" - "3.4" - "3.5" install: - if [[ $TRAVIS_PYTHON_VERSION == 2.6* ]]; then export PYTEST_ADDOPTS='-p no:pylint'; fi - pip install -r requirements.txt script: py.test ## Instruction: Add different requests versions to test builds ## Code After: language: python env: - REQUESTS_VERSION=2.2.1 - REQUESTS_VERSION=2.8.1 - REQUESTS_VERSION=2.9.1 python: - "2.6" - "2.7" - "3.3" - "3.4" - "3.5" install: - if [[ $TRAVIS_PYTHON_VERSION == 2.6* ]]; then export PYTEST_ADDOPTS='-p no:pylint'; fi - pip install -r requirements.txt - pip install --upgrade --force-reinstall requests==$REQUESTS_VERSION script: py.test
language: python + env: + - REQUESTS_VERSION=2.2.1 + - REQUESTS_VERSION=2.8.1 + - REQUESTS_VERSION=2.9.1 python: - "2.6" - "2.7" - "3.3" - "3.4" - "3.5" install: - if [[ $TRAVIS_PYTHON_VERSION == 2.6* ]]; then export PYTEST_ADDOPTS='-p no:pylint'; fi - pip install -r requirements.txt + - pip install --upgrade --force-reinstall requests==$REQUESTS_VERSION script: py.test
5
0.454545
5
0
af24dd57a0eaf34b177c4b046ab71e27cd89cdfd
app/presenters/lifecycle_presenter.rb
app/presenters/lifecycle_presenter.rb
class LifecyclePresenter attr_reader :subject def initialize(subject) @subject = subject end def as_json(opts = {}) subject.lifecycle_events.each_with_object({}) do |(event_name, relation_name), h| if event = subject.send(relation_name) user = if event.respond_to?(:originating_user) event.originating_user else event.user end h[event_name] = { timestamp: event.created_at, user: UserPresenter.new(user), organization: OrganizationIndexPresenter.new(event.organization), } end end end end
class LifecyclePresenter attr_reader :subject def initialize(subject) @subject = subject end def as_json(opts = {}) subject.lifecycle_events.each_with_object({}) do |(event_name, relation_name), h| if event = subject.send(relation_name) user = if event.respond_to?(:originating_user) event.originating_user else event.user end organization = if event.organization.nil? {} else OrganizationIndexPresenter.new(event.organization) end h[event_name] = { timestamp: event.created_at, user: UserPresenter.new(user), organization: organization, } end end end end
Handle lifecycle events without an organization
Handle lifecycle events without an organization
Ruby
mit
genome/civic-server,genome/civic-server,genome/civic-server,genome/civic-server,genome/civic-server
ruby
## Code Before: class LifecyclePresenter attr_reader :subject def initialize(subject) @subject = subject end def as_json(opts = {}) subject.lifecycle_events.each_with_object({}) do |(event_name, relation_name), h| if event = subject.send(relation_name) user = if event.respond_to?(:originating_user) event.originating_user else event.user end h[event_name] = { timestamp: event.created_at, user: UserPresenter.new(user), organization: OrganizationIndexPresenter.new(event.organization), } end end end end ## Instruction: Handle lifecycle events without an organization ## Code After: class LifecyclePresenter attr_reader :subject def initialize(subject) @subject = subject end def as_json(opts = {}) subject.lifecycle_events.each_with_object({}) do |(event_name, relation_name), h| if event = subject.send(relation_name) user = if event.respond_to?(:originating_user) event.originating_user else event.user end organization = if event.organization.nil? {} else OrganizationIndexPresenter.new(event.organization) end h[event_name] = { timestamp: event.created_at, user: UserPresenter.new(user), organization: organization, } end end end end
class LifecyclePresenter attr_reader :subject def initialize(subject) @subject = subject end def as_json(opts = {}) subject.lifecycle_events.each_with_object({}) do |(event_name, relation_name), h| if event = subject.send(relation_name) user = if event.respond_to?(:originating_user) event.originating_user else event.user end + organization = if event.organization.nil? + {} + else + OrganizationIndexPresenter.new(event.organization) + end h[event_name] = { timestamp: event.created_at, user: UserPresenter.new(user), - organization: OrganizationIndexPresenter.new(event.organization), + organization: organization, } end end end end
7
0.291667
6
1
c0ce65ccd7db7e7f34e9d6172f7179cf9ee16ef2
chandra_aca/tests/test_dark_scale.py
chandra_aca/tests/test_dark_scale.py
import numpy as np from ..dark_model import dark_temp_scale def test_dark_temp_scale(): scale = dark_temp_scale(-10., -14) assert np.allclose(scale, 0.70) scale = dark_temp_scale(-10., -14, scale_4c=2.0) assert scale == 0.5 # Should be an exact match
import numpy as np from ..dark_model import dark_temp_scale, get_warm_fracs def test_get_warm_fracs(): exp = {(100, '2020:001', -11): 341312, (100, '2017:001', -11): 278627, (100, '2020:001', -15): 250546, (100, '2017:001', -15): 200786, (1000, '2017:001', -11): 1703, (1000, '2017:001', -15): 558, (1000, '2020:001', -15): 798, (1000, '2020:001', -11): 2436} warmpixs = {} for warm_threshold in (100, 1000): for date in ('2017:001', '2020:001'): for T_ccd in (-11, -15): key = (warm_threshold, date, T_ccd) warmpixs[key] = int(get_warm_fracs(*key) * 1024 ** 2) for key in warmpixs: assert np.allclose(warmpixs[key], exp[key], rtol=1e-5, atol=1) def test_dark_temp_scale(): scale = dark_temp_scale(-10., -14) assert np.allclose(scale, 0.70) scale = dark_temp_scale(-10., -14, scale_4c=2.0) assert scale == 0.5 # Should be an exact match
Add regression test of warm fractions calculation
Add regression test of warm fractions calculation
Python
bsd-2-clause
sot/chandra_aca,sot/chandra_aca
python
## Code Before: import numpy as np from ..dark_model import dark_temp_scale def test_dark_temp_scale(): scale = dark_temp_scale(-10., -14) assert np.allclose(scale, 0.70) scale = dark_temp_scale(-10., -14, scale_4c=2.0) assert scale == 0.5 # Should be an exact match ## Instruction: Add regression test of warm fractions calculation ## Code After: import numpy as np from ..dark_model import dark_temp_scale, get_warm_fracs def test_get_warm_fracs(): exp = {(100, '2020:001', -11): 341312, (100, '2017:001', -11): 278627, (100, '2020:001', -15): 250546, (100, '2017:001', -15): 200786, (1000, '2017:001', -11): 1703, (1000, '2017:001', -15): 558, (1000, '2020:001', -15): 798, (1000, '2020:001', -11): 2436} warmpixs = {} for warm_threshold in (100, 1000): for date in ('2017:001', '2020:001'): for T_ccd in (-11, -15): key = (warm_threshold, date, T_ccd) warmpixs[key] = int(get_warm_fracs(*key) * 1024 ** 2) for key in warmpixs: assert np.allclose(warmpixs[key], exp[key], rtol=1e-5, atol=1) def test_dark_temp_scale(): scale = dark_temp_scale(-10., -14) assert np.allclose(scale, 0.70) scale = dark_temp_scale(-10., -14, scale_4c=2.0) assert scale == 0.5 # Should be an exact match
import numpy as np - from ..dark_model import dark_temp_scale + from ..dark_model import dark_temp_scale, get_warm_fracs ? ++++++++++++++++ + + + def test_get_warm_fracs(): + exp = {(100, '2020:001', -11): 341312, + (100, '2017:001', -11): 278627, + (100, '2020:001', -15): 250546, + (100, '2017:001', -15): 200786, + (1000, '2017:001', -11): 1703, + (1000, '2017:001', -15): 558, + (1000, '2020:001', -15): 798, + (1000, '2020:001', -11): 2436} + warmpixs = {} + for warm_threshold in (100, 1000): + for date in ('2017:001', '2020:001'): + for T_ccd in (-11, -15): + key = (warm_threshold, date, T_ccd) + warmpixs[key] = int(get_warm_fracs(*key) * 1024 ** 2) + for key in warmpixs: + assert np.allclose(warmpixs[key], exp[key], rtol=1e-5, atol=1) + def test_dark_temp_scale(): scale = dark_temp_scale(-10., -14) assert np.allclose(scale, 0.70) scale = dark_temp_scale(-10., -14, scale_4c=2.0) assert scale == 0.5 # Should be an exact match + +
24
2.666667
23
1
2e91917e1611a266eb52a5d0ca0842e519a729df
deploy/ansible/roles/startup/tasks/main.yml
deploy/ansible/roles/startup/tasks/main.yml
--- # start it up - name: make sure code is on the box and in sync synchronize: src: ../../../../../ dest: "{{base_path}}" rsync_opts: - --include=.bin/*** - --include=api/*** - --include=config/*** - --include=migrations/*** - --include=seeds/*** - --include=package.json - --include=index.js - --exclude='.*' - --exclude='*' - --delete-before - name: run npm install npm: path={{base_path}} state=present - name: create database postgresql_db: name=cth - name: make sure api log file exists file: path={{api_log_file}} state=touch mode=0666 owner=www-data group=www-data - name: (re)start the api command: /bin/true notify: restart api
--- # start it up - name: make sure code is on the box and in sync synchronize: src: ../../../../../ dest: "{{base_path}}" rsync_opts: - --include=.bin/*** - --include=api/*** - --include=config/*** - --include=migrations/*** - --include=seeds/*** - --include=package.json - --include=index.js - --include=knexfile.js - --exclude='.*' - --exclude='*' - --delete-before - name: run npm install npm: path={{base_path}} state=present - name: create database postgresql_db: name=cth - name: make sure api log file exists file: path={{api_log_file}} state=touch mode=0666 owner=www-data group=www-data - name: (re)start the api command: /bin/true notify: restart api
Modify Ansible task to copy knexfile.
Modify Ansible task to copy knexfile. Resolves #14
YAML
mit
coding-the-humanities/unacademic_backend,coding-the-humanities/unacademic_backend
yaml
## Code Before: --- # start it up - name: make sure code is on the box and in sync synchronize: src: ../../../../../ dest: "{{base_path}}" rsync_opts: - --include=.bin/*** - --include=api/*** - --include=config/*** - --include=migrations/*** - --include=seeds/*** - --include=package.json - --include=index.js - --exclude='.*' - --exclude='*' - --delete-before - name: run npm install npm: path={{base_path}} state=present - name: create database postgresql_db: name=cth - name: make sure api log file exists file: path={{api_log_file}} state=touch mode=0666 owner=www-data group=www-data - name: (re)start the api command: /bin/true notify: restart api ## Instruction: Modify Ansible task to copy knexfile. Resolves #14 ## Code After: --- # start it up - name: make sure code is on the box and in sync synchronize: src: ../../../../../ dest: "{{base_path}}" rsync_opts: - --include=.bin/*** - --include=api/*** - --include=config/*** - --include=migrations/*** - --include=seeds/*** - --include=package.json - --include=index.js - --include=knexfile.js - --exclude='.*' - --exclude='*' - --delete-before - name: run npm install npm: path={{base_path}} state=present - name: create database postgresql_db: name=cth - name: make sure api log file exists file: path={{api_log_file}} state=touch mode=0666 owner=www-data group=www-data - name: (re)start the api command: /bin/true notify: restart api
--- # start it up - name: make sure code is on the box and in sync synchronize: src: ../../../../../ dest: "{{base_path}}" rsync_opts: - --include=.bin/*** - --include=api/*** - --include=config/*** - --include=migrations/*** - --include=seeds/*** - --include=package.json - --include=index.js + - --include=knexfile.js - --exclude='.*' - --exclude='*' - --delete-before - name: run npm install npm: path={{base_path}} state=present - name: create database postgresql_db: name=cth - name: make sure api log file exists file: path={{api_log_file}} state=touch mode=0666 owner=www-data group=www-data - name: (re)start the api command: /bin/true notify: restart api
1
0.032258
1
0
04237e3bc68eaf52e89144fd0e73c6c5f4d8cbea
README.md
README.md
[![Build Status](https://travis-ci.org/cdubz/babybuddy.svg?branch=master)](https://travis-ci.org/cdubz/babybuddy) [![Coverage Status](https://coveralls.io/repos/github/cdubz/babybuddy/badge.svg?branch=master)](https://coveralls.io/github/cdubz/babybuddy?branch=master) [![License](https://img.shields.io/badge/License-BSD%202--Clause-orange.svg)](https://opensource.org/licenses/BSD-2-Clause) A buddy for babies! Helps caregivers track sleep, feedings, diaper changes, and tummy time to learn about and predict baby's needs without (as much) guess work. ## Development ### Installation ``` git clone https://github.com/cdubz/babybuddy.git cd babybuddy pip install pipenv pipenv install --dev pipenv shell python manage.py migrate npm install -g gulp-cli npm install gulp build python manage.py runserver ``` Open [http://127.0.0.1:8000](http://127.0.0.1:8000) and log in with the default user name and password (admin/admin). ### Fake data From within the pipenv shell, execute: ``` python manage.py fake ```
[![Build Status](https://travis-ci.org/cdubz/babybuddy.svg?branch=master)](https://travis-ci.org/cdubz/babybuddy) [![Coverage Status](https://coveralls.io/repos/github/cdubz/babybuddy/badge.svg?branch=master)](https://coveralls.io/github/cdubz/babybuddy?branch=master) [![License](https://img.shields.io/badge/License-BSD%202--Clause-orange.svg)](https://opensource.org/licenses/BSD-2-Clause) A buddy for babies! Helps caregivers track sleep, feedings, diaper changes, and tummy time to learn about and predict baby's needs without (as much) guess work. ## Demo A demo of Baby Buddy is available on Heroku: [https://babybuddy.herokuapp.com](https://babybuddy.herokuapp.com). Login credentials are `admin`/`admin`. ## Development ### Installation ``` git clone https://github.com/cdubz/babybuddy.git cd babybuddy pip install pipenv pipenv install --dev pipenv shell python manage.py migrate npm install -g gulp-cli npm install gulp build python manage.py runserver ``` Open [http://127.0.0.1:8000](http://127.0.0.1:8000) and log in with the default user name and password (admin/admin). ### Fake data From within the pipenv shell, execute: ``` python manage.py fake ```
Add a link to the Herko demo instance.
Add a link to the Herko demo instance.
Markdown
bsd-2-clause
cdubz/babybuddy,cdubz/babybuddy,cdubz/babybuddy
markdown
## Code Before: [![Build Status](https://travis-ci.org/cdubz/babybuddy.svg?branch=master)](https://travis-ci.org/cdubz/babybuddy) [![Coverage Status](https://coveralls.io/repos/github/cdubz/babybuddy/badge.svg?branch=master)](https://coveralls.io/github/cdubz/babybuddy?branch=master) [![License](https://img.shields.io/badge/License-BSD%202--Clause-orange.svg)](https://opensource.org/licenses/BSD-2-Clause) A buddy for babies! Helps caregivers track sleep, feedings, diaper changes, and tummy time to learn about and predict baby's needs without (as much) guess work. ## Development ### Installation ``` git clone https://github.com/cdubz/babybuddy.git cd babybuddy pip install pipenv pipenv install --dev pipenv shell python manage.py migrate npm install -g gulp-cli npm install gulp build python manage.py runserver ``` Open [http://127.0.0.1:8000](http://127.0.0.1:8000) and log in with the default user name and password (admin/admin). ### Fake data From within the pipenv shell, execute: ``` python manage.py fake ``` ## Instruction: Add a link to the Herko demo instance. ## Code After: [![Build Status](https://travis-ci.org/cdubz/babybuddy.svg?branch=master)](https://travis-ci.org/cdubz/babybuddy) [![Coverage Status](https://coveralls.io/repos/github/cdubz/babybuddy/badge.svg?branch=master)](https://coveralls.io/github/cdubz/babybuddy?branch=master) [![License](https://img.shields.io/badge/License-BSD%202--Clause-orange.svg)](https://opensource.org/licenses/BSD-2-Clause) A buddy for babies! Helps caregivers track sleep, feedings, diaper changes, and tummy time to learn about and predict baby's needs without (as much) guess work. ## Demo A demo of Baby Buddy is available on Heroku: [https://babybuddy.herokuapp.com](https://babybuddy.herokuapp.com). Login credentials are `admin`/`admin`. ## Development ### Installation ``` git clone https://github.com/cdubz/babybuddy.git cd babybuddy pip install pipenv pipenv install --dev pipenv shell python manage.py migrate npm install -g gulp-cli npm install gulp build python manage.py runserver ``` Open [http://127.0.0.1:8000](http://127.0.0.1:8000) and log in with the default user name and password (admin/admin). ### Fake data From within the pipenv shell, execute: ``` python manage.py fake ```
[![Build Status](https://travis-ci.org/cdubz/babybuddy.svg?branch=master)](https://travis-ci.org/cdubz/babybuddy) [![Coverage Status](https://coveralls.io/repos/github/cdubz/babybuddy/badge.svg?branch=master)](https://coveralls.io/github/cdubz/babybuddy?branch=master) [![License](https://img.shields.io/badge/License-BSD%202--Clause-orange.svg)](https://opensource.org/licenses/BSD-2-Clause) A buddy for babies! Helps caregivers track sleep, feedings, diaper changes, and tummy time to learn about and predict baby's needs without (as much) guess work. + + ## Demo + + A demo of Baby Buddy is available on Heroku: + [https://babybuddy.herokuapp.com](https://babybuddy.herokuapp.com). Login + credentials are `admin`/`admin`. ## Development ### Installation ``` git clone https://github.com/cdubz/babybuddy.git cd babybuddy pip install pipenv pipenv install --dev pipenv shell python manage.py migrate npm install -g gulp-cli npm install gulp build python manage.py runserver ``` Open [http://127.0.0.1:8000](http://127.0.0.1:8000) and log in with the default user name and password (admin/admin). ### Fake data From within the pipenv shell, execute: ``` python manage.py fake ```
6
0.171429
6
0
1bf15d387eff73fffd49a5da7a92fdac68ab913c
spec/classes/munin_master_spec.rb
spec/classes/munin_master_spec.rb
require 'spec_helper' describe 'munin::master', :type => 'class' do it { should contain_package('munin') } end
require 'spec_helper' describe 'munin::master', :type => 'class' do it { should contain_package('munin') } it do should contain_file('/etc/munin/munin.conf')\ .with_content(/^graph_strategy cgi$/) end context 'with graph_strategy => cron' do let(:params) { {:graph_strategy => 'cron'} } it do should contain_file('/etc/munin/munin.conf')\ .with_content(/^graph_strategy cron$/) end end end
Add rspec test for munin.conf template
Add rspec test for munin.conf template
Ruby
apache-2.0
ssm/ssm-munin,ssm/ssm-munin
ruby
## Code Before: require 'spec_helper' describe 'munin::master', :type => 'class' do it { should contain_package('munin') } end ## Instruction: Add rspec test for munin.conf template ## Code After: require 'spec_helper' describe 'munin::master', :type => 'class' do it { should contain_package('munin') } it do should contain_file('/etc/munin/munin.conf')\ .with_content(/^graph_strategy cgi$/) end context 'with graph_strategy => cron' do let(:params) { {:graph_strategy => 'cron'} } it do should contain_file('/etc/munin/munin.conf')\ .with_content(/^graph_strategy cron$/) end end end
require 'spec_helper' describe 'munin::master', :type => 'class' do it { should contain_package('munin') } + + it do + should contain_file('/etc/munin/munin.conf')\ + .with_content(/^graph_strategy cgi$/) + end + + context 'with graph_strategy => cron' do + let(:params) { {:graph_strategy => 'cron'} } + + it do + should contain_file('/etc/munin/munin.conf')\ + .with_content(/^graph_strategy cron$/) + end + end end
14
2
14
0
43bca98ca5af682bc6ab4c291161b231a89f8e30
proguard-android.txt
proguard-android.txt
-keep class !android.support.v7.internal.view.menu.MenuBuilder, !android.support.v7.internal.view.menu.SubMenuBuilder, android.support.v7.** { *; } -keep interface android.support.v7.** { *; } -keep class android.support.v7.widget.ShareActionProvider { *; } # Enable reflective access to mX509Certificate -keepclassmembers class android.net.http.SslCertificate { private final X509Certificate mX509Certificate; } # Disable code obfuscation.(http://stackoverflow.com/a/13877518) -dontobfuscate -optimizations !code/simplification/arithmetic,!field/*,!class/merging/*,!code/allocation/variable
-keep class !android.support.v7.internal.view.menu.MenuBuilder, !android.support.v7.internal.view.menu.SubMenuBuilder, android.support.v7.** { *; } -keep interface android.support.v7.** { *; } -keep class android.support.v7.internal.** { *; } -keep interface android.support.v7.internal.** { *; } -keep class android.support.v7.** { *; } -keep interface android.support.v7.** { *; } # Enable reflective access to mX509Certificate -keepclassmembers class android.net.http.SslCertificate { private final X509Certificate mX509Certificate; } # Disable code obfuscation.(http://stackoverflow.com/a/13877518) -dontobfuscate -optimizations !code/simplification/arithmetic,!field/*,!class/merging/*,!code/allocation/variable
Fix crash opening log window for Android 5.1
Fix crash opening log window for Android 5.1
Text
mpl-2.0
syncthing/syncthing-android,syncthing/syncthing-android,wweich/syncthing-android,Nutomic/syncthing-android,Zillode/syncthing-android,brianhlin/syncthing-android,flipreverse/syncthing-android,lkwg82/syncthing-android,lkwg82/syncthing-android,wweich/syncthing-android,Zillode/syncthing-android,syncthing/syncthing-android,flipreverse/syncthing-android,begetan/syncthing-android,brianhlin/syncthing-android,Nutomic/syncthing-android,jmintb/syncthing-android,begetan/syncthing-android,jmintb/syncthing-android
text
## Code Before: -keep class !android.support.v7.internal.view.menu.MenuBuilder, !android.support.v7.internal.view.menu.SubMenuBuilder, android.support.v7.** { *; } -keep interface android.support.v7.** { *; } -keep class android.support.v7.widget.ShareActionProvider { *; } # Enable reflective access to mX509Certificate -keepclassmembers class android.net.http.SslCertificate { private final X509Certificate mX509Certificate; } # Disable code obfuscation.(http://stackoverflow.com/a/13877518) -dontobfuscate -optimizations !code/simplification/arithmetic,!field/*,!class/merging/*,!code/allocation/variable ## Instruction: Fix crash opening log window for Android 5.1 ## Code After: -keep class !android.support.v7.internal.view.menu.MenuBuilder, !android.support.v7.internal.view.menu.SubMenuBuilder, android.support.v7.** { *; } -keep interface android.support.v7.** { *; } -keep class android.support.v7.internal.** { *; } -keep interface android.support.v7.internal.** { *; } -keep class android.support.v7.** { *; } -keep interface android.support.v7.** { *; } # Enable reflective access to mX509Certificate -keepclassmembers class android.net.http.SslCertificate { private final X509Certificate mX509Certificate; } # Disable code obfuscation.(http://stackoverflow.com/a/13877518) -dontobfuscate -optimizations !code/simplification/arithmetic,!field/*,!class/merging/*,!code/allocation/variable
-keep class !android.support.v7.internal.view.menu.MenuBuilder, !android.support.v7.internal.view.menu.SubMenuBuilder, android.support.v7.** { *; } -keep interface android.support.v7.** { *; } - -keep class android.support.v7.widget.ShareActionProvider { *; } + -keep class android.support.v7.internal.** { *; } + -keep interface android.support.v7.internal.** { *; } + -keep class android.support.v7.** { *; } + -keep interface android.support.v7.** { *; } # Enable reflective access to mX509Certificate -keepclassmembers class android.net.http.SslCertificate { private final X509Certificate mX509Certificate; } # Disable code obfuscation.(http://stackoverflow.com/a/13877518) -dontobfuscate -optimizations !code/simplification/arithmetic,!field/*,!class/merging/*,!code/allocation/variable
5
0.416667
4
1
5fbf5bac84a7ededde99e109d206681af99c112c
sort/bubble_sort_optimized/python/bubble_sort_optimized.py
sort/bubble_sort_optimized/python/bubble_sort_optimized.py
class Solution: def bubbleSortOptimized(self, nums: List[int]) -> None: if len(nums) == 1: return nums else: swapped = False while not swapped: swapped = True for i in range(0, len(nums)-1): if nums[i] > nums[i+1]: swapped = False nums[i], nums[i+1] = nums[i+1], nums[i]
class Solution: def bubbleSortOptimized(self, nums): if len(nums) == 1: return nums else: swapped = False while not swapped: swapped = True for i in range(0, len(nums)-1): if nums[i] > nums[i+1]: swapped = False nums[i], nums[i+1] = nums[i+1], nums[i]
Add dijkstras algorithm and depth first search in python
Add dijkstras algorithm and depth first search in python
Python
cc0-1.0
ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms
python
## Code Before: class Solution: def bubbleSortOptimized(self, nums: List[int]) -> None: if len(nums) == 1: return nums else: swapped = False while not swapped: swapped = True for i in range(0, len(nums)-1): if nums[i] > nums[i+1]: swapped = False nums[i], nums[i+1] = nums[i+1], nums[i] ## Instruction: Add dijkstras algorithm and depth first search in python ## Code After: class Solution: def bubbleSortOptimized(self, nums): if len(nums) == 1: return nums else: swapped = False while not swapped: swapped = True for i in range(0, len(nums)-1): if nums[i] > nums[i+1]: swapped = False nums[i], nums[i+1] = nums[i+1], nums[i]
class Solution: - def bubbleSortOptimized(self, nums: List[int]) -> None: ? -------------------- + def bubbleSortOptimized(self, nums): ? + if len(nums) == 1: return nums else: swapped = False while not swapped: swapped = True for i in range(0, len(nums)-1): if nums[i] > nums[i+1]: swapped = False nums[i], nums[i+1] = nums[i+1], nums[i]
2
0.166667
1
1
5f8eb368eade471673dccaa9b61f7581179d1e97
php-config/Git.config.php
php-config/Git.config.php
<?php Git::$repositories['Gatekeeper'] = [ 'remote' => 'git@github.com:JarvusInnovations/Gatekeeper.git', 'originBranch' => 'master', 'workingBranch' => 'instances/' . Site::getConfig('primary_hostname'), 'localOnly' => true, 'trees' => [ 'dwoo-plugins', 'event-handlers', 'html-templates', 'php-classes', 'php-config' => [ 'exclude' => '#^/Git\\.config\\.php$#' // don't sync this file ], 'php-migrations', 'phpunit-tests', 'sencha-workspace/pages', 'site-root' => [ 'exclude' => [ '#^/css(/|$)#', // don't sync /css, this directory is generated by /sass/compile '#^/js/pages(/|$)#' // don't sync /js/pages, this directory is generated by /sencha-cmd/pages-build ] ] ] ]; Git::$repositories['symfony-yaml'] = [ 'remote' => 'https://github.com/symfony/Yaml.git', 'originBranch' => 'master', 'workingBranch' => 'master', 'trees' => [ 'php-classes/Symfony/Component/Yaml' => [ 'path' => '.', 'exclude' => [ '#\\.gitignore$#', '#^/Tests#', '#\\.md$#', '#composer\\.json#', '#phpunit\\.xml\\.dist#' ] ] ] ]; Git::$repositories['jarvus-highlighter'] = [ 'remote' => "https://github.com/JarvusInnovations/jarvus-highlighter.git", 'originBranch' => 'master', 'workingBranch' => 'master', 'trees' => [ "sencha-workspace/packages/jarvus-highlighter" => '.' ] ];
<?php Git::$repositories['Gatekeeper'] = [ 'remote' => 'git@github.com:JarvusInnovations/Gatekeeper.git', 'originBranch' => 'master', 'workingBranch' => 'instances/' . Site::getConfig('primary_hostname'), 'localOnly' => true, 'trees' => [ 'dwoo-plugins', 'event-handlers', 'html-templates', 'php-classes', 'php-config' => [ 'exclude' => '#^/Git\\.config\\.php$#' // don't sync this file ], 'php-migrations', 'phpunit-tests', 'sencha-workspace/pages', 'site-root' => [ 'exclude' => [ '#^/css(/|$)#', // don't sync /css, this directory is generated by /sass/compile '#^/js/pages(/|$)#' // don't sync /js/pages, this directory is generated by /sencha-cmd/pages-build ] ] ] ]; Git::$repositories['jarvus-highlighter'] = [ 'remote' => "https://github.com/JarvusInnovations/jarvus-highlighter.git", 'originBranch' => 'master', 'workingBranch' => 'master', 'trees' => [ "sencha-workspace/packages/jarvus-highlighter" => '.' ] ];
Remove symfony-yaml repo link, it's been merged into skeleton-v1
Remove symfony-yaml repo link, it's been merged into skeleton-v1
PHP
agpl-3.0
JarvusInnovations/Gatekeeper,JarvusInnovations/Gatekeeper,JarvusInnovations/Gatekeeper
php
## Code Before: <?php Git::$repositories['Gatekeeper'] = [ 'remote' => 'git@github.com:JarvusInnovations/Gatekeeper.git', 'originBranch' => 'master', 'workingBranch' => 'instances/' . Site::getConfig('primary_hostname'), 'localOnly' => true, 'trees' => [ 'dwoo-plugins', 'event-handlers', 'html-templates', 'php-classes', 'php-config' => [ 'exclude' => '#^/Git\\.config\\.php$#' // don't sync this file ], 'php-migrations', 'phpunit-tests', 'sencha-workspace/pages', 'site-root' => [ 'exclude' => [ '#^/css(/|$)#', // don't sync /css, this directory is generated by /sass/compile '#^/js/pages(/|$)#' // don't sync /js/pages, this directory is generated by /sencha-cmd/pages-build ] ] ] ]; Git::$repositories['symfony-yaml'] = [ 'remote' => 'https://github.com/symfony/Yaml.git', 'originBranch' => 'master', 'workingBranch' => 'master', 'trees' => [ 'php-classes/Symfony/Component/Yaml' => [ 'path' => '.', 'exclude' => [ '#\\.gitignore$#', '#^/Tests#', '#\\.md$#', '#composer\\.json#', '#phpunit\\.xml\\.dist#' ] ] ] ]; Git::$repositories['jarvus-highlighter'] = [ 'remote' => "https://github.com/JarvusInnovations/jarvus-highlighter.git", 'originBranch' => 'master', 'workingBranch' => 'master', 'trees' => [ "sencha-workspace/packages/jarvus-highlighter" => '.' ] ]; ## Instruction: Remove symfony-yaml repo link, it's been merged into skeleton-v1 ## Code After: <?php Git::$repositories['Gatekeeper'] = [ 'remote' => 'git@github.com:JarvusInnovations/Gatekeeper.git', 'originBranch' => 'master', 'workingBranch' => 'instances/' . Site::getConfig('primary_hostname'), 'localOnly' => true, 'trees' => [ 'dwoo-plugins', 'event-handlers', 'html-templates', 'php-classes', 'php-config' => [ 'exclude' => '#^/Git\\.config\\.php$#' // don't sync this file ], 'php-migrations', 'phpunit-tests', 'sencha-workspace/pages', 'site-root' => [ 'exclude' => [ '#^/css(/|$)#', // don't sync /css, this directory is generated by /sass/compile '#^/js/pages(/|$)#' // don't sync /js/pages, this directory is generated by /sencha-cmd/pages-build ] ] ] ]; Git::$repositories['jarvus-highlighter'] = [ 'remote' => "https://github.com/JarvusInnovations/jarvus-highlighter.git", 'originBranch' => 'master', 'workingBranch' => 'master', 'trees' => [ "sencha-workspace/packages/jarvus-highlighter" => '.' ] ];
<?php Git::$repositories['Gatekeeper'] = [ 'remote' => 'git@github.com:JarvusInnovations/Gatekeeper.git', 'originBranch' => 'master', 'workingBranch' => 'instances/' . Site::getConfig('primary_hostname'), 'localOnly' => true, 'trees' => [ 'dwoo-plugins', 'event-handlers', 'html-templates', 'php-classes', 'php-config' => [ 'exclude' => '#^/Git\\.config\\.php$#' // don't sync this file ], 'php-migrations', 'phpunit-tests', 'sencha-workspace/pages', 'site-root' => [ 'exclude' => [ '#^/css(/|$)#', // don't sync /css, this directory is generated by /sass/compile '#^/js/pages(/|$)#' // don't sync /js/pages, this directory is generated by /sencha-cmd/pages-build ] ] ] ]; - Git::$repositories['symfony-yaml'] = [ - 'remote' => 'https://github.com/symfony/Yaml.git', - 'originBranch' => 'master', - 'workingBranch' => 'master', - 'trees' => [ - 'php-classes/Symfony/Component/Yaml' => [ - 'path' => '.', - 'exclude' => [ - '#\\.gitignore$#', - '#^/Tests#', - '#\\.md$#', - '#composer\\.json#', - '#phpunit\\.xml\\.dist#' - ] - ] - ] - ]; - Git::$repositories['jarvus-highlighter'] = [ 'remote' => "https://github.com/JarvusInnovations/jarvus-highlighter.git", 'originBranch' => 'master', 'workingBranch' => 'master', 'trees' => [ "sencha-workspace/packages/jarvus-highlighter" => '.' ] ];
18
0.339623
0
18
6cda06c305bc337101d46a87eecc17251bb91cf5
packages/se/servant-serf.yaml
packages/se/servant-serf.yaml
homepage: '' changelog-type: '' hash: 3b632ed2ce2a0a3c98301ea6fb23d56b79f89654492df134f2d33f4c43fae00c test-bench-deps: {} maintainer: Zachary Churchill <zachary@itpro.tv> synopsis: Generates a servant API module changelog: '' basic-deps: base: '>=4.13.0.0 && <=5.2.0.0' parser-combinators: '>=1.2.1' text: '>=1.2.4.0' regex-tdfa: '>=1.3.1.0' regex-base: '>=0.94.0.0' mtl: '>=2.2.2' attoparsec: '>=0.13.2.4' optparse-applicative: '>=0.15.1.0' hpack: '>=0.34.2' tomland: '>=1.3.1.0' all-versions: - 0.0.2 author: '' latest: 0.0.2 description-type: haddock description: A preprocessor which will parse a psuedo-haskell module with imports and generate a module with exports an Api type and a server function license-name: MIT
homepage: '' changelog-type: '' hash: cfa4b5995eecc613cc80b2fa97640ab3967586979e01f23a9f30482754077c9f test-bench-deps: {} maintainer: Zachary Churchill <zachary@itpro.tv> synopsis: Generates a servant API module changelog: '' basic-deps: base: '>=4.13.0.0 && <=5.2.0.0' parser-combinators: '>=1.2.1' text: '>=1.2.4.0' regex-tdfa: '>=1.3.1.0' regex-base: '>=0.94.0.0' mtl: '>=2.2.2' attoparsec: '>=0.13.2.4' optparse-applicative: '>=0.15.1.0' hpack: '>=0.34.2' tomland: '>=1.3.1.0' all-versions: - 0.0.3 author: '' latest: 0.0.3 description-type: haddock description: A preprocessor which will parse a psuedo-haskell module with imports and generate a module with exports an Api type and a server function license-name: MIT
Update from Hackage at 2020-09-30T19:06:11Z
Update from Hackage at 2020-09-30T19:06:11Z
YAML
mit
commercialhaskell/all-cabal-metadata
yaml
## Code Before: homepage: '' changelog-type: '' hash: 3b632ed2ce2a0a3c98301ea6fb23d56b79f89654492df134f2d33f4c43fae00c test-bench-deps: {} maintainer: Zachary Churchill <zachary@itpro.tv> synopsis: Generates a servant API module changelog: '' basic-deps: base: '>=4.13.0.0 && <=5.2.0.0' parser-combinators: '>=1.2.1' text: '>=1.2.4.0' regex-tdfa: '>=1.3.1.0' regex-base: '>=0.94.0.0' mtl: '>=2.2.2' attoparsec: '>=0.13.2.4' optparse-applicative: '>=0.15.1.0' hpack: '>=0.34.2' tomland: '>=1.3.1.0' all-versions: - 0.0.2 author: '' latest: 0.0.2 description-type: haddock description: A preprocessor which will parse a psuedo-haskell module with imports and generate a module with exports an Api type and a server function license-name: MIT ## Instruction: Update from Hackage at 2020-09-30T19:06:11Z ## Code After: homepage: '' changelog-type: '' hash: cfa4b5995eecc613cc80b2fa97640ab3967586979e01f23a9f30482754077c9f test-bench-deps: {} maintainer: Zachary Churchill <zachary@itpro.tv> synopsis: Generates a servant API module changelog: '' basic-deps: base: '>=4.13.0.0 && <=5.2.0.0' parser-combinators: '>=1.2.1' text: '>=1.2.4.0' regex-tdfa: '>=1.3.1.0' regex-base: '>=0.94.0.0' mtl: '>=2.2.2' attoparsec: '>=0.13.2.4' optparse-applicative: '>=0.15.1.0' hpack: '>=0.34.2' tomland: '>=1.3.1.0' all-versions: - 0.0.3 author: '' latest: 0.0.3 description-type: haddock description: A preprocessor which will parse a psuedo-haskell module with imports and generate a module with exports an Api type and a server function license-name: MIT
homepage: '' changelog-type: '' - hash: 3b632ed2ce2a0a3c98301ea6fb23d56b79f89654492df134f2d33f4c43fae00c + hash: cfa4b5995eecc613cc80b2fa97640ab3967586979e01f23a9f30482754077c9f test-bench-deps: {} maintainer: Zachary Churchill <zachary@itpro.tv> synopsis: Generates a servant API module changelog: '' basic-deps: base: '>=4.13.0.0 && <=5.2.0.0' parser-combinators: '>=1.2.1' text: '>=1.2.4.0' regex-tdfa: '>=1.3.1.0' regex-base: '>=0.94.0.0' mtl: '>=2.2.2' attoparsec: '>=0.13.2.4' optparse-applicative: '>=0.15.1.0' hpack: '>=0.34.2' tomland: '>=1.3.1.0' all-versions: - - 0.0.2 ? ^ + - 0.0.3 ? ^ author: '' - latest: 0.0.2 ? ^ + latest: 0.0.3 ? ^ description-type: haddock description: A preprocessor which will parse a psuedo-haskell module with imports and generate a module with exports an Api type and a server function license-name: MIT
6
0.230769
3
3
a86601069ea693138c8be2612e156f9b1560aa86
manifest.json
manifest.json
{ "name": "Michromeformats", "version": "0.2.9", "description": "Displays any microformats on the page. Supports hCard, hCalendar, hReview, hRecipe and geo", "page_action": { "default_icon": "images/microformats-logo-16.png", "default_title" : "Click to view the microformats...", "popup": "popup.html" }, "content_scripts": [ { "js": [ "javascripts/jquery.min.js", "javascripts/microformat.js", "javascripts/hcard.js", "javascripts/hcalendar.js", "javascripts/hreview.js", "javascripts/hrecipe.js", "javascripts/geo.js", "contentscript.js" ], "matches": [ "http://*/*", "https://*/*" ] } ], "icons" : { "48" : "images/michromeformat_logo-48.png", "128" : "images/michromeformat_logo.png" }, "permissions": [ "tabs", "http://*/*", "https://*/*" ], "background_page": "background.html" }
{ "name": "Michromeformats", "version": "0.2.9", "description": "Displays any microformats on the page. Supports hCard, hCalendar, hReview, hRecipe and geo", "page_action": { "default_icon": "images/microformats-logo-16.png", "default_title" : "Click to view the microformats...", "popup": "popup.html" }, "content_scripts": [ { "js": [ "javascripts/jquery.min.js", "javascripts/microformat.js", "javascripts/hcard.js", "javascripts/hcalendar.js", "javascripts/hreview.js", "javascripts/hrecipe.js", "javascripts/geo.js", "contentscript.js" ], "matches": [ "http://*/*", "https://*/*", "file://*/*" ] } ], "icons" : { "48" : "images/michromeformat_logo-48.png", "128" : "images/michromeformat_logo.png" }, "permissions": [ "tabs", "http://*/*", "https://*/*" ], "background_page": "background.html" }
Allow access to file URLs
Allow access to file URLs
JSON
mit
mattslack/michromeformats,mattslack/michromeformats,bryckbost/michromeformats
json
## Code Before: { "name": "Michromeformats", "version": "0.2.9", "description": "Displays any microformats on the page. Supports hCard, hCalendar, hReview, hRecipe and geo", "page_action": { "default_icon": "images/microformats-logo-16.png", "default_title" : "Click to view the microformats...", "popup": "popup.html" }, "content_scripts": [ { "js": [ "javascripts/jquery.min.js", "javascripts/microformat.js", "javascripts/hcard.js", "javascripts/hcalendar.js", "javascripts/hreview.js", "javascripts/hrecipe.js", "javascripts/geo.js", "contentscript.js" ], "matches": [ "http://*/*", "https://*/*" ] } ], "icons" : { "48" : "images/michromeformat_logo-48.png", "128" : "images/michromeformat_logo.png" }, "permissions": [ "tabs", "http://*/*", "https://*/*" ], "background_page": "background.html" } ## Instruction: Allow access to file URLs ## Code After: { "name": "Michromeformats", "version": "0.2.9", "description": "Displays any microformats on the page. Supports hCard, hCalendar, hReview, hRecipe and geo", "page_action": { "default_icon": "images/microformats-logo-16.png", "default_title" : "Click to view the microformats...", "popup": "popup.html" }, "content_scripts": [ { "js": [ "javascripts/jquery.min.js", "javascripts/microformat.js", "javascripts/hcard.js", "javascripts/hcalendar.js", "javascripts/hreview.js", "javascripts/hrecipe.js", "javascripts/geo.js", "contentscript.js" ], "matches": [ "http://*/*", "https://*/*", "file://*/*" ] } ], "icons" : { "48" : "images/michromeformat_logo-48.png", "128" : "images/michromeformat_logo.png" }, "permissions": [ "tabs", "http://*/*", "https://*/*" ], "background_page": "background.html" }
{ "name": "Michromeformats", "version": "0.2.9", "description": "Displays any microformats on the page. Supports hCard, hCalendar, hReview, hRecipe and geo", "page_action": { "default_icon": "images/microformats-logo-16.png", "default_title" : "Click to view the microformats...", "popup": "popup.html" }, "content_scripts": [ { "js": [ "javascripts/jquery.min.js", "javascripts/microformat.js", "javascripts/hcard.js", "javascripts/hcalendar.js", "javascripts/hreview.js", "javascripts/hrecipe.js", "javascripts/geo.js", "contentscript.js" ], - "matches": [ "http://*/*", "https://*/*" ] + "matches": [ "http://*/*", "https://*/*", "file://*/*" ] ? ++++++++++++++ } ], "icons" : { "48" : "images/michromeformat_logo-48.png", "128" : "images/michromeformat_logo.png" }, "permissions": [ "tabs", "http://*/*", "https://*/*" ], "background_page": "background.html" }
2
0.1
1
1
fb11aab6648c89eeff3cfb2eaba86682faad84af
Package.json
Package.json
{ "dependencies": [ { "repo": [ "https://bitbucket.org/mcinglis/libtypes.git", "https://github.com/mcinglis/libtypes.git", "https://gitorious.org/mcinglis/libtypes.git" ], "tag": "v3.*" }, { "repo": [ "https://bitbucket.org/mcinglis/libmacro.git", "https://github.com/mcinglis/libmacro.git", "https://gitorious.org/mcinglis/libmacro.git" ], "tag": "v2.*" }, { "dev": true, "repo": [ "https://bitbucket.org/mcinglis/tplrender.git", "https://github.com/mcinglis/tplrender.git" ] }, { "dev": true, "repo": [ "https://bitbucket.org/mcinglis/libbase.git", "https://github.com/mcinglis/libbase.git", "https://gitorious.org/mcinglis/libbase.git" ] } ], "commands": { "clean": "make clean", "test": "make test" } }
{ "dependencies": [ { "repo": [ "https://bitbucket.org/mcinglis/libtypes.git", "https://github.com/mcinglis/libtypes.git", "https://gitorious.org/mcinglis/libtypes.git" ], "tag": "v3.*" }, { "repo": [ "https://bitbucket.org/mcinglis/libmacro.git", "https://github.com/mcinglis/libmacro.git", "https://gitorious.org/mcinglis/libmacro.git" ], "tag": "v2.*" }, { "dev": true, "repo": [ "https://bitbucket.org/mcinglis/tplrender.git", "https://github.com/mcinglis/tplrender.git" ], "tag": "v1.*" }, { "dev": true, "repo": [ "https://bitbucket.org/mcinglis/libbase.git", "https://github.com/mcinglis/libbase.git", "https://gitorious.org/mcinglis/libbase.git" ], "tag": "v1.*" } ], "commands": { "clean": "make clean", "test": "make test" } }
Add versions to development packages
Add versions to development packages
JSON
agpl-3.0
mcinglis/libmaybe,mcinglis/libmaybe
json
## Code Before: { "dependencies": [ { "repo": [ "https://bitbucket.org/mcinglis/libtypes.git", "https://github.com/mcinglis/libtypes.git", "https://gitorious.org/mcinglis/libtypes.git" ], "tag": "v3.*" }, { "repo": [ "https://bitbucket.org/mcinglis/libmacro.git", "https://github.com/mcinglis/libmacro.git", "https://gitorious.org/mcinglis/libmacro.git" ], "tag": "v2.*" }, { "dev": true, "repo": [ "https://bitbucket.org/mcinglis/tplrender.git", "https://github.com/mcinglis/tplrender.git" ] }, { "dev": true, "repo": [ "https://bitbucket.org/mcinglis/libbase.git", "https://github.com/mcinglis/libbase.git", "https://gitorious.org/mcinglis/libbase.git" ] } ], "commands": { "clean": "make clean", "test": "make test" } } ## Instruction: Add versions to development packages ## Code After: { "dependencies": [ { "repo": [ "https://bitbucket.org/mcinglis/libtypes.git", "https://github.com/mcinglis/libtypes.git", "https://gitorious.org/mcinglis/libtypes.git" ], "tag": "v3.*" }, { "repo": [ "https://bitbucket.org/mcinglis/libmacro.git", "https://github.com/mcinglis/libmacro.git", "https://gitorious.org/mcinglis/libmacro.git" ], "tag": "v2.*" }, { "dev": true, "repo": [ "https://bitbucket.org/mcinglis/tplrender.git", "https://github.com/mcinglis/tplrender.git" ], "tag": "v1.*" }, { "dev": true, "repo": [ "https://bitbucket.org/mcinglis/libbase.git", "https://github.com/mcinglis/libbase.git", "https://gitorious.org/mcinglis/libbase.git" ], "tag": "v1.*" } ], "commands": { "clean": "make clean", "test": "make test" } }
{ "dependencies": [ { "repo": [ "https://bitbucket.org/mcinglis/libtypes.git", "https://github.com/mcinglis/libtypes.git", "https://gitorious.org/mcinglis/libtypes.git" ], "tag": "v3.*" }, { "repo": [ "https://bitbucket.org/mcinglis/libmacro.git", "https://github.com/mcinglis/libmacro.git", "https://gitorious.org/mcinglis/libmacro.git" ], "tag": "v2.*" }, - { "dev": true, + { "dev": true, ? + "repo": [ "https://bitbucket.org/mcinglis/tplrender.git", - "https://github.com/mcinglis/tplrender.git" ] + "https://github.com/mcinglis/tplrender.git" ], ? + + "tag": "v1.*" }, - { "dev": true, + { "dev": true, ? + "repo": [ "https://bitbucket.org/mcinglis/libbase.git", "https://github.com/mcinglis/libbase.git", - "https://gitorious.org/mcinglis/libbase.git" ] + "https://gitorious.org/mcinglis/libbase.git" ], ? + + "tag": "v1.*" } ], "commands": { "clean": "make clean", "test": "make test" } }
10
0.37037
6
4
bca60e1a2553bea9c4a550ac6213017f3a30d171
demo/src/app/lists/list-with-api.scss
demo/src/app/lists/list-with-api.scss
:host { list-item { display: inline-block; overflow: hidden; vertical-align: top; border: 0; margin: 0px; width: 100%; } button { background: #03A9F4; border: none; color: white; margin: 1em; width: 4em; border-radius: 5em; font-size: .8em; line-height: 1em; padding: .5em; outline: none; } .loader { height: 4em; display: block; line-height: 4em; text-align: center; position: relative; } .loader:before { content: ' '; position: absolute; top: 0; left: 0; width: 20%; height: 2px; background: red; animation: loader-animation 2s ease-out infinite; } @keyframes loader-animation { 0% { transform: translate(0%); } 100% { transform: translate(500%); } } }
:host { button { background: #03A9F4; border: none; color: white; margin: 1em; width: 4em; border-radius: 5em; font-size: .8em; line-height: 1em; padding: .5em; outline: none; } .loader { height: 4em; display: block; line-height: 4em; text-align: center; position: relative; } .loader:before { content: ' '; position: absolute; top: 0; left: 0; width: 20%; height: 2px; background: red; animation: loader-animation 2s ease-out infinite; } @keyframes loader-animation { 0% { transform: translate(0%); } 100% { transform: translate(500%); } } }
Fix CSS issue with demo
Fix CSS issue with demo
SCSS
mit
rintoj/angular2-virtual-scroll
scss
## Code Before: :host { list-item { display: inline-block; overflow: hidden; vertical-align: top; border: 0; margin: 0px; width: 100%; } button { background: #03A9F4; border: none; color: white; margin: 1em; width: 4em; border-radius: 5em; font-size: .8em; line-height: 1em; padding: .5em; outline: none; } .loader { height: 4em; display: block; line-height: 4em; text-align: center; position: relative; } .loader:before { content: ' '; position: absolute; top: 0; left: 0; width: 20%; height: 2px; background: red; animation: loader-animation 2s ease-out infinite; } @keyframes loader-animation { 0% { transform: translate(0%); } 100% { transform: translate(500%); } } } ## Instruction: Fix CSS issue with demo ## Code After: :host { button { background: #03A9F4; border: none; color: white; margin: 1em; width: 4em; border-radius: 5em; font-size: .8em; line-height: 1em; padding: .5em; outline: none; } .loader { height: 4em; display: block; line-height: 4em; text-align: center; position: relative; } .loader:before { content: ' '; position: absolute; top: 0; left: 0; width: 20%; height: 2px; background: red; animation: loader-animation 2s ease-out infinite; } @keyframes loader-animation { 0% { transform: translate(0%); } 100% { transform: translate(500%); } } }
:host { - list-item { - display: inline-block; - overflow: hidden; - vertical-align: top; - border: 0; - margin: 0px; - width: 100%; - } button { background: #03A9F4; border: none; color: white; margin: 1em; width: 4em; border-radius: 5em; font-size: .8em; line-height: 1em; padding: .5em; outline: none; } .loader { height: 4em; display: block; line-height: 4em; text-align: center; position: relative; } .loader:before { content: ' '; position: absolute; top: 0; left: 0; width: 20%; height: 2px; background: red; animation: loader-animation 2s ease-out infinite; } @keyframes loader-animation { 0% { transform: translate(0%); } 100% { transform: translate(500%); } } }
8
0.170213
0
8
38d80e10c2d8c8dfa187a0b5e660faf1c9c9f5b7
environment.yml
environment.yml
name: unidata-workshop channels: - conda-forge dependencies: - python=3 - numpy - nomkl - matplotlib - cartopy - jupyter - netcdf4 - owslib - metpy - pint - shapely - siphon - xarray - pip - ffmpeg - pytest - pip - pip: - mpldatacursor
name: unidata-workshop channels: - conda-forge dependencies: - python=3 - numpy - matplotlib - cartopy - jupyter - netcdf4 - owslib - metpy - pint - shapely - siphon - xarray - pip - ffmpeg - pytest - mplcursors
Remove nomkl (sad windows) and use mplcursors.
Remove nomkl (sad windows) and use mplcursors.
YAML
mit
julienchastang/unidata-python-workshop,julienchastang/unidata-python-workshop,Unidata/unidata-python-workshop
yaml
## Code Before: name: unidata-workshop channels: - conda-forge dependencies: - python=3 - numpy - nomkl - matplotlib - cartopy - jupyter - netcdf4 - owslib - metpy - pint - shapely - siphon - xarray - pip - ffmpeg - pytest - pip - pip: - mpldatacursor ## Instruction: Remove nomkl (sad windows) and use mplcursors. ## Code After: name: unidata-workshop channels: - conda-forge dependencies: - python=3 - numpy - matplotlib - cartopy - jupyter - netcdf4 - owslib - metpy - pint - shapely - siphon - xarray - pip - ffmpeg - pytest - mplcursors
name: unidata-workshop channels: - conda-forge dependencies: - python=3 - numpy - - nomkl - matplotlib - cartopy - jupyter - netcdf4 - owslib - metpy - pint - shapely - siphon - xarray - pip - ffmpeg - pytest - - pip - - pip: - - mpldatacursor ? -- ---- + - mplcursors ? +
5
0.217391
1
4
a1d71466d09e9e1ea2f75eae57e72e0000c65ffc
tests/run.py
tests/run.py
import sys import django from colour_runner.django_runner import ColourRunnerMixin from django.conf import settings settings.configure( DATABASES={ 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': ':memory:', } }, MIDDLEWARE_CLASSES=(), TEMPLATE_DIRS=('tests/templates',), ) if django.VERSION >= (1, 7): django.setup() try: from django.test.runner import DiscoverRunner except ImportError: # Django < 1.6 from discover_runner import DiscoverRunner class Runner(ColourRunnerMixin, DiscoverRunner): pass test_runner = Runner(verbosity=1) failures = test_runner.run_tests(['tests']) if failures: sys.exit(1)
import sys import django from colour_runner.django_runner import ColourRunnerMixin from django.conf import settings settings.configure( DATABASES={ 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': ':memory:', } }, MIDDLEWARE_CLASSES=(), TEMPLATES=[ { 'BACKEND': 'django.template.backends.django.DjangoTemplates', 'APP_DIRS': False, 'DIRS': ('tests/templates',), }, ] ) if django.VERSION >= (1, 7): django.setup() try: from django.test.runner import DiscoverRunner except ImportError: # Django < 1.6 from discover_runner import DiscoverRunner class Runner(ColourRunnerMixin, DiscoverRunner): pass test_runner = Runner(verbosity=1) failures = test_runner.run_tests(['tests']) if failures: sys.exit(1)
Add new-style TEMPLATES setting for tests
Add new-style TEMPLATES setting for tests
Python
bsd-2-clause
incuna/incuna-mail,incuna/incuna-mail
python
## Code Before: import sys import django from colour_runner.django_runner import ColourRunnerMixin from django.conf import settings settings.configure( DATABASES={ 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': ':memory:', } }, MIDDLEWARE_CLASSES=(), TEMPLATE_DIRS=('tests/templates',), ) if django.VERSION >= (1, 7): django.setup() try: from django.test.runner import DiscoverRunner except ImportError: # Django < 1.6 from discover_runner import DiscoverRunner class Runner(ColourRunnerMixin, DiscoverRunner): pass test_runner = Runner(verbosity=1) failures = test_runner.run_tests(['tests']) if failures: sys.exit(1) ## Instruction: Add new-style TEMPLATES setting for tests ## Code After: import sys import django from colour_runner.django_runner import ColourRunnerMixin from django.conf import settings settings.configure( DATABASES={ 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': ':memory:', } }, MIDDLEWARE_CLASSES=(), TEMPLATES=[ { 'BACKEND': 'django.template.backends.django.DjangoTemplates', 'APP_DIRS': False, 'DIRS': ('tests/templates',), }, ] ) if django.VERSION >= (1, 7): django.setup() try: from django.test.runner import DiscoverRunner except ImportError: # Django < 1.6 from discover_runner import DiscoverRunner class Runner(ColourRunnerMixin, DiscoverRunner): pass test_runner = Runner(verbosity=1) failures = test_runner.run_tests(['tests']) if failures: sys.exit(1)
import sys import django from colour_runner.django_runner import ColourRunnerMixin from django.conf import settings settings.configure( DATABASES={ 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': ':memory:', } }, MIDDLEWARE_CLASSES=(), - TEMPLATE_DIRS=('tests/templates',), + TEMPLATES=[ + { + 'BACKEND': 'django.template.backends.django.DjangoTemplates', + 'APP_DIRS': False, + 'DIRS': ('tests/templates',), + }, + ] ) if django.VERSION >= (1, 7): django.setup() try: from django.test.runner import DiscoverRunner except ImportError: # Django < 1.6 from discover_runner import DiscoverRunner class Runner(ColourRunnerMixin, DiscoverRunner): pass test_runner = Runner(verbosity=1) failures = test_runner.run_tests(['tests']) if failures: sys.exit(1)
8
0.216216
7
1
f995892c2c4400f96ff8264a115c9d91cc048590
dockerfiles/fedora-base.js
dockerfiles/fedora-base.js
var funcs = require('./funcs.js') module.exports = function (dist, release) { var contents = funcs.replace(header, {dist: dist, release: release}) + '\n\n' contents += funcs.replace(pkgs, {pkgs: funcs.generatePkgStr(commonPkgs)}) + '\n\n' return contents } var header = 'FROM {{DIST}}:{{RELEASE}}\n' + 'MAINTAINER William Blankenship <wblankenship@nodesource.com>' var pkgs = 'RUN yum install -y \\\n' + '{{PKGS}}' + ' && yum clean all' /* Shouldn't be needed for Fedora var epel = 'RUN rpm -ivh $(curl http://dl.fedoraproject.org/pub/epel/5/x86_64/repoview/epel-release.html | grep -oE "epel-release-[0-9\-]+\.noarch\.rpm" | sed "s/^/http:\\/\\/dl.fedoraproject.org\\/pub\\/epel\\/5\\/x86_64\\//") \\\n' + ' && yum install -y python26 \\\n' + ' && yum clean all' */ var commonPkgs = [ 'automake', 'libicu', 'curl', 'gcc', 'gcc-c++', 'git', 'kernel-devel', 'make', 'perl', 'which' ]
var funcs = require('./funcs.js') module.exports = function (dist, release) { var contents = funcs.replace(header, {dist: dist, release: release}) + '\n\n' contents += funcs.replace(pkgs, {pkgs: funcs.generatePkgStr(commonPkgs)}) + '\n\n' return contents } var header = 'FROM {{DIST}}:{{RELEASE}}\n' + 'MAINTAINER William Blankenship <wblankenship@nodesource.com>' var pkgs = 'RUN yum install -y \\\n' + '{{PKGS}}' + ' && yum clean all' /* Shouldn't be needed for Fedora var epel = 'RUN rpm -ivh $(curl http://dl.fedoraproject.org/pub/epel/5/x86_64/repoview/epel-release.html | grep -oE "epel-release-[0-9\-]+\.noarch\.rpm" | sed "s/^/http:\\/\\/dl.fedoraproject.org\\/pub\\/epel\\/5\\/x86_64\\//") \\\n' + ' && yum install -y python26 \\\n' + ' && yum clean all' */ var commonPkgs = [ 'automake', 'libicu', 'curl', 'gcc', 'gcc-c++', 'git', 'kernel-devel', 'make', 'perl', 'python', 'which' ]
Add latest python to fedora
Add latest python to fedora
JavaScript
mit
nodesource/docker-node
javascript
## Code Before: var funcs = require('./funcs.js') module.exports = function (dist, release) { var contents = funcs.replace(header, {dist: dist, release: release}) + '\n\n' contents += funcs.replace(pkgs, {pkgs: funcs.generatePkgStr(commonPkgs)}) + '\n\n' return contents } var header = 'FROM {{DIST}}:{{RELEASE}}\n' + 'MAINTAINER William Blankenship <wblankenship@nodesource.com>' var pkgs = 'RUN yum install -y \\\n' + '{{PKGS}}' + ' && yum clean all' /* Shouldn't be needed for Fedora var epel = 'RUN rpm -ivh $(curl http://dl.fedoraproject.org/pub/epel/5/x86_64/repoview/epel-release.html | grep -oE "epel-release-[0-9\-]+\.noarch\.rpm" | sed "s/^/http:\\/\\/dl.fedoraproject.org\\/pub\\/epel\\/5\\/x86_64\\//") \\\n' + ' && yum install -y python26 \\\n' + ' && yum clean all' */ var commonPkgs = [ 'automake', 'libicu', 'curl', 'gcc', 'gcc-c++', 'git', 'kernel-devel', 'make', 'perl', 'which' ] ## Instruction: Add latest python to fedora ## Code After: var funcs = require('./funcs.js') module.exports = function (dist, release) { var contents = funcs.replace(header, {dist: dist, release: release}) + '\n\n' contents += funcs.replace(pkgs, {pkgs: funcs.generatePkgStr(commonPkgs)}) + '\n\n' return contents } var header = 'FROM {{DIST}}:{{RELEASE}}\n' + 'MAINTAINER William Blankenship <wblankenship@nodesource.com>' var pkgs = 'RUN yum install -y \\\n' + '{{PKGS}}' + ' && yum clean all' /* Shouldn't be needed for Fedora var epel = 'RUN rpm -ivh $(curl http://dl.fedoraproject.org/pub/epel/5/x86_64/repoview/epel-release.html | grep -oE "epel-release-[0-9\-]+\.noarch\.rpm" | sed "s/^/http:\\/\\/dl.fedoraproject.org\\/pub\\/epel\\/5\\/x86_64\\//") \\\n' + ' && yum install -y python26 \\\n' + ' && yum clean all' */ var commonPkgs = [ 'automake', 'libicu', 'curl', 'gcc', 'gcc-c++', 'git', 'kernel-devel', 'make', 'perl', 'python', 'which' ]
var funcs = require('./funcs.js') module.exports = function (dist, release) { var contents = funcs.replace(header, {dist: dist, release: release}) + '\n\n' contents += funcs.replace(pkgs, {pkgs: funcs.generatePkgStr(commonPkgs)}) + '\n\n' return contents } var header = 'FROM {{DIST}}:{{RELEASE}}\n' + 'MAINTAINER William Blankenship <wblankenship@nodesource.com>' var pkgs = 'RUN yum install -y \\\n' + '{{PKGS}}' + ' && yum clean all' /* Shouldn't be needed for Fedora var epel = 'RUN rpm -ivh $(curl http://dl.fedoraproject.org/pub/epel/5/x86_64/repoview/epel-release.html | grep -oE "epel-release-[0-9\-]+\.noarch\.rpm" | sed "s/^/http:\\/\\/dl.fedoraproject.org\\/pub\\/epel\\/5\\/x86_64\\//") \\\n' + ' && yum install -y python26 \\\n' + ' && yum clean all' */ var commonPkgs = [ 'automake', 'libicu', 'curl', 'gcc', 'gcc-c++', 'git', 'kernel-devel', 'make', 'perl', + 'python', 'which' ]
1
0.032258
1
0
d0ef213eba6da39cf0786aef92eedfa675aa1e9e
Dashboard/app/js/lib/controllers/maps-controllers.js
Dashboard/app/js/lib/controllers/maps-controllers.js
/*jshint browser:true, jquery:true */ /*global Ember, FLOW */ FLOW.placemarkControl = Ember.ArrayController.create({ content: null, populate: function () { this.set('content', FLOW.store.findAll(FLOW.Placemark)); } }); FLOW.placemarkDetailControl = Ember.ArrayController.create({ content: null, selectedDetailImage: null, selectedPointCode: null, populate: function (placemarkId) { if(typeof placemarkId === 'undefined') { this.set('content', null); } else { this.set('content', FLOW.store.find(FLOW.PlacemarkDetail, { "placemarkId": placemarkId })); } } }); FLOW.countryControl = Ember.Object.create({ content: null, init: function() { this._super(); this.set('content', this.getContent(Ember.ENV.countries)); }, getContent: function (countries) { var countryList = []; for (var i = 0; i < countries.length; i++) { countryList.push( Ember.Object.create({ label: countries[i].label, lat: countries[i].lat, lon: countries[i].lon, zoom: countries[i].zoom }) ); } return countryList; } });
/*jshint browser:true, jquery:true */ /*global Ember, FLOW */ FLOW.placemarkControl = Ember.ArrayController.create({ content: null, populate: function () { this.set('content', FLOW.store.findAll(FLOW.Placemark)); } }); FLOW.placemarkDetailControl = Ember.ArrayController.create({ content: null, selectedDetailImage: null, selectedPointCode: null, populate: function (placemarkId) { if(typeof placemarkId === 'undefined') { this.set('content', null); } else { this.set('content', FLOW.store.find(FLOW.PlacemarkDetail, { "placemarkId": placemarkId })); } } }); FLOW.countryControl = Ember.Object.create({ content: null, init: function() { this._super(); this.set('content', this.getContent(Ember.ENV.countries)); }, getContent: function (countries) { var countryList = []; countries.sort(function (a, b) { if (a.label < b.label) return -1; if (a.label > b.label) return 1; return 0; }); for (var i = 0; i < countries.length; i++) { countryList.push( Ember.Object.create({ label: countries[i].label, lat: countries[i].lat, lon: countries[i].lon, zoom: countries[i].zoom }) ); } return countryList; } });
Sort the maps country selector items
Sort the maps country selector items . #109
JavaScript
agpl-3.0
akvo/akvo-flow,akvo/akvo-flow,akvo/akvo-flow,akvo/akvo-flow,akvo/akvo-flow
javascript
## Code Before: /*jshint browser:true, jquery:true */ /*global Ember, FLOW */ FLOW.placemarkControl = Ember.ArrayController.create({ content: null, populate: function () { this.set('content', FLOW.store.findAll(FLOW.Placemark)); } }); FLOW.placemarkDetailControl = Ember.ArrayController.create({ content: null, selectedDetailImage: null, selectedPointCode: null, populate: function (placemarkId) { if(typeof placemarkId === 'undefined') { this.set('content', null); } else { this.set('content', FLOW.store.find(FLOW.PlacemarkDetail, { "placemarkId": placemarkId })); } } }); FLOW.countryControl = Ember.Object.create({ content: null, init: function() { this._super(); this.set('content', this.getContent(Ember.ENV.countries)); }, getContent: function (countries) { var countryList = []; for (var i = 0; i < countries.length; i++) { countryList.push( Ember.Object.create({ label: countries[i].label, lat: countries[i].lat, lon: countries[i].lon, zoom: countries[i].zoom }) ); } return countryList; } }); ## Instruction: Sort the maps country selector items . #109 ## Code After: /*jshint browser:true, jquery:true */ /*global Ember, FLOW */ FLOW.placemarkControl = Ember.ArrayController.create({ content: null, populate: function () { this.set('content', FLOW.store.findAll(FLOW.Placemark)); } }); FLOW.placemarkDetailControl = Ember.ArrayController.create({ content: null, selectedDetailImage: null, selectedPointCode: null, populate: function (placemarkId) { if(typeof placemarkId === 'undefined') { this.set('content', null); } else { this.set('content', FLOW.store.find(FLOW.PlacemarkDetail, { "placemarkId": placemarkId })); } } }); FLOW.countryControl = Ember.Object.create({ content: null, init: function() { this._super(); this.set('content', this.getContent(Ember.ENV.countries)); }, getContent: function (countries) { var countryList = []; countries.sort(function (a, b) { if (a.label < b.label) return -1; if (a.label > b.label) return 1; return 0; }); for (var i = 0; i < countries.length; i++) { countryList.push( Ember.Object.create({ label: countries[i].label, lat: countries[i].lat, lon: countries[i].lon, zoom: countries[i].zoom }) ); } return countryList; } });
/*jshint browser:true, jquery:true */ /*global Ember, FLOW */ FLOW.placemarkControl = Ember.ArrayController.create({ content: null, populate: function () { this.set('content', FLOW.store.findAll(FLOW.Placemark)); } }); FLOW.placemarkDetailControl = Ember.ArrayController.create({ content: null, selectedDetailImage: null, selectedPointCode: null, populate: function (placemarkId) { if(typeof placemarkId === 'undefined') { this.set('content', null); } else { this.set('content', FLOW.store.find(FLOW.PlacemarkDetail, { "placemarkId": placemarkId })); } } }); FLOW.countryControl = Ember.Object.create({ content: null, init: function() { this._super(); this.set('content', this.getContent(Ember.ENV.countries)); }, getContent: function (countries) { var countryList = []; + countries.sort(function (a, b) { + if (a.label < b.label) return -1; + if (a.label > b.label) return 1; + return 0; + }); + for (var i = 0; i < countries.length; i++) { countryList.push( Ember.Object.create({ label: countries[i].label, lat: countries[i].lat, lon: countries[i].lon, zoom: countries[i].zoom }) ); } return countryList; } });
6
0.105263
6
0
47e48049229d5393c024c0b742bd8511693d5e09
static/js/share-buttons.js
static/js/share-buttons.js
// https://github.com/kni-labs/rrssb var popupCenter = function(url, title, w, h) { // Fixes dual-screen position Most browsers Firefox var dualScreenLeft = window.screenLeft !== undefined ? window.screenLeft : screen.left; var dualScreenTop = window.screenTop !== undefined ? window.screenTop : screen.top; var width = window.innerWidth ? window.innerWidth : document.documentElement.clientWidth ? document.documentElement.clientWidth : screen.width; var height = window.innerHeight ? window.innerHeight : document.documentElement.clientHeight ? document.documentElement.clientHeight : screen.height; var left = width / 2 - w / 2 + dualScreenLeft; var top = height / 3 - h / 3 + dualScreenTop; var newWindow = window.open( url, title, "scrollbars=yes, width=" + w + ", height=" + h + ", top=" + top + ", left=" + left ); // Puts focus on the newWindow if (newWindow && newWindow.focus) { newWindow.focus(); } }; document.querySelectorAll(".popup").forEach(function(el) { el.addEventListener("click", function(e) { popupCenter(el.getAttribute("href"), "TODO", 580, 470); e.preventDefault(); }); });
// https://github.com/kni-labs/rrssb var popupCenter = function(url) { var w = 580; var h = 470; // Fixes dual-screen position Most browsers Firefox var dualScreenLeft = window.screenLeft !== undefined ? window.screenLeft : screen.left; var dualScreenTop = window.screenTop !== undefined ? window.screenTop : screen.top; var width = window.innerWidth ? window.innerWidth : document.documentElement.clientWidth ? document.documentElement.clientWidth : screen.width; var height = window.innerHeight ? window.innerHeight : document.documentElement.clientHeight ? document.documentElement.clientHeight : screen.height; var left = width / 2 - w / 2 + dualScreenLeft; var top = height / 3 - h / 3 + dualScreenTop; var newWindow = window.open( url, "share-popup", "scrollbars=yes, width=" + w + ", height=" + h + ", top=" + top + ", left=" + left ); // Puts focus on the newWindow if (newWindow && newWindow.focus) { newWindow.focus(); } }; document.querySelectorAll(".popup").forEach(function(el) { el.addEventListener("click", function(e) { popupCenter(el.getAttribute("href")); e.preventDefault(); }); });
Remove title w and h params in popupCenter
Remove title w and h params in popupCenter
JavaScript
mit
DeveloperDavo/learnitmyway,DeveloperDavo/learnitmyway
javascript
## Code Before: // https://github.com/kni-labs/rrssb var popupCenter = function(url, title, w, h) { // Fixes dual-screen position Most browsers Firefox var dualScreenLeft = window.screenLeft !== undefined ? window.screenLeft : screen.left; var dualScreenTop = window.screenTop !== undefined ? window.screenTop : screen.top; var width = window.innerWidth ? window.innerWidth : document.documentElement.clientWidth ? document.documentElement.clientWidth : screen.width; var height = window.innerHeight ? window.innerHeight : document.documentElement.clientHeight ? document.documentElement.clientHeight : screen.height; var left = width / 2 - w / 2 + dualScreenLeft; var top = height / 3 - h / 3 + dualScreenTop; var newWindow = window.open( url, title, "scrollbars=yes, width=" + w + ", height=" + h + ", top=" + top + ", left=" + left ); // Puts focus on the newWindow if (newWindow && newWindow.focus) { newWindow.focus(); } }; document.querySelectorAll(".popup").forEach(function(el) { el.addEventListener("click", function(e) { popupCenter(el.getAttribute("href"), "TODO", 580, 470); e.preventDefault(); }); }); ## Instruction: Remove title w and h params in popupCenter ## Code After: // https://github.com/kni-labs/rrssb var popupCenter = function(url) { var w = 580; var h = 470; // Fixes dual-screen position Most browsers Firefox var dualScreenLeft = window.screenLeft !== undefined ? window.screenLeft : screen.left; var dualScreenTop = window.screenTop !== undefined ? window.screenTop : screen.top; var width = window.innerWidth ? window.innerWidth : document.documentElement.clientWidth ? document.documentElement.clientWidth : screen.width; var height = window.innerHeight ? window.innerHeight : document.documentElement.clientHeight ? document.documentElement.clientHeight : screen.height; var left = width / 2 - w / 2 + dualScreenLeft; var top = height / 3 - h / 3 + dualScreenTop; var newWindow = window.open( url, "share-popup", "scrollbars=yes, width=" + w + ", height=" + h + ", top=" + top + ", left=" + left ); // Puts focus on the newWindow if (newWindow && newWindow.focus) { newWindow.focus(); } }; document.querySelectorAll(".popup").forEach(function(el) { el.addEventListener("click", function(e) { popupCenter(el.getAttribute("href")); e.preventDefault(); }); });
// https://github.com/kni-labs/rrssb - var popupCenter = function(url, title, w, h) { ? ------------- + var popupCenter = function(url) { + var w = 580; + var h = 470; // Fixes dual-screen position Most browsers Firefox var dualScreenLeft = window.screenLeft !== undefined ? window.screenLeft : screen.left; var dualScreenTop = window.screenTop !== undefined ? window.screenTop : screen.top; var width = window.innerWidth ? window.innerWidth : document.documentElement.clientWidth ? document.documentElement.clientWidth : screen.width; var height = window.innerHeight ? window.innerHeight : document.documentElement.clientHeight ? document.documentElement.clientHeight : screen.height; var left = width / 2 - w / 2 + dualScreenLeft; var top = height / 3 - h / 3 + dualScreenTop; var newWindow = window.open( url, - title, + "share-popup", "scrollbars=yes, width=" + w + ", height=" + h + ", top=" + top + ", left=" + left ); // Puts focus on the newWindow if (newWindow && newWindow.focus) { newWindow.focus(); } }; document.querySelectorAll(".popup").forEach(function(el) { el.addEventListener("click", function(e) { - popupCenter(el.getAttribute("href"), "TODO", 580, 470); ? ------------------ + popupCenter(el.getAttribute("href")); e.preventDefault(); }); });
8
0.166667
5
3
4caf448c6517efb3bf22f0e9a832408d8cfd3322
brew_cask_install.sh
brew_cask_install.sh
brew tap caskroom/cask brew cask install --appdir="/Applications" alfred brew cask install --appdir="/Applications" firefox brew cask install --appdir="/Applications" iterm2 brew cask install --appdir="/Applications" sublime-text brew cask install --appdir="/Applications" karabiner brew cask install --appdir="/Applications" seil brew cask install --appdir="/Applications" shady
brew tap caskroom/cask brew cask install --appdir="/Applications" alfred brew cask install --appdir="/Applications" firefox brew cask install --appdir="/Applications" iterm2 brew cask install --appdir="/Applications" sublime-text brew cask install --appdir="/Applications" karabiner brew cask install --appdir="/Applications" seil brew cask install --appdir="/Applications" shady brew cask install --appdir="/Applications" google-chrome brew cask install --appdir="/Applications" shiftit brew cask install --appdir="/Applications" vlc brew cask install --appdir="/Applications" filezilla brew cask install --appdir="/Applications" appcleaner brew cask install --appdir="/Applications" libreoffice brew cask install --appdir="/Applications" thunderbird brew cask install --appdir="/Applications" skype brew cask install --appdir="/Applications" rubymine brew cask install --appdir="/Applications" silverlight brew cask install --appdir="/Applications" dropbox
Install more with brew cask
Install more with brew cask
Shell
mit
angelikatyborska/mac-os-x-setup
shell
## Code Before: brew tap caskroom/cask brew cask install --appdir="/Applications" alfred brew cask install --appdir="/Applications" firefox brew cask install --appdir="/Applications" iterm2 brew cask install --appdir="/Applications" sublime-text brew cask install --appdir="/Applications" karabiner brew cask install --appdir="/Applications" seil brew cask install --appdir="/Applications" shady ## Instruction: Install more with brew cask ## Code After: brew tap caskroom/cask brew cask install --appdir="/Applications" alfred brew cask install --appdir="/Applications" firefox brew cask install --appdir="/Applications" iterm2 brew cask install --appdir="/Applications" sublime-text brew cask install --appdir="/Applications" karabiner brew cask install --appdir="/Applications" seil brew cask install --appdir="/Applications" shady brew cask install --appdir="/Applications" google-chrome brew cask install --appdir="/Applications" shiftit brew cask install --appdir="/Applications" vlc brew cask install --appdir="/Applications" filezilla brew cask install --appdir="/Applications" appcleaner brew cask install --appdir="/Applications" libreoffice brew cask install --appdir="/Applications" thunderbird brew cask install --appdir="/Applications" skype brew cask install --appdir="/Applications" rubymine brew cask install --appdir="/Applications" silverlight brew cask install --appdir="/Applications" dropbox
brew tap caskroom/cask brew cask install --appdir="/Applications" alfred brew cask install --appdir="/Applications" firefox brew cask install --appdir="/Applications" iterm2 brew cask install --appdir="/Applications" sublime-text brew cask install --appdir="/Applications" karabiner brew cask install --appdir="/Applications" seil brew cask install --appdir="/Applications" shady + brew cask install --appdir="/Applications" google-chrome + brew cask install --appdir="/Applications" shiftit + brew cask install --appdir="/Applications" vlc + brew cask install --appdir="/Applications" filezilla + brew cask install --appdir="/Applications" appcleaner + brew cask install --appdir="/Applications" libreoffice + brew cask install --appdir="/Applications" thunderbird + brew cask install --appdir="/Applications" skype + brew cask install --appdir="/Applications" rubymine + brew cask install --appdir="/Applications" silverlight + brew cask install --appdir="/Applications" dropbox
11
1.1
11
0
bc9857a6c94afc5333bae0caa2e74ed2851e2e64
templates/studygroups/feedback_form.html
templates/studygroups/feedback_form.html
{% extends 'base.html' %} {% load crispy_forms_tags %} {% load i18n %} {% block content %} <div class="container learning-circle-signup"> <div class="row"> <div class="col-md-12 col-sm-12"> <h2> {% blocktrans with meeting_date=form.initial.study_group_meeting.meeting_date|date:"D, d M Y" meeting_time=form.initial.study_group_meeting.meeting_time|time:"f A" %} Capture feedback for the meeting that happened on {{meeting_date}}, {{meeting_time}} {% endblocktrans %} </h2> </div> <div class="col-md-12 col-sm-12"> <form action="" method="POST"> {% csrf_token %} {{ form|crispy }} <p><button type="submit" class="btn btn-default">{% trans "Save" %}</button></p> </form> <p>{% blocktrans %}Get in touch with other facilitators at <a href="https://community.p2pu.org/">community.p2pu.org</a>{% endblocktrans %}</p> </div> </div> </div> {% endblock %}
{% extends 'base.html' %} {% load crispy_forms_tags %} {% load i18n %} {% block content %} <div class="container learning-circle-signup"> <div class="row"> <div class="col-md-12 col-sm-12"> <h2> {% blocktrans with meeting_date=form.initial.study_group_meeting.meeting_date|date:"D, d M Y" meeting_time=form.initial.study_group_meeting.meeting_time|time:"f A" %} Capture feedback for the meeting that happened on {{meeting_date}}, {{meeting_time}} {% endblocktrans %} </h2> </div> <div class="col-md-12 col-sm-12"> <form action="" method="POST"> {% csrf_token %} {{ form|crispy }} <p><button type="submit" class="btn btn-default">{% trans "Save" %}</button></p> </form> <p>{% blocktrans %}If you have any questions, reach out to your organizer or the <a href="https://groups.google.com/a/p2pu.org/forum/#!forum/community">P2PU community</a>{% endblocktrans %}</p> </div> </div> </div> {% endblock %}
Update community link on feedback page
Update community link on feedback page
HTML
mit
p2pu/learning-circles,p2pu/learning-circles,p2pu/learning-circles,p2pu/learning-circles
html
## Code Before: {% extends 'base.html' %} {% load crispy_forms_tags %} {% load i18n %} {% block content %} <div class="container learning-circle-signup"> <div class="row"> <div class="col-md-12 col-sm-12"> <h2> {% blocktrans with meeting_date=form.initial.study_group_meeting.meeting_date|date:"D, d M Y" meeting_time=form.initial.study_group_meeting.meeting_time|time:"f A" %} Capture feedback for the meeting that happened on {{meeting_date}}, {{meeting_time}} {% endblocktrans %} </h2> </div> <div class="col-md-12 col-sm-12"> <form action="" method="POST"> {% csrf_token %} {{ form|crispy }} <p><button type="submit" class="btn btn-default">{% trans "Save" %}</button></p> </form> <p>{% blocktrans %}Get in touch with other facilitators at <a href="https://community.p2pu.org/">community.p2pu.org</a>{% endblocktrans %}</p> </div> </div> </div> {% endblock %} ## Instruction: Update community link on feedback page ## Code After: {% extends 'base.html' %} {% load crispy_forms_tags %} {% load i18n %} {% block content %} <div class="container learning-circle-signup"> <div class="row"> <div class="col-md-12 col-sm-12"> <h2> {% blocktrans with meeting_date=form.initial.study_group_meeting.meeting_date|date:"D, d M Y" meeting_time=form.initial.study_group_meeting.meeting_time|time:"f A" %} Capture feedback for the meeting that happened on {{meeting_date}}, {{meeting_time}} {% endblocktrans %} </h2> </div> <div class="col-md-12 col-sm-12"> <form action="" method="POST"> {% csrf_token %} {{ form|crispy }} <p><button type="submit" class="btn btn-default">{% trans "Save" %}</button></p> </form> <p>{% blocktrans %}If you have any questions, reach out to your organizer or the <a href="https://groups.google.com/a/p2pu.org/forum/#!forum/community">P2PU community</a>{% endblocktrans %}</p> </div> </div> </div> {% endblock %}
{% extends 'base.html' %} {% load crispy_forms_tags %} {% load i18n %} {% block content %} <div class="container learning-circle-signup"> <div class="row"> <div class="col-md-12 col-sm-12"> <h2> {% blocktrans with meeting_date=form.initial.study_group_meeting.meeting_date|date:"D, d M Y" meeting_time=form.initial.study_group_meeting.meeting_time|time:"f A" %} Capture feedback for the meeting that happened on {{meeting_date}}, {{meeting_time}} {% endblocktrans %} </h2> </div> <div class="col-md-12 col-sm-12"> <form action="" method="POST"> {% csrf_token %} {{ form|crispy }} <p><button type="submit" class="btn btn-default">{% trans "Save" %}</button></p> </form> - <p>{% blocktrans %}Get in touch with other facilitators at <a href="https://community.p2pu.org/">community.p2pu.org</a>{% endblocktrans %}</p> + <p>{% blocktrans %}If you have any questions, reach out to your organizer or the <a href="https://groups.google.com/a/p2pu.org/forum/#!forum/community">P2PU community</a>{% endblocktrans %}</p> </div> </div> </div> {% endblock %}
2
0.074074
1
1
cc1285a0cef923432f99aaa136a2e0ca4723d445
.github/workflows/test_url.yaml
.github/workflows/test_url.yaml
name: Add message on pull requests with the related examples on: pull_request: types: - opened jobs: all: runs-on: ubuntu-latest steps: - run: npm install --production @actions/github - run: | echo " const github = require('@actions/github'); async function run() { // Get client and context const client = new github.getOctokit(process.env.GITHUB_TOKEN); await client.pulls.createReview({ owner: github.context.issue.owner, repo: github.context.issue.repo, pull_number: github.context.issue.number, body: [ \`Examples: https://camptocamp.github.io/ngeo/\${process.env.GITHUB_HEAD_REF}/examples/\`, \`API documentation: https://camptocamp.github.io/ngeo/\${process.env.GITHUB_HEAD_REF}/apidoc/\`, ].join('\n'), event: 'COMMENT' }); } run(); " > pr-message.js - run: node pr-message.js env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
--- name: Add message on pull requests with the related examples on: pull_request: types: - opened jobs: all: name: Add message on pull requests with the related examples runs-on: ubuntu-latest steps: - run: npm install --production @actions/github - run: | echo " const github = require('@actions/github'); async function run() { // Get client and context const client = new github.getOctokit(process.env.GITHUB_TOKEN); await client.pulls.createReview({ owner: github.context.issue.owner, repo: github.context.issue.repo, pull_number: github.context.issue.number, body: [ \`Examples: https://camptocamp.github.io/ngeo/\${process.env.GITHUB_HEAD_REF}/examples/\`, \`API documentation: https://camptocamp.github.io/ngeo/\${process.env.GITHUB_HEAD_REF}/apidoc/\`, ].join('\n'), event: 'COMMENT' }); } run(); " > pr-message.js - run: node pr-message.js env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Add a name to the job
Add a name to the job
YAML
mit
camptocamp/ngeo,camptocamp/ngeo,camptocamp/ngeo,camptocamp/ngeo,camptocamp/ngeo
yaml
## Code Before: name: Add message on pull requests with the related examples on: pull_request: types: - opened jobs: all: runs-on: ubuntu-latest steps: - run: npm install --production @actions/github - run: | echo " const github = require('@actions/github'); async function run() { // Get client and context const client = new github.getOctokit(process.env.GITHUB_TOKEN); await client.pulls.createReview({ owner: github.context.issue.owner, repo: github.context.issue.repo, pull_number: github.context.issue.number, body: [ \`Examples: https://camptocamp.github.io/ngeo/\${process.env.GITHUB_HEAD_REF}/examples/\`, \`API documentation: https://camptocamp.github.io/ngeo/\${process.env.GITHUB_HEAD_REF}/apidoc/\`, ].join('\n'), event: 'COMMENT' }); } run(); " > pr-message.js - run: node pr-message.js env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} ## Instruction: Add a name to the job ## Code After: --- name: Add message on pull requests with the related examples on: pull_request: types: - opened jobs: all: name: Add message on pull requests with the related examples runs-on: ubuntu-latest steps: - run: npm install --production @actions/github - run: | echo " const github = require('@actions/github'); async function run() { // Get client and context const client = new github.getOctokit(process.env.GITHUB_TOKEN); await client.pulls.createReview({ owner: github.context.issue.owner, repo: github.context.issue.repo, pull_number: github.context.issue.number, body: [ \`Examples: https://camptocamp.github.io/ngeo/\${process.env.GITHUB_HEAD_REF}/examples/\`, \`API documentation: https://camptocamp.github.io/ngeo/\${process.env.GITHUB_HEAD_REF}/apidoc/\`, ].join('\n'), event: 'COMMENT' }); } run(); " > pr-message.js - run: node pr-message.js env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ --- name: Add message on pull requests with the related examples on: pull_request: types: - opened jobs: all: + name: Add message on pull requests with the related examples runs-on: ubuntu-latest steps: - run: npm install --production @actions/github - run: | echo " const github = require('@actions/github'); async function run() { // Get client and context const client = new github.getOctokit(process.env.GITHUB_TOKEN); await client.pulls.createReview({ owner: github.context.issue.owner, repo: github.context.issue.repo, pull_number: github.context.issue.number, body: [ \`Examples: https://camptocamp.github.io/ngeo/\${process.env.GITHUB_HEAD_REF}/examples/\`, \`API documentation: https://camptocamp.github.io/ngeo/\${process.env.GITHUB_HEAD_REF}/apidoc/\`, ].join('\n'), event: 'COMMENT' }); } run(); " > pr-message.js - run: node pr-message.js env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2
0.054054
2
0
f266ea3158e03f75b7a917aa8d9d466eced602f4
php/charge-custom-form.php
php/charge-custom-form.php
<?php require_once('./config.php'); echo "The POST is $_POST"; var_dump($_POST); $state = $_POST['shippingState']; if ( !strcmp("GA", $state) ) { // the shipping address is in Georgia, so go ahead $token = $_POST['stripeToken']; $email = $_POST['emailAddress']; echo "$token and $email"; $customer = Stripe_Customer::create(array( 'email' => $email, 'card' => $token )); $charge = Stripe_Charge::create(array( 'customer' => $customer->id, 'amount' => 1500, 'currency' => 'usd', 'description' => 'Widget, Qty 1' )); echo '<h1>Successfully charged $15.00!</h1>'; } else { echo "Sorry, we can only ship to addresses in GA."; echo "Hit the back button and try again with 'GA' in the state field."; } ?>
<?php require_once('./config.php'); var_dump($_POST); $state = $_POST['shippingState']; if ( !strcmp("GA", $state) ) { // the shipping address is in Georgia, so go ahead $token = $_POST['stripeToken']; $email = $_POST['emailAddress']; echo "$token and $email"; $customer = Stripe_Customer::create(array( 'email' => $email, 'card' => $token )); $charge = Stripe_Charge::create(array( 'customer' => $customer->id, 'amount' => 1500, 'currency' => 'usd', 'description' => 'Widget, Qty 1' )); echo '<h1>Successfully charged $15.00!</h1>'; } else { echo "Sorry, we can only ship to addresses in GA."; echo "Hit the back button and try again with 'GA' in the state field."; } ?>
Remove incorrect debugging line, leave var_dump
Remove incorrect debugging line, leave var_dump
PHP
apache-2.0
wsmoak/stripe,wsmoak/stripe,wsmoak/stripe,wsmoak/stripe,wsmoak/stripe
php
## Code Before: <?php require_once('./config.php'); echo "The POST is $_POST"; var_dump($_POST); $state = $_POST['shippingState']; if ( !strcmp("GA", $state) ) { // the shipping address is in Georgia, so go ahead $token = $_POST['stripeToken']; $email = $_POST['emailAddress']; echo "$token and $email"; $customer = Stripe_Customer::create(array( 'email' => $email, 'card' => $token )); $charge = Stripe_Charge::create(array( 'customer' => $customer->id, 'amount' => 1500, 'currency' => 'usd', 'description' => 'Widget, Qty 1' )); echo '<h1>Successfully charged $15.00!</h1>'; } else { echo "Sorry, we can only ship to addresses in GA."; echo "Hit the back button and try again with 'GA' in the state field."; } ?> ## Instruction: Remove incorrect debugging line, leave var_dump ## Code After: <?php require_once('./config.php'); var_dump($_POST); $state = $_POST['shippingState']; if ( !strcmp("GA", $state) ) { // the shipping address is in Georgia, so go ahead $token = $_POST['stripeToken']; $email = $_POST['emailAddress']; echo "$token and $email"; $customer = Stripe_Customer::create(array( 'email' => $email, 'card' => $token )); $charge = Stripe_Charge::create(array( 'customer' => $customer->id, 'amount' => 1500, 'currency' => 'usd', 'description' => 'Widget, Qty 1' )); echo '<h1>Successfully charged $15.00!</h1>'; } else { echo "Sorry, we can only ship to addresses in GA."; echo "Hit the back button and try again with 'GA' in the state field."; } ?>
<?php require_once('./config.php'); - - echo "The POST is $_POST"; var_dump($_POST); $state = $_POST['shippingState']; if ( !strcmp("GA", $state) ) { // the shipping address is in Georgia, so go ahead $token = $_POST['stripeToken']; $email = $_POST['emailAddress']; echo "$token and $email"; $customer = Stripe_Customer::create(array( 'email' => $email, 'card' => $token )); $charge = Stripe_Charge::create(array( 'customer' => $customer->id, 'amount' => 1500, 'currency' => 'usd', 'description' => 'Widget, Qty 1' )); echo '<h1>Successfully charged $15.00!</h1>'; } else { echo "Sorry, we can only ship to addresses in GA."; echo "Hit the back button and try again with 'GA' in the state field."; } ?>
2
0.05
0
2
3017f12367661328d8e8adc1d398087c0b2dc562
finders/metadata/vehicle-recalls-and-faults-alert.json
finders/metadata/vehicle-recalls-and-faults-alert.json
{ "content_id": "76290530-743e-4a8c-8752-04ebee25f64a", "base_path": "/vehicle-recalls-faults", "format_name": "Vehicle recalls and faults", "name": "Vehicle recalls and faults", "beta": true, "summary": "<p>Find out if your vehicle has been recalled by the manufacturer or has a fault. You can also search for child car seats, tyres and other vehicle parts.</p>", "filter": { "document_type": "vehicle_recalls_and_faults_alert" }, "organisations": [] }
{ "content_id": "76290530-743e-4a8c-8752-04ebee25f64a", "base_path": "/vehicle-recalls-faults", "format_name": "Vehicle recalls and faults", "name": "Vehicle recalls and faults", "beta": true, "summary": "<p>Find out if your vehicle has been recalled by the manufacturer or has a fault. You can also search for child car seats, tyres and other vehicle parts.</p>", "filter": { "document_type": "vehicle_recalls_and_faults_alert" }, "organisations": [], "pre_production": true }
Mark DVSA prototype finder as pre-production
Mark DVSA prototype finder as pre-production The vehicle-recalls-faults finder should only show in integration at present, so mark it as pre-production. This will prevent it being published on deployment in production and staging.
JSON
mit
alphagov/manuals-publisher,ministryofjustice/specialist-publisher,ministryofjustice/specialist-publisher,ministryofjustice/specialist-publisher,alphagov/manuals-publisher,ministryofjustice/specialist-publisher,alphagov/manuals-publisher
json
## Code Before: { "content_id": "76290530-743e-4a8c-8752-04ebee25f64a", "base_path": "/vehicle-recalls-faults", "format_name": "Vehicle recalls and faults", "name": "Vehicle recalls and faults", "beta": true, "summary": "<p>Find out if your vehicle has been recalled by the manufacturer or has a fault. You can also search for child car seats, tyres and other vehicle parts.</p>", "filter": { "document_type": "vehicle_recalls_and_faults_alert" }, "organisations": [] } ## Instruction: Mark DVSA prototype finder as pre-production The vehicle-recalls-faults finder should only show in integration at present, so mark it as pre-production. This will prevent it being published on deployment in production and staging. ## Code After: { "content_id": "76290530-743e-4a8c-8752-04ebee25f64a", "base_path": "/vehicle-recalls-faults", "format_name": "Vehicle recalls and faults", "name": "Vehicle recalls and faults", "beta": true, "summary": "<p>Find out if your vehicle has been recalled by the manufacturer or has a fault. You can also search for child car seats, tyres and other vehicle parts.</p>", "filter": { "document_type": "vehicle_recalls_and_faults_alert" }, "organisations": [], "pre_production": true }
{ "content_id": "76290530-743e-4a8c-8752-04ebee25f64a", "base_path": "/vehicle-recalls-faults", "format_name": "Vehicle recalls and faults", "name": "Vehicle recalls and faults", "beta": true, "summary": "<p>Find out if your vehicle has been recalled by the manufacturer or has a fault. You can also search for child car seats, tyres and other vehicle parts.</p>", "filter": { "document_type": "vehicle_recalls_and_faults_alert" }, - "organisations": [] + "organisations": [], ? + + "pre_production": true }
3
0.25
2
1
a7929778b4ee3e3f2bb4d0e4ed057b385955534d
README.md
README.md
Please note that GeilMail is very much work in progress. There are tons of ugly code (first make it work, then make it nice), documentation is lacking very much and some things are broken or not existing. ## What is GeilMail aiming for? GeilMail should make hosting an email server for you, your friends or your organisation as easy as possible. While there are a lot of solutions of setting up an email server, there need all a lot of documentation reading and understand about email. GeilMail is trying to be an all-in-one solution that can be installed and configured in 15 minutes. It is not designed for endless scalability and thousands of users, because email is about decentrality and intercommunication and not huge clustering. GeilMail will have SMTP and IMAP support with STARTTLS. There won't be support for legacy technology. ## Guidelines ### Test Coverage A high test coverage is appreciated. In order to measure and inspect, type `go test -v -cover -covermode=count -coverprofile=cover.out && go tool cover -html=cover.out`
[![Build Status](https://travis-ci.org/GeilMail/geilmail.svg?branch=master)](https://travis-ci.org/GeilMail/geilmail) ## A word of warning Please note that GeilMail is very much work in progress. There are tons of ugly code (first make it work, then make it nice), documentation is lacking very much and some things are broken or not existing. ## What is GeilMail aiming for? GeilMail should make hosting an email server for you, your friends or your organisation as easy as possible. While there are a lot of solutions of setting up an email server, they all need a lot of documentation reading and understand about email. GeilMail is trying to be an all-in-one solution that can be installed and configured in 15 minutes. It is not designed for endless scalability and thousands of users, because email is about decentrality and intercommunication and not huge clustering. GeilMail will have SMTP and IMAP support with STARTTLS. There won't be support for legacy technology. ## Guidelines ### Test Coverage A high test coverage is appreciated. In order to measure and inspect, type `go test -v -cover -covermode=count -coverprofile=cover.out && go tool cover -html=cover.out`
Build status + Typo fix
Build status + Typo fix
Markdown
isc
GeilMail/geilmail
markdown
## Code Before: Please note that GeilMail is very much work in progress. There are tons of ugly code (first make it work, then make it nice), documentation is lacking very much and some things are broken or not existing. ## What is GeilMail aiming for? GeilMail should make hosting an email server for you, your friends or your organisation as easy as possible. While there are a lot of solutions of setting up an email server, there need all a lot of documentation reading and understand about email. GeilMail is trying to be an all-in-one solution that can be installed and configured in 15 minutes. It is not designed for endless scalability and thousands of users, because email is about decentrality and intercommunication and not huge clustering. GeilMail will have SMTP and IMAP support with STARTTLS. There won't be support for legacy technology. ## Guidelines ### Test Coverage A high test coverage is appreciated. In order to measure and inspect, type `go test -v -cover -covermode=count -coverprofile=cover.out && go tool cover -html=cover.out` ## Instruction: Build status + Typo fix ## Code After: [![Build Status](https://travis-ci.org/GeilMail/geilmail.svg?branch=master)](https://travis-ci.org/GeilMail/geilmail) ## A word of warning Please note that GeilMail is very much work in progress. There are tons of ugly code (first make it work, then make it nice), documentation is lacking very much and some things are broken or not existing. ## What is GeilMail aiming for? GeilMail should make hosting an email server for you, your friends or your organisation as easy as possible. While there are a lot of solutions of setting up an email server, they all need a lot of documentation reading and understand about email. GeilMail is trying to be an all-in-one solution that can be installed and configured in 15 minutes. It is not designed for endless scalability and thousands of users, because email is about decentrality and intercommunication and not huge clustering. GeilMail will have SMTP and IMAP support with STARTTLS. There won't be support for legacy technology. ## Guidelines ### Test Coverage A high test coverage is appreciated. In order to measure and inspect, type `go test -v -cover -covermode=count -coverprofile=cover.out && go tool cover -html=cover.out`
+ + [![Build Status](https://travis-ci.org/GeilMail/geilmail.svg?branch=master)](https://travis-ci.org/GeilMail/geilmail) + + ## A word of warning Please note that GeilMail is very much work in progress. There are tons of ugly code (first make it work, then make it nice), documentation is lacking very much and some things are broken or not existing. ## What is GeilMail aiming for? - GeilMail should make hosting an email server for you, your friends or your organisation as easy as possible. While there are a lot of solutions of setting up an email server, there need all a lot of documentation reading and understand about email. GeilMail is trying to be an all-in-one solution that can be installed and configured in 15 minutes. ? ^^^^^^^^^^^ + GeilMail should make hosting an email server for you, your friends or your organisation as easy as possible. While there are a lot of solutions of setting up an email server, they all need a lot of documentation reading and understand about email. GeilMail is trying to be an all-in-one solution that can be installed and configured in 15 minutes. ? ^^^^^^^^^^ It is not designed for endless scalability and thousands of users, because email is about decentrality and intercommunication and not huge clustering. GeilMail will have SMTP and IMAP support with STARTTLS. There won't be support for legacy technology. ## Guidelines ### Test Coverage A high test coverage is appreciated. In order to measure and inspect, type `go test -v -cover -covermode=count -coverprofile=cover.out && go tool cover -html=cover.out`
6
0.375
5
1
a5c348fd1d5ac6e8212653410d43e69b28cf57db
resources/views/mail/attendance/report.blade.php
resources/views/mail/attendance/report.blade.php
@component('mail::message') RoboJackets' attendance report from {{ $export->start_time->format('l, n/j/Y \a\t g:iA') }} to {{ $export->end_time->format('l, n/j/Y \a\t g:iA') }} is available [here]({{ route('attendance.export', ['secret' => $export->secret]) }}). That link will only work once and will expire after three days. For help or to get a new link, please reply to this email. @endcomponent
@component('mail::message') RoboJackets' attendance report from {{ $export->start_time->format('l, n/j/Y \a\t g:iA') }} to {{ $export->end_time->format('l, n/j/Y \a\t g:iA') }} is available [here]({{ route('attendance.export', ['secret' => $export->secret]) }}). That link will only work once and will expire on {{ $export->expires->format('l, n/j/Y \a\t g:iA') }}. For help or to get a new link, please reply to this email. @endcomponent
Include expiration time in the email.
Include expiration time in the email.
PHP
apache-2.0
RoboJackets/apiary,RoboJackets/apiary
php
## Code Before: @component('mail::message') RoboJackets' attendance report from {{ $export->start_time->format('l, n/j/Y \a\t g:iA') }} to {{ $export->end_time->format('l, n/j/Y \a\t g:iA') }} is available [here]({{ route('attendance.export', ['secret' => $export->secret]) }}). That link will only work once and will expire after three days. For help or to get a new link, please reply to this email. @endcomponent ## Instruction: Include expiration time in the email. ## Code After: @component('mail::message') RoboJackets' attendance report from {{ $export->start_time->format('l, n/j/Y \a\t g:iA') }} to {{ $export->end_time->format('l, n/j/Y \a\t g:iA') }} is available [here]({{ route('attendance.export', ['secret' => $export->secret]) }}). That link will only work once and will expire on {{ $export->expires->format('l, n/j/Y \a\t g:iA') }}. For help or to get a new link, please reply to this email. @endcomponent
@component('mail::message') - RoboJackets' attendance report from {{ $export->start_time->format('l, n/j/Y \a\t g:iA') }} to {{ $export->end_time->format('l, n/j/Y \a\t g:iA') }} is available [here]({{ route('attendance.export', ['secret' => $export->secret]) }}). That link will only work once and will expire after three days. For help or to get a new link, please reply to this email. ? ^ ^^^^^ ^^^^^^ ^ ----------------------------------------------------------- + RoboJackets' attendance report from {{ $export->start_time->format('l, n/j/Y \a\t g:iA') }} to {{ $export->end_time->format('l, n/j/Y \a\t g:iA') }} is available [here]({{ route('attendance.export', ['secret' => $export->secret]) }}). That link will only work once and will expire on {{ $export->expires->format('l, n/j/Y \a\t g:iA') }}. For help or to get a new link, please reply to this email. ? ^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^ @endcomponent
2
0.4
1
1
becc9ff7e1d260f9a4f47a36a0e6403e71f9f0b0
contentcuration/contentcuration/utils/messages.py
contentcuration/contentcuration/utils/messages.py
import json import os from django.conf import settings from django.utils.translation import get_language from django.utils.translation import to_locale _JSON_MESSAGES_FILE_CACHE = {} def locale_data_file(locale): path = getattr(settings, 'LOCALE_PATHS')[0] locale_path = os.path.join(path, locale) return os.path.join(locale_path, "LC_FRONTEND_MESSAGES", "contentcuration-messages.json") def get_messages(): global _JSON_MESSAGES_FILE_CACHE locale = to_locale(get_language()) if locale not in _JSON_MESSAGES_FILE_CACHE: try: with open(locale_data_file(locale), 'rb') as data: message_json = json.load(data) translation_dict = {} for key, value in message_json.items(): namespace, key = key.split(".") translation_dict[namespace] = translation_dict.get(namespace) or {} translation_dict[namespace][key] = value _JSON_MESSAGES_FILE_CACHE[locale] = json.dumps(translation_dict) except IOError: _JSON_MESSAGES_FILE_CACHE[locale] = json.dumps({}) return _JSON_MESSAGES_FILE_CACHE[locale]
import json import os from django.conf import settings from django.utils.translation import get_language from django.utils.translation import to_locale _JSON_MESSAGES_FILE_CACHE = {} def locale_data_file(locale): path = getattr(settings, 'LOCALE_PATHS')[0] return os.path.join(path, locale, "LC_FRONTEND_MESSAGES", "contentcuration-messages.json") def get_messages(): global _JSON_MESSAGES_FILE_CACHE locale = to_locale(get_language()) if locale not in _JSON_MESSAGES_FILE_CACHE: try: with open(locale_data_file(locale), 'rb') as data: message_json = json.load(data) translation_dict = {} for key, value in message_json.items(): namespace, key = key.split(".") translation_dict[namespace] = translation_dict.get(namespace) or {} translation_dict[namespace][key] = value _JSON_MESSAGES_FILE_CACHE[locale] = json.dumps(translation_dict) except IOError: _JSON_MESSAGES_FILE_CACHE[locale] = json.dumps({}) return _JSON_MESSAGES_FILE_CACHE[locale]
Remove no longer needed local variable.
Remove no longer needed local variable.
Python
mit
DXCanas/content-curation,DXCanas/content-curation,DXCanas/content-curation,DXCanas/content-curation
python
## Code Before: import json import os from django.conf import settings from django.utils.translation import get_language from django.utils.translation import to_locale _JSON_MESSAGES_FILE_CACHE = {} def locale_data_file(locale): path = getattr(settings, 'LOCALE_PATHS')[0] locale_path = os.path.join(path, locale) return os.path.join(locale_path, "LC_FRONTEND_MESSAGES", "contentcuration-messages.json") def get_messages(): global _JSON_MESSAGES_FILE_CACHE locale = to_locale(get_language()) if locale not in _JSON_MESSAGES_FILE_CACHE: try: with open(locale_data_file(locale), 'rb') as data: message_json = json.load(data) translation_dict = {} for key, value in message_json.items(): namespace, key = key.split(".") translation_dict[namespace] = translation_dict.get(namespace) or {} translation_dict[namespace][key] = value _JSON_MESSAGES_FILE_CACHE[locale] = json.dumps(translation_dict) except IOError: _JSON_MESSAGES_FILE_CACHE[locale] = json.dumps({}) return _JSON_MESSAGES_FILE_CACHE[locale] ## Instruction: Remove no longer needed local variable. ## Code After: import json import os from django.conf import settings from django.utils.translation import get_language from django.utils.translation import to_locale _JSON_MESSAGES_FILE_CACHE = {} def locale_data_file(locale): path = getattr(settings, 'LOCALE_PATHS')[0] return os.path.join(path, locale, "LC_FRONTEND_MESSAGES", "contentcuration-messages.json") def get_messages(): global _JSON_MESSAGES_FILE_CACHE locale = to_locale(get_language()) if locale not in _JSON_MESSAGES_FILE_CACHE: try: with open(locale_data_file(locale), 'rb') as data: message_json = json.load(data) translation_dict = {} for key, value in message_json.items(): namespace, key = key.split(".") translation_dict[namespace] = translation_dict.get(namespace) or {} translation_dict[namespace][key] = value _JSON_MESSAGES_FILE_CACHE[locale] = json.dumps(translation_dict) except IOError: _JSON_MESSAGES_FILE_CACHE[locale] = json.dumps({}) return _JSON_MESSAGES_FILE_CACHE[locale]
import json import os from django.conf import settings from django.utils.translation import get_language from django.utils.translation import to_locale _JSON_MESSAGES_FILE_CACHE = {} def locale_data_file(locale): path = getattr(settings, 'LOCALE_PATHS')[0] - locale_path = os.path.join(path, locale) - return os.path.join(locale_path, "LC_FRONTEND_MESSAGES", "contentcuration-messages.json") ? ----- + return os.path.join(path, locale, "LC_FRONTEND_MESSAGES", "contentcuration-messages.json") ? ++++++ def get_messages(): global _JSON_MESSAGES_FILE_CACHE locale = to_locale(get_language()) if locale not in _JSON_MESSAGES_FILE_CACHE: try: with open(locale_data_file(locale), 'rb') as data: message_json = json.load(data) translation_dict = {} for key, value in message_json.items(): namespace, key = key.split(".") translation_dict[namespace] = translation_dict.get(namespace) or {} translation_dict[namespace][key] = value _JSON_MESSAGES_FILE_CACHE[locale] = json.dumps(translation_dict) except IOError: _JSON_MESSAGES_FILE_CACHE[locale] = json.dumps({}) return _JSON_MESSAGES_FILE_CACHE[locale]
3
0.085714
1
2
dfe14a821f18f232b1def9a00af5450fc7f6eaa1
src/middleware/protectedPages.js
src/middleware/protectedPages.js
import { LOCATION_CHANGE, CALL_HISTORY_METHOD, push } from 'react-router-redux'; export default store => next => action => { // Can only access test page if test data is prepared if ((action.type === CALL_HISTORY_METHOD || action.type === LOCATION_CHANGE) && action.payload.pathname === '/test' && !store.getState().test.tasks) { next(push('/')); } else { next(action); } };
import { LOCATION_CHANGE, push } from 'react-router-redux'; export default store => next => action => { // Can only access test page if test data is prepared if (action.type === LOCATION_CHANGE && action.payload.pathname === '/test' && !store.getState().test.tasks) { next(push('/')); } else { next(action); } };
Remove unecessary action type check
Remove unecessary action type check
JavaScript
apache-2.0
alexeyryzhikov/kanjitesto,alexeyryzhikov/kanjitesto
javascript
## Code Before: import { LOCATION_CHANGE, CALL_HISTORY_METHOD, push } from 'react-router-redux'; export default store => next => action => { // Can only access test page if test data is prepared if ((action.type === CALL_HISTORY_METHOD || action.type === LOCATION_CHANGE) && action.payload.pathname === '/test' && !store.getState().test.tasks) { next(push('/')); } else { next(action); } }; ## Instruction: Remove unecessary action type check ## Code After: import { LOCATION_CHANGE, push } from 'react-router-redux'; export default store => next => action => { // Can only access test page if test data is prepared if (action.type === LOCATION_CHANGE && action.payload.pathname === '/test' && !store.getState().test.tasks) { next(push('/')); } else { next(action); } };
- import { LOCATION_CHANGE, CALL_HISTORY_METHOD, push } from 'react-router-redux'; ? --------------------- + import { LOCATION_CHANGE, push } from 'react-router-redux'; export default store => next => action => { // Can only access test page if test data is prepared - if ((action.type === CALL_HISTORY_METHOD || action.type === LOCATION_CHANGE) + if (action.type === LOCATION_CHANGE && action.payload.pathname === '/test' && !store.getState().test.tasks) { next(push('/')); } else { next(action); } };
4
0.333333
2
2
53ecb8eca3b8ecff7da77ece3b81bedf91d74674
config/webpack.config.js
config/webpack.config.js
const webpack = require('webpack'), HtmlWebpackPlugin = require('html-webpack-plugin'), path = require('path'), babelCfg = require("./babel.config"), paths = { root: path.join(__dirname, '../'), app: path.join(__dirname, '../app/'), dist: path.join(__dirname, '../dist/') }; module.exports = { resolve: { alias: { cx: paths.root + 'node_modules/cx-core/src/', app: paths.app //uncomment the line below to alias cx-react to cx-preact or some other React replacement library //'cx-react': 'cx-preact', } }, module: { loaders: [{ test: /\.js$/, //add here any ES6 based library include: /(app|intl-io|cx-core|cx|redux|redux-thunk|lodash)/, loader: 'babel', query: babelCfg }] }, entry: { vendor: ['cx-react'], app: paths.app + 'index.js' }, output: { path: paths.dist, filename: "[name].js" }, plugins: [ new webpack.optimize.CommonsChunkPlugin({ names: ["vendor"], minChunks: Infinity }), new HtmlWebpackPlugin({ template: paths.app + 'index.html', hash: true }) ] };
const webpack = require('webpack'), HtmlWebpackPlugin = require('html-webpack-plugin'), path = require('path'), babelCfg = require("./babel.config"), paths = { root: path.join(__dirname, '../'), app: path.join(__dirname, '../app/'), dist: path.join(__dirname, '../dist/') }; module.exports = { resolve: { alias: { cx: paths.root + 'node_modules/cx-core/src/', app: paths.app //uncomment the line below to alias cx-react to cx-preact or some other React replacement library //'cx-react': 'cx-preact', } }, module: { loaders: [{ test: /\.js$/, //add here any ES6 based library include: /(app|intl-io|cx-core|cx|redux|redux-thunk|lodash)/, loader: 'babel', query: babelCfg }] }, entry: { //vendor: ['cx-react'], app: paths.app + 'index.js' }, output: { path: paths.dist, filename: "[name].js" }, plugins: [ // new webpack.optimize.CommonsChunkPlugin({ // names: ["vendor"], // minChunks: Infinity // }), new HtmlWebpackPlugin({ template: paths.app + 'index.html', hash: true }) ] };
Use single dist js file
Use single dist js file
JavaScript
mit
mstijak/tdo,mstijak/tdo,mstijak/tdo
javascript
## Code Before: const webpack = require('webpack'), HtmlWebpackPlugin = require('html-webpack-plugin'), path = require('path'), babelCfg = require("./babel.config"), paths = { root: path.join(__dirname, '../'), app: path.join(__dirname, '../app/'), dist: path.join(__dirname, '../dist/') }; module.exports = { resolve: { alias: { cx: paths.root + 'node_modules/cx-core/src/', app: paths.app //uncomment the line below to alias cx-react to cx-preact or some other React replacement library //'cx-react': 'cx-preact', } }, module: { loaders: [{ test: /\.js$/, //add here any ES6 based library include: /(app|intl-io|cx-core|cx|redux|redux-thunk|lodash)/, loader: 'babel', query: babelCfg }] }, entry: { vendor: ['cx-react'], app: paths.app + 'index.js' }, output: { path: paths.dist, filename: "[name].js" }, plugins: [ new webpack.optimize.CommonsChunkPlugin({ names: ["vendor"], minChunks: Infinity }), new HtmlWebpackPlugin({ template: paths.app + 'index.html', hash: true }) ] }; ## Instruction: Use single dist js file ## Code After: const webpack = require('webpack'), HtmlWebpackPlugin = require('html-webpack-plugin'), path = require('path'), babelCfg = require("./babel.config"), paths = { root: path.join(__dirname, '../'), app: path.join(__dirname, '../app/'), dist: path.join(__dirname, '../dist/') }; module.exports = { resolve: { alias: { cx: paths.root + 'node_modules/cx-core/src/', app: paths.app //uncomment the line below to alias cx-react to cx-preact or some other React replacement library //'cx-react': 'cx-preact', } }, module: { loaders: [{ test: /\.js$/, //add here any ES6 based library include: /(app|intl-io|cx-core|cx|redux|redux-thunk|lodash)/, loader: 'babel', query: babelCfg }] }, entry: { //vendor: ['cx-react'], app: paths.app + 'index.js' }, output: { path: paths.dist, filename: "[name].js" }, plugins: [ // new webpack.optimize.CommonsChunkPlugin({ // names: ["vendor"], // minChunks: Infinity // }), new HtmlWebpackPlugin({ template: paths.app + 'index.html', hash: true }) ] };
const webpack = require('webpack'), HtmlWebpackPlugin = require('html-webpack-plugin'), path = require('path'), babelCfg = require("./babel.config"), paths = { root: path.join(__dirname, '../'), app: path.join(__dirname, '../app/'), dist: path.join(__dirname, '../dist/') }; module.exports = { resolve: { alias: { cx: paths.root + 'node_modules/cx-core/src/', app: paths.app //uncomment the line below to alias cx-react to cx-preact or some other React replacement library //'cx-react': 'cx-preact', } }, module: { loaders: [{ test: /\.js$/, //add here any ES6 based library include: /(app|intl-io|cx-core|cx|redux|redux-thunk|lodash)/, loader: 'babel', query: babelCfg }] }, entry: { - vendor: ['cx-react'], + //vendor: ['cx-react'], ? ++ app: paths.app + 'index.js' }, output: { path: paths.dist, filename: "[name].js" }, plugins: [ - new webpack.optimize.CommonsChunkPlugin({ + // new webpack.optimize.CommonsChunkPlugin({ ? +++ - names: ["vendor"], + // names: ["vendor"], ? +++ - minChunks: Infinity + // minChunks: Infinity ? +++ - }), + // }), ? +++ new HtmlWebpackPlugin({ template: paths.app + 'index.html', hash: true }) ] };
10
0.2
5
5
4fa7bc49626493ed13353240d665ac7560297b00
README.md
README.md
Yii-PHPJavaBridge ================= Yii component for connecting PHP with Java Virtual Machine ## Installation Copy this repo to yii extensions dir. ## Configure Add this component to config.php: ``` return array( ... 'components' => array( ... 'java' => array( 'class' => 'application.extensions.YiiPHPJavaBridge.Wrapper', ), ), ... ); ``` ## Usage ``` $bridge = Yii::app()->java->getInstance(); echo $bridge->java("java.lang.Long")->MAX_VALUE; ```
Yii-PHPJavaBridge ================= Yii component for connecting PHP with Java Virtual Machine ## Installation Copy this repo to yii extensions dir. ## Configure Add this component to protected/config/main.php: ``` return array( ... 'components' => array( ... 'java' => array( 'class' => 'application.extensions.YiiPHPJavaBridge.Wrapper', ), ), ... ); ``` ## Usage ``` $bridge = Yii::app()->java->getInstance(); echo $bridge->java("java.lang.Long")->MAX_VALUE; ```
Fix wrong file configuration name.
Fix wrong file configuration name.
Markdown
mit
iwanjunaid/Yii-PHPJavaBridge
markdown
## Code Before: Yii-PHPJavaBridge ================= Yii component for connecting PHP with Java Virtual Machine ## Installation Copy this repo to yii extensions dir. ## Configure Add this component to config.php: ``` return array( ... 'components' => array( ... 'java' => array( 'class' => 'application.extensions.YiiPHPJavaBridge.Wrapper', ), ), ... ); ``` ## Usage ``` $bridge = Yii::app()->java->getInstance(); echo $bridge->java("java.lang.Long")->MAX_VALUE; ``` ## Instruction: Fix wrong file configuration name. ## Code After: Yii-PHPJavaBridge ================= Yii component for connecting PHP with Java Virtual Machine ## Installation Copy this repo to yii extensions dir. ## Configure Add this component to protected/config/main.php: ``` return array( ... 'components' => array( ... 'java' => array( 'class' => 'application.extensions.YiiPHPJavaBridge.Wrapper', ), ), ... ); ``` ## Usage ``` $bridge = Yii::app()->java->getInstance(); echo $bridge->java("java.lang.Long")->MAX_VALUE; ```
Yii-PHPJavaBridge ================= Yii component for connecting PHP with Java Virtual Machine ## Installation Copy this repo to yii extensions dir. ## Configure - Add this component to config.php: + Add this component to protected/config/main.php: ? ++++++++++ +++++ ``` return array( ... 'components' => array( ... 'java' => array( 'class' => 'application.extensions.YiiPHPJavaBridge.Wrapper', ), ), ... ); ``` ## Usage ``` $bridge = Yii::app()->java->getInstance(); echo $bridge->java("java.lang.Long")->MAX_VALUE; ```
2
0.058824
1
1
c7a57164fe2933e1d7d7a4b3396c36fbcbc44889
diffux-core.gemspec
diffux-core.gemspec
$LOAD_PATH << File.expand_path('../lib', __FILE__) require 'diffux_core/version' Gem::Specification.new do |s| s.name = 'diffux-core' s.version = DiffuxCore::VERSION s.license = 'MIT' s.summary = 'Diffux Core' s.description = 'Tools for taking and comparing responsive website snapshots' s.authors = ['Joe Lencioni', 'Henric Trotzig'] s.email = ['joe.lencioni@causes.com', 'henric.trotzig@causes.com'] s.require_paths = ['lib'] s.files = Dir['lib/**/*'] s.executables = ['diffux-snapshot', 'diffux-compare'] s.required_ruby_version = '>= 2.0.0' s.add_dependency 'chunky_png', '~>1.3.1' s.add_dependency 'oily_png', '~> 1.1.1' s.add_dependency 'phantomjs', '1.9.2.1' s.add_dependency 'diff-lcs', '~> 1.2' s.add_development_dependency 'rspec', '~> 2.14' s.add_development_dependency 'mocha', '~> 1.0' s.add_development_dependency 'codeclimate-test-reporter' end
$LOAD_PATH << File.expand_path('../lib', __FILE__) require 'diffux_core/version' Gem::Specification.new do |s| s.name = 'diffux-core' s.version = DiffuxCore::VERSION s.license = 'MIT' s.summary = 'Diffux Core' s.description = 'Tools for taking and comparing responsive website snapshots' s.authors = ['Joe Lencioni', 'Henric Trotzig'] s.email = ['joe.lencioni@brigade.com', 'henric.trotzig@brigade.com'] s.require_paths = ['lib'] s.files = Dir['lib/**/*'] s.executables = ['diffux-snapshot', 'diffux-compare'] s.required_ruby_version = '>= 2.0.0' s.add_dependency 'chunky_png', '~>1.3.1' s.add_dependency 'oily_png', '~> 1.1.1' s.add_dependency 'phantomjs', '1.9.2.1' s.add_dependency 'diff-lcs', '~> 1.2' s.add_development_dependency 'rspec', '~> 2.14' s.add_development_dependency 'mocha', '~> 1.0' s.add_development_dependency 'codeclimate-test-reporter' end
Change email addresses from @causes.com to @brigade.com
Change email addresses from @causes.com to @brigade.com
Ruby
mit
kalw/diffux-core,diffux/diffux-core,diffux/diffux-core,kalw/diffux-core
ruby
## Code Before: $LOAD_PATH << File.expand_path('../lib', __FILE__) require 'diffux_core/version' Gem::Specification.new do |s| s.name = 'diffux-core' s.version = DiffuxCore::VERSION s.license = 'MIT' s.summary = 'Diffux Core' s.description = 'Tools for taking and comparing responsive website snapshots' s.authors = ['Joe Lencioni', 'Henric Trotzig'] s.email = ['joe.lencioni@causes.com', 'henric.trotzig@causes.com'] s.require_paths = ['lib'] s.files = Dir['lib/**/*'] s.executables = ['diffux-snapshot', 'diffux-compare'] s.required_ruby_version = '>= 2.0.0' s.add_dependency 'chunky_png', '~>1.3.1' s.add_dependency 'oily_png', '~> 1.1.1' s.add_dependency 'phantomjs', '1.9.2.1' s.add_dependency 'diff-lcs', '~> 1.2' s.add_development_dependency 'rspec', '~> 2.14' s.add_development_dependency 'mocha', '~> 1.0' s.add_development_dependency 'codeclimate-test-reporter' end ## Instruction: Change email addresses from @causes.com to @brigade.com ## Code After: $LOAD_PATH << File.expand_path('../lib', __FILE__) require 'diffux_core/version' Gem::Specification.new do |s| s.name = 'diffux-core' s.version = DiffuxCore::VERSION s.license = 'MIT' s.summary = 'Diffux Core' s.description = 'Tools for taking and comparing responsive website snapshots' s.authors = ['Joe Lencioni', 'Henric Trotzig'] s.email = ['joe.lencioni@brigade.com', 'henric.trotzig@brigade.com'] s.require_paths = ['lib'] s.files = Dir['lib/**/*'] s.executables = ['diffux-snapshot', 'diffux-compare'] s.required_ruby_version = '>= 2.0.0' s.add_dependency 'chunky_png', '~>1.3.1' s.add_dependency 'oily_png', '~> 1.1.1' s.add_dependency 'phantomjs', '1.9.2.1' s.add_dependency 'diff-lcs', '~> 1.2' s.add_development_dependency 'rspec', '~> 2.14' s.add_development_dependency 'mocha', '~> 1.0' s.add_development_dependency 'codeclimate-test-reporter' end
$LOAD_PATH << File.expand_path('../lib', __FILE__) require 'diffux_core/version' Gem::Specification.new do |s| s.name = 'diffux-core' s.version = DiffuxCore::VERSION s.license = 'MIT' s.summary = 'Diffux Core' s.description = 'Tools for taking and comparing responsive website snapshots' s.authors = ['Joe Lencioni', 'Henric Trotzig'] - s.email = ['joe.lencioni@causes.com', 'henric.trotzig@causes.com'] ? ^ ^^ - ^ ^^ - + s.email = ['joe.lencioni@brigade.com', 'henric.trotzig@brigade.com'] ? ^^^^ ^ ^^^^ ^ s.require_paths = ['lib'] s.files = Dir['lib/**/*'] s.executables = ['diffux-snapshot', 'diffux-compare'] s.required_ruby_version = '>= 2.0.0' s.add_dependency 'chunky_png', '~>1.3.1' s.add_dependency 'oily_png', '~> 1.1.1' s.add_dependency 'phantomjs', '1.9.2.1' s.add_dependency 'diff-lcs', '~> 1.2' s.add_development_dependency 'rspec', '~> 2.14' s.add_development_dependency 'mocha', '~> 1.0' s.add_development_dependency 'codeclimate-test-reporter' end
2
0.076923
1
1
3219428f5f7408d27c5fed7909c3ac80c9be3549
cmake/FindReadline.cmake
cmake/FindReadline.cmake
include(FindCurses) include(FindTermcap) FIND_LIBRARY(READLINE_HISTORY_LIBRARY NAMES history) FIND_LIBRARY(READLINE_READLINE_LIBRARY NAMES readline) FIND_PATH(READLINE_INCLUDE_DIR readline/readline.h) SET(READLINE_FOUND FALSE) IF (READLINE_HISTORY_LIBRARY AND READLINE_READLINE_LIBRARY AND READLINE_INCLUDE_DIR) SET (READLINE_FOUND TRUE) SET (READLINE_INCLUDE_DIR ${READLINE_INCLUDE_DIR}) SET (READLINE_LIBRARIES ${READLINE_HISTORY_LIBRARY} ${READLINE_READLINE_LIBRARY}) MESSAGE(STATUS "Found GNU readline: ${READLINE_HISTORY_LIBRARY}, ${READLINE_READLINE_LIBRARY}") IF (CURSES_FOUND) SET (READLINE_LIBRARIES ${READLINE_LIBRARIES} ${CURSES_LIBRARY}) ENDIF(CURSES_FOUND) IF (TERMCAP_FOUND) SET (READLINE_LIBRARIES ${READLINE_LIBRARIES} ${TERMCAP_LIBRARY}) ENDIF (TERMCAP_FOUND) ENDIF (READLINE_HISTORY_LIBRARY AND READLINE_READLINE_LIBRARY AND READLINE_INCLUDE_DIR) MARK_AS_ADVANCED( READLINE_FOUND READLINE_INCLUDE_DIR READLINE_LIBRARIES )
include(FindTermcap) FIND_LIBRARY(READLINE_READLINE_LIBRARY NAMES readline) FIND_PATH(READLINE_INCLUDE_DIR readline/readline.h) SET(READLINE_FOUND FALSE) IF (READLINE_READLINE_LIBRARY AND READLINE_INCLUDE_DIR) SET (READLINE_FOUND TRUE) SET (READLINE_INCLUDE_DIR ${READLINE_INCLUDE_DIR}) SET (READLINE_LIBRARIES ${READLINE_READLINE_LIBRARY}) MESSAGE(STATUS "Found GNU readline: ${READLINE_READLINE_LIBRARY}") IF (TERMCAP_FOUND) SET (READLINE_LIBRARIES ${READLINE_LIBRARIES} ${TERMCAP_LIBRARY}) ENDIF (TERMCAP_FOUND) ENDIF (READLINE_READLINE_LIBRARY AND READLINE_INCLUDE_DIR) MARK_AS_ADVANCED( READLINE_FOUND READLINE_INCLUDE_DIR READLINE_LIBRARIES )
Fix broken (crashing) command line client on Ubuntu Precise
Fix broken (crashing) command line client on Ubuntu Precise libreadline already goes with libhistory compiled in, no reason to add it to the dynamically linked library list. Apparently, explicitly listing libhistory leads to the dl loader pre-loading it instead of the compiled-in version, which, in turn, leads to a crash on the first history search in the command line client. The fix is to remove cmake dependency on libhistory as well as on libncurses, which we don't need either (always require libtermcap).
CMake
bsd-2-clause
vasilenkomike/tarantool,guard163/tarantool,KlonD90/tarantool,nvoron23/tarantool,guard163/tarantool,ocelot-inc/tarantool,nvoron23/tarantool,Sannis/tarantool,ocelot-inc/tarantool,mejedi/tarantool,KlonD90/tarantool,rtsisyk/tarantool,KlonD90/tarantool,dkorolev/tarantool,nvoron23/tarantool,KlonD90/tarantool,ocelot-inc/tarantool,mejedi/tarantool,vasilenkomike/tarantool,vasilenkomike/tarantool,mejedi/tarantool,dkorolev/tarantool,rtsisyk/tarantool,ocelot-inc/tarantool,nvoron23/tarantool,condor-the-bird/tarantool,Sannis/tarantool,dkorolev/tarantool,nvoron23/tarantool,condor-the-bird/tarantool,nvoron23/tarantool,rtsisyk/tarantool,KlonD90/tarantool,Sannis/tarantool,mejedi/tarantool,Sannis/tarantool,guard163/tarantool,Sannis/tarantool,guard163/tarantool,dkorolev/tarantool,guard163/tarantool,condor-the-bird/tarantool,vasilenkomike/tarantool,vasilenkomike/tarantool,condor-the-bird/tarantool,rtsisyk/tarantool,dkorolev/tarantool,condor-the-bird/tarantool
cmake
## Code Before: include(FindCurses) include(FindTermcap) FIND_LIBRARY(READLINE_HISTORY_LIBRARY NAMES history) FIND_LIBRARY(READLINE_READLINE_LIBRARY NAMES readline) FIND_PATH(READLINE_INCLUDE_DIR readline/readline.h) SET(READLINE_FOUND FALSE) IF (READLINE_HISTORY_LIBRARY AND READLINE_READLINE_LIBRARY AND READLINE_INCLUDE_DIR) SET (READLINE_FOUND TRUE) SET (READLINE_INCLUDE_DIR ${READLINE_INCLUDE_DIR}) SET (READLINE_LIBRARIES ${READLINE_HISTORY_LIBRARY} ${READLINE_READLINE_LIBRARY}) MESSAGE(STATUS "Found GNU readline: ${READLINE_HISTORY_LIBRARY}, ${READLINE_READLINE_LIBRARY}") IF (CURSES_FOUND) SET (READLINE_LIBRARIES ${READLINE_LIBRARIES} ${CURSES_LIBRARY}) ENDIF(CURSES_FOUND) IF (TERMCAP_FOUND) SET (READLINE_LIBRARIES ${READLINE_LIBRARIES} ${TERMCAP_LIBRARY}) ENDIF (TERMCAP_FOUND) ENDIF (READLINE_HISTORY_LIBRARY AND READLINE_READLINE_LIBRARY AND READLINE_INCLUDE_DIR) MARK_AS_ADVANCED( READLINE_FOUND READLINE_INCLUDE_DIR READLINE_LIBRARIES ) ## Instruction: Fix broken (crashing) command line client on Ubuntu Precise libreadline already goes with libhistory compiled in, no reason to add it to the dynamically linked library list. Apparently, explicitly listing libhistory leads to the dl loader pre-loading it instead of the compiled-in version, which, in turn, leads to a crash on the first history search in the command line client. The fix is to remove cmake dependency on libhistory as well as on libncurses, which we don't need either (always require libtermcap). ## Code After: include(FindTermcap) FIND_LIBRARY(READLINE_READLINE_LIBRARY NAMES readline) FIND_PATH(READLINE_INCLUDE_DIR readline/readline.h) SET(READLINE_FOUND FALSE) IF (READLINE_READLINE_LIBRARY AND READLINE_INCLUDE_DIR) SET (READLINE_FOUND TRUE) SET (READLINE_INCLUDE_DIR ${READLINE_INCLUDE_DIR}) SET (READLINE_LIBRARIES ${READLINE_READLINE_LIBRARY}) MESSAGE(STATUS "Found GNU readline: ${READLINE_READLINE_LIBRARY}") IF (TERMCAP_FOUND) SET (READLINE_LIBRARIES ${READLINE_LIBRARIES} ${TERMCAP_LIBRARY}) ENDIF (TERMCAP_FOUND) ENDIF (READLINE_READLINE_LIBRARY AND READLINE_INCLUDE_DIR) MARK_AS_ADVANCED( READLINE_FOUND READLINE_INCLUDE_DIR READLINE_LIBRARIES )
- include(FindCurses) include(FindTermcap) - FIND_LIBRARY(READLINE_HISTORY_LIBRARY NAMES history) FIND_LIBRARY(READLINE_READLINE_LIBRARY NAMES readline) FIND_PATH(READLINE_INCLUDE_DIR readline/readline.h) SET(READLINE_FOUND FALSE) - IF (READLINE_HISTORY_LIBRARY AND READLINE_READLINE_LIBRARY AND READLINE_INCLUDE_DIR) ? ----------------------------- + IF (READLINE_READLINE_LIBRARY AND READLINE_INCLUDE_DIR) SET (READLINE_FOUND TRUE) SET (READLINE_INCLUDE_DIR ${READLINE_INCLUDE_DIR}) - SET (READLINE_LIBRARIES ${READLINE_HISTORY_LIBRARY} ${READLINE_READLINE_LIBRARY}) ? ---------------------------- + SET (READLINE_LIBRARIES ${READLINE_READLINE_LIBRARY}) - MESSAGE(STATUS "Found GNU readline: ${READLINE_HISTORY_LIBRARY}, ${READLINE_READLINE_LIBRARY}") ? ----------------------------- + MESSAGE(STATUS "Found GNU readline: ${READLINE_READLINE_LIBRARY}") - IF (CURSES_FOUND) - SET (READLINE_LIBRARIES ${READLINE_LIBRARIES} ${CURSES_LIBRARY}) - ENDIF(CURSES_FOUND) IF (TERMCAP_FOUND) SET (READLINE_LIBRARIES ${READLINE_LIBRARIES} ${TERMCAP_LIBRARY}) ENDIF (TERMCAP_FOUND) - ENDIF (READLINE_HISTORY_LIBRARY AND READLINE_READLINE_LIBRARY AND READLINE_INCLUDE_DIR) ? ----------------------------- + ENDIF (READLINE_READLINE_LIBRARY AND READLINE_INCLUDE_DIR) MARK_AS_ADVANCED( READLINE_FOUND READLINE_INCLUDE_DIR READLINE_LIBRARIES )
13
0.5
4
9
101b6a994ef6e1eb7095ce075b112f5d80947bef
webextensions/manifest.json
webextensions/manifest.json
{ "manifest_version": 2, "name": "__MSG_extensionName__", "version": "1.99.0", "author": "ClearCode Inc.", "description": "__MSG_extensionDescription__", "permissions": [ "accountsRead", "compose", "messagesRead", "storage" ], "icons": { "16": "/resources/icon.svg", "20": "/resources/icon.svg", "24": "/resources/icon.svg", "32": "/resources/icon.svg" }, "background": { "page": "/background/background.html" }, "message_display_action": { "default_icon": "/resources/icon.svg", "default_title": "__MSG_buttonsLabel__", "default_popup": "/ui/message-display-action/message-display-action.html" }, "default_locale": "en", "applications": { "gecko": { "id": "typical-reply@clear-code.com", "strict_min_version": "78.0" } } }
{ "manifest_version": 2, "name": "__MSG_extensionName__", "version": "1.99.0", "author": "ClearCode Inc.", "description": "__MSG_extensionDescription__", "permissions": [ "accountsRead", "compose", "messagesRead", "storage" ], "icons": { "16": "/resources/icon.svg", "20": "/resources/icon.svg", "24": "/resources/icon.svg", "32": "/resources/icon.svg", "64": "/resources/icon.svg" }, "background": { "page": "/background/background.html" }, "message_display_action": { "default_icon": "/resources/icon.svg", "default_title": "__MSG_buttonsLabel__", "default_popup": "/ui/message-display-action/message-display-action.html" }, "default_locale": "en", "applications": { "gecko": { "id": "typical-reply@clear-code.com", "strict_min_version": "78.0" } } }
Set icon for more larger size
Set icon for more larger size
JSON
mpl-2.0
clear-code/typical-reply
json
## Code Before: { "manifest_version": 2, "name": "__MSG_extensionName__", "version": "1.99.0", "author": "ClearCode Inc.", "description": "__MSG_extensionDescription__", "permissions": [ "accountsRead", "compose", "messagesRead", "storage" ], "icons": { "16": "/resources/icon.svg", "20": "/resources/icon.svg", "24": "/resources/icon.svg", "32": "/resources/icon.svg" }, "background": { "page": "/background/background.html" }, "message_display_action": { "default_icon": "/resources/icon.svg", "default_title": "__MSG_buttonsLabel__", "default_popup": "/ui/message-display-action/message-display-action.html" }, "default_locale": "en", "applications": { "gecko": { "id": "typical-reply@clear-code.com", "strict_min_version": "78.0" } } } ## Instruction: Set icon for more larger size ## Code After: { "manifest_version": 2, "name": "__MSG_extensionName__", "version": "1.99.0", "author": "ClearCode Inc.", "description": "__MSG_extensionDescription__", "permissions": [ "accountsRead", "compose", "messagesRead", "storage" ], "icons": { "16": "/resources/icon.svg", "20": "/resources/icon.svg", "24": "/resources/icon.svg", "32": "/resources/icon.svg", "64": "/resources/icon.svg" }, "background": { "page": "/background/background.html" }, "message_display_action": { "default_icon": "/resources/icon.svg", "default_title": "__MSG_buttonsLabel__", "default_popup": "/ui/message-display-action/message-display-action.html" }, "default_locale": "en", "applications": { "gecko": { "id": "typical-reply@clear-code.com", "strict_min_version": "78.0" } } }
{ "manifest_version": 2, "name": "__MSG_extensionName__", "version": "1.99.0", "author": "ClearCode Inc.", "description": "__MSG_extensionDescription__", "permissions": [ "accountsRead", "compose", "messagesRead", "storage" ], "icons": { "16": "/resources/icon.svg", "20": "/resources/icon.svg", "24": "/resources/icon.svg", - "32": "/resources/icon.svg" + "32": "/resources/icon.svg", ? + + "64": "/resources/icon.svg" }, "background": { "page": "/background/background.html" }, "message_display_action": { "default_icon": "/resources/icon.svg", "default_title": "__MSG_buttonsLabel__", "default_popup": "/ui/message-display-action/message-display-action.html" }, "default_locale": "en", "applications": { "gecko": { "id": "typical-reply@clear-code.com", "strict_min_version": "78.0" } } }
3
0.088235
2
1
c8cfebe04527481c74f6b446c23b9bfc0ca51acf
src/main/scala/Tools.scala
src/main/scala/Tools.scala
package org.continuumio.bokeh sealed abstract class Tool extends PlotObject class PanTool extends Tool { object dimensions extends Field[this.type, List[Dimension]](this) } class WheelZoomTool extends Tool { object dimensions extends Field[this.type, List[Dimension]](this) } class PreviewSaveTool extends Tool { object dimensions extends Field[this.type, List[Dimension]](this) object dataranges extends Field[this.type, List[Range with DataRange]](this) } class EmbedTool extends Tool { object dimensions extends Field[this.type, List[Dimension]](this) object dataranges extends Field[this.type, List[Range with DataRange]](this) } class ResetTool extends Tool class ResizeTool extends Tool class CrosshairTool extends Tool class BoxZoomTool extends Tool { object renderers extends Field[this.type, List[Renderer]](this) object select_every_mousemove extends Field[this.type, Boolean](this, true) } class BoxSelectTool extends Tool { object renderers extends Field[this.type, List[Renderer]](this) object select_every_mousemove extends Field[this.type, Boolean](this, true) }
package org.continuumio.bokeh sealed abstract class Tool extends PlotObject { object plot extends Field[this.type, Plot](this) } class PanTool extends Tool { object dimensions extends Field[this.type, List[Dimension]](this) } class WheelZoomTool extends Tool { object dimensions extends Field[this.type, List[Dimension]](this) } class PreviewSaveTool extends Tool { object dimensions extends Field[this.type, List[Dimension]](this) object dataranges extends Field[this.type, List[Range with DataRange]](this) } class EmbedTool extends Tool { object dimensions extends Field[this.type, List[Dimension]](this) object dataranges extends Field[this.type, List[Range with DataRange]](this) } class ResetTool extends Tool class ResizeTool extends Tool class CrosshairTool extends Tool class BoxZoomTool extends Tool { object renderers extends Field[this.type, List[Renderer]](this) object select_every_mousemove extends Field[this.type, Boolean](this, true) } class BoxSelectTool extends Tool { object renderers extends Field[this.type, List[Renderer]](this) object select_every_mousemove extends Field[this.type, Boolean](this, true) }
Add `plot` field to Tool
Add `plot` field to Tool
Scala
mit
bokeh/bokeh-scala,bokeh/bokeh-scala
scala
## Code Before: package org.continuumio.bokeh sealed abstract class Tool extends PlotObject class PanTool extends Tool { object dimensions extends Field[this.type, List[Dimension]](this) } class WheelZoomTool extends Tool { object dimensions extends Field[this.type, List[Dimension]](this) } class PreviewSaveTool extends Tool { object dimensions extends Field[this.type, List[Dimension]](this) object dataranges extends Field[this.type, List[Range with DataRange]](this) } class EmbedTool extends Tool { object dimensions extends Field[this.type, List[Dimension]](this) object dataranges extends Field[this.type, List[Range with DataRange]](this) } class ResetTool extends Tool class ResizeTool extends Tool class CrosshairTool extends Tool class BoxZoomTool extends Tool { object renderers extends Field[this.type, List[Renderer]](this) object select_every_mousemove extends Field[this.type, Boolean](this, true) } class BoxSelectTool extends Tool { object renderers extends Field[this.type, List[Renderer]](this) object select_every_mousemove extends Field[this.type, Boolean](this, true) } ## Instruction: Add `plot` field to Tool ## Code After: package org.continuumio.bokeh sealed abstract class Tool extends PlotObject { object plot extends Field[this.type, Plot](this) } class PanTool extends Tool { object dimensions extends Field[this.type, List[Dimension]](this) } class WheelZoomTool extends Tool { object dimensions extends Field[this.type, List[Dimension]](this) } class PreviewSaveTool extends Tool { object dimensions extends Field[this.type, List[Dimension]](this) object dataranges extends Field[this.type, List[Range with DataRange]](this) } class EmbedTool extends Tool { object dimensions extends Field[this.type, List[Dimension]](this) object dataranges extends Field[this.type, List[Range with DataRange]](this) } class ResetTool extends Tool class ResizeTool extends Tool class CrosshairTool extends Tool class BoxZoomTool extends Tool { object renderers extends Field[this.type, List[Renderer]](this) object select_every_mousemove extends Field[this.type, Boolean](this, true) } class BoxSelectTool extends Tool { object renderers extends Field[this.type, List[Renderer]](this) object select_every_mousemove extends Field[this.type, Boolean](this, true) }
package org.continuumio.bokeh - sealed abstract class Tool extends PlotObject + sealed abstract class Tool extends PlotObject { ? ++ + object plot extends Field[this.type, Plot](this) + } class PanTool extends Tool { object dimensions extends Field[this.type, List[Dimension]](this) } class WheelZoomTool extends Tool { object dimensions extends Field[this.type, List[Dimension]](this) } class PreviewSaveTool extends Tool { object dimensions extends Field[this.type, List[Dimension]](this) object dataranges extends Field[this.type, List[Range with DataRange]](this) } class EmbedTool extends Tool { object dimensions extends Field[this.type, List[Dimension]](this) object dataranges extends Field[this.type, List[Range with DataRange]](this) } class ResetTool extends Tool class ResizeTool extends Tool class CrosshairTool extends Tool class BoxZoomTool extends Tool { object renderers extends Field[this.type, List[Renderer]](this) object select_every_mousemove extends Field[this.type, Boolean](this, true) } class BoxSelectTool extends Tool { object renderers extends Field[this.type, List[Renderer]](this) object select_every_mousemove extends Field[this.type, Boolean](this, true) }
4
0.108108
3
1
2fbd1ae1814834703a861ad4e4bb1996cc01e5b0
src/m4/ax_vpp_find_jdk8.m4
src/m4/ax_vpp_find_jdk8.m4
AC_DEFUN([AX_VPP_FIND_JDK8], [ while true do test "${JAVA_HOME+set}" = set && break for dir in $(find /usr/lib/jvm/* -maxdepth 0 -type d); do AC_MSG_CHECKING([${dir} for Java 8 compiler]) JAVA_VERSION=$(${dir}/bin/javac -source 8 -version 2>&1) if test 0 -eq "$?"; then JAVA_VERSION=$(echo "${JAVA_VERSION}" | cut -d\ -f2) JAVA_HOME=${dir} JAVAC=${dir}/bin/javac JAVAH=${dir}/bin/javah JAR=${dir}/bin/jar AC_MSG_RESULT([found version $JAVA_VERSION]) break else JAVA_VERSION="" AC_MSG_RESULT([no]) fi done test "${JAVA_HOME}set" = set && AC_MSG_ERROR([Could not find Java 8 compiler]) break done ])
AC_DEFUN([AX_VPP_FIND_JDK8], [ while true do if test "${JAVA_HOME+set}" = set ; then AC_MSG_CHECKING([${JAVA_HOME} for Java 8 compiler]) JAVAC=${JAVA_HOME}/bin/javac JAVAH=${JAVA_HOME}/bin/javah JAR=${JAVA_HOME}/bin/jar JAVA_VERSION=$(${JAVA_HOME}/bin/javac -source 8 -version 2>&1) if test 0 -eq "$?"; then JAVA_VERSION=$(echo "${JAVA_VERSION}" | cut -d\ -f2) AC_MSG_RESULT([ok]) else AC_MSG_RESULT([no]) AC_MSG_ERROR([Java in ${JAVA_HOME} (path specified in JAVA_HOME) cannot compile Java 8 code]) fi break fi for dir in $(find /usr/lib/jvm/* -maxdepth 0 -type d); do AC_MSG_CHECKING([${dir} for Java 8 compiler]) JAVA_VERSION=$(${dir}/bin/javac -source 8 -version 2>&1) if test 0 -eq "$?"; then JAVA_VERSION=$(echo "${JAVA_VERSION}" | cut -d\ -f2) JAVA_HOME=${dir} JAVAC=${dir}/bin/javac JAVAH=${dir}/bin/javah JAR=${dir}/bin/jar AC_MSG_RESULT([found version $JAVA_VERSION]) break else JAVA_VERSION="" AC_MSG_RESULT([no]) fi done test "${JAVA_HOME}set" = set && AC_MSG_ERROR([Could not find Java 8 compiler]) break done ])
Improve Java 8 detection m4 script to deal with pre-set JAVA_HOME
Improve Java 8 detection m4 script to deal with pre-set JAVA_HOME Change-Id: I38685530634fd43d0a46ff43e5ef7d62b9ee4d9b Signed-off-by: Damjan Marion <9141bba8b2efed526e55cf796d48631af330ad98@cisco.com>
M4
apache-2.0
vpp-dev/vpp,milanlenco/vpp,milanlenco/vpp,FDio/vpp,FDio/vpp,chrisy/vpp,chrisy/vpp,vpp-dev/vpp,milanlenco/vpp,FDio/vpp,vpp-dev/vpp,FDio/vpp,chrisy/vpp,vpp-dev/vpp,chrisy/vpp,milanlenco/vpp,chrisy/vpp,milanlenco/vpp,vpp-dev/vpp,milanlenco/vpp,FDio/vpp,chrisy/vpp,FDio/vpp,vpp-dev/vpp,chrisy/vpp,chrisy/vpp,vpp-dev/vpp,FDio/vpp,FDio/vpp
m4
## Code Before: AC_DEFUN([AX_VPP_FIND_JDK8], [ while true do test "${JAVA_HOME+set}" = set && break for dir in $(find /usr/lib/jvm/* -maxdepth 0 -type d); do AC_MSG_CHECKING([${dir} for Java 8 compiler]) JAVA_VERSION=$(${dir}/bin/javac -source 8 -version 2>&1) if test 0 -eq "$?"; then JAVA_VERSION=$(echo "${JAVA_VERSION}" | cut -d\ -f2) JAVA_HOME=${dir} JAVAC=${dir}/bin/javac JAVAH=${dir}/bin/javah JAR=${dir}/bin/jar AC_MSG_RESULT([found version $JAVA_VERSION]) break else JAVA_VERSION="" AC_MSG_RESULT([no]) fi done test "${JAVA_HOME}set" = set && AC_MSG_ERROR([Could not find Java 8 compiler]) break done ]) ## Instruction: Improve Java 8 detection m4 script to deal with pre-set JAVA_HOME Change-Id: I38685530634fd43d0a46ff43e5ef7d62b9ee4d9b Signed-off-by: Damjan Marion <9141bba8b2efed526e55cf796d48631af330ad98@cisco.com> ## Code After: AC_DEFUN([AX_VPP_FIND_JDK8], [ while true do if test "${JAVA_HOME+set}" = set ; then AC_MSG_CHECKING([${JAVA_HOME} for Java 8 compiler]) JAVAC=${JAVA_HOME}/bin/javac JAVAH=${JAVA_HOME}/bin/javah JAR=${JAVA_HOME}/bin/jar JAVA_VERSION=$(${JAVA_HOME}/bin/javac -source 8 -version 2>&1) if test 0 -eq "$?"; then JAVA_VERSION=$(echo "${JAVA_VERSION}" | cut -d\ -f2) AC_MSG_RESULT([ok]) else AC_MSG_RESULT([no]) AC_MSG_ERROR([Java in ${JAVA_HOME} (path specified in JAVA_HOME) cannot compile Java 8 code]) fi break fi for dir in $(find /usr/lib/jvm/* -maxdepth 0 -type d); do AC_MSG_CHECKING([${dir} for Java 8 compiler]) JAVA_VERSION=$(${dir}/bin/javac -source 8 -version 2>&1) if test 0 -eq "$?"; then JAVA_VERSION=$(echo "${JAVA_VERSION}" | cut -d\ -f2) JAVA_HOME=${dir} JAVAC=${dir}/bin/javac JAVAH=${dir}/bin/javah JAR=${dir}/bin/jar AC_MSG_RESULT([found version $JAVA_VERSION]) break else JAVA_VERSION="" AC_MSG_RESULT([no]) fi done test "${JAVA_HOME}set" = set && AC_MSG_ERROR([Could not find Java 8 compiler]) break done ])
AC_DEFUN([AX_VPP_FIND_JDK8], [ while true do - test "${JAVA_HOME+set}" = set && break ? ^^ ^^ ^^ + if test "${JAVA_HOME+set}" = set ; then ? +++ ^ ^^ ^ + AC_MSG_CHECKING([${JAVA_HOME} for Java 8 compiler]) + JAVAC=${JAVA_HOME}/bin/javac + JAVAH=${JAVA_HOME}/bin/javah + JAR=${JAVA_HOME}/bin/jar + JAVA_VERSION=$(${JAVA_HOME}/bin/javac -source 8 -version 2>&1) + if test 0 -eq "$?"; then + JAVA_VERSION=$(echo "${JAVA_VERSION}" | cut -d\ -f2) + AC_MSG_RESULT([ok]) + else + AC_MSG_RESULT([no]) + AC_MSG_ERROR([Java in ${JAVA_HOME} (path specified in JAVA_HOME) cannot compile Java 8 code]) + fi + break + fi for dir in $(find /usr/lib/jvm/* -maxdepth 0 -type d); do AC_MSG_CHECKING([${dir} for Java 8 compiler]) JAVA_VERSION=$(${dir}/bin/javac -source 8 -version 2>&1) if test 0 -eq "$?"; then JAVA_VERSION=$(echo "${JAVA_VERSION}" | cut -d\ -f2) JAVA_HOME=${dir} JAVAC=${dir}/bin/javac JAVAH=${dir}/bin/javah JAR=${dir}/bin/jar AC_MSG_RESULT([found version $JAVA_VERSION]) break else JAVA_VERSION="" AC_MSG_RESULT([no]) fi done test "${JAVA_HOME}set" = set && AC_MSG_ERROR([Could not find Java 8 compiler]) break done ])
16
0.551724
15
1
b2e5fefcc7a1d8fc4462d9b210ee9f69978037ea
.github/pull_request_template.md
.github/pull_request_template.md
<!-- Hi! Thanks for contributing to JupyterLab. Please look through the checklist below before submitting your pull request. --> ## References <!-- Note here issue numbers this pull request addresses. --> <!-- Note here any other pull requests that address this issue and how this pull request is different. --> ## Code changes <!-- Describe here the code changes and how they address the issue. --> ## User-facing changes <!-- Describe here any visual or user interaction changes and how they address the issue. --> <!-- For user interface changes, include before/after screenshots here. --> ## Backwards incompatibe changes <!-- Describe here any backwards-incompatible changes to JupyterLab public APIs. -->
<!-- Thanks for contributing to JupyterLab! Please fill out the following items to submit a pull request. --> ## References <!-- Note here issue numbers this pull request addresses. --> <!-- Note here any other pull requests that address this issue and how this pull request is different. --> ## Code changes <!-- Describe here the code changes and how they address the issue. --> ## User-facing changes <!-- Describe here any visual or user interaction changes and how they address the issue. --> <!-- For user interface changes, include before/after screenshots here. --> ## Backwards incompatibe changes <!-- Describe here any backwards-incompatible changes to JupyterLab public APIs. -->
Update initial greeting and instructions for PR template.
Update initial greeting and instructions for PR template.
Markdown
bsd-3-clause
jupyter/jupyterlab,jupyter/jupyterlab,jupyter/jupyterlab,jupyter/jupyterlab,jupyter/jupyterlab
markdown
## Code Before: <!-- Hi! Thanks for contributing to JupyterLab. Please look through the checklist below before submitting your pull request. --> ## References <!-- Note here issue numbers this pull request addresses. --> <!-- Note here any other pull requests that address this issue and how this pull request is different. --> ## Code changes <!-- Describe here the code changes and how they address the issue. --> ## User-facing changes <!-- Describe here any visual or user interaction changes and how they address the issue. --> <!-- For user interface changes, include before/after screenshots here. --> ## Backwards incompatibe changes <!-- Describe here any backwards-incompatible changes to JupyterLab public APIs. --> ## Instruction: Update initial greeting and instructions for PR template. ## Code After: <!-- Thanks for contributing to JupyterLab! Please fill out the following items to submit a pull request. --> ## References <!-- Note here issue numbers this pull request addresses. --> <!-- Note here any other pull requests that address this issue and how this pull request is different. --> ## Code changes <!-- Describe here the code changes and how they address the issue. --> ## User-facing changes <!-- Describe here any visual or user interaction changes and how they address the issue. --> <!-- For user interface changes, include before/after screenshots here. --> ## Backwards incompatibe changes <!-- Describe here any backwards-incompatible changes to JupyterLab public APIs. -->
+ <!-- Thanks for contributing to JupyterLab! Please fill out the following items to submit a pull request. --> - <!-- - Hi! Thanks for contributing to JupyterLab. - Please look through the checklist below before submitting your pull request. - --> ## References + <!-- Note here issue numbers this pull request addresses. --> - <!-- Note here any other pull requests that address this issue and how this pull request is different. --> + ## Code changes - ## Code changes <!-- Describe here the code changes and how they address the issue. --> + ## User-facing changes - ## User-facing changes <!-- Describe here any visual or user interaction changes and how they address the issue. --> - <!-- For user interface changes, include before/after screenshots here. --> + ## Backwards incompatibe changes - ## Backwards incompatibe changes <!-- Describe here any backwards-incompatible changes to JupyterLab public APIs. -->
14
0.56
5
9
094e4c26999e38db9f2606512ad7eaa3116bdc7d
chrome/test/data/popup_blocker/popup-blocked-to-post-blank.html
chrome/test/data/popup_blocker/popup-blocked-to-post-blank.html
<html> <head> <title>Popup Blocked Post Blank</title> <script> function test() { // We rely on sequential ordering of POST processing. var form = document.getElementById('form'); form.submit(); } </script> </head> <body onload="test()"> If the POST pop-up was not blocked then there will be an warning message displayed in a new tab. Otherwise, the test passes. <form id="form" action="data:text/html,<title>Popup Success!</title>you should not see this message if popup blocker is enabled" target="_blank"> <input type="submit" value="Submit to new window"/> </form> </body> </html>
<html> <head> <title>Popup Blocked Post Blank</title> <script> function test() { // We rely on sequential ordering of POST processing. var form = document.getElementById('form'); form.submit(); } </script> </head> <body onload="test()"> If the POST pop-up was not blocked then there will be an warning message displayed in a new tab. Otherwise, the test passes. <form id="form" method="post" action="data:text/html,<title>Popup Success!</title>you should not see this message if popup blocker is enabled" target="_blank"> <input type="submit" value="Submit to new window"/> </form> </body> </html>
Add missing POST method to popup test HTML
Add missing POST method to popup test HTML This is a pre-requisite for crbug.com/291747 / crrev.com/23526048 as with that get request will have query param appended even when the target is data: Also the test states it is doing a POST so this actually makes it so. Landing as its own patch as trybots don't like my attempts to send CRLF edits in patches. NOTRY=true BUG=291747 R=kristianm@chromium.org Review URL: https://codereview.chromium.org/23513057 git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@223266 0039d316-1c4b-4281-b951-d872f2087c98
HTML
bsd-3-clause
Chilledheart/chromium,Jonekee/chromium.src,dednal/chromium.src,mohamed--abdel-maksoud/chromium.src,TheTypoMaster/chromium-crosswalk,hgl888/chromium-crosswalk,markYoungH/chromium.src,ChromiumWebApps/chromium,jaruba/chromium.src,Jonekee/chromium.src,anirudhSK/chromium,axinging/chromium-crosswalk,krieger-od/nwjs_chromium.src,Jonekee/chromium.src,krieger-od/nwjs_chromium.src,ltilve/chromium,axinging/chromium-crosswalk,Jonekee/chromium.src,fujunwei/chromium-crosswalk,krieger-od/nwjs_chromium.src,ondra-novak/chromium.src,PeterWangIntel/chromium-crosswalk,M4sse/chromium.src,jaruba/chromium.src,mogoweb/chromium-crosswalk,chuan9/chromium-crosswalk,jaruba/chromium.src,Pluto-tv/chromium-crosswalk,hgl888/chromium-crosswalk,Pluto-tv/chromium-crosswalk,hgl888/chromium-crosswalk,ChromiumWebApps/chromium,ondra-novak/chromium.src,dushu1203/chromium.src,ltilve/chromium,Fireblend/chromium-crosswalk,ondra-novak/chromium.src,ltilve/chromium,patrickm/chromium.src,markYoungH/chromium.src,TheTypoMaster/chromium-crosswalk,jaruba/chromium.src,markYoungH/chromium.src,Fireblend/chromium-crosswalk,anirudhSK/chromium,chuan9/chromium-crosswalk,Jonekee/chromium.src,mohamed--abdel-maksoud/chromium.src,ondra-novak/chromium.src,ChromiumWebApps/chromium,krieger-od/nwjs_chromium.src,mogoweb/chromium-crosswalk,hgl888/chromium-crosswalk-efl,mohamed--abdel-maksoud/chromium.src,littlstar/chromium.src,PeterWangIntel/chromium-crosswalk,dednal/chromium.src,TheTypoMaster/chromium-crosswalk,patrickm/chromium.src,fujunwei/chromium-crosswalk,bright-sparks/chromium-spacewalk,ChromiumWebApps/chromium,dushu1203/chromium.src,Just-D/chromium-1,anirudhSK/chromium,Fireblend/chromium-crosswalk,markYoungH/chromium.src,Just-D/chromium-1,markYoungH/chromium.src,dednal/chromium.src,anirudhSK/chromium,fujunwei/chromium-crosswalk,Jonekee/chromium.src,anirudhSK/chromium,jaruba/chromium.src,M4sse/chromium.src,Pluto-tv/chromium-crosswalk,M4sse/chromium.src,ChromiumWebApps/chromium,mohamed--abdel-maksoud/chromium.src,hgl888/chromium-crosswalk,ltilve/chromium,bright-sparks/chromium-spacewalk,Just-D/chromium-1,M4sse/chromium.src,anirudhSK/chromium,jaruba/chromium.src,axinging/chromium-crosswalk,Just-D/chromium-1,ltilve/chromium,mohamed--abdel-maksoud/chromium.src,ondra-novak/chromium.src,hgl888/chromium-crosswalk,ChromiumWebApps/chromium,Jonekee/chromium.src,mohamed--abdel-maksoud/chromium.src,anirudhSK/chromium,krieger-od/nwjs_chromium.src,mogoweb/chromium-crosswalk,krieger-od/nwjs_chromium.src,hgl888/chromium-crosswalk-efl,Fireblend/chromium-crosswalk,mogoweb/chromium-crosswalk,ltilve/chromium,markYoungH/chromium.src,mohamed--abdel-maksoud/chromium.src,dushu1203/chromium.src,Chilledheart/chromium,Pluto-tv/chromium-crosswalk,dednal/chromium.src,hgl888/chromium-crosswalk-efl,jaruba/chromium.src,patrickm/chromium.src,axinging/chromium-crosswalk,ChromiumWebApps/chromium,mogoweb/chromium-crosswalk,jaruba/chromium.src,patrickm/chromium.src,jaruba/chromium.src,Pluto-tv/chromium-crosswalk,fujunwei/chromium-crosswalk,dushu1203/chromium.src,Chilledheart/chromium,patrickm/chromium.src,Jonekee/chromium.src,ChromiumWebApps/chromium,patrickm/chromium.src,M4sse/chromium.src,hgl888/chromium-crosswalk-efl,fujunwei/chromium-crosswalk,dednal/chromium.src,ChromiumWebApps/chromium,Pluto-tv/chromium-crosswalk,axinging/chromium-crosswalk,hgl888/chromium-crosswalk-efl,Chilledheart/chromium,littlstar/chromium.src,markYoungH/chromium.src,bright-sparks/chromium-spacewalk,TheTypoMaster/chromium-crosswalk,Jonekee/chromium.src,ltilve/chromium,M4sse/chromium.src,axinging/chromium-crosswalk,ChromiumWebApps/chromium,fujunwei/chromium-crosswalk,mogoweb/chromium-crosswalk,Just-D/chromium-1,dushu1203/chromium.src,chuan9/chromium-crosswalk,Fireblend/chromium-crosswalk,bright-sparks/chromium-spacewalk,Just-D/chromium-1,dednal/chromium.src,anirudhSK/chromium,Fireblend/chromium-crosswalk,littlstar/chromium.src,axinging/chromium-crosswalk,dednal/chromium.src,markYoungH/chromium.src,axinging/chromium-crosswalk,littlstar/chromium.src,bright-sparks/chromium-spacewalk,dushu1203/chromium.src,patrickm/chromium.src,PeterWangIntel/chromium-crosswalk,bright-sparks/chromium-spacewalk,axinging/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,bright-sparks/chromium-spacewalk,hgl888/chromium-crosswalk-efl,dednal/chromium.src,ondra-novak/chromium.src,dednal/chromium.src,fujunwei/chromium-crosswalk,jaruba/chromium.src,mogoweb/chromium-crosswalk,dushu1203/chromium.src,hgl888/chromium-crosswalk-efl,crosswalk-project/chromium-crosswalk-efl,crosswalk-project/chromium-crosswalk-efl,M4sse/chromium.src,anirudhSK/chromium,littlstar/chromium.src,chuan9/chromium-crosswalk,littlstar/chromium.src,mohamed--abdel-maksoud/chromium.src,Fireblend/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,M4sse/chromium.src,Pluto-tv/chromium-crosswalk,chuan9/chromium-crosswalk,hgl888/chromium-crosswalk-efl,TheTypoMaster/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,TheTypoMaster/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,markYoungH/chromium.src,Chilledheart/chromium,bright-sparks/chromium-spacewalk,bright-sparks/chromium-spacewalk,TheTypoMaster/chromium-crosswalk,hgl888/chromium-crosswalk,Just-D/chromium-1,ondra-novak/chromium.src,dushu1203/chromium.src,crosswalk-project/chromium-crosswalk-efl,TheTypoMaster/chromium-crosswalk,anirudhSK/chromium,M4sse/chromium.src,krieger-od/nwjs_chromium.src,patrickm/chromium.src,chuan9/chromium-crosswalk,ltilve/chromium,fujunwei/chromium-crosswalk,Chilledheart/chromium,hgl888/chromium-crosswalk-efl,Just-D/chromium-1,Pluto-tv/chromium-crosswalk,anirudhSK/chromium,fujunwei/chromium-crosswalk,dushu1203/chromium.src,chuan9/chromium-crosswalk,ondra-novak/chromium.src,hgl888/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,Fireblend/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,PeterWangIntel/chromium-crosswalk,Chilledheart/chromium,Just-D/chromium-1,Jonekee/chromium.src,PeterWangIntel/chromium-crosswalk,axinging/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,Pluto-tv/chromium-crosswalk,markYoungH/chromium.src,chuan9/chromium-crosswalk,krieger-od/nwjs_chromium.src,ChromiumWebApps/chromium,hgl888/chromium-crosswalk-efl,Chilledheart/chromium,ondra-novak/chromium.src,axinging/chromium-crosswalk,krieger-od/nwjs_chromium.src,mogoweb/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,littlstar/chromium.src,Chilledheart/chromium,dednal/chromium.src,markYoungH/chromium.src,M4sse/chromium.src,dushu1203/chromium.src,ChromiumWebApps/chromium,mohamed--abdel-maksoud/chromium.src,krieger-od/nwjs_chromium.src,mohamed--abdel-maksoud/chromium.src,mogoweb/chromium-crosswalk,Fireblend/chromium-crosswalk,dednal/chromium.src,ltilve/chromium,Jonekee/chromium.src,hgl888/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,PeterWangIntel/chromium-crosswalk,krieger-od/nwjs_chromium.src,PeterWangIntel/chromium-crosswalk,M4sse/chromium.src,mogoweb/chromium-crosswalk,dushu1203/chromium.src,patrickm/chromium.src,chuan9/chromium-crosswalk,hgl888/chromium-crosswalk,anirudhSK/chromium,littlstar/chromium.src,PeterWangIntel/chromium-crosswalk,jaruba/chromium.src
html
## Code Before: <html> <head> <title>Popup Blocked Post Blank</title> <script> function test() { // We rely on sequential ordering of POST processing. var form = document.getElementById('form'); form.submit(); } </script> </head> <body onload="test()"> If the POST pop-up was not blocked then there will be an warning message displayed in a new tab. Otherwise, the test passes. <form id="form" action="data:text/html,<title>Popup Success!</title>you should not see this message if popup blocker is enabled" target="_blank"> <input type="submit" value="Submit to new window"/> </form> </body> </html> ## Instruction: Add missing POST method to popup test HTML This is a pre-requisite for crbug.com/291747 / crrev.com/23526048 as with that get request will have query param appended even when the target is data: Also the test states it is doing a POST so this actually makes it so. Landing as its own patch as trybots don't like my attempts to send CRLF edits in patches. NOTRY=true BUG=291747 R=kristianm@chromium.org Review URL: https://codereview.chromium.org/23513057 git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@223266 0039d316-1c4b-4281-b951-d872f2087c98 ## Code After: <html> <head> <title>Popup Blocked Post Blank</title> <script> function test() { // We rely on sequential ordering of POST processing. var form = document.getElementById('form'); form.submit(); } </script> </head> <body onload="test()"> If the POST pop-up was not blocked then there will be an warning message displayed in a new tab. Otherwise, the test passes. <form id="form" method="post" action="data:text/html,<title>Popup Success!</title>you should not see this message if popup blocker is enabled" target="_blank"> <input type="submit" value="Submit to new window"/> </form> </body> </html>
<html> <head> <title>Popup Blocked Post Blank</title> <script> function test() { // We rely on sequential ordering of POST processing. var form = document.getElementById('form'); form.submit(); } </script> </head> <body onload="test()"> If the POST pop-up was not blocked then there will be an warning message displayed in a new tab. Otherwise, the test passes. - <form id="form" action="data:text/html,<title>Popup Success!</title>you should not see this message if popup blocker is enabled" target="_blank"> + <form id="form" method="post" action="data:text/html,<title>Popup Success!</title>you should not see this message if popup blocker is enabled" target="_blank"> ? ++++++++++++++ <input type="submit" value="Submit to new window"/> </form> </body> </html>
2
0.111111
1
1
299a44e0842f27565d340fda5092ac6926f173c9
app/components/notification-message.js
app/components/notification-message.js
import NotificationMessage from 'ember-cli-notifications/components/notification-message'; import ENV from '../config/environment'; var config = ENV['ember-cli-notifications'] || {}; export default NotificationMessage.extend({ icons: config.icons });
import NotificationMessage from 'ember-cli-notifications/components/notification-message'; import ENV from '../config/environment'; var config = ENV['ember-cli-notifications'] || {}; export default NotificationMessage.extend({ icons: config.icons || 'font-awesome' });
Set a default icon style
Set a default icon style
JavaScript
mit
marcemira/ember-cli-notifications,cesarizu/ember-cli-notifications,stonecircle/ember-cli-notifications,cesarizu/ember-cli-notifications,Blooie/ember-cli-notifications,stonecircle/ember-cli-notifications,Blooie/ember-cli-notifications,aupac/ember-cli-notifications,aupac/ember-cli-notifications,marcemira/ember-cli-notifications
javascript
## Code Before: import NotificationMessage from 'ember-cli-notifications/components/notification-message'; import ENV from '../config/environment'; var config = ENV['ember-cli-notifications'] || {}; export default NotificationMessage.extend({ icons: config.icons }); ## Instruction: Set a default icon style ## Code After: import NotificationMessage from 'ember-cli-notifications/components/notification-message'; import ENV from '../config/environment'; var config = ENV['ember-cli-notifications'] || {}; export default NotificationMessage.extend({ icons: config.icons || 'font-awesome' });
import NotificationMessage from 'ember-cli-notifications/components/notification-message'; import ENV from '../config/environment'; var config = ENV['ember-cli-notifications'] || {}; export default NotificationMessage.extend({ - icons: config.icons + icons: config.icons || 'font-awesome' });
2
0.25
1
1
2134f285e183063947a1726815627600d8310ad6
src/main/resources/jenkins/plugins/git/GitStep/help-branch.html
src/main/resources/jenkins/plugins/git/GitStep/help-branch.html
<div> <p> Branch to be checked out in the workspace. Default is the remote repository's default branch (typically '<code>master</code>'). </p> <p> Note that this must be a local branch name like 'master' or 'develop' or a tag name. Remote branch names like 'origin/master' and 'origin/develop' are <strong>not supported</strong> as the branch argument. SHA-1 hashes are <strong>not supported</strong> as the branch argument. Remote branch names and SHA-1 hashes are supported by the general purpose <code>checkout</code> step. </p> </div>
<div> <p> Branch to be checked out in the workspace. Default is '<code>master</code>'. </p> <p> Note that this must be a local branch name like 'master' or 'develop' or a tag name. Remote branch names like 'origin/master' and 'origin/develop' are <strong>not supported</strong> as the branch argument. SHA-1 hashes are <strong>not supported</strong> as the branch argument. Remote branch names and SHA-1 hashes are supported by the general purpose <code>checkout</code> step. </p> </div>
Fix git step default branch docs
[JENKINS-64320] Fix git step default branch docs The plugin uses a `checkout` operation rather than `clone`. The checkout operation is not smart enough to use the default remote branch. Since the `git` step is not receiving further investment, correct the documentation to accurately describe the implmenentation. Resolves https://issues.jenkins.io/browse/JENKINS-64320
HTML
mit
MarkEWaite/git-plugin,jenkinsci/git-plugin,MarkEWaite/git-plugin,jenkinsci/git-plugin,martinda/git-plugin,jenkinsci/git-plugin,martinda/git-plugin,MarkEWaite/git-plugin,martinda/git-plugin,jenkinsci/git-plugin,MarkEWaite/git-plugin
html
## Code Before: <div> <p> Branch to be checked out in the workspace. Default is the remote repository's default branch (typically '<code>master</code>'). </p> <p> Note that this must be a local branch name like 'master' or 'develop' or a tag name. Remote branch names like 'origin/master' and 'origin/develop' are <strong>not supported</strong> as the branch argument. SHA-1 hashes are <strong>not supported</strong> as the branch argument. Remote branch names and SHA-1 hashes are supported by the general purpose <code>checkout</code> step. </p> </div> ## Instruction: [JENKINS-64320] Fix git step default branch docs The plugin uses a `checkout` operation rather than `clone`. The checkout operation is not smart enough to use the default remote branch. Since the `git` step is not receiving further investment, correct the documentation to accurately describe the implmenentation. Resolves https://issues.jenkins.io/browse/JENKINS-64320 ## Code After: <div> <p> Branch to be checked out in the workspace. Default is '<code>master</code>'. </p> <p> Note that this must be a local branch name like 'master' or 'develop' or a tag name. Remote branch names like 'origin/master' and 'origin/develop' are <strong>not supported</strong> as the branch argument. SHA-1 hashes are <strong>not supported</strong> as the branch argument. Remote branch names and SHA-1 hashes are supported by the general purpose <code>checkout</code> step. </p> </div>
<div> <p> - Branch to be checked out in the workspace. Default is the remote repository's default branch (typically '<code>master</code>'). + Branch to be checked out in the workspace. + Default is '<code>master</code>'. </p> <p> Note that this must be a local branch name like 'master' or 'develop' or a tag name. Remote branch names like 'origin/master' and 'origin/develop' are <strong>not supported</strong> as the branch argument. SHA-1 hashes are <strong>not supported</strong> as the branch argument. Remote branch names and SHA-1 hashes are supported by the general purpose <code>checkout</code> step. </p> </div>
3
0.272727
2
1
f2fa322e9dc7be68c6fb62a253e81d332cdc1fb4
loritta-discord/src/main/java/net/perfectdreams/loritta/tables/Backgrounds.kt
loritta-discord/src/main/java/net/perfectdreams/loritta/tables/Backgrounds.kt
package net.perfectdreams.loritta.tables import com.google.gson.Gson import com.google.gson.JsonParser import com.mrpowergamerbr.loritta.utils.exposed.array import com.mrpowergamerbr.loritta.utils.exposed.rawJsonb import net.perfectdreams.loritta.api.utils.Rarity import org.jetbrains.exposed.dao.id.EntityID import org.jetbrains.exposed.dao.id.IdTable import org.jetbrains.exposed.sql.Column import org.jetbrains.exposed.sql.TextColumnType object Backgrounds : IdTable<String>() { val internalName = text("internal_name").primaryKey() override val id: Column<EntityID<String>> = internalName.entityId() val imageFile = text("image_file") val enabled = bool("enabled").index() val rarity = enumeration("rarity", Rarity::class).index() val createdBy = array<String>("created_by", TextColumnType()) val crop = rawJsonb("crop", Gson(), JsonParser()).nullable() val availableToBuyViaDreams = bool("available_to_buy_via_dreams").index() val availableToBuyViaMoney = bool("available_to_buy_via_money").index() val set = optReference("set", Sets) val addedAt = long("added_at").default(System.currentTimeMillis()) }
package net.perfectdreams.loritta.tables import com.google.gson.Gson import com.google.gson.JsonParser import com.mrpowergamerbr.loritta.utils.exposed.array import com.mrpowergamerbr.loritta.utils.exposed.rawJsonb import net.perfectdreams.loritta.api.utils.Rarity import org.jetbrains.exposed.dao.id.EntityID import org.jetbrains.exposed.dao.id.IdTable import org.jetbrains.exposed.sql.Column import org.jetbrains.exposed.sql.TextColumnType object Backgrounds : IdTable<String>() { val internalName = text("internal_name").primaryKey() override val id: Column<EntityID<String>> = internalName.entityId() val imageFile = text("image_file") val enabled = bool("enabled").index() val rarity = enumeration("rarity", Rarity::class).index() val createdBy = array<String>("created_by", TextColumnType()) val crop = rawJsonb("crop", Gson(), JsonParser()).nullable() val availableToBuyViaDreams = bool("available_to_buy_via_dreams").index() val availableToBuyViaMoney = bool("available_to_buy_via_money").index() val set = optReference("set", Sets) val addedAt = long("added_at") }
Remove default value because that's not how it works
Remove default value because that's not how it works
Kotlin
agpl-3.0
LorittaBot/Loritta,LorittaBot/Loritta,LorittaBot/Loritta,LorittaBot/Loritta
kotlin
## Code Before: package net.perfectdreams.loritta.tables import com.google.gson.Gson import com.google.gson.JsonParser import com.mrpowergamerbr.loritta.utils.exposed.array import com.mrpowergamerbr.loritta.utils.exposed.rawJsonb import net.perfectdreams.loritta.api.utils.Rarity import org.jetbrains.exposed.dao.id.EntityID import org.jetbrains.exposed.dao.id.IdTable import org.jetbrains.exposed.sql.Column import org.jetbrains.exposed.sql.TextColumnType object Backgrounds : IdTable<String>() { val internalName = text("internal_name").primaryKey() override val id: Column<EntityID<String>> = internalName.entityId() val imageFile = text("image_file") val enabled = bool("enabled").index() val rarity = enumeration("rarity", Rarity::class).index() val createdBy = array<String>("created_by", TextColumnType()) val crop = rawJsonb("crop", Gson(), JsonParser()).nullable() val availableToBuyViaDreams = bool("available_to_buy_via_dreams").index() val availableToBuyViaMoney = bool("available_to_buy_via_money").index() val set = optReference("set", Sets) val addedAt = long("added_at").default(System.currentTimeMillis()) } ## Instruction: Remove default value because that's not how it works ## Code After: package net.perfectdreams.loritta.tables import com.google.gson.Gson import com.google.gson.JsonParser import com.mrpowergamerbr.loritta.utils.exposed.array import com.mrpowergamerbr.loritta.utils.exposed.rawJsonb import net.perfectdreams.loritta.api.utils.Rarity import org.jetbrains.exposed.dao.id.EntityID import org.jetbrains.exposed.dao.id.IdTable import org.jetbrains.exposed.sql.Column import org.jetbrains.exposed.sql.TextColumnType object Backgrounds : IdTable<String>() { val internalName = text("internal_name").primaryKey() override val id: Column<EntityID<String>> = internalName.entityId() val imageFile = text("image_file") val enabled = bool("enabled").index() val rarity = enumeration("rarity", Rarity::class).index() val createdBy = array<String>("created_by", TextColumnType()) val crop = rawJsonb("crop", Gson(), JsonParser()).nullable() val availableToBuyViaDreams = bool("available_to_buy_via_dreams").index() val availableToBuyViaMoney = bool("available_to_buy_via_money").index() val set = optReference("set", Sets) val addedAt = long("added_at") }
package net.perfectdreams.loritta.tables import com.google.gson.Gson import com.google.gson.JsonParser import com.mrpowergamerbr.loritta.utils.exposed.array import com.mrpowergamerbr.loritta.utils.exposed.rawJsonb import net.perfectdreams.loritta.api.utils.Rarity import org.jetbrains.exposed.dao.id.EntityID import org.jetbrains.exposed.dao.id.IdTable import org.jetbrains.exposed.sql.Column import org.jetbrains.exposed.sql.TextColumnType object Backgrounds : IdTable<String>() { val internalName = text("internal_name").primaryKey() override val id: Column<EntityID<String>> = internalName.entityId() val imageFile = text("image_file") val enabled = bool("enabled").index() val rarity = enumeration("rarity", Rarity::class).index() val createdBy = array<String>("created_by", TextColumnType()) val crop = rawJsonb("crop", Gson(), JsonParser()).nullable() val availableToBuyViaDreams = bool("available_to_buy_via_dreams").index() val availableToBuyViaMoney = bool("available_to_buy_via_money").index() val set = optReference("set", Sets) - val addedAt = long("added_at").default(System.currentTimeMillis()) + val addedAt = long("added_at") }
2
0.076923
1
1
fedf5b5356da5583242d576e9cce8794c9e981eb
lib/stevenson/output_filter/zip.rb
lib/stevenson/output_filter/zip.rb
require 'zip' module Stevenson module OutputFilter module Zip include Base def output Dir.mktmpdir do |dir| # Call the parent method super dir # Zip up the output directory write dir, directory end end private def write(inputDir, outputFile) @inputDir = inputDir @outputFile = outputFile entries = Dir.entries(@inputDir) entries.delete(".") entries.delete("..") io = Zip::File.open(@outputFile, Zip::File::CREATE) writeEntries(entries, "", io) io.close() end def writeEntries(entries, path, io) entries.each { |e| zipFilePath = path == "" ? e : File.join(path, e) diskFilePath = File.join(@inputDir, zipFilePath) if File.directory?(diskFilePath) io.mkdir(zipFilePath) subdir =Dir.entries(diskFilePath); subdir.delete("."); subdir.delete("..") writeEntries(subdir, zipFilePath, io) else io.get_output_stream(zipFilePath) { |f| f.puts(File.open(diskFilePath, "rb").read())} end } end end end end
require 'zip' module Stevenson module OutputFilter module Zip include Base def output Dir.mktmpdir do |dir| # Call the parent method super dir # Zip up the output directory write dir, directory end end private def write(inputDir, outputFile) @inputDir = inputDir @outputFile = outputFile entries = Dir.entries(@inputDir) entries.delete(".") entries.delete("..") io = Zip::File.open(@outputFile, Zip::File::CREATE) writeEntries(entries, "", io) io.close() end def writeEntries(entries, path, io) entries.each do |entry| zipFilePath = path == "" ? entry : File.join(path, entry) diskFilePath = File.join(@inputDir, zipFilePath) if File.directory?(diskFilePath) io.mkdir(zipFilePath) subdir =Dir.entries(diskFilePath); subdir.delete("."); subdir.delete("..") writeEntries(subdir, zipFilePath, io) else io.get_output_stream(zipFilePath) { |f| f.puts(File.open(diskFilePath, "rb").read()) } end end end end end end
Use do..end syntax for multiline-blocks
Use do..end syntax for multiline-blocks
Ruby
mit
RootsRated/stevenson
ruby
## Code Before: require 'zip' module Stevenson module OutputFilter module Zip include Base def output Dir.mktmpdir do |dir| # Call the parent method super dir # Zip up the output directory write dir, directory end end private def write(inputDir, outputFile) @inputDir = inputDir @outputFile = outputFile entries = Dir.entries(@inputDir) entries.delete(".") entries.delete("..") io = Zip::File.open(@outputFile, Zip::File::CREATE) writeEntries(entries, "", io) io.close() end def writeEntries(entries, path, io) entries.each { |e| zipFilePath = path == "" ? e : File.join(path, e) diskFilePath = File.join(@inputDir, zipFilePath) if File.directory?(diskFilePath) io.mkdir(zipFilePath) subdir =Dir.entries(diskFilePath); subdir.delete("."); subdir.delete("..") writeEntries(subdir, zipFilePath, io) else io.get_output_stream(zipFilePath) { |f| f.puts(File.open(diskFilePath, "rb").read())} end } end end end end ## Instruction: Use do..end syntax for multiline-blocks ## Code After: require 'zip' module Stevenson module OutputFilter module Zip include Base def output Dir.mktmpdir do |dir| # Call the parent method super dir # Zip up the output directory write dir, directory end end private def write(inputDir, outputFile) @inputDir = inputDir @outputFile = outputFile entries = Dir.entries(@inputDir) entries.delete(".") entries.delete("..") io = Zip::File.open(@outputFile, Zip::File::CREATE) writeEntries(entries, "", io) io.close() end def writeEntries(entries, path, io) entries.each do |entry| zipFilePath = path == "" ? entry : File.join(path, entry) diskFilePath = File.join(@inputDir, zipFilePath) if File.directory?(diskFilePath) io.mkdir(zipFilePath) subdir =Dir.entries(diskFilePath); subdir.delete("."); subdir.delete("..") writeEntries(subdir, zipFilePath, io) else io.get_output_stream(zipFilePath) { |f| f.puts(File.open(diskFilePath, "rb").read()) } end end end end end end
require 'zip' module Stevenson module OutputFilter module Zip include Base def output Dir.mktmpdir do |dir| # Call the parent method super dir # Zip up the output directory write dir, directory end end private def write(inputDir, outputFile) @inputDir = inputDir @outputFile = outputFile entries = Dir.entries(@inputDir) entries.delete(".") entries.delete("..") io = Zip::File.open(@outputFile, Zip::File::CREATE) writeEntries(entries, "", io) io.close() end def writeEntries(entries, path, io) - entries.each { |e| ? ^ + entries.each do |entry| ? ^^ ++++ - zipFilePath = path == "" ? e : File.join(path, e) + zipFilePath = path == "" ? entry : File.join(path, entry) ? ++++ ++++ diskFilePath = File.join(@inputDir, zipFilePath) if File.directory?(diskFilePath) io.mkdir(zipFilePath) subdir =Dir.entries(diskFilePath); subdir.delete("."); subdir.delete("..") writeEntries(subdir, zipFilePath, io) else - io.get_output_stream(zipFilePath) { |f| f.puts(File.open(diskFilePath, "rb").read())} + io.get_output_stream(zipFilePath) { |f| f.puts(File.open(diskFilePath, "rb").read()) } ? + end - } ? ^ + end ? ^^^ end end end end
8
0.166667
4
4
67ac0397eeb310a55c0e871574cd17038366a2f0
aplazame/views/templates/hook/header.tpl
aplazame/views/templates/hook/header.tpl
<script type="text/javascript" src="{$aplazame_js_uri|escape:'htmlall':'UTF-8'}" data-api-host="{$aplazame_api_base_uri}" data-aplazame="{$aplazame_public_key}" data-sandbox="{if $aplazame_is_sandbox}true{else}false{/if}"> </script>
<script type="text/javascript" src="{$aplazame_js_uri|escape:'htmlall':'UTF-8'}"></script> <script> aplazame.init({ host: "{$aplazame_api_base_uri}", publicKey: "{$aplazame_public_key}", sandbox: "{if $aplazame_is_sandbox}true{else}false{/if}" }); </script>
Revert aplazame.js use of data attributes
Revert aplazame.js use of data attributes PrestaShop minifier strip data attributes.
Smarty
bsd-3-clause
aplazame/prestashop
smarty
## Code Before: <script type="text/javascript" src="{$aplazame_js_uri|escape:'htmlall':'UTF-8'}" data-api-host="{$aplazame_api_base_uri}" data-aplazame="{$aplazame_public_key}" data-sandbox="{if $aplazame_is_sandbox}true{else}false{/if}"> </script> ## Instruction: Revert aplazame.js use of data attributes PrestaShop minifier strip data attributes. ## Code After: <script type="text/javascript" src="{$aplazame_js_uri|escape:'htmlall':'UTF-8'}"></script> <script> aplazame.init({ host: "{$aplazame_api_base_uri}", publicKey: "{$aplazame_public_key}", sandbox: "{if $aplazame_is_sandbox}true{else}false{/if}" }); </script>
+ <script type="text/javascript" src="{$aplazame_js_uri|escape:'htmlall':'UTF-8'}"></script> + - <script + <script> ? + + aplazame.init({ - type="text/javascript" - src="{$aplazame_js_uri|escape:'htmlall':'UTF-8'}" - data-api-host="{$aplazame_api_base_uri}" ? ^^^^^^^^^ ^ + host: "{$aplazame_api_base_uri}", ? ^^^^ ^^ + - data-aplazame="{$aplazame_public_key}" + publicKey: "{$aplazame_public_key}", - data-sandbox="{if $aplazame_is_sandbox}true{else}false{/if}"> ? ^^^^^ ^ - + sandbox: "{if $aplazame_is_sandbox}true{else}false{/if}" ? ^^^^ ^^ + }); </script>
14
2
8
6
7f9cda50c94a2af77f198f5207afd621ecefb71c
website/desc/exclude.csv
website/desc/exclude.csv
use,test,lang,id ,ackermann,gcc,2 ,ackermann,icc,2 ,except,cmucl,2 ,except,felix,0 ,except,python,2 ,fannkuch,python,0 ,fannkuch,ocaml,0 ,fannkuch,ocaml,2 ,nbody,csharp,2 ,nsieve,ocaml,0 ,nsieve,ocaml,2 ,nsieve,ocamlb,0 ,prodcons,ghc,0 ,prodcons,gforth,0 ,prodcons,smlnj,0 ,prodcons,hipe,0 ,prodcons,erlang,0 ,prodcons,felix,0 ,prodcons,lua,0 ,prodcons,gst,0 ,prodcons,oz,0 ,regexmatch,cmucl,0 ,regexmatch,sbcl,0 ,sieve,ghc,2 ,takfp,perl,0 ,tcpecho,nice,0 ,tcprequest,nice,0 ,tcpstream,nice,0
use,test,lang,id ,ackermann,gcc,2 ,ackermann,icc,2 ,except,cmucl,2 ,except,felix,0 ,except,python,2 ,fannkuch,python,0 ,fannkuch,ocaml,0 ,fannkuch,ocaml,2 ,nbody,csharp,2 ,nsieve,ocaml,0 ,nsieve,ocaml,2 ,nsieve,ocamlb,0 ,prodcons,ghc,0 ,prodcons,gforth,0 ,prodcons,smlnj,0 ,prodcons,hipe,0 ,prodcons,erlang,0 ,prodcons,felix,0 ,prodcons,lua,0 ,prodcons,gst,0 ,prodcons,oz,0 ,regexmatch,cmucl,0 ,regexmatch,sbcl,0 ,regexmatch,gnat,2 ,sieve,ghc,2 ,takfp,perl,0 ,tcpecho,nice,0 ,tcprequest,nice,0 ,tcpstream,nice,0
Add regexmatch alt for GNAT
Add regexmatch alt for GNAT
CSV
bsd-3-clause
kragen/shootout,kragen/shootout,kragen/shootout,kragen/shootout,kragen/shootout,kragen/shootout,kragen/shootout,kragen/shootout,kragen/shootout,kragen/shootout,kragen/shootout
csv
## Code Before: use,test,lang,id ,ackermann,gcc,2 ,ackermann,icc,2 ,except,cmucl,2 ,except,felix,0 ,except,python,2 ,fannkuch,python,0 ,fannkuch,ocaml,0 ,fannkuch,ocaml,2 ,nbody,csharp,2 ,nsieve,ocaml,0 ,nsieve,ocaml,2 ,nsieve,ocamlb,0 ,prodcons,ghc,0 ,prodcons,gforth,0 ,prodcons,smlnj,0 ,prodcons,hipe,0 ,prodcons,erlang,0 ,prodcons,felix,0 ,prodcons,lua,0 ,prodcons,gst,0 ,prodcons,oz,0 ,regexmatch,cmucl,0 ,regexmatch,sbcl,0 ,sieve,ghc,2 ,takfp,perl,0 ,tcpecho,nice,0 ,tcprequest,nice,0 ,tcpstream,nice,0 ## Instruction: Add regexmatch alt for GNAT ## Code After: use,test,lang,id ,ackermann,gcc,2 ,ackermann,icc,2 ,except,cmucl,2 ,except,felix,0 ,except,python,2 ,fannkuch,python,0 ,fannkuch,ocaml,0 ,fannkuch,ocaml,2 ,nbody,csharp,2 ,nsieve,ocaml,0 ,nsieve,ocaml,2 ,nsieve,ocamlb,0 ,prodcons,ghc,0 ,prodcons,gforth,0 ,prodcons,smlnj,0 ,prodcons,hipe,0 ,prodcons,erlang,0 ,prodcons,felix,0 ,prodcons,lua,0 ,prodcons,gst,0 ,prodcons,oz,0 ,regexmatch,cmucl,0 ,regexmatch,sbcl,0 ,regexmatch,gnat,2 ,sieve,ghc,2 ,takfp,perl,0 ,tcpecho,nice,0 ,tcprequest,nice,0 ,tcpstream,nice,0
use,test,lang,id ,ackermann,gcc,2 ,ackermann,icc,2 ,except,cmucl,2 ,except,felix,0 ,except,python,2 ,fannkuch,python,0 ,fannkuch,ocaml,0 ,fannkuch,ocaml,2 ,nbody,csharp,2 ,nsieve,ocaml,0 ,nsieve,ocaml,2 ,nsieve,ocamlb,0 ,prodcons,ghc,0 ,prodcons,gforth,0 ,prodcons,smlnj,0 ,prodcons,hipe,0 ,prodcons,erlang,0 ,prodcons,felix,0 ,prodcons,lua,0 ,prodcons,gst,0 ,prodcons,oz,0 ,regexmatch,cmucl,0 ,regexmatch,sbcl,0 + ,regexmatch,gnat,2 ,sieve,ghc,2 ,takfp,perl,0 ,tcpecho,nice,0 ,tcprequest,nice,0 ,tcpstream,nice,0
1
0.02381
1
0
14460e4928353287b8133b86b5868798ea0812d0
application/chrome/content/wesabe/ofx/Status.coffee
application/chrome/content/wesabe/ofx/Status.coffee
type = require 'lang/type' class Status constructor: (@code, @status, @message) -> isSuccess: -> @code in ["0", "1"] isError: -> not @isSuccess() isGeneralError: -> @code is '2000' isAuthenticationError: -> @code is '15500' isAuthorizationError: -> @code is '15000' or @code is '15502' isUnknownError: -> @isError() and not @isGeneralError() and not @isAuthenticationError() and not @isAuthorizationError() wesabe.util.privacy.registerTaintWrapper detector: (o) -> type.is(o, wesabe.ofx.Status) getters: ["code", "status", "message"] module.exports = Status
type = require 'lang/type' privacy = require 'util/privacy' class Status constructor: (@code, @status, @message) -> isSuccess: -> @code in ["0", "1"] isError: -> not @isSuccess() isGeneralError: -> @code is '2000' isAuthenticationError: -> @code is '15500' isAuthorizationError: -> @code is '15000' or @code is '15502' isUnknownError: -> @isError() and not @isGeneralError() and not @isAuthenticationError() and not @isAuthorizationError() privacy.registerTaintWrapper detector: (o) -> type.is(o, Status) getters: ["code", "status", "message"] module.exports = Status
Stop referencing the old style naming for util/privacy.
Stop referencing the old style naming for util/privacy.
CoffeeScript
apache-2.0
wesabe/ssu,wesabe/ssu,wesabe/ssu,wesabe/ssu,wesabe/ssu
coffeescript
## Code Before: type = require 'lang/type' class Status constructor: (@code, @status, @message) -> isSuccess: -> @code in ["0", "1"] isError: -> not @isSuccess() isGeneralError: -> @code is '2000' isAuthenticationError: -> @code is '15500' isAuthorizationError: -> @code is '15000' or @code is '15502' isUnknownError: -> @isError() and not @isGeneralError() and not @isAuthenticationError() and not @isAuthorizationError() wesabe.util.privacy.registerTaintWrapper detector: (o) -> type.is(o, wesabe.ofx.Status) getters: ["code", "status", "message"] module.exports = Status ## Instruction: Stop referencing the old style naming for util/privacy. ## Code After: type = require 'lang/type' privacy = require 'util/privacy' class Status constructor: (@code, @status, @message) -> isSuccess: -> @code in ["0", "1"] isError: -> not @isSuccess() isGeneralError: -> @code is '2000' isAuthenticationError: -> @code is '15500' isAuthorizationError: -> @code is '15000' or @code is '15502' isUnknownError: -> @isError() and not @isGeneralError() and not @isAuthenticationError() and not @isAuthorizationError() privacy.registerTaintWrapper detector: (o) -> type.is(o, Status) getters: ["code", "status", "message"] module.exports = Status
type = require 'lang/type' + privacy = require 'util/privacy' class Status constructor: (@code, @status, @message) -> isSuccess: -> @code in ["0", "1"] isError: -> not @isSuccess() isGeneralError: -> @code is '2000' isAuthenticationError: -> @code is '15500' isAuthorizationError: -> @code is '15000' or @code is '15502' isUnknownError: -> @isError() and not @isGeneralError() and not @isAuthenticationError() and not @isAuthorizationError() - wesabe.util.privacy.registerTaintWrapper ? ------------ + privacy.registerTaintWrapper - detector: (o) -> type.is(o, wesabe.ofx.Status) ? ----------- + detector: (o) -> type.is(o, Status) getters: ["code", "status", "message"] module.exports = Status
5
0.151515
3
2
50d060ff03556498d43c271afcf2cca02da4e158
.travis.yml
.travis.yml
sudo: required dist: trusty language: ruby cache: bundler matrix: include: - rvm: 1.9.3 - rvm: 2.2.8 - rvm: 2.4.2 # see https://github.com/travis-ci/travis-ci/issues/6471 - rvm: jruby-9.1.14.0 env: JRUBY_OPTS="" before_install: - "sudo apt-get update" - "sudo apt-get install -y firefox xvfb libav-tools" script: "bundle exec rspec"
sudo: required dist: trusty language: ruby cache: bundler matrix: include: - rvm: 1.9.3 - rvm: 2.2.8 - rvm: 2.4.2 # see https://github.com/travis-ci/travis-ci/issues/6471 - rvm: jruby-9.1.14.0 env: JRUBY_OPTS="" before_install: - "sudo apt-get update" - "sudo apt-get install -y libav-tools" # Install geckodriver to drive Firefox - wget https://github.com/mozilla/geckodriver/releases/download/v0.19.1/geckodriver-v0.19.1-linux64.tar.gz - mkdir geckodriver - tar -xzf geckodriver-v0.19.1-linux64.tar.gz -C geckodriver - export PATH=$PATH:$PWD/geckodriver script: "bundle exec rspec"
Add Geckodriver to Travis build
Add Geckodriver to Travis build
YAML
mit
leonid-shevtsov/headless
yaml
## Code Before: sudo: required dist: trusty language: ruby cache: bundler matrix: include: - rvm: 1.9.3 - rvm: 2.2.8 - rvm: 2.4.2 # see https://github.com/travis-ci/travis-ci/issues/6471 - rvm: jruby-9.1.14.0 env: JRUBY_OPTS="" before_install: - "sudo apt-get update" - "sudo apt-get install -y firefox xvfb libav-tools" script: "bundle exec rspec" ## Instruction: Add Geckodriver to Travis build ## Code After: sudo: required dist: trusty language: ruby cache: bundler matrix: include: - rvm: 1.9.3 - rvm: 2.2.8 - rvm: 2.4.2 # see https://github.com/travis-ci/travis-ci/issues/6471 - rvm: jruby-9.1.14.0 env: JRUBY_OPTS="" before_install: - "sudo apt-get update" - "sudo apt-get install -y libav-tools" # Install geckodriver to drive Firefox - wget https://github.com/mozilla/geckodriver/releases/download/v0.19.1/geckodriver-v0.19.1-linux64.tar.gz - mkdir geckodriver - tar -xzf geckodriver-v0.19.1-linux64.tar.gz -C geckodriver - export PATH=$PATH:$PWD/geckodriver script: "bundle exec rspec"
sudo: required dist: trusty language: ruby cache: bundler matrix: include: - rvm: 1.9.3 - rvm: 2.2.8 - rvm: 2.4.2 # see https://github.com/travis-ci/travis-ci/issues/6471 - rvm: jruby-9.1.14.0 env: JRUBY_OPTS="" before_install: - "sudo apt-get update" - - "sudo apt-get install -y firefox xvfb libav-tools" ? ------------- + - "sudo apt-get install -y libav-tools" - + # Install geckodriver to drive Firefox + - wget https://github.com/mozilla/geckodriver/releases/download/v0.19.1/geckodriver-v0.19.1-linux64.tar.gz + - mkdir geckodriver + - tar -xzf geckodriver-v0.19.1-linux64.tar.gz -C geckodriver + - export PATH=$PATH:$PWD/geckodriver script: "bundle exec rspec"
8
0.470588
6
2
715b67f338bcae2fd368085d863446382bb9a527
BulletinBoard.podspec
BulletinBoard.podspec
Pod::Spec.new do |s| s.name = "BulletinBoard" s.version = "2.0.0-beta.1" s.summary = "Generate and Display Bottom Card Interfaces for iOS" s.description = <<-DESC BulletinBoard is an iOS library that generates and manages contextual cards displayed at the bottom of the screen. It is especially well suited for quick user interactions such as onboarding screens or configuration. It has an interface similar to the cards displayed by iOS for AirPods, Apple TV configuration and NFC tag scanning. It has built-in support for accessibility features such as VoiceOver and Switch Control. DESC s.homepage = "https://github.com/alexaubry/BulletinBoard" s.license = { :type => "MIT", :file => "LICENSE" } s.author = { "Alexis Aubry" => "me@alexaubry.fr" } s.social_media_url = "https://twitter.com/_alexaubry" s.ios.deployment_target = "9.0" s.source = { :git => "https://github.com/alexaubry/BulletinBoard.git", :tag => s.version.to_s } s.source_files = "Sources/**/*" s.frameworks = "UIKit" s.documentation_url = "https://alexaubry.github.io/BulletinBoard" end
Pod::Spec.new do |s| s.name = "BulletinBoard" s.version = "2.0.0-beta.1" s.summary = "Generate and Display Bottom Card Interfaces for iOS" s.description = <<-DESC BulletinBoard is an iOS library that generates and manages contextual cards displayed at the bottom of the screen. It is especially well suited for quick user interactions such as onboarding screens or configuration. It has an interface similar to the cards displayed by iOS for AirPods, Apple TV configuration and NFC tag scanning. It has built-in support for accessibility features such as VoiceOver and Switch Control. DESC s.homepage = "https://github.com/alexaubry/BulletinBoard" s.license = { :type => "MIT", :file => "LICENSE" } s.author = { "Alexis Aubry" => "me@alexaubry.fr" } s.social_media_url = "https://twitter.com/_alexaubry" s.ios.deployment_target = "9.0" s.source = { :git => "https://github.com/alexaubry/BulletinBoard.git", :tag => s.version.to_s } s.source_files = "Sources/**/*" s.frameworks = "UIKit" s.documentation_url = "https://alexaubry.github.io/BulletinBoard" s.module_name = "BLTNBoard" end
Set module name to "BLTNBoard" in pod spec
Set module name to "BLTNBoard" in pod spec
Ruby
mit
alexaubry/BulletinBoard,alexaubry/BulletinBoard,alexaubry/BulletinBoard
ruby
## Code Before: Pod::Spec.new do |s| s.name = "BulletinBoard" s.version = "2.0.0-beta.1" s.summary = "Generate and Display Bottom Card Interfaces for iOS" s.description = <<-DESC BulletinBoard is an iOS library that generates and manages contextual cards displayed at the bottom of the screen. It is especially well suited for quick user interactions such as onboarding screens or configuration. It has an interface similar to the cards displayed by iOS for AirPods, Apple TV configuration and NFC tag scanning. It has built-in support for accessibility features such as VoiceOver and Switch Control. DESC s.homepage = "https://github.com/alexaubry/BulletinBoard" s.license = { :type => "MIT", :file => "LICENSE" } s.author = { "Alexis Aubry" => "me@alexaubry.fr" } s.social_media_url = "https://twitter.com/_alexaubry" s.ios.deployment_target = "9.0" s.source = { :git => "https://github.com/alexaubry/BulletinBoard.git", :tag => s.version.to_s } s.source_files = "Sources/**/*" s.frameworks = "UIKit" s.documentation_url = "https://alexaubry.github.io/BulletinBoard" end ## Instruction: Set module name to "BLTNBoard" in pod spec ## Code After: Pod::Spec.new do |s| s.name = "BulletinBoard" s.version = "2.0.0-beta.1" s.summary = "Generate and Display Bottom Card Interfaces for iOS" s.description = <<-DESC BulletinBoard is an iOS library that generates and manages contextual cards displayed at the bottom of the screen. It is especially well suited for quick user interactions such as onboarding screens or configuration. It has an interface similar to the cards displayed by iOS for AirPods, Apple TV configuration and NFC tag scanning. It has built-in support for accessibility features such as VoiceOver and Switch Control. DESC s.homepage = "https://github.com/alexaubry/BulletinBoard" s.license = { :type => "MIT", :file => "LICENSE" } s.author = { "Alexis Aubry" => "me@alexaubry.fr" } s.social_media_url = "https://twitter.com/_alexaubry" s.ios.deployment_target = "9.0" s.source = { :git => "https://github.com/alexaubry/BulletinBoard.git", :tag => s.version.to_s } s.source_files = "Sources/**/*" s.frameworks = "UIKit" s.documentation_url = "https://alexaubry.github.io/BulletinBoard" s.module_name = "BLTNBoard" end
Pod::Spec.new do |s| s.name = "BulletinBoard" s.version = "2.0.0-beta.1" s.summary = "Generate and Display Bottom Card Interfaces for iOS" s.description = <<-DESC BulletinBoard is an iOS library that generates and manages contextual cards displayed at the bottom of the screen. It is especially well suited for quick user interactions such as onboarding screens or configuration. It has an interface similar to the cards displayed by iOS for AirPods, Apple TV configuration and NFC tag scanning. It has built-in support for accessibility features such as VoiceOver and Switch Control. DESC s.homepage = "https://github.com/alexaubry/BulletinBoard" s.license = { :type => "MIT", :file => "LICENSE" } s.author = { "Alexis Aubry" => "me@alexaubry.fr" } s.social_media_url = "https://twitter.com/_alexaubry" s.ios.deployment_target = "9.0" s.source = { :git => "https://github.com/alexaubry/BulletinBoard.git", :tag => s.version.to_s } s.source_files = "Sources/**/*" s.frameworks = "UIKit" s.documentation_url = "https://alexaubry.github.io/BulletinBoard" + s.module_name = "BLTNBoard" end
1
0.052632
1
0
48dc6bf0f07bc909ed7b26e7fd495a2b0b5dc37d
apps/pro_buyer/index.coffee
apps/pro_buyer/index.coffee
express = require 'express' adminOnly = require '../../lib/middleware/admin_only' JSONPage = require '../../components/json_page' app = module.exports = express() app.set 'views', __dirname app.set 'view engine', 'jade' page = new JSONPage name: 'professional-buyer', paths: show: '/professional-buyer' edit: '/professional-buyer/edit' { data, edit, upload } = require('../../components/json_page/routes')(page) { get, middleware } = require('./routes')(page) app.get page.paths.show, adminOnly, get.landing app.get page.paths.show + '/data', adminOnly, data app.get page.paths.edit, adminOnly, edit app.post page.paths.edit, adminOnly, upload app.get page.paths.show + '/complete', adminOnly, middleware, get.complete
express = require 'express' adminOnly = require '../../lib/middleware/admin_only' JSONPage = require '../../components/json_page' app = module.exports = express() app.set 'views', __dirname app.set 'view engine', 'jade' page = new JSONPage name: 'professional-buyer', paths: show: '/professional-buyer' edit: '/professional-buyer/edit' { data, edit, upload } = require('../../components/json_page/routes')(page) { get, middleware } = require('./routes')(page) app.get page.paths.show, get.landing app.get "#{page.paths.show}/data", adminOnly, data app.get page.paths.edit, adminOnly, edit app.post page.paths.edit, adminOnly, upload app.get "#{page.paths.show}/complete", middleware.isLoggedIn, get.complete
Update naming and remove admin restrictions
Update naming and remove admin restrictions
CoffeeScript
mit
anandaroop/force,izakp/force,kanaabe/force,dblock/force,yuki24/force,izakp/force,kanaabe/force,erikdstock/force,izakp/force,dblock/force,kanaabe/force,anandaroop/force,damassi/force,mzikherman/force,cavvia/force-1,mzikherman/force,kanaabe/force,joeyAghion/force,oxaudo/force,eessex/force,artsy/force,artsy/force-public,dblock/force,erikdstock/force,joeyAghion/force,xtina-starr/force,oxaudo/force,erikdstock/force,joeyAghion/force,damassi/force,xtina-starr/force,izakp/force,eessex/force,mzikherman/force,oxaudo/force,yuki24/force,erikdstock/force,oxaudo/force,xtina-starr/force,artsy/force-public,anandaroop/force,damassi/force,anandaroop/force,joeyAghion/force,artsy/force,xtina-starr/force,artsy/force,damassi/force,mzikherman/force,yuki24/force,eessex/force,kanaabe/force,cavvia/force-1,cavvia/force-1,cavvia/force-1,eessex/force,yuki24/force,artsy/force
coffeescript
## Code Before: express = require 'express' adminOnly = require '../../lib/middleware/admin_only' JSONPage = require '../../components/json_page' app = module.exports = express() app.set 'views', __dirname app.set 'view engine', 'jade' page = new JSONPage name: 'professional-buyer', paths: show: '/professional-buyer' edit: '/professional-buyer/edit' { data, edit, upload } = require('../../components/json_page/routes')(page) { get, middleware } = require('./routes')(page) app.get page.paths.show, adminOnly, get.landing app.get page.paths.show + '/data', adminOnly, data app.get page.paths.edit, adminOnly, edit app.post page.paths.edit, adminOnly, upload app.get page.paths.show + '/complete', adminOnly, middleware, get.complete ## Instruction: Update naming and remove admin restrictions ## Code After: express = require 'express' adminOnly = require '../../lib/middleware/admin_only' JSONPage = require '../../components/json_page' app = module.exports = express() app.set 'views', __dirname app.set 'view engine', 'jade' page = new JSONPage name: 'professional-buyer', paths: show: '/professional-buyer' edit: '/professional-buyer/edit' { data, edit, upload } = require('../../components/json_page/routes')(page) { get, middleware } = require('./routes')(page) app.get page.paths.show, get.landing app.get "#{page.paths.show}/data", adminOnly, data app.get page.paths.edit, adminOnly, edit app.post page.paths.edit, adminOnly, upload app.get "#{page.paths.show}/complete", middleware.isLoggedIn, get.complete
express = require 'express' adminOnly = require '../../lib/middleware/admin_only' JSONPage = require '../../components/json_page' app = module.exports = express() app.set 'views', __dirname app.set 'view engine', 'jade' page = new JSONPage name: 'professional-buyer', paths: show: '/professional-buyer' edit: '/professional-buyer/edit' { data, edit, upload } = require('../../components/json_page/routes')(page) { get, middleware } = require('./routes')(page) - app.get page.paths.show, adminOnly, get.landing ? ----------- + app.get page.paths.show, get.landing - app.get page.paths.show + '/data', adminOnly, data ? ^^^^ ^ + app.get "#{page.paths.show}/data", adminOnly, data ? +++ ^ ^ app.get page.paths.edit, adminOnly, edit app.post page.paths.edit, adminOnly, upload - app.get page.paths.show + '/complete', adminOnly, middleware, get.complete ? ^^^^ ^^^^^^^^^^^^ + app.get "#{page.paths.show}/complete", middleware.isLoggedIn, get.complete ? +++ ^ ^ +++++++++++
6
0.272727
3
3
51801dee5c61943a4a4983180a942fb5f8fcbcbf
composer.json
composer.json
{ "name": "friendsofcake/cakepdf", "type": "cakephp-plugin", "description": "CakePHP plugin for creating and/or rendering Pdf, several Pdf engines supported.", "homepage": "https://github.com/FriendsOfCake/CakePdf", "license": "MIT", "require": { "php": ">=5.3.0", "composer/installers": "*" }, "replace": { "ceeram/cakepdf": "self.version" } }
{ "name": "friendsofcake/cakepdf", "type": "cakephp-plugin", "description": "CakePHP plugin for creating and/or rendering Pdf, several Pdf engines supported.", "homepage": "https://github.com/FriendsOfCake/CakePdf", "license": "MIT", "require": { "php": ">=5.3.0", "composer/installers": "*" }, "replace": { "ceeram/cakepdf": "self.version" }, "extra": { "installer-name": "CakePdf" } }
Set explicit installer location for BC
Set explicit installer location for BC CakePdf was always installed to CakePdf, the explicit installer-name setting was lost in the switch to FriendsOfCake. This restores it.
JSON
mit
birdy247/CakePdf,p-try/CakePdf,darkglamb/CakePdf,FriendsOfCake/CakePdf,Laykou/CakePdf,burzum/CakePdf,xyng/CakePdf
json
## Code Before: { "name": "friendsofcake/cakepdf", "type": "cakephp-plugin", "description": "CakePHP plugin for creating and/or rendering Pdf, several Pdf engines supported.", "homepage": "https://github.com/FriendsOfCake/CakePdf", "license": "MIT", "require": { "php": ">=5.3.0", "composer/installers": "*" }, "replace": { "ceeram/cakepdf": "self.version" } } ## Instruction: Set explicit installer location for BC CakePdf was always installed to CakePdf, the explicit installer-name setting was lost in the switch to FriendsOfCake. This restores it. ## Code After: { "name": "friendsofcake/cakepdf", "type": "cakephp-plugin", "description": "CakePHP plugin for creating and/or rendering Pdf, several Pdf engines supported.", "homepage": "https://github.com/FriendsOfCake/CakePdf", "license": "MIT", "require": { "php": ">=5.3.0", "composer/installers": "*" }, "replace": { "ceeram/cakepdf": "self.version" }, "extra": { "installer-name": "CakePdf" } }
{ "name": "friendsofcake/cakepdf", "type": "cakephp-plugin", "description": "CakePHP plugin for creating and/or rendering Pdf, several Pdf engines supported.", "homepage": "https://github.com/FriendsOfCake/CakePdf", "license": "MIT", "require": { "php": ">=5.3.0", "composer/installers": "*" }, "replace": { "ceeram/cakepdf": "self.version" - } + }, ? + + "extra": { + "installer-name": "CakePdf" + } }
5
0.357143
4
1
9f7094df923535d4b7e2ceef1fe3b6f77ada3ed8
packages/qu/quickcheck-special.yaml
packages/qu/quickcheck-special.yaml
homepage: https://github.com/minad/quickcheck-special#readme changelog-type: '' hash: 3f03448291f19b2fac0d5efd707af028451e7d0752da22258c9617ce492103c7 test-bench-deps: {} maintainer: Daniel Mendler <mail@daniel-mendler.de> synopsis: Edge cases and special values for QuickCheck Arbitrary instances changelog: '' basic-deps: bytestring: ! '>=0.9 && <0.11' base: <6 text: ! '>=0.7 && <1.3' ieee754: ! '>=0.8 && <0.9' scientific: ! '>=0.2 && <0.4' QuickCheck: ! '>=2.1 && <2.10' all-versions: - '0.1.0.0' - '0.1.0.1' - '0.1.0.2' - '0.1.0.3' author: Daniel Mendler <mail@daniel-mendler.de> latest: '0.1.0.3' description-type: haddock description: The standard Arbitrary instances of QuickCheck don't generate special values. This is fixed by this package which provides the newtype Special with an Arbitrary instance. The special values are given by the SpecialValues typeclass. license-name: MIT
homepage: https://github.com/minad/quickcheck-special#readme changelog-type: '' hash: 71f74bee395eb66adfef889a68e8500f33521f2006b6ef37965aba8e14036103 test-bench-deps: {} maintainer: Daniel Mendler <mail@daniel-mendler.de> synopsis: Edge cases and special values for QuickCheck Arbitrary instances changelog: '' basic-deps: bytestring: ! '>=0.9 && <0.11' base: <6 text: ! '>=0.7 && <1.3' ieee754: ! '>=0.8 && <0.9' scientific: ! '>=0.2 && <0.4' QuickCheck: ! '>=2.1 && <2.10' all-versions: - '0.1.0.0' - '0.1.0.1' - '0.1.0.2' - '0.1.0.3' - '0.1.0.4' author: Daniel Mendler <mail@daniel-mendler.de> latest: '0.1.0.4' description-type: haddock description: The standard Arbitrary instances of QuickCheck don't generate special values. This is fixed by this package which provides the newtype Special with an Arbitrary instance. The special values are given by the SpecialValues typeclass. license-name: MIT
Update from Hackage at 2017-03-05T12:51:49Z
Update from Hackage at 2017-03-05T12:51:49Z
YAML
mit
commercialhaskell/all-cabal-metadata
yaml
## Code Before: homepage: https://github.com/minad/quickcheck-special#readme changelog-type: '' hash: 3f03448291f19b2fac0d5efd707af028451e7d0752da22258c9617ce492103c7 test-bench-deps: {} maintainer: Daniel Mendler <mail@daniel-mendler.de> synopsis: Edge cases and special values for QuickCheck Arbitrary instances changelog: '' basic-deps: bytestring: ! '>=0.9 && <0.11' base: <6 text: ! '>=0.7 && <1.3' ieee754: ! '>=0.8 && <0.9' scientific: ! '>=0.2 && <0.4' QuickCheck: ! '>=2.1 && <2.10' all-versions: - '0.1.0.0' - '0.1.0.1' - '0.1.0.2' - '0.1.0.3' author: Daniel Mendler <mail@daniel-mendler.de> latest: '0.1.0.3' description-type: haddock description: The standard Arbitrary instances of QuickCheck don't generate special values. This is fixed by this package which provides the newtype Special with an Arbitrary instance. The special values are given by the SpecialValues typeclass. license-name: MIT ## Instruction: Update from Hackage at 2017-03-05T12:51:49Z ## Code After: homepage: https://github.com/minad/quickcheck-special#readme changelog-type: '' hash: 71f74bee395eb66adfef889a68e8500f33521f2006b6ef37965aba8e14036103 test-bench-deps: {} maintainer: Daniel Mendler <mail@daniel-mendler.de> synopsis: Edge cases and special values for QuickCheck Arbitrary instances changelog: '' basic-deps: bytestring: ! '>=0.9 && <0.11' base: <6 text: ! '>=0.7 && <1.3' ieee754: ! '>=0.8 && <0.9' scientific: ! '>=0.2 && <0.4' QuickCheck: ! '>=2.1 && <2.10' all-versions: - '0.1.0.0' - '0.1.0.1' - '0.1.0.2' - '0.1.0.3' - '0.1.0.4' author: Daniel Mendler <mail@daniel-mendler.de> latest: '0.1.0.4' description-type: haddock description: The standard Arbitrary instances of QuickCheck don't generate special values. This is fixed by this package which provides the newtype Special with an Arbitrary instance. The special values are given by the SpecialValues typeclass. license-name: MIT
homepage: https://github.com/minad/quickcheck-special#readme changelog-type: '' - hash: 3f03448291f19b2fac0d5efd707af028451e7d0752da22258c9617ce492103c7 + hash: 71f74bee395eb66adfef889a68e8500f33521f2006b6ef37965aba8e14036103 test-bench-deps: {} maintainer: Daniel Mendler <mail@daniel-mendler.de> synopsis: Edge cases and special values for QuickCheck Arbitrary instances changelog: '' basic-deps: bytestring: ! '>=0.9 && <0.11' base: <6 text: ! '>=0.7 && <1.3' ieee754: ! '>=0.8 && <0.9' scientific: ! '>=0.2 && <0.4' QuickCheck: ! '>=2.1 && <2.10' all-versions: - '0.1.0.0' - '0.1.0.1' - '0.1.0.2' - '0.1.0.3' + - '0.1.0.4' author: Daniel Mendler <mail@daniel-mendler.de> - latest: '0.1.0.3' ? ^ + latest: '0.1.0.4' ? ^ description-type: haddock description: The standard Arbitrary instances of QuickCheck don't generate special values. This is fixed by this package which provides the newtype Special with an Arbitrary instance. The special values are given by the SpecialValues typeclass. license-name: MIT
5
0.192308
3
2
2c1a2293b76c1edaa42a28fa4aaf8a4ff6fcbc24
controllers/image.go
controllers/image.go
package controllers package controllers import ( "github.com/astaxie/beego" ) type ImageController struct { beego.Controller } func (this *ImageController) Prepare() { this.Ctx.Output.Context.ResponseWriter.Header().Set("X-Docker-Registry-Version", beego.AppConfig.String("Version")) this.Ctx.Output.Context.ResponseWriter.Header().Set("X-Docker-Registry-Standalone", beego.AppConfig.String("Standalone")) } func (this *ImageController) GETPrivateLayer() { } func (this *ImageController) GETLayer() { } func (this *ImageController) PUTLayer() { } func (this *ImageController) PUTChecksum() { } func (this *ImageController) GETPrivateJSON() { } func (this *ImageController) GETJSON() { } func (this *ImageController) GETAncestry() { } func (this *ImageController) PUTJSON() { } func (this *ImageController) GETPrivateFiles() { } func (this *ImageController) GETFiles() { }
package controllers import ( "github.com/astaxie/beego" ) type ImageController struct { beego.Controller } func (this *ImageController) Prepare() { this.Ctx.Output.Context.ResponseWriter.Header().Set("X-Docker-Registry-Version", beego.AppConfig.String("Version")) this.Ctx.Output.Context.ResponseWriter.Header().Set("X-Docker-Registry-Standalone", beego.AppConfig.String("Standalone")) } func (this *ImageController) GETPrivateLayer() { } func (this *ImageController) GETLayer() { } func (this *ImageController) PUTLayer() { } func (this *ImageController) PUTChecksum() { } func (this *ImageController) GETPrivateJSON() { } func (this *ImageController) GETJSON() { } func (this *ImageController) GETAncestry() { } func (this *ImageController) PUTJSON() { } func (this *ImageController) GETPrivateFiles() { } func (this *ImageController) GETFiles() { }
Fix the package repetition bug
Fix the package repetition bug
Go
mit
yonh/wharf,yonh/wharf,maquanyi/wharf,maquanyi/wharf,astaxie/docker-registry
go
## Code Before: package controllers package controllers import ( "github.com/astaxie/beego" ) type ImageController struct { beego.Controller } func (this *ImageController) Prepare() { this.Ctx.Output.Context.ResponseWriter.Header().Set("X-Docker-Registry-Version", beego.AppConfig.String("Version")) this.Ctx.Output.Context.ResponseWriter.Header().Set("X-Docker-Registry-Standalone", beego.AppConfig.String("Standalone")) } func (this *ImageController) GETPrivateLayer() { } func (this *ImageController) GETLayer() { } func (this *ImageController) PUTLayer() { } func (this *ImageController) PUTChecksum() { } func (this *ImageController) GETPrivateJSON() { } func (this *ImageController) GETJSON() { } func (this *ImageController) GETAncestry() { } func (this *ImageController) PUTJSON() { } func (this *ImageController) GETPrivateFiles() { } func (this *ImageController) GETFiles() { } ## Instruction: Fix the package repetition bug ## Code After: package controllers import ( "github.com/astaxie/beego" ) type ImageController struct { beego.Controller } func (this *ImageController) Prepare() { this.Ctx.Output.Context.ResponseWriter.Header().Set("X-Docker-Registry-Version", beego.AppConfig.String("Version")) this.Ctx.Output.Context.ResponseWriter.Header().Set("X-Docker-Registry-Standalone", beego.AppConfig.String("Standalone")) } func (this *ImageController) GETPrivateLayer() { } func (this *ImageController) GETLayer() { } func (this *ImageController) PUTLayer() { } func (this *ImageController) PUTChecksum() { } func (this *ImageController) GETPrivateJSON() { } func (this *ImageController) GETJSON() { } func (this *ImageController) GETAncestry() { } func (this *ImageController) PUTJSON() { } func (this *ImageController) GETPrivateFiles() { } func (this *ImageController) GETFiles() { }
- package controllers - package controllers import ( - "github.com/astaxie/beego" ? ^ + "github.com/astaxie/beego" ? ^^ ) type ImageController struct { - beego.Controller ? ^ + beego.Controller ? ^^ } func (this *ImageController) Prepare() { - this.Ctx.Output.Context.ResponseWriter.Header().Set("X-Docker-Registry-Version", beego.AppConfig.String("Version")) ? ^ + this.Ctx.Output.Context.ResponseWriter.Header().Set("X-Docker-Registry-Version", beego.AppConfig.String("Version")) ? ^^ - this.Ctx.Output.Context.ResponseWriter.Header().Set("X-Docker-Registry-Standalone", beego.AppConfig.String("Standalone")) ? ^ + this.Ctx.Output.Context.ResponseWriter.Header().Set("X-Docker-Registry-Standalone", beego.AppConfig.String("Standalone")) ? ^^ } func (this *ImageController) GETPrivateLayer() { } func (this *ImageController) GETLayer() { } func (this *ImageController) PUTLayer() { } func (this *ImageController) PUTChecksum() { } func (this *ImageController) GETPrivateJSON() { } func (this *ImageController) GETJSON() { } func (this *ImageController) GETAncestry() { } func (this *ImageController) PUTJSON() { } func (this *ImageController) GETPrivateFiles() { } func (this *ImageController) GETFiles() { - + }
12
0.214286
5
7
be85c8c67502dbc9a27f374f52143ab53b236f85
.github/workflows/test.yml
.github/workflows/test.yml
name: Test on: [push] jobs: test: strategy: matrix: ruby: [2.4, 2.5, 2.6, 2.7] runs-on: ubuntu-latest steps: - uses: actions/checkout@v1 - name: Set up Ruby ${{ matrix.ruby }} uses: actions/setup-ruby@v1 with: ruby-version: ${{ matrix.ruby }} - name: Build and test with Rake env: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} run: | gem install bundler bundle install --jobs 4 --retry 3 --without development bundle exec rspec
name: Test on: [push] jobs: test: name: Test strategy: matrix: ruby: [2.4, 2.5, 2.6, 2.7] runs-on: ubuntu-latest steps: - uses: actions/checkout@v1 - name: Set up Ruby ${{ matrix.ruby }} uses: actions/setup-ruby@v1 with: ruby-version: ${{ matrix.ruby }} - name: Install dependencies run: | gem install bundler bundle install --jobs 4 --retry 3 --without development - name: RSpec env: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} run: | bundle exec rspec rubocop: name: RuboCop runs-on: ubuntu-latest steps: - uses: actions/checkout@v1 - name: Set up Ruby uses: actions/setup-ruby@v1 with: ruby-version: 2.7 - name: Install dependencies run: | gem install bundler bundle install --jobs 4 --retry 3 --without development - name: RuboCop run: | bundle exec rubocop
Add RuboCop to GitHub action
Add RuboCop to GitHub action
YAML
mit
jpalumickas/mailerlite-ruby,jpalumickas/mailerlite-ruby
yaml
## Code Before: name: Test on: [push] jobs: test: strategy: matrix: ruby: [2.4, 2.5, 2.6, 2.7] runs-on: ubuntu-latest steps: - uses: actions/checkout@v1 - name: Set up Ruby ${{ matrix.ruby }} uses: actions/setup-ruby@v1 with: ruby-version: ${{ matrix.ruby }} - name: Build and test with Rake env: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} run: | gem install bundler bundle install --jobs 4 --retry 3 --without development bundle exec rspec ## Instruction: Add RuboCop to GitHub action ## Code After: name: Test on: [push] jobs: test: name: Test strategy: matrix: ruby: [2.4, 2.5, 2.6, 2.7] runs-on: ubuntu-latest steps: - uses: actions/checkout@v1 - name: Set up Ruby ${{ matrix.ruby }} uses: actions/setup-ruby@v1 with: ruby-version: ${{ matrix.ruby }} - name: Install dependencies run: | gem install bundler bundle install --jobs 4 --retry 3 --without development - name: RSpec env: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} run: | bundle exec rspec rubocop: name: RuboCop runs-on: ubuntu-latest steps: - uses: actions/checkout@v1 - name: Set up Ruby uses: actions/setup-ruby@v1 with: ruby-version: 2.7 - name: Install dependencies run: | gem install bundler bundle install --jobs 4 --retry 3 --without development - name: RuboCop run: | bundle exec rubocop
name: Test on: [push] jobs: test: + name: Test strategy: matrix: ruby: [2.4, 2.5, 2.6, 2.7] runs-on: ubuntu-latest steps: - uses: actions/checkout@v1 - name: Set up Ruby ${{ matrix.ruby }} uses: actions/setup-ruby@v1 with: ruby-version: ${{ matrix.ruby }} - - name: Build and test with Rake + - name: Install dependencies + run: | + gem install bundler + bundle install --jobs 4 --retry 3 --without development + - name: RSpec env: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} run: | + bundle exec rspec + + rubocop: + name: RuboCop + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v1 + - name: Set up Ruby + uses: actions/setup-ruby@v1 + with: + ruby-version: 2.7 + - name: Install dependencies + run: | gem install bundler bundle install --jobs 4 --retry 3 --without development + - name: RuboCop + run: | - bundle exec rspec ? ^ -- + bundle exec rubocop ? ^^^^^
25
1
23
2
fa4cf8c6c7a89a60c0067be53c6b0f29d3d3cde3
biosensorsdb/admin.py
biosensorsdb/admin.py
import biosensorsdb.models from django.contrib import admin class ProjectAdmin(admin.ModelAdmin): search_fields = ['team__name', 'year', 'title', 'abstract', 'inputs__name', 'outputs__name', 'tags__name'] admin.site.register(biosensorsdb.models.Team) admin.site.register(biosensorsdb.models.SensorInput) admin.site.register(biosensorsdb.models.SensorOutput) admin.site.register(biosensorsdb.models.Track) admin.site.register(biosensorsdb.models.Application) admin.site.register(biosensorsdb.models.CompetitionResult) admin.site.register(biosensorsdb.models.Project, ProjectAdmin)
import biosensorsdb.models from django.contrib import admin class ProjectAdmin(admin.ModelAdmin): search_fields = [ 'team__name', 'year', 'title', 'abstract', 'track__name', 'inputs__name', 'outputs__name', 'application__name', 'results__result', 'tags__name', ] admin.site.register(biosensorsdb.models.Team) admin.site.register(biosensorsdb.models.SensorInput) admin.site.register(biosensorsdb.models.SensorOutput) admin.site.register(biosensorsdb.models.Track) admin.site.register(biosensorsdb.models.Application) admin.site.register(biosensorsdb.models.CompetitionResult) admin.site.register(biosensorsdb.models.Project, ProjectAdmin)
Make all project fields searchable.
Make all project fields searchable.
Python
mit
jwintersinger/igembiosensors,jwintersinger/igembiosensors
python
## Code Before: import biosensorsdb.models from django.contrib import admin class ProjectAdmin(admin.ModelAdmin): search_fields = ['team__name', 'year', 'title', 'abstract', 'inputs__name', 'outputs__name', 'tags__name'] admin.site.register(biosensorsdb.models.Team) admin.site.register(biosensorsdb.models.SensorInput) admin.site.register(biosensorsdb.models.SensorOutput) admin.site.register(biosensorsdb.models.Track) admin.site.register(biosensorsdb.models.Application) admin.site.register(biosensorsdb.models.CompetitionResult) admin.site.register(biosensorsdb.models.Project, ProjectAdmin) ## Instruction: Make all project fields searchable. ## Code After: import biosensorsdb.models from django.contrib import admin class ProjectAdmin(admin.ModelAdmin): search_fields = [ 'team__name', 'year', 'title', 'abstract', 'track__name', 'inputs__name', 'outputs__name', 'application__name', 'results__result', 'tags__name', ] admin.site.register(biosensorsdb.models.Team) admin.site.register(biosensorsdb.models.SensorInput) admin.site.register(biosensorsdb.models.SensorOutput) admin.site.register(biosensorsdb.models.Track) admin.site.register(biosensorsdb.models.Application) admin.site.register(biosensorsdb.models.CompetitionResult) admin.site.register(biosensorsdb.models.Project, ProjectAdmin)
import biosensorsdb.models from django.contrib import admin class ProjectAdmin(admin.ModelAdmin): - search_fields = ['team__name', 'year', 'title', 'abstract', 'inputs__name', 'outputs__name', 'tags__name'] + search_fields = [ + 'team__name', + 'year', + 'title', + 'abstract', + 'track__name', + 'inputs__name', + 'outputs__name', + 'application__name', + 'results__result', + 'tags__name', + ] admin.site.register(biosensorsdb.models.Team) admin.site.register(biosensorsdb.models.SensorInput) admin.site.register(biosensorsdb.models.SensorOutput) admin.site.register(biosensorsdb.models.Track) admin.site.register(biosensorsdb.models.Application) admin.site.register(biosensorsdb.models.CompetitionResult) admin.site.register(biosensorsdb.models.Project, ProjectAdmin)
13
1
12
1