commit
stringlengths
40
40
old_file
stringlengths
4
237
new_file
stringlengths
4
237
old_contents
stringlengths
1
4.24k
new_contents
stringlengths
5
4.84k
subject
stringlengths
15
778
message
stringlengths
16
6.86k
lang
stringlengths
1
30
license
stringclasses
13 values
repos
stringlengths
5
116k
config
stringlengths
1
30
content
stringlengths
105
8.72k
88ec6dc5bfa4c6c6e66f0034b4860fda021cb391
demo/graphics/frame.js
demo/graphics/frame.js
'use strict'; var PIXI = window.PIXI, Point = require('../data/point'), Rect = require('../data/rect'); function Frame(position, url, options) { this.pos = position; this.dir = options.direction || new Point(1, 1); this.offset = options.offset || new Point(0, 0); var base = PIXI.BaseTexture.fromImage(url, false, PIXI.scaleModes.NEAREST), slice = options.crop || new Rect(0, 0, base.width, base.height), tex = new PIXI.Texture(base, slice); this.sprite = new PIXI.Sprite(tex); this.render(); } Frame.prototype.render = function() { var gPos = this.sprite.position, gScale = this.sprite.scale; gPos.x = Math.round(this.pos.x + this.offset.x); gPos.y = Math.round(this.pos.y + this.offset.y); gScale.x = this.dir.x; gScale.y = this.dir.y; /* * Flipping will result in the sprite appearing to jump (flips on the 0, * rather than mid-sprite), so subtract the sprite's size from its position * if it's flipped. */ if(gScale.x < 0) gPos.x -= this.sprite.width; if(gScale.y < 0) gPos.y -= this.sprite.height; }; module.exports = Frame;
'use strict'; var PIXI = window.PIXI, Point = require('../data/point'), Rect = require('../data/rect'); function Frame(position, url, options) { this.pos = position; this.dir = options.direction || new Point(1, 1); this.offset = options.offset || new Point(0, 0); var base = PIXI.BaseTexture.fromImage(url, false, PIXI.scaleModes.NEAREST), slice = options.crop || new Rect(0, 0, base.width, base.height), tex = new PIXI.Texture(base, slice); this.sprite = new PIXI.Sprite(tex); this.render(); } Frame.prototype.render = function() { var gPos = this.sprite.position, gScale = this.sprite.scale; gPos.x = this.pos.x + this.offset.x; gPos.y = this.pos.y + this.offset.y; gScale.x = this.dir.x; gScale.y = this.dir.y; /* * Flipping will result in the sprite appearing to jump (flips on the 0, * rather than mid-sprite), so subtract the sprite's size from its position * if it's flipped. */ if(gScale.x < 0) gPos.x -= this.sprite.width; if(gScale.y < 0) gPos.y -= this.sprite.height; }; module.exports = Frame;
Remove deoptimized calls based on profiling
Remove deoptimized calls based on profiling
JavaScript
mit
reissbaker/gamekernel,reissbaker/gamekernel
javascript
## Code Before: 'use strict'; var PIXI = window.PIXI, Point = require('../data/point'), Rect = require('../data/rect'); function Frame(position, url, options) { this.pos = position; this.dir = options.direction || new Point(1, 1); this.offset = options.offset || new Point(0, 0); var base = PIXI.BaseTexture.fromImage(url, false, PIXI.scaleModes.NEAREST), slice = options.crop || new Rect(0, 0, base.width, base.height), tex = new PIXI.Texture(base, slice); this.sprite = new PIXI.Sprite(tex); this.render(); } Frame.prototype.render = function() { var gPos = this.sprite.position, gScale = this.sprite.scale; gPos.x = Math.round(this.pos.x + this.offset.x); gPos.y = Math.round(this.pos.y + this.offset.y); gScale.x = this.dir.x; gScale.y = this.dir.y; /* * Flipping will result in the sprite appearing to jump (flips on the 0, * rather than mid-sprite), so subtract the sprite's size from its position * if it's flipped. */ if(gScale.x < 0) gPos.x -= this.sprite.width; if(gScale.y < 0) gPos.y -= this.sprite.height; }; module.exports = Frame; ## Instruction: Remove deoptimized calls based on profiling ## Code After: 'use strict'; var PIXI = window.PIXI, Point = require('../data/point'), Rect = require('../data/rect'); function Frame(position, url, options) { this.pos = position; this.dir = options.direction || new Point(1, 1); this.offset = options.offset || new Point(0, 0); var base = PIXI.BaseTexture.fromImage(url, false, PIXI.scaleModes.NEAREST), slice = options.crop || new Rect(0, 0, base.width, base.height), tex = new PIXI.Texture(base, slice); this.sprite = new PIXI.Sprite(tex); this.render(); } Frame.prototype.render = function() { var gPos = this.sprite.position, gScale = this.sprite.scale; gPos.x = this.pos.x + this.offset.x; gPos.y = this.pos.y + this.offset.y; gScale.x = this.dir.x; gScale.y = this.dir.y; /* * Flipping will result in the sprite appearing to jump (flips on the 0, * rather than mid-sprite), so subtract the sprite's size from its position * if it's flipped. */ if(gScale.x < 0) gPos.x -= this.sprite.width; if(gScale.y < 0) gPos.y -= this.sprite.height; }; module.exports = Frame;
65bfe55ca0448dc941739deea117347798807fc9
app/assets/javascripts/patient_auto_complete.js
app/assets/javascripts/patient_auto_complete.js
$(document).ready(function() { $("[data-autocomplete-source]").each(function() { var url = $(this).data("autocomplete-source"); var target = $(this).data("autocomplete-rel"); $(this).autocomplete({ minLength: 2, source: function(request,response) { var path = url + "?term=" + request.term $.getJSON(path, function(data) { var list = $.map(data, function(patient) { return { label: patient.unique_label, value: patient.unique_label, id: patient.id }; }); response(list); }) }, search: function(event, ui) { $(target).val(""); }, select: function(event, ui) { $(target).val(ui.item.id); } }); }); });
$(document).ready(function() { $("[data-autocomplete-source]").each(function() { var url = $(this).data("autocomplete-source"); var target = $(this).data("autocomplete-rel"); $(this).autocomplete({ minLength: 2, source: function(request,response) { $.ajax({ url: url, data: { term: request.term }, success: function(data) { var list = $.map(data, function(patient) { return { label: patient.unique_label, id: patient.id }; }); response(list); }, error: function(jqXHR, textStatus, errorThrown) { var msg = "An error occurred. Please contact an administrator."; response({ label: msg, id: 0}); } }); }, search: function(event, ui) { $(target).val(""); }, select: function(event, ui) { $(target).val(ui.item.id); } }); }); });
Handle error if autocomplete query fails
Handle error if autocomplete query fails
JavaScript
mit
airslie/renalware-core,airslie/renalware-core,airslie/renalware-core,airslie/renalware-core
javascript
## Code Before: $(document).ready(function() { $("[data-autocomplete-source]").each(function() { var url = $(this).data("autocomplete-source"); var target = $(this).data("autocomplete-rel"); $(this).autocomplete({ minLength: 2, source: function(request,response) { var path = url + "?term=" + request.term $.getJSON(path, function(data) { var list = $.map(data, function(patient) { return { label: patient.unique_label, value: patient.unique_label, id: patient.id }; }); response(list); }) }, search: function(event, ui) { $(target).val(""); }, select: function(event, ui) { $(target).val(ui.item.id); } }); }); }); ## Instruction: Handle error if autocomplete query fails ## Code After: $(document).ready(function() { $("[data-autocomplete-source]").each(function() { var url = $(this).data("autocomplete-source"); var target = $(this).data("autocomplete-rel"); $(this).autocomplete({ minLength: 2, source: function(request,response) { $.ajax({ url: url, data: { term: request.term }, success: function(data) { var list = $.map(data, function(patient) { return { label: patient.unique_label, id: patient.id }; }); response(list); }, error: function(jqXHR, textStatus, errorThrown) { var msg = "An error occurred. Please contact an administrator."; response({ label: msg, id: 0}); } }); }, search: function(event, ui) { $(target).val(""); }, select: function(event, ui) { $(target).val(ui.item.id); } }); }); });
c9d8c2c202bd9e6706cb094cd49f3c26e2232341
Assets/Shaders/MW_Standard_Blended.shader
Assets/Shaders/MW_Standard_Blended.shader
Shader "TES Unity/Standard Blended" { Properties { _Color ("Color", Color) = (1,1,1,1) _MainTex ("Albedo (RGB)", 2D) = "white" {} _Glossiness ("Smoothness", Range(0,1)) = 0.5 _Metallic ("Metallic", Range(0,1)) = 0.0 [HideInInspector] _SrcBlend("__src", Float) = 1.0 [HideInInspector] _DstBlend("__dst", Float) = 0.0 } SubShader { Tags { "RenderType"="Transparent" "Queue"="Transparent" } Blend[_SrcBlend][_DstBlend] ZWrite Off CGPROGRAM #pragma surface surf Standard alpha:fade #pragma target 3.0 sampler2D _MainTex; struct Input { float2 uv_MainTex; }; fixed _Cutoff; half _Glossiness; half _Metallic; half4 _Color; void surf (Input i, inout SurfaceOutputStandard o) { half4 c = tex2D (_MainTex, i.uv_MainTex) * _Color; //if ( c.a <= 0.0 ) discard; o.Albedo = c.rgb; o.Metallic = _Metallic; o.Smoothness = _Glossiness; o.Alpha = c.a; } ENDCG } FallBack "Diffuse" }
Shader "TES Unity/Standard Blended" { Properties { _Color ("Color", Color) = (1,1,1,1) _MainTex ("Albedo (RGB)", 2D) = "white" {} _Glossiness ("Smoothness", Range(0,1)) = 0.5 _Metallic ("Metallic", Range(0,1)) = 0.0 [HideInInspector] _SrcBlend("__src", Float) = 1.0 [HideInInspector] _DstBlend("__dst", Float) = 0.0 [HideInInspector]_Cutoff("cutoff", Float) = 0.5 } SubShader { Tags { "RenderType"="Transparent" "Queue"="Transparent" } Blend[_SrcBlend][_DstBlend] ZWrite Off CGPROGRAM #pragma surface surf Standard alpha:fade #pragma target 3.0 sampler2D _MainTex; struct Input { float2 uv_MainTex; }; half _Glossiness; half _Metallic; half4 _Color; void surf (Input i, inout SurfaceOutputStandard o) { half4 c = tex2D (_MainTex, i.uv_MainTex) * _Color; o.Albedo = c.rgb; o.Metallic = _Metallic; o.Smoothness = _Glossiness; o.Alpha = c.a; } ENDCG } FallBack "Transparent/Cutout/Diffuse" }
Fix for transparent material shadows. Alpha blended material + alpha tested shadows
Fix for transparent material shadows. Alpha blended material + alpha tested shadows
GLSL
mit
demonixis/TESUnity,ColeDeanShepherd/TESUnity
glsl
## Code Before: Shader "TES Unity/Standard Blended" { Properties { _Color ("Color", Color) = (1,1,1,1) _MainTex ("Albedo (RGB)", 2D) = "white" {} _Glossiness ("Smoothness", Range(0,1)) = 0.5 _Metallic ("Metallic", Range(0,1)) = 0.0 [HideInInspector] _SrcBlend("__src", Float) = 1.0 [HideInInspector] _DstBlend("__dst", Float) = 0.0 } SubShader { Tags { "RenderType"="Transparent" "Queue"="Transparent" } Blend[_SrcBlend][_DstBlend] ZWrite Off CGPROGRAM #pragma surface surf Standard alpha:fade #pragma target 3.0 sampler2D _MainTex; struct Input { float2 uv_MainTex; }; fixed _Cutoff; half _Glossiness; half _Metallic; half4 _Color; void surf (Input i, inout SurfaceOutputStandard o) { half4 c = tex2D (_MainTex, i.uv_MainTex) * _Color; //if ( c.a <= 0.0 ) discard; o.Albedo = c.rgb; o.Metallic = _Metallic; o.Smoothness = _Glossiness; o.Alpha = c.a; } ENDCG } FallBack "Diffuse" } ## Instruction: Fix for transparent material shadows. Alpha blended material + alpha tested shadows ## Code After: Shader "TES Unity/Standard Blended" { Properties { _Color ("Color", Color) = (1,1,1,1) _MainTex ("Albedo (RGB)", 2D) = "white" {} _Glossiness ("Smoothness", Range(0,1)) = 0.5 _Metallic ("Metallic", Range(0,1)) = 0.0 [HideInInspector] _SrcBlend("__src", Float) = 1.0 [HideInInspector] _DstBlend("__dst", Float) = 0.0 [HideInInspector]_Cutoff("cutoff", Float) = 0.5 } SubShader { Tags { "RenderType"="Transparent" "Queue"="Transparent" } Blend[_SrcBlend][_DstBlend] ZWrite Off CGPROGRAM #pragma surface surf Standard alpha:fade #pragma target 3.0 sampler2D _MainTex; struct Input { float2 uv_MainTex; }; half _Glossiness; half _Metallic; half4 _Color; void surf (Input i, inout SurfaceOutputStandard o) { half4 c = tex2D (_MainTex, i.uv_MainTex) * _Color; o.Albedo = c.rgb; o.Metallic = _Metallic; o.Smoothness = _Glossiness; o.Alpha = c.a; } ENDCG } FallBack "Transparent/Cutout/Diffuse" }
be927e17787bd722f4974fdde50ca615522fb51d
README.md
README.md
* Add Polymer * Create some components * Create comic layout with components
* Try to get Heroku to build the app upon code check-in * Add Polymer * Create some components * Create comic layout with components
Add todo item for build system
Add todo item for build system
Markdown
mit
megafatsquirrel/RainbowScratch,megafatsquirrel/RainbowScratch
markdown
## Code Before: * Add Polymer * Create some components * Create comic layout with components ## Instruction: Add todo item for build system ## Code After: * Try to get Heroku to build the app upon code check-in * Add Polymer * Create some components * Create comic layout with components
6065e7833fcce06b3f6ba5a9c159e533cab33efa
pubspec.yaml
pubspec.yaml
name: dartcoin version: 0.0.0 author: Steven Roose <[email protected]> description: A Bitcoin library for Dart. Pub-test release. homepage: http://www.dartcoin.org/ dependencies: bignum: '>=0.0.4' cipher: path: /Users/steven/git/cipher collection: any crypto: any json: any json_rpc: any asn1lib: path: /Users/steven/git/asn1lib dev_dependencies: browser: any unittest: any uuid: any
name: dartcoin version: 0.0.0 author: Steven Roose <[email protected]> description: A Bitcoin library for Dart. Pub-test release. homepage: http://www.dartcoin.org/ dependencies: bignum: '>=0.0.4' cipher: path: /home/steven/git/cipher collection: any crypto: any json: any json_rpc: any asn1lib: '>=0.3.1' dev_dependencies: browser: any unittest: any uuid: any
Set minimum version of asn1lib to 0.3.1
Set minimum version of asn1lib to 0.3.1
YAML
mit
stevenroose/dartcoin-lib,dartcoin/dartcoin-lib
yaml
## Code Before: name: dartcoin version: 0.0.0 author: Steven Roose <[email protected]> description: A Bitcoin library for Dart. Pub-test release. homepage: http://www.dartcoin.org/ dependencies: bignum: '>=0.0.4' cipher: path: /Users/steven/git/cipher collection: any crypto: any json: any json_rpc: any asn1lib: path: /Users/steven/git/asn1lib dev_dependencies: browser: any unittest: any uuid: any ## Instruction: Set minimum version of asn1lib to 0.3.1 ## Code After: name: dartcoin version: 0.0.0 author: Steven Roose <[email protected]> description: A Bitcoin library for Dart. Pub-test release. homepage: http://www.dartcoin.org/ dependencies: bignum: '>=0.0.4' cipher: path: /home/steven/git/cipher collection: any crypto: any json: any json_rpc: any asn1lib: '>=0.3.1' dev_dependencies: browser: any unittest: any uuid: any
e02f59c9abde988058f4b2745ddc392bed4bb94d
README.rst
README.rst
Flask-MongoKit ============== Flask-MongoKit simplifies to use `MongoKit`_, a powerful `MongoDB`_ ORM in Flask applications. .. _MongoKit: http://namlook.github.com/mongokit/ .. _MongoDB: http://www.mongodb.org/ .. _here: http://bitbucket.org/Jarus/flask-mongokit/ Installation ------------ The installation is thanks to the Python Package Index and `pip`_ really simple. :: $ pip install Flask-MongoKit If you only can use `easy_install` than use :: $ easy_install Flask-MongoKit .. _pip: http://pip.openplans.org/ Flask-MongoKit requires to run some packages (they will be installed automatically if they not already installed): * Flask * MongoKit * pymongo Changes ------- * **0.4**: Support new import system of flask. Use now: :: form flask.ext.mongokit import Mongokit
Flask-MongoKit ============== .. image:: https://secure.travis-ci.org/jarus/flask-mongokit.png :target: http://travis-ci.org/jarus/flask-mongokit Flask-MongoKit simplifies to use `MongoKit`_, a powerful `MongoDB`_ ORM in Flask applications. .. _MongoKit: http://namlook.github.com/mongokit/ .. _MongoDB: http://www.mongodb.org/ .. _here: http://bitbucket.org/Jarus/flask-mongokit/ Installation ------------ The installation is thanks to the Python Package Index and `pip`_ really simple. :: $ pip install Flask-MongoKit If you only can use `easy_install` than use :: $ easy_install Flask-MongoKit .. _pip: http://pip.openplans.org/ Flask-MongoKit requires to run some packages (they will be installed automatically if they not already installed): * Flask * MongoKit * pymongo Changes ------- * **0.4**: Support new import system of flask. Use now: :: form flask.ext.mongokit import Mongokit
Add Travis CI status image to readme
Add Travis CI status image to readme
reStructuredText
bsd-3-clause
jarus/flask-mongokit,VishvajitP/flask-mongokit,VishvajitP/flask-mongokit,jarus/flask-mongokit
restructuredtext
## Code Before: Flask-MongoKit ============== Flask-MongoKit simplifies to use `MongoKit`_, a powerful `MongoDB`_ ORM in Flask applications. .. _MongoKit: http://namlook.github.com/mongokit/ .. _MongoDB: http://www.mongodb.org/ .. _here: http://bitbucket.org/Jarus/flask-mongokit/ Installation ------------ The installation is thanks to the Python Package Index and `pip`_ really simple. :: $ pip install Flask-MongoKit If you only can use `easy_install` than use :: $ easy_install Flask-MongoKit .. _pip: http://pip.openplans.org/ Flask-MongoKit requires to run some packages (they will be installed automatically if they not already installed): * Flask * MongoKit * pymongo Changes ------- * **0.4**: Support new import system of flask. Use now: :: form flask.ext.mongokit import Mongokit ## Instruction: Add Travis CI status image to readme ## Code After: Flask-MongoKit ============== .. image:: https://secure.travis-ci.org/jarus/flask-mongokit.png :target: http://travis-ci.org/jarus/flask-mongokit Flask-MongoKit simplifies to use `MongoKit`_, a powerful `MongoDB`_ ORM in Flask applications. .. _MongoKit: http://namlook.github.com/mongokit/ .. _MongoDB: http://www.mongodb.org/ .. _here: http://bitbucket.org/Jarus/flask-mongokit/ Installation ------------ The installation is thanks to the Python Package Index and `pip`_ really simple. :: $ pip install Flask-MongoKit If you only can use `easy_install` than use :: $ easy_install Flask-MongoKit .. _pip: http://pip.openplans.org/ Flask-MongoKit requires to run some packages (they will be installed automatically if they not already installed): * Flask * MongoKit * pymongo Changes ------- * **0.4**: Support new import system of flask. Use now: :: form flask.ext.mongokit import Mongokit
3a0ab52bbab3ffea86ae51f189159dda47634572
app/controllers/pantry_items.js
app/controllers/pantry_items.js
var PantryItemsController = Em.ArrayController.extend({ actions: { incrementQuantity: function(item) { item.incrementProperty('quantity', 1); }, decrementQuantity: function(item) { if (item.get('quantity') > 0) { item.incrementProperty('quantity', -1); } }, createNewItem: function(newTitle) { this.addObject(Em.Object.create({ title: newTitle, quantity: 1 })); this.set('newTitle', ''); } }, sortProperties: ['title'], sortAscending: true }); export default PantryItemsController;
var PantryItemsController = Em.ArrayController.extend({ actions: { incrementQuantity: function(item) { item.incrementProperty('quantity', 1); }, decrementQuantity: function(item) { if (item.get('quantity') > 0) { item.incrementProperty('quantity', -1); } }, createNewItem: function(newTitle) { if (!Em.isEmpty(newTitle) && Em.isNone(this.findBy('title', newTitle))) { this.addObject(Em.Object.create({ title: newTitle, quantity: 1 })); this.set('newTitle', ''); } } }, sortProperties: ['title'], sortAscending: true }); export default PantryItemsController;
Add feature to only add new items when title is unique and non-empty.
Add feature to only add new items when title is unique and non-empty.
JavaScript
mit
wukkuan/inventory
javascript
## Code Before: var PantryItemsController = Em.ArrayController.extend({ actions: { incrementQuantity: function(item) { item.incrementProperty('quantity', 1); }, decrementQuantity: function(item) { if (item.get('quantity') > 0) { item.incrementProperty('quantity', -1); } }, createNewItem: function(newTitle) { this.addObject(Em.Object.create({ title: newTitle, quantity: 1 })); this.set('newTitle', ''); } }, sortProperties: ['title'], sortAscending: true }); export default PantryItemsController; ## Instruction: Add feature to only add new items when title is unique and non-empty. ## Code After: var PantryItemsController = Em.ArrayController.extend({ actions: { incrementQuantity: function(item) { item.incrementProperty('quantity', 1); }, decrementQuantity: function(item) { if (item.get('quantity') > 0) { item.incrementProperty('quantity', -1); } }, createNewItem: function(newTitle) { if (!Em.isEmpty(newTitle) && Em.isNone(this.findBy('title', newTitle))) { this.addObject(Em.Object.create({ title: newTitle, quantity: 1 })); this.set('newTitle', ''); } } }, sortProperties: ['title'], sortAscending: true }); export default PantryItemsController;
816a2a33c5dea8870cfdf106922cf665d8f1714e
README.md
README.md
The ``warpdrive`` project provide the scripts for implementing a build and deployment system for Python web applications using Docker. The scripts can be integrated into a suitable Docker base image to provide a more structured way for incorporating a Python web application into a Docker image, with ``warpdrive`` doing all the hard work of co-ordinating the build of the Docker image containing you application. The ``warpdrive`` scripts will also handle the startup of the Python web application when the container is run. As well as basic support for working with Docker directly, the ``warpdrive`` project also provides ``assemble`` and ``run`` scripts suitable for use with the [Source to Image ](https://github.com/openshift/source-to-image) (S2I) project. This allows a Docker image to be enabled as a S2I builder for constructing Docker images for your application without you needing to even know how to build Docker containers. Any S2I enabled Docker image would also be able to be used as a S2I builder with any Docker based PaaS with S2I support built in, such as OpenShift. For examples of Docker images which incorporate the ``warpdrive`` scripts see: * [warp0-python-debian8](https://github.com/GrahamDumpleton/warp0-python-debian8)
The ``warpdrive`` project provide the scripts for implementing a build and deployment system for Python web applications using Docker. The scripts can be integrated into a suitable Docker base image to provide a more structured way for incorporating a Python web application into a Docker image, with ``warpdrive`` doing all the hard work of co-ordinating the build of the Docker image containing you application. The ``warpdrive`` scripts will also handle the startup of the Python web application when the container is run. As well as basic support for working with Docker directly, the ``warpdrive`` project also provides ``assemble`` and ``run`` scripts suitable for use with the [Source to Image ](https://github.com/openshift/source-to-image) (S2I) project. This allows a Docker image to be enabled as a S2I builder for constructing Docker images for your application without you needing to even know how to build Docker containers. Any S2I enabled Docker image would also be able to be used as a S2I builder with any Docker based PaaS with S2I support built in, such as OpenShift. For examples of Docker images which incorporate the ``warpdrive`` scripts see: * [warp0-debian8-python](https://github.com/GrahamDumpleton/warp0-debian8-python)
Fix up Docker image references.
Fix up Docker image references.
Markdown
bsd-2-clause
GrahamDumpleton/warpdrive-python,GrahamDumpleton/warpdrive-python,GrahamDumpleton/warpdrive,GrahamDumpleton/warpdrive
markdown
## Code Before: The ``warpdrive`` project provide the scripts for implementing a build and deployment system for Python web applications using Docker. The scripts can be integrated into a suitable Docker base image to provide a more structured way for incorporating a Python web application into a Docker image, with ``warpdrive`` doing all the hard work of co-ordinating the build of the Docker image containing you application. The ``warpdrive`` scripts will also handle the startup of the Python web application when the container is run. As well as basic support for working with Docker directly, the ``warpdrive`` project also provides ``assemble`` and ``run`` scripts suitable for use with the [Source to Image ](https://github.com/openshift/source-to-image) (S2I) project. This allows a Docker image to be enabled as a S2I builder for constructing Docker images for your application without you needing to even know how to build Docker containers. Any S2I enabled Docker image would also be able to be used as a S2I builder with any Docker based PaaS with S2I support built in, such as OpenShift. For examples of Docker images which incorporate the ``warpdrive`` scripts see: * [warp0-python-debian8](https://github.com/GrahamDumpleton/warp0-python-debian8) ## Instruction: Fix up Docker image references. ## Code After: The ``warpdrive`` project provide the scripts for implementing a build and deployment system for Python web applications using Docker. The scripts can be integrated into a suitable Docker base image to provide a more structured way for incorporating a Python web application into a Docker image, with ``warpdrive`` doing all the hard work of co-ordinating the build of the Docker image containing you application. The ``warpdrive`` scripts will also handle the startup of the Python web application when the container is run. As well as basic support for working with Docker directly, the ``warpdrive`` project also provides ``assemble`` and ``run`` scripts suitable for use with the [Source to Image ](https://github.com/openshift/source-to-image) (S2I) project. This allows a Docker image to be enabled as a S2I builder for constructing Docker images for your application without you needing to even know how to build Docker containers. Any S2I enabled Docker image would also be able to be used as a S2I builder with any Docker based PaaS with S2I support built in, such as OpenShift. For examples of Docker images which incorporate the ``warpdrive`` scripts see: * [warp0-debian8-python](https://github.com/GrahamDumpleton/warp0-debian8-python)
39680d46b55b25b04e1cb3b30d00f0403dc0f636
README.md
README.md
Docker container for Vim. ## Quickstart Assuming you have docker installed, add this to your `~/.bash_profile`. ```bash alias vim="docker run --rm -it -v \"$PWD:/workspace\" bcbcarl/vim" ``` Happy Vimming! ## License The MIT License (MIT) Copyright (c) 2014 Carl X. Su
* [`7.4`, `latest` (7.4/Dockerfile)](https://github.com/bcbcarl/docker-vim/blob/master/7.4/Dockerfile) Docker container for Vim. ## Quickstart Assuming you have docker installed, add this to your `~/.bash_profile`. ```bash alias vim="docker run --rm -it -v \"$PWD:/workspace\" bcbcarl/vim" ``` Happy Vimming! ## License The MIT License (MIT) Copyright (c) 2014 Carl X. Su
Add info about supported tags
Add info about supported tags
Markdown
mit
cdinu/docker-vim,bcbcarl/docker-vim
markdown
## Code Before: Docker container for Vim. ## Quickstart Assuming you have docker installed, add this to your `~/.bash_profile`. ```bash alias vim="docker run --rm -it -v \"$PWD:/workspace\" bcbcarl/vim" ``` Happy Vimming! ## License The MIT License (MIT) Copyright (c) 2014 Carl X. Su ## Instruction: Add info about supported tags ## Code After: * [`7.4`, `latest` (7.4/Dockerfile)](https://github.com/bcbcarl/docker-vim/blob/master/7.4/Dockerfile) Docker container for Vim. ## Quickstart Assuming you have docker installed, add this to your `~/.bash_profile`. ```bash alias vim="docker run --rm -it -v \"$PWD:/workspace\" bcbcarl/vim" ``` Happy Vimming! ## License The MIT License (MIT) Copyright (c) 2014 Carl X. Su
ac2f484c3ac210decac9f351bea5e9415cf8c30b
src/gox_build.sh
src/gox_build.sh
export GOPATH=$GOPATH:/Users/jemy/QiniuCloud/Projects/qshell gox -os="windows" gox -os="darwin"
export GOPATH=$GOPATH:/Users/jemy/QiniuCloud/Projects/qshell gox -os="darwin" -arch="386" gox -os="darwin" -arch="amd64" gox -os="windows" -arch="386" gox -os="windows" -arch="amd64" gox -os="linux" -arch="386" gox -os="linux" -arch="amd64" mv src_* ../bin/
Add new gox build script.
Add new gox build script.
Shell
mit
qiniu-lab/qshell,qiniu/qshell,jemygraw/qshell,liangchao07115/qshell,liangchao07115/qshell,jemygraw/qshell,qiniu-lab/qshell
shell
## Code Before: export GOPATH=$GOPATH:/Users/jemy/QiniuCloud/Projects/qshell gox -os="windows" gox -os="darwin" ## Instruction: Add new gox build script. ## Code After: export GOPATH=$GOPATH:/Users/jemy/QiniuCloud/Projects/qshell gox -os="darwin" -arch="386" gox -os="darwin" -arch="amd64" gox -os="windows" -arch="386" gox -os="windows" -arch="amd64" gox -os="linux" -arch="386" gox -os="linux" -arch="amd64" mv src_* ../bin/
c493a7d58878f0c86d1cd5521a04637f6f3abcd9
src/cljs/word_finder/actions/call_server.cljs
src/cljs/word_finder/actions/call_server.cljs
(ns ^:figwheel-load word-finder.actions.call-server (:require [ajax.core :refer [GET]])) (def server "http://localhost:8080/api/words/") ;;FIXME: the string interpolation can be easily broken. (defn find-words [input-string callback] (GET (str server "find" "?find=" input-string) {:handler callback :error-handler #(println "ERROR" %)})) (defn find-anagrams [input-string callback] (GET (str server "anagrams" "?find=" input-string) {:handler callback :error-handler #(println "ERROR!" %)})) (defn find-sub-anagrams [input-string callback] (GET (str server "sub-anagrams" "?find=" input-string) {:handler callback}))
(ns ^:figwheel-load word-finder.actions.call-server (:require [ajax.core :refer [GET]])) (def server "http://localhost:8080/api/words/") (defn find-words "Call the server-side find-words, returning JSON" [input-string callback] (GET (str server "find") {:params {:find input-string} :format :json :handler callback :error-handler #(println "ERROR" %)})) (defn find-anagrams "Call the server-side find-anangrams, returning JSON" [input-string callback] (GET (str server "anagrams") {:params {:find input-string} :format :json :handler callback :error-handler #(println "ERROR!" %)})) (defn find-sub-anagrams "Call the server-side find-sub-anagrams, returning JSON" [input-string callback] (GET (str server "sub-anagrams") {:params {:find input-string} :format :json :handler callback :error-handler #(println "ERROR!" %)}))
Fix the cljs server calls to use ajax.core :params
Fix the cljs server calls to use ajax.core :params Instead of doing poor string interpolation, just use the library.
Clojure
epl-1.0
davidjameshumphreys/clojure-word-finder
clojure
## Code Before: (ns ^:figwheel-load word-finder.actions.call-server (:require [ajax.core :refer [GET]])) (def server "http://localhost:8080/api/words/") ;;FIXME: the string interpolation can be easily broken. (defn find-words [input-string callback] (GET (str server "find" "?find=" input-string) {:handler callback :error-handler #(println "ERROR" %)})) (defn find-anagrams [input-string callback] (GET (str server "anagrams" "?find=" input-string) {:handler callback :error-handler #(println "ERROR!" %)})) (defn find-sub-anagrams [input-string callback] (GET (str server "sub-anagrams" "?find=" input-string) {:handler callback})) ## Instruction: Fix the cljs server calls to use ajax.core :params Instead of doing poor string interpolation, just use the library. ## Code After: (ns ^:figwheel-load word-finder.actions.call-server (:require [ajax.core :refer [GET]])) (def server "http://localhost:8080/api/words/") (defn find-words "Call the server-side find-words, returning JSON" [input-string callback] (GET (str server "find") {:params {:find input-string} :format :json :handler callback :error-handler #(println "ERROR" %)})) (defn find-anagrams "Call the server-side find-anangrams, returning JSON" [input-string callback] (GET (str server "anagrams") {:params {:find input-string} :format :json :handler callback :error-handler #(println "ERROR!" %)})) (defn find-sub-anagrams "Call the server-side find-sub-anagrams, returning JSON" [input-string callback] (GET (str server "sub-anagrams") {:params {:find input-string} :format :json :handler callback :error-handler #(println "ERROR!" %)}))
1bd83af7657592772f8291f2dd49c09f588ae839
README.rst
README.rst
geoportailv3 project =================== geoportailv3 is the implementation of the v3 of the map viewer of the luxembourgish geoportal. Read the `Documentation <http://docs.camptocamp.net/c2cgeoportal/>`_ System-level dependencies ------------------------- The following must be installed on the system: * ``git`` * ``python-virtualenv`` * ``httpd`` * ``mod_wsgi`` * ``postgresql-devel`` (or ``libpq-dev`` on Debian) * ``python-devel`` * ``gcc`` * ``npm`` * ``openldap-devel`` (or ``libldap2-dev`` and ``libsasl2-dev`` on Debian) For the print to work, you wil need * ``jdk`` (java-1.7.0-openjdk-devel) * ``tomcat`` Make sure ``pg_config`` (from the ``postgresql-devel``) is in your ``PATH``. Checkout -------- .. code:: bash git clone [email protected]:Geoportail-Luxembourg/geoportailv3.git Build ----- .. code:: bash cd geoportailv3 make -f <user>.mk build .. Feel free to add project-specific things.
geoportailv3 project =================== [![Build Status](https://travis-ci.org/Geoportail-Luxembourg/geoportailv3.svg?branch=master)](https://travis-ci.org/Geoportail-Luxembourg/geoportailv3) geoportailv3 is the implementation of the v3 of the map viewer of the luxembourgish geoportal. Read the `Documentation <http://docs.camptocamp.net/c2cgeoportal/>`_ System-level dependencies ------------------------- The following must be installed on the system: * ``git`` * ``python-virtualenv`` * ``httpd`` * ``mod_wsgi`` * ``postgresql-devel`` (or ``libpq-dev`` on Debian) * ``python-devel`` * ``gcc`` * ``npm`` * ``openldap-devel`` (or ``libldap2-dev`` and ``libsasl2-dev`` on Debian) For the print to work, you wil need * ``jdk`` (java-1.7.0-openjdk-devel) * ``tomcat`` Make sure ``pg_config`` (from the ``postgresql-devel``) is in your ``PATH``. Checkout -------- .. code:: bash git clone [email protected]:Geoportail-Luxembourg/geoportailv3.git Build ----- .. code:: bash cd geoportailv3 make -f <user>.mk build .. Feel free to add project-specific things.
Add badge to display current travis build status in github
Add badge to display current travis build status in github
reStructuredText
mit
Geoportail-Luxembourg/geoportailv3,geoportallux/geoportailv3-gisgr,geoportallux/geoportailv3-gisgr,geoportallux/geoportailv3-gisgr,Geoportail-Luxembourg/geoportailv3,geoportallux/geoportailv3-gisgr,Geoportail-Luxembourg/geoportailv3,Geoportail-Luxembourg/geoportailv3,Geoportail-Luxembourg/geoportailv3
restructuredtext
## Code Before: geoportailv3 project =================== geoportailv3 is the implementation of the v3 of the map viewer of the luxembourgish geoportal. Read the `Documentation <http://docs.camptocamp.net/c2cgeoportal/>`_ System-level dependencies ------------------------- The following must be installed on the system: * ``git`` * ``python-virtualenv`` * ``httpd`` * ``mod_wsgi`` * ``postgresql-devel`` (or ``libpq-dev`` on Debian) * ``python-devel`` * ``gcc`` * ``npm`` * ``openldap-devel`` (or ``libldap2-dev`` and ``libsasl2-dev`` on Debian) For the print to work, you wil need * ``jdk`` (java-1.7.0-openjdk-devel) * ``tomcat`` Make sure ``pg_config`` (from the ``postgresql-devel``) is in your ``PATH``. Checkout -------- .. code:: bash git clone [email protected]:Geoportail-Luxembourg/geoportailv3.git Build ----- .. code:: bash cd geoportailv3 make -f <user>.mk build .. Feel free to add project-specific things. ## Instruction: Add badge to display current travis build status in github ## Code After: geoportailv3 project =================== [![Build Status](https://travis-ci.org/Geoportail-Luxembourg/geoportailv3.svg?branch=master)](https://travis-ci.org/Geoportail-Luxembourg/geoportailv3) geoportailv3 is the implementation of the v3 of the map viewer of the luxembourgish geoportal. Read the `Documentation <http://docs.camptocamp.net/c2cgeoportal/>`_ System-level dependencies ------------------------- The following must be installed on the system: * ``git`` * ``python-virtualenv`` * ``httpd`` * ``mod_wsgi`` * ``postgresql-devel`` (or ``libpq-dev`` on Debian) * ``python-devel`` * ``gcc`` * ``npm`` * ``openldap-devel`` (or ``libldap2-dev`` and ``libsasl2-dev`` on Debian) For the print to work, you wil need * ``jdk`` (java-1.7.0-openjdk-devel) * ``tomcat`` Make sure ``pg_config`` (from the ``postgresql-devel``) is in your ``PATH``. Checkout -------- .. code:: bash git clone [email protected]:Geoportail-Luxembourg/geoportailv3.git Build ----- .. code:: bash cd geoportailv3 make -f <user>.mk build .. Feel free to add project-specific things.
a0320ff6a143eeb2b523bb1a046a8568823438ab
tests/run-tests.sh
tests/run-tests.sh
cd "$(dirname "$0")" if [ ! -d ./bin ]; then mkdir -p ./bin fi # Ensure we fail immediately if any command fails. set -e pushd ./bin > /dev/null cmake -DUSE_OS_MESA=ON .. make -j4 ./batch-testing popd
cd "$(dirname "$0")" if [ ! -d ./bin ]; then mkdir -p ./bin fi # Ensure we fail immediately if any command fails. set -e pushd ./bin > /dev/null cmake -DCPM_MODULE_CACHE_DIR=${HOME}/.cpm_cache -DUSE_OS_MESA=ON .. make -j4 ./batch-testing popd
Add default module cache directory for tests.
Add default module cache directory for tests.
Shell
mit
iauns/cpm-gl-batch-testing,iauns/cpm-gl-batch-testing
shell
## Code Before: cd "$(dirname "$0")" if [ ! -d ./bin ]; then mkdir -p ./bin fi # Ensure we fail immediately if any command fails. set -e pushd ./bin > /dev/null cmake -DUSE_OS_MESA=ON .. make -j4 ./batch-testing popd ## Instruction: Add default module cache directory for tests. ## Code After: cd "$(dirname "$0")" if [ ! -d ./bin ]; then mkdir -p ./bin fi # Ensure we fail immediately if any command fails. set -e pushd ./bin > /dev/null cmake -DCPM_MODULE_CACHE_DIR=${HOME}/.cpm_cache -DUSE_OS_MESA=ON .. make -j4 ./batch-testing popd
081ad2792d333bf01efdfa7cee9e599a591c3dc4
.travis.yml
.travis.yml
language: php php: - 5.3 - 5.4 branches: only: - master - composer before_script: - curl -s http://getcomposer.org/installer | php - php composer.phar install script: - phpunit -c tests/phpunit.xml.dist tests/small - phpunit -c tests/phpunit.xml.dist tests/medium notifications: email: - [email protected]
language: php php: - 5.3 - 5.4 branches: only: - master before_script: - curl -s http://getcomposer.org/installer | php - php composer.phar install script: - phpunit -c tests/phpunit.xml.dist tests/small - phpunit -c tests/phpunit.xml.dist tests/medium notifications: email: - [email protected]
Remove "composer" branch from CI tests
Remove "composer" branch from CI tests
YAML
mit
ithinkihaveacat/byron,ithinkihaveacat/byron
yaml
## Code Before: language: php php: - 5.3 - 5.4 branches: only: - master - composer before_script: - curl -s http://getcomposer.org/installer | php - php composer.phar install script: - phpunit -c tests/phpunit.xml.dist tests/small - phpunit -c tests/phpunit.xml.dist tests/medium notifications: email: - [email protected] ## Instruction: Remove "composer" branch from CI tests ## Code After: language: php php: - 5.3 - 5.4 branches: only: - master before_script: - curl -s http://getcomposer.org/installer | php - php composer.phar install script: - phpunit -c tests/phpunit.xml.dist tests/small - phpunit -c tests/phpunit.xml.dist tests/medium notifications: email: - [email protected]
55ad629f0fc469f705556b66d16e194b243586bb
templates/audiotracks/user_index.html
templates/audiotracks/user_index.html
{% extends "audiotracks/base_listing.html" %} {% load i18n %} {% block head_title %}{% trans 'Your Tracks' %}{% endblock %} {% block body_title %}{% trans 'Your Tracks' %}{% endblock %}
{% extends "audiotracks/base_listing.html" %} {% load i18n %} {% block head_title %} {% blocktrans %}Tracks from {{ username }}{% endblocktrans %} {% endblock %} {% block body_title %} {% blocktrans %}Tracks from {{ username }}{% endblocktrans %} {% endblock %}
Update tracks user index title
Update tracks user index title
HTML
mit
fgirault/smeuhsocial,amarandon/smeuhsocial,fgirault/smeuhsocial,fgirault/smeuhsocial,amarandon/smeuhsocial,amarandon/smeuhsocial
html
## Code Before: {% extends "audiotracks/base_listing.html" %} {% load i18n %} {% block head_title %}{% trans 'Your Tracks' %}{% endblock %} {% block body_title %}{% trans 'Your Tracks' %}{% endblock %} ## Instruction: Update tracks user index title ## Code After: {% extends "audiotracks/base_listing.html" %} {% load i18n %} {% block head_title %} {% blocktrans %}Tracks from {{ username }}{% endblocktrans %} {% endblock %} {% block body_title %} {% blocktrans %}Tracks from {{ username }}{% endblocktrans %} {% endblock %}
383e35a1d8a13896abf6e8c8e1789713dfc3d1c8
lib/app/views/setup/clojure.erb
lib/app/views/setup/clojure.erb
<h3>Clojure</h3> <h4>Installation:</h4> <ul> <li> Homebrew for Mac OS X <ul> <li>Update your homebrew to latest: <code>brew update</code></li> <li>Install Clojure: <code>brew install clojure</code></li> </ul> </li> <li> Other <ul> <li>Download the latest table release jar file <a href="http://clojure.org/downloads">Clojure-1.5.1</a></li> </ul> </li> </ul> <h4>Running tests:</h4> <p>If installed with homebrew: </p> <pre>$ clj bob_test.clj</pre> <p>If jar file downloaded, assuming <code>clojure-1.5.1.jar</code></p> <pre>$ java -cp clojure-1.5.1.jar clojure.main bob_test.clj</pre>
<h3>Clojure</h3> <h4>Installation:</h4> <ul> <li> Homebrew for Mac OS X <ul> <li>Update your homebrew to latest: <code>brew update</code></li> <li>Install Leiningen: <code>brew install leiningen</code></li> <li>Install lein-exec: edit <code>~/.lein/profiles.clj</code> and add <code>{:user {:plugins [[lein-exec "0.3.1"]]}}</code></li> </ul> </li> <li> Other <ul> <li>Download the latest table release jar file <a href="http://clojure.org/downloads">Clojure-1.5.1</a></li> </ul> </li> </ul> <h4>Running tests:</h4> <p>If you installed lein-exec: </p> <pre>$ lein exec bob_test.clj</pre> <p>If jar file downloaded, assuming <code>clojure-1.5.1.jar</code></p> <pre>$ java -cp clojure-1.5.1.jar clojure.main bob_test.clj</pre>
Add lein-exec instructions for Clojure on OSX
Add lein-exec instructions for Clojure on OSX
HTML+ERB
agpl-3.0
colinrubbert/exercism.io,MBGeoff/Exercism.io-mbgeoff,nathanbwright/exercism.io,hanumakanthvvn/exercism.io,beni55/exercism.io,copiousfreetime/exercism.io,bmulvihill/exercism.io,tejasbubane/exercism.io,Tonkpils/exercism.io,k4rtik/exercism.io,mscoutermarsh/exercism_coveralls,exercistas/exercism.io,praveenpuglia/exercism.io,copiousfreetime/exercism.io,alexclarkofficial/exercism.io,bmulvihill/exercism.io,sheekap/exercism.io,RaptorRCX/exercism.io,bmulvihill/exercism.io,mscoutermarsh/exercism_coveralls,beni55/exercism.io,IanDCarroll/exercism.io,Tonkpils/exercism.io,mscoutermarsh/exercism_coveralls,treiff/exercism.io,kizerxl/exercism.io,nathanbwright/exercism.io,kangkyu/exercism.io,praveenpuglia/exercism.io,IanDCarroll/exercism.io,copiousfreetime/exercism.io,amar47shah/exercism.io,colinrubbert/exercism.io,alexclarkofficial/exercism.io,jtigger/exercism.io,jtigger/exercism.io,emilyforst/exercism.io,mhelmetag/exercism.io,mscoutermarsh/exercism_coveralls,copiousfreetime/exercism.io,MBGeoff/Exercism.io-mbgeoff,chastell/exercism.io,RaptorRCX/exercism.io,tejasbubane/exercism.io,kangkyu/exercism.io,RaptorRCX/exercism.io,Tonkpils/exercism.io,emilyforst/exercism.io,IanDCarroll/exercism.io,mhelmetag/exercism.io,treiff/exercism.io,nathanbwright/exercism.io,chastell/exercism.io,mhelmetag/exercism.io,RaptorRCX/exercism.io,chinaowl/exercism.io,alexclarkofficial/exercism.io,kangkyu/exercism.io,kizerxl/exercism.io,amar47shah/exercism.io,treiff/exercism.io,praveenpuglia/exercism.io,mscoutermarsh/exercism_coveralls,k4rtik/exercism.io,tejasbubane/exercism.io,sheekap/exercism.io,nathanbwright/exercism.io,tejasbubane/exercism.io,sheekap/exercism.io,Tonkpils/exercism.io,mhelmetag/exercism.io,amar47shah/exercism.io,emilyforst/exercism.io,praveenpuglia/exercism.io,treiff/exercism.io,sheekap/exercism.io,MBGeoff/Exercism.io-mbgeoff,beni55/exercism.io,colinrubbert/exercism.io,chastell/exercism.io,bmulvihill/exercism.io,chinaowl/exercism.io,hanumakanthvvn/exercism.io,hanumakanthvvn/exercism.io,mscoutermarsh/exercism_coveralls,exercistas/exercism.io,mscoutermarsh/exercism_coveralls,chinaowl/exercism.io,exercistas/exercism.io,jtigger/exercism.io,kizerxl/exercism.io,jtigger/exercism.io,hanumakanthvvn/exercism.io,IanDCarroll/exercism.io,mscoutermarsh/exercism_coveralls,mscoutermarsh/exercism_coveralls,k4rtik/exercism.io,mscoutermarsh/exercism_coveralls
html+erb
## Code Before: <h3>Clojure</h3> <h4>Installation:</h4> <ul> <li> Homebrew for Mac OS X <ul> <li>Update your homebrew to latest: <code>brew update</code></li> <li>Install Clojure: <code>brew install clojure</code></li> </ul> </li> <li> Other <ul> <li>Download the latest table release jar file <a href="http://clojure.org/downloads">Clojure-1.5.1</a></li> </ul> </li> </ul> <h4>Running tests:</h4> <p>If installed with homebrew: </p> <pre>$ clj bob_test.clj</pre> <p>If jar file downloaded, assuming <code>clojure-1.5.1.jar</code></p> <pre>$ java -cp clojure-1.5.1.jar clojure.main bob_test.clj</pre> ## Instruction: Add lein-exec instructions for Clojure on OSX ## Code After: <h3>Clojure</h3> <h4>Installation:</h4> <ul> <li> Homebrew for Mac OS X <ul> <li>Update your homebrew to latest: <code>brew update</code></li> <li>Install Leiningen: <code>brew install leiningen</code></li> <li>Install lein-exec: edit <code>~/.lein/profiles.clj</code> and add <code>{:user {:plugins [[lein-exec "0.3.1"]]}}</code></li> </ul> </li> <li> Other <ul> <li>Download the latest table release jar file <a href="http://clojure.org/downloads">Clojure-1.5.1</a></li> </ul> </li> </ul> <h4>Running tests:</h4> <p>If you installed lein-exec: </p> <pre>$ lein exec bob_test.clj</pre> <p>If jar file downloaded, assuming <code>clojure-1.5.1.jar</code></p> <pre>$ java -cp clojure-1.5.1.jar clojure.main bob_test.clj</pre>
1ea208934307fccf4c93389bff536a442667b28c
Config/core.php
Config/core.php
<?php if (file_exists(APP . 'Config' . DS . 'croogo.php')) { require APP . 'Config' . DS . 'croogo.php'; } else { if (!defined('LOG_ERROR')) { define('LOG_ERROR', LOG_ERR); } Configure::write('Error', array( 'handler' => 'ErrorHandler::handleError', 'level' => E_ALL & ~E_DEPRECATED, 'trace' => true )); Configure::write('Exception', array( 'handler' => 'ErrorHandler::handleException', 'renderer' => 'ExceptionRenderer', 'log' => true )); }
<?php if (file_exists(APP . 'Config' . DS . 'croogo.php')) { require APP . 'Config' . DS . 'croogo.php'; } else { if (!defined('LOG_ERROR')) { define('LOG_ERROR', LOG_ERR); } Configure::write('Error', array( 'handler' => 'ErrorHandler::handleError', 'level' => E_ALL & ~E_DEPRECATED, 'trace' => true )); Configure::write('Exception', array( 'handler' => 'ErrorHandler::handleException', 'renderer' => 'ExceptionRenderer', 'log' => true )); Configure::write('Session', array( 'defaults' => 'php', 'ini' => array( 'session.cookie_httponly' => 1 ) )); }
Fix missing default session settings prior to the installation process
Fix missing default session settings prior to the installation process Closes #440 Cherry-picked from: croogo/croogo@f51f0852abbf
PHP
mit
sitex/croogo-app-expander,sitex/heroku-croogo-app,sitex/heroku-croogo-app,rchavik/croogo-app,elbakai/app,elbakai/app,sitex/croogo-app-expander,rchavik/croogo-app,elbakai/app,elbakai/app,sitex/croogo-app-expander,sitex/heroku-croogo-app,rchavik/croogo-app
php
## Code Before: <?php if (file_exists(APP . 'Config' . DS . 'croogo.php')) { require APP . 'Config' . DS . 'croogo.php'; } else { if (!defined('LOG_ERROR')) { define('LOG_ERROR', LOG_ERR); } Configure::write('Error', array( 'handler' => 'ErrorHandler::handleError', 'level' => E_ALL & ~E_DEPRECATED, 'trace' => true )); Configure::write('Exception', array( 'handler' => 'ErrorHandler::handleException', 'renderer' => 'ExceptionRenderer', 'log' => true )); } ## Instruction: Fix missing default session settings prior to the installation process Closes #440 Cherry-picked from: croogo/croogo@f51f0852abbf ## Code After: <?php if (file_exists(APP . 'Config' . DS . 'croogo.php')) { require APP . 'Config' . DS . 'croogo.php'; } else { if (!defined('LOG_ERROR')) { define('LOG_ERROR', LOG_ERR); } Configure::write('Error', array( 'handler' => 'ErrorHandler::handleError', 'level' => E_ALL & ~E_DEPRECATED, 'trace' => true )); Configure::write('Exception', array( 'handler' => 'ErrorHandler::handleException', 'renderer' => 'ExceptionRenderer', 'log' => true )); Configure::write('Session', array( 'defaults' => 'php', 'ini' => array( 'session.cookie_httponly' => 1 ) )); }
af90cf6febfceb7bee28265a1db7fc89071d415e
src/test/scala/persistence/dal/SuppliersDAATest.scala
src/test/scala/persistence/dal/SuppliersDAATest.scala
package persistence.dal import persistence.dal.SuppliersDAA.{GetSupplierById, Save, CreateTables} import persistence.entities.{Supplier} import scala.concurrent.Future import org.junit.runner.RunWith import org.scalatest.{BeforeAndAfterAll, FunSuite} import org.scalatest.junit.JUnitRunner import akka.pattern.ask import scala.concurrent.Await import scala.concurrent.duration._ import akka.util.Timeout @RunWith(classOf[JUnitRunner]) class SuppliersDAATest extends FunSuite with AbstractPersistenceTest with BeforeAndAfterAll{ implicit val timeout = Timeout(5.seconds) val modules = new Modules { } test("SuppliersActor: Test Suppliers Actor") { Await.result((modules.suppliersDAA ? CreateTables).mapTo[Future[Unit]],5.seconds) val numberOfEntities : Int = Await.result((modules.suppliersDAA ? Save(Supplier(None,"sup","desc"))).mapTo[Future[Int]].flatMap(x => x),5.seconds) assert (numberOfEntities == 1) val supplier : Seq[Supplier] = Await.result((modules.suppliersDAA ? GetSupplierById(1)).mapTo[Future[Seq[Supplier]]].flatMap(x => x),5.seconds) assert (supplier.length == 1 && supplier.head.name.compareTo("sup") == 0) } override def afterAll: Unit ={ modules.db.close() } }
package persistence.dal import persistence.dal.SuppliersDAA.{GetSupplierById, Save, CreateTables} import persistence.entities.{Supplier} import scala.concurrent.Future import org.junit.runner.RunWith import org.scalatest.{BeforeAndAfterAll, FunSuite} import org.scalatest.junit.JUnitRunner import akka.pattern.ask import scala.concurrent.Await import scala.concurrent.duration._ import akka.util.Timeout @RunWith(classOf[JUnitRunner]) class SuppliersDAATest extends FunSuite with AbstractPersistenceTest with BeforeAndAfterAll{ implicit val timeout = Timeout(5.seconds) val modules = new Modules { } test("SuppliersActor: Testing Suppliers Actor") { Await.result((modules.suppliersDAA ? CreateTables).mapTo[Future[Unit]],5.seconds) val numberOfEntities : Int = Await.result((modules.suppliersDAA ? Save(Supplier(None,"sup","desc"))).mapTo[Future[Int]].flatMap(x => x),5.seconds) assert (numberOfEntities == 1) val supplier : Seq[Supplier] = Await.result((modules.suppliersDAA ? GetSupplierById(1)).mapTo[Future[Seq[Supplier]]].flatMap(x => x),5.seconds) assert (supplier.length == 1 && supplier.head.name.compareTo("sup") == 0) val empty : Seq[Supplier] = Await.result((modules.suppliersDAA ? GetSupplierById(2)).mapTo[Future[Seq[Supplier]]].flatMap(x => x),5.seconds) assert (empty.length == 0) } override def afterAll: Unit ={ modules.db.close() } }
Test for get supplier by id that should return an empty sequence
Test for get supplier by id that should return an empty sequence
Scala
apache-2.0
edvorkin/simple-docker-scala-app,Kanris826/spray-slick-swagger,cdiniz/spray-slick-swagger,cdiniz/spray-slick-swagger,Kanris826/spray-slick-swagger,edvorkin/simple-docker-scala-app
scala
## Code Before: package persistence.dal import persistence.dal.SuppliersDAA.{GetSupplierById, Save, CreateTables} import persistence.entities.{Supplier} import scala.concurrent.Future import org.junit.runner.RunWith import org.scalatest.{BeforeAndAfterAll, FunSuite} import org.scalatest.junit.JUnitRunner import akka.pattern.ask import scala.concurrent.Await import scala.concurrent.duration._ import akka.util.Timeout @RunWith(classOf[JUnitRunner]) class SuppliersDAATest extends FunSuite with AbstractPersistenceTest with BeforeAndAfterAll{ implicit val timeout = Timeout(5.seconds) val modules = new Modules { } test("SuppliersActor: Test Suppliers Actor") { Await.result((modules.suppliersDAA ? CreateTables).mapTo[Future[Unit]],5.seconds) val numberOfEntities : Int = Await.result((modules.suppliersDAA ? Save(Supplier(None,"sup","desc"))).mapTo[Future[Int]].flatMap(x => x),5.seconds) assert (numberOfEntities == 1) val supplier : Seq[Supplier] = Await.result((modules.suppliersDAA ? GetSupplierById(1)).mapTo[Future[Seq[Supplier]]].flatMap(x => x),5.seconds) assert (supplier.length == 1 && supplier.head.name.compareTo("sup") == 0) } override def afterAll: Unit ={ modules.db.close() } } ## Instruction: Test for get supplier by id that should return an empty sequence ## Code After: package persistence.dal import persistence.dal.SuppliersDAA.{GetSupplierById, Save, CreateTables} import persistence.entities.{Supplier} import scala.concurrent.Future import org.junit.runner.RunWith import org.scalatest.{BeforeAndAfterAll, FunSuite} import org.scalatest.junit.JUnitRunner import akka.pattern.ask import scala.concurrent.Await import scala.concurrent.duration._ import akka.util.Timeout @RunWith(classOf[JUnitRunner]) class SuppliersDAATest extends FunSuite with AbstractPersistenceTest with BeforeAndAfterAll{ implicit val timeout = Timeout(5.seconds) val modules = new Modules { } test("SuppliersActor: Testing Suppliers Actor") { Await.result((modules.suppliersDAA ? CreateTables).mapTo[Future[Unit]],5.seconds) val numberOfEntities : Int = Await.result((modules.suppliersDAA ? Save(Supplier(None,"sup","desc"))).mapTo[Future[Int]].flatMap(x => x),5.seconds) assert (numberOfEntities == 1) val supplier : Seq[Supplier] = Await.result((modules.suppliersDAA ? GetSupplierById(1)).mapTo[Future[Seq[Supplier]]].flatMap(x => x),5.seconds) assert (supplier.length == 1 && supplier.head.name.compareTo("sup") == 0) val empty : Seq[Supplier] = Await.result((modules.suppliersDAA ? GetSupplierById(2)).mapTo[Future[Seq[Supplier]]].flatMap(x => x),5.seconds) assert (empty.length == 0) } override def afterAll: Unit ={ modules.db.close() } }
4b79cf6107910b6e4d88a1b6a35aa20f128aac19
software/hermit.md
software/hermit.md
--- layout: page title: The Haskell Equational Reasoning Model-to-Implementation Tunnel (HERMIT) redirect_from: - /Tools/HERMIT/ --- The **Haskell Equational Reasoning Model-to-Implementation Tunnel** (HERMIT) is a GHC plugin that allows post-hoc transformations to be applied to Haskell programs, after compilation has started. HERMIT can be used for program-specfic optimizations, domain-specific optimzations, or for constructing semi-formal assurance arguments. ## Architecture ![](/images/software/hermit/hermit-arch2.png) The HERMIT Package ------------------ * On Hackage: <http://hackage.haskell.org/package/hermit> * On Github: <https://github.com/ku-fpg/hermit> Publications ------------ {% include cite.fn key="Adams-15-OSTIE" %} {% include cite.fn key="Farmer-14-HERMITinStream" %} {% include cite.fn key="Adams-14-OSIE" %} {% include cite.fn key="Sculthorpe-13-KURE" %} {% include cite.fn key="Sculthorpe-13-HERMITinTree" %} {% include cite.fn key="Farmer-12-HERMITinMachine" %}
--- layout: page title: The Haskell Equational Reasoning Model-to-Implementation Tunnel (HERMIT) redirect_from: - /Tools/HERMIT/ --- The **Haskell Equational Reasoning Model-to-Implementation Tunnel** (HERMIT) is a GHC plugin that allows post-hoc transformations to be applied to Haskell programs, after compilation has started. HERMIT can be used for program-specfic optimizations, domain-specific optimzations, or for constructing semi-formal assurance arguments. ## Architecture ![](/images/software/hermit/hermit-arch2.png) The HERMIT Package ------------------ * On Hackage: <http://hackage.haskell.org/package/hermit> * On Github: <https://github.com/ku-fpg/hermit> Publications ------------ {% include cite.fn key="Farmer-15-HERMIT-reasoning" %} {% include cite.fn key="Farmer-15-PhD" %} {% include cite.fn key="Adams-15-OSTIE" %} {% include cite.fn key="Farmer-14-HERMITinStream" %} {% include cite.fn key="Adams-14-OSIE" %} {% include cite.fn key="Sculthorpe-13-KURE" %} {% include cite.fn key="Sculthorpe-13-HERMITinTree" %} {% include cite.fn key="Farmer-12-HERMITinMachine" %}
Add a couple cites to HERMIT software page
Add a couple cites to HERMIT software page
Markdown
bsd-3-clause
ku-fpg/ku-fpg.github.io,ku-fpg/ku-fpg.github.io,ku-fpg/ku-fpg.github.io
markdown
## Code Before: --- layout: page title: The Haskell Equational Reasoning Model-to-Implementation Tunnel (HERMIT) redirect_from: - /Tools/HERMIT/ --- The **Haskell Equational Reasoning Model-to-Implementation Tunnel** (HERMIT) is a GHC plugin that allows post-hoc transformations to be applied to Haskell programs, after compilation has started. HERMIT can be used for program-specfic optimizations, domain-specific optimzations, or for constructing semi-formal assurance arguments. ## Architecture ![](/images/software/hermit/hermit-arch2.png) The HERMIT Package ------------------ * On Hackage: <http://hackage.haskell.org/package/hermit> * On Github: <https://github.com/ku-fpg/hermit> Publications ------------ {% include cite.fn key="Adams-15-OSTIE" %} {% include cite.fn key="Farmer-14-HERMITinStream" %} {% include cite.fn key="Adams-14-OSIE" %} {% include cite.fn key="Sculthorpe-13-KURE" %} {% include cite.fn key="Sculthorpe-13-HERMITinTree" %} {% include cite.fn key="Farmer-12-HERMITinMachine" %} ## Instruction: Add a couple cites to HERMIT software page ## Code After: --- layout: page title: The Haskell Equational Reasoning Model-to-Implementation Tunnel (HERMIT) redirect_from: - /Tools/HERMIT/ --- The **Haskell Equational Reasoning Model-to-Implementation Tunnel** (HERMIT) is a GHC plugin that allows post-hoc transformations to be applied to Haskell programs, after compilation has started. HERMIT can be used for program-specfic optimizations, domain-specific optimzations, or for constructing semi-formal assurance arguments. ## Architecture ![](/images/software/hermit/hermit-arch2.png) The HERMIT Package ------------------ * On Hackage: <http://hackage.haskell.org/package/hermit> * On Github: <https://github.com/ku-fpg/hermit> Publications ------------ {% include cite.fn key="Farmer-15-HERMIT-reasoning" %} {% include cite.fn key="Farmer-15-PhD" %} {% include cite.fn key="Adams-15-OSTIE" %} {% include cite.fn key="Farmer-14-HERMITinStream" %} {% include cite.fn key="Adams-14-OSIE" %} {% include cite.fn key="Sculthorpe-13-KURE" %} {% include cite.fn key="Sculthorpe-13-HERMITinTree" %} {% include cite.fn key="Farmer-12-HERMITinMachine" %}
e651536983ac91e333aae8b4c680427f4cfd888f
media/css/pliny.css
media/css/pliny.css
article > div:last-child > div > span { border-bottom: 1px solid black } body { padding-top: 70px; } footer { text-align: center; font-size: 50%; } #main-content { padding-bottom: 100px; } #nav_nomina { width: 200px; }
article > div:last-child > div > span { border-bottom: 1px solid black } body { padding-top: 70px; } footer { text-align: center; font-size: 50%; } #main-content { padding-bottom: 100px; } #nav_nomina { width: 200px; } #id_nomina { width: 200px; }
Fix search form input too
Fix search form input too
CSS
mit
bwhicks/PlinyProject,bwhicks/PlinyProject,bwhicks/PlinyProject,bwhicks/PlinyProject
css
## Code Before: article > div:last-child > div > span { border-bottom: 1px solid black } body { padding-top: 70px; } footer { text-align: center; font-size: 50%; } #main-content { padding-bottom: 100px; } #nav_nomina { width: 200px; } ## Instruction: Fix search form input too ## Code After: article > div:last-child > div > span { border-bottom: 1px solid black } body { padding-top: 70px; } footer { text-align: center; font-size: 50%; } #main-content { padding-bottom: 100px; } #nav_nomina { width: 200px; } #id_nomina { width: 200px; }
cb8d8bdf4b8431fccb7e40dcd6a0c733bc74e4e9
index.js
index.js
"use strict"; var TypeDecorator = require( "./lib/type/decorator" ); var TypeHelper = require( "./lib/type/helper" ); var TypeInfo = require( "./lib/type/info" ); module.exports = { DecoratorError : require( "./lib/error/decorator" ), HelperError : require( "./lib/error/helper" ), ChangeSet : require( "./lib/history/changeset" ), Conductor : require( "./lib/transaction/conductor" ), WebSockets : require( "./lib/transaction/websockets" ), TypeDecorator : TypeDecorator, Factory : require( "./lib/type/factory" ), TypeHelper : TypeHelper, TypeInfo : TypeInfo, Type : require( "./lib/type/type" ), decorate : decorate, info : info, helper : helper }; function decorate( type ) { return new TypeDecorator( type ); } function info( typeName, type ) { return new TypeInfo( typeName, type ); } function helper( typeInfo ) { return new TypeHelper( typeInfo ); }
"use strict"; var TypeDecorator = require( "./lib/type/decorator" ); var TypeHelper = require( "./lib/type/helper" ); var TypeInfo = require( "./lib/type/info" ); module.exports = { DecoratorError : require( "./lib/error/decorator" ), HelperError : require( "./lib/error/helper" ), ChangeSet : require( "./lib/history/changeset" ), Conductor : require( "./lib/transaction/conductor" ), WebSockets : require( "./lib/transaction/websockets" ), TypeDecorator : TypeDecorator, Factory : require( "./lib/type/factory" ), TypeHelper : TypeHelper, TypeInfo : TypeInfo, Type : require( "./lib/type/type" ), decorate : decorate, info : info, helper : helper }; function decorate( type ) { return new TypeDecorator( type ); } function info( typeName, type ) { return new TypeInfo( typeName, type ); } function helper( typeInfo ) { return new TypeHelper( typeInfo ); } module.exports.USERCLASS_ADMIN = TypeInfo.USERCLASS_ADMIN; module.exports.USERCLASS_USER = TypeInfo.USERCLASS_USER; module.exports.CONCEALED = TypeInfo.CONCEALED; module.exports.HIDDEN = TypeInfo.HIDDEN; module.exports.READ_ONLY = TypeInfo.READ_ONLY;
Put commonly used constants on main export
[FEATURE] Put commonly used constants on main export
JavaScript
mit
oliversalzburg/sanitizr
javascript
## Code Before: "use strict"; var TypeDecorator = require( "./lib/type/decorator" ); var TypeHelper = require( "./lib/type/helper" ); var TypeInfo = require( "./lib/type/info" ); module.exports = { DecoratorError : require( "./lib/error/decorator" ), HelperError : require( "./lib/error/helper" ), ChangeSet : require( "./lib/history/changeset" ), Conductor : require( "./lib/transaction/conductor" ), WebSockets : require( "./lib/transaction/websockets" ), TypeDecorator : TypeDecorator, Factory : require( "./lib/type/factory" ), TypeHelper : TypeHelper, TypeInfo : TypeInfo, Type : require( "./lib/type/type" ), decorate : decorate, info : info, helper : helper }; function decorate( type ) { return new TypeDecorator( type ); } function info( typeName, type ) { return new TypeInfo( typeName, type ); } function helper( typeInfo ) { return new TypeHelper( typeInfo ); } ## Instruction: [FEATURE] Put commonly used constants on main export ## Code After: "use strict"; var TypeDecorator = require( "./lib/type/decorator" ); var TypeHelper = require( "./lib/type/helper" ); var TypeInfo = require( "./lib/type/info" ); module.exports = { DecoratorError : require( "./lib/error/decorator" ), HelperError : require( "./lib/error/helper" ), ChangeSet : require( "./lib/history/changeset" ), Conductor : require( "./lib/transaction/conductor" ), WebSockets : require( "./lib/transaction/websockets" ), TypeDecorator : TypeDecorator, Factory : require( "./lib/type/factory" ), TypeHelper : TypeHelper, TypeInfo : TypeInfo, Type : require( "./lib/type/type" ), decorate : decorate, info : info, helper : helper }; function decorate( type ) { return new TypeDecorator( type ); } function info( typeName, type ) { return new TypeInfo( typeName, type ); } function helper( typeInfo ) { return new TypeHelper( typeInfo ); } module.exports.USERCLASS_ADMIN = TypeInfo.USERCLASS_ADMIN; module.exports.USERCLASS_USER = TypeInfo.USERCLASS_USER; module.exports.CONCEALED = TypeInfo.CONCEALED; module.exports.HIDDEN = TypeInfo.HIDDEN; module.exports.READ_ONLY = TypeInfo.READ_ONLY;
c3a3f57e501c828f88f30ab0b49a57c5e305d383
app/controllers/application_controller.rb
app/controllers/application_controller.rb
class ApplicationController < ActionController::Base # CSRF protection protect_from_forgery # Abilities checking check_authorization # Setup locale before_filter :set_gettext_locale # Ask users to authenticate before_filter :require_login # Handle errors rescue_from CanCan::AccessDenied, :with => :unauthorized rescue_from ActiveRecord::RecordNotFound, :with => :not_found private # Sorcery method overwritten to customize error message def not_authenticated redirect_to(login_url, :alert => _('Please authenticate first.')) end # Unauthorized error handler def unauthorized redirect_to(root_url, :alert => _('Access to this page is not allowed.')) end # Not found handler def not_found render(:status => 404) end end
class ApplicationController < ActionController::Base # CSRF protection protect_from_forgery # Abilities checking check_authorization # Setup locale before_filter :set_gettext_locale # Ask users to authenticate before_filter :require_login # Handle errors rescue_from CanCan::AccessDenied, :with => :unauthorized rescue_from ActiveRecord::RecordNotFound, :with => :not_found private # Sorcery method overwritten to customize error message def not_authenticated redirect_to(login_url, :alert => _('Please authenticate first.')) end # Unauthorized error handler def unauthorized redirect_to(root_url, :alert => _('Access to this page is not allowed.')) end # Not found handler def not_found redirect_to('/404') end end
Handle 404 rails way (static).
Handle 404 rails way (static).
Ruby
mit
Courseware/coursewa.re,Courseware/coursewa.re
ruby
## Code Before: class ApplicationController < ActionController::Base # CSRF protection protect_from_forgery # Abilities checking check_authorization # Setup locale before_filter :set_gettext_locale # Ask users to authenticate before_filter :require_login # Handle errors rescue_from CanCan::AccessDenied, :with => :unauthorized rescue_from ActiveRecord::RecordNotFound, :with => :not_found private # Sorcery method overwritten to customize error message def not_authenticated redirect_to(login_url, :alert => _('Please authenticate first.')) end # Unauthorized error handler def unauthorized redirect_to(root_url, :alert => _('Access to this page is not allowed.')) end # Not found handler def not_found render(:status => 404) end end ## Instruction: Handle 404 rails way (static). ## Code After: class ApplicationController < ActionController::Base # CSRF protection protect_from_forgery # Abilities checking check_authorization # Setup locale before_filter :set_gettext_locale # Ask users to authenticate before_filter :require_login # Handle errors rescue_from CanCan::AccessDenied, :with => :unauthorized rescue_from ActiveRecord::RecordNotFound, :with => :not_found private # Sorcery method overwritten to customize error message def not_authenticated redirect_to(login_url, :alert => _('Please authenticate first.')) end # Unauthorized error handler def unauthorized redirect_to(root_url, :alert => _('Access to this page is not allowed.')) end # Not found handler def not_found redirect_to('/404') end end
bbd0d87faade33d2a072b012ad163aa8ac1973c2
src/util/reactify.js
src/util/reactify.js
import Bit from '../components/Bit' import { createElement } from 'react' const COMMENT_TAG = '--' const DEFAULT_TAG = Bit // eslint-disable-next-line max-params function parse (buffer, doc, options, key) { switch (doc.type) { case 'text': return [...buffer, doc.content] case 'tag': { if (doc.name.startsWith(COMMENT_TAG)) { return buffer } const tag = options.mappings[doc.name] || DEFAULT_TAG let children = reactify(doc.children, options, key) if (!children.length) { children = null } if (tag.fromMarkup) { doc.attrs = tag.fromMarkup(doc.attrs) } if (tag === DEFAULT_TAG && !doc.attrs.as) { doc.attrs.as = doc.name } if (doc.attrs.class) { // Rename class to className for React compatibility doc.attrs.className = doc.attrs.class delete doc.attrs.class } return [...buffer, createElement(tag, { key, ...doc.attrs }, children)] } default: return buffer } } export default function reactify (doc, options, keyPrefix = '$') { return doc.reduce( (collection, rootEl, key) => [ ...collection, ...parse([], rootEl, options, `${keyPrefix}.${key}`) ], [] ) }
import Bit from '../components/Bit' import { createElement } from 'react' const COMMENT_TAG = '--' const DEFAULT_TAG = Bit // eslint-disable-next-line max-params function parse (buffer, doc, options, key) { switch (doc.type) { case 'text': return [...buffer, doc.content] case 'tag': { let children = reactify(doc.children, options, key) if (!children.length) { children = null } if (doc.name.startsWith(COMMENT_TAG)) { return [...buffer, ...children] } const tag = options.mappings[doc.name] || DEFAULT_TAG if (tag.fromMarkup) { doc.attrs = tag.fromMarkup(doc.attrs) } if (tag === DEFAULT_TAG && !doc.attrs.as) { doc.attrs.as = doc.name } if (doc.attrs.class) { // Rename class to className for React compatibility doc.attrs.className = doc.attrs.class delete doc.attrs.class } return [...buffer, createElement(tag, { key, ...doc.attrs }, children)] } default: return buffer } } export default function reactify (doc, options, keyPrefix = '$') { return doc.reduce( (collection, rootEl, key) => [ ...collection, ...parse([], rootEl, options, `${keyPrefix}.${key}`) ], [] ) }
Fix bug that caused HTML comments to halt all additional parsing
Fix bug that caused HTML comments to halt all additional parsing
JavaScript
mit
dlindahl/stemcell,dlindahl/stemcell
javascript
## Code Before: import Bit from '../components/Bit' import { createElement } from 'react' const COMMENT_TAG = '--' const DEFAULT_TAG = Bit // eslint-disable-next-line max-params function parse (buffer, doc, options, key) { switch (doc.type) { case 'text': return [...buffer, doc.content] case 'tag': { if (doc.name.startsWith(COMMENT_TAG)) { return buffer } const tag = options.mappings[doc.name] || DEFAULT_TAG let children = reactify(doc.children, options, key) if (!children.length) { children = null } if (tag.fromMarkup) { doc.attrs = tag.fromMarkup(doc.attrs) } if (tag === DEFAULT_TAG && !doc.attrs.as) { doc.attrs.as = doc.name } if (doc.attrs.class) { // Rename class to className for React compatibility doc.attrs.className = doc.attrs.class delete doc.attrs.class } return [...buffer, createElement(tag, { key, ...doc.attrs }, children)] } default: return buffer } } export default function reactify (doc, options, keyPrefix = '$') { return doc.reduce( (collection, rootEl, key) => [ ...collection, ...parse([], rootEl, options, `${keyPrefix}.${key}`) ], [] ) } ## Instruction: Fix bug that caused HTML comments to halt all additional parsing ## Code After: import Bit from '../components/Bit' import { createElement } from 'react' const COMMENT_TAG = '--' const DEFAULT_TAG = Bit // eslint-disable-next-line max-params function parse (buffer, doc, options, key) { switch (doc.type) { case 'text': return [...buffer, doc.content] case 'tag': { let children = reactify(doc.children, options, key) if (!children.length) { children = null } if (doc.name.startsWith(COMMENT_TAG)) { return [...buffer, ...children] } const tag = options.mappings[doc.name] || DEFAULT_TAG if (tag.fromMarkup) { doc.attrs = tag.fromMarkup(doc.attrs) } if (tag === DEFAULT_TAG && !doc.attrs.as) { doc.attrs.as = doc.name } if (doc.attrs.class) { // Rename class to className for React compatibility doc.attrs.className = doc.attrs.class delete doc.attrs.class } return [...buffer, createElement(tag, { key, ...doc.attrs }, children)] } default: return buffer } } export default function reactify (doc, options, keyPrefix = '$') { return doc.reduce( (collection, rootEl, key) => [ ...collection, ...parse([], rootEl, options, `${keyPrefix}.${key}`) ], [] ) }
645e68ceb451226177fb4b1f1b03083b6d66c045
.forestry/front_matter/templates/review.yml
.forestry/front_matter/templates/review.yml
--- label: review hide_body: false is_partial: false fields: - type: text name: title label: Title - type: include name: date label: date template: partial-date - name: attribution label: Attribution type: text hidden: false default: '' - type: select name: book config: source: type: pages section: books label: Book - type: boolean name: featured label: Featured - type: include name: weight label: weight template: partial-weight pages: - content/no/anmeldelser/sarah-kerr-vogue-usa-on.md - content/no/anmeldelser/boston-globe-usa-on-før-du-sovner.md
--- label: review hide_body: false is_partial: false fields: - type: text name: title label: Title default: on Before You Sleep - type: datetime name: date label: Date default: 1999-10-04 00:00:00 -0400 - name: attribution label: Attribution type: text hidden: false default: '' - type: select name: book config: source: type: pages section: books label: Book - type: boolean name: featured label: Featured - type: include name: weight label: weight template: partial-weight pages: - content/no/anmeldelser/sarah-kerr-vogue-usa-on.md - content/no/anmeldelser/boston-globe-usa-on-før-du-sovner.md
Update from Forestry.io - Updated Forestry configuration
Update from Forestry.io - Updated Forestry configuration
YAML
mit
sonnetmedia/linnullmann,sonnetmedia/linnullmann,sonnetmedia/linnullmann
yaml
## Code Before: --- label: review hide_body: false is_partial: false fields: - type: text name: title label: Title - type: include name: date label: date template: partial-date - name: attribution label: Attribution type: text hidden: false default: '' - type: select name: book config: source: type: pages section: books label: Book - type: boolean name: featured label: Featured - type: include name: weight label: weight template: partial-weight pages: - content/no/anmeldelser/sarah-kerr-vogue-usa-on.md - content/no/anmeldelser/boston-globe-usa-on-før-du-sovner.md ## Instruction: Update from Forestry.io - Updated Forestry configuration ## Code After: --- label: review hide_body: false is_partial: false fields: - type: text name: title label: Title default: on Before You Sleep - type: datetime name: date label: Date default: 1999-10-04 00:00:00 -0400 - name: attribution label: Attribution type: text hidden: false default: '' - type: select name: book config: source: type: pages section: books label: Book - type: boolean name: featured label: Featured - type: include name: weight label: weight template: partial-weight pages: - content/no/anmeldelser/sarah-kerr-vogue-usa-on.md - content/no/anmeldelser/boston-globe-usa-on-før-du-sovner.md
b9c4888d1105318c79c4692937ab2d12a0dd5d28
lib/yard/rake/yardoc_task.rb
lib/yard/rake/yardoc_task.rb
require 'rake' require 'rake/tasklib' module YARD module Rake class YardocTask < ::Rake::TaskLib attr_accessor :name attr_accessor :options attr_accessor :files def initialize(name = :yardoc) @name = name @options = [] @files = [] yield self if block_given? self.options += ENV['OPTS'].split(' ') if ENV['OPTS'] self.files += ENV['FILES'].split(',') if ENV['FILES'] define end def define task(name) { YARD::CLI::Yardoc.run *(options + files) } end end end end
require 'rake' require 'rake/tasklib' module YARD module Rake class YardocTask < ::Rake::TaskLib attr_accessor :name attr_accessor :options attr_accessor :files def initialize(name = :yardoc) @name = name @options = [] @files = [] yield self if block_given? self.options += ENV['OPTS'].split(/[ ,]/) if ENV['OPTS'] self.files += ENV['FILES'].split(/[ ,]/) if ENV['FILES'] define end def define task(name) { YARD::CLI::Yardoc.run *(options + files) } end end end end
Allow comma delimitation in OPTS and space delimitation in FILES
Allow comma delimitation in OPTS and space delimitation in FILES
Ruby
mit
thomthom/yard,herosky/yard,thomthom/yard,ohai/yard,jreinert/yard,herosky/yard,ohai/yard,alexdowad/yard,alexdowad/yard,amclain/yard,lsegal/yard,jreinert/yard,thomthom/yard,travis-repos/yard,iankronquist/yard,jreinert/yard,travis-repos/yard,amclain/yard,iankronquist/yard,lsegal/yard,alexdowad/yard,iankronquist/yard,amclain/yard,herosky/yard,ohai/yard,lsegal/yard
ruby
## Code Before: require 'rake' require 'rake/tasklib' module YARD module Rake class YardocTask < ::Rake::TaskLib attr_accessor :name attr_accessor :options attr_accessor :files def initialize(name = :yardoc) @name = name @options = [] @files = [] yield self if block_given? self.options += ENV['OPTS'].split(' ') if ENV['OPTS'] self.files += ENV['FILES'].split(',') if ENV['FILES'] define end def define task(name) { YARD::CLI::Yardoc.run *(options + files) } end end end end ## Instruction: Allow comma delimitation in OPTS and space delimitation in FILES ## Code After: require 'rake' require 'rake/tasklib' module YARD module Rake class YardocTask < ::Rake::TaskLib attr_accessor :name attr_accessor :options attr_accessor :files def initialize(name = :yardoc) @name = name @options = [] @files = [] yield self if block_given? self.options += ENV['OPTS'].split(/[ ,]/) if ENV['OPTS'] self.files += ENV['FILES'].split(/[ ,]/) if ENV['FILES'] define end def define task(name) { YARD::CLI::Yardoc.run *(options + files) } end end end end
29be0ccaa9deb0ced229d2e49b238702769cddb4
spec/support/helper_methods.rb
spec/support/helper_methods.rb
module RSpecHelpers def relative_path(path) RSpec::Core::Metadata.relative_path(path) end def ignoring_warnings original = $VERBOSE $VERBOSE = nil result = yield $VERBOSE = original result end def with_safe_set_to_level_that_triggers_security_errors Thread.new do ignoring_warnings { $SAFE = 3 } yield end.join # $SAFE is not supported on Rubinius unless defined?(Rubinius) expect($SAFE).to eql 0 # $SAFE should not have changed in this thread. end end end
module RSpecHelpers SAFE_LEVEL_THAT_TRIGGERS_SECURITY_ERRORS = RUBY_VERSION >= '2.3' ? 1 : 3 def relative_path(path) RSpec::Core::Metadata.relative_path(path) end def ignoring_warnings original = $VERBOSE $VERBOSE = nil result = yield $VERBOSE = original result end def with_safe_set_to_level_that_triggers_security_errors Thread.new do ignoring_warnings { $SAFE = SAFE_LEVEL_THAT_TRIGGERS_SECURITY_ERRORS } yield end.join # $SAFE is not supported on Rubinius unless defined?(Rubinius) expect($SAFE).to eql 0 # $SAFE should not have changed in this thread. end end end
Fix failing specs caused by $SAFE incompatibility on MRI 2.3
Fix failing specs caused by $SAFE incompatibility on MRI 2.3 ArgumentError: $SAFE=2 to 4 are obsolete
Ruby
mit
xmik/rspec-core,rspec/rspec-core,rspec/rspec-core,azbshiri/rspec-core,rspec/rspec-core,xmik/rspec-core,xmik/rspec-core,azbshiri/rspec-core,azbshiri/rspec-core
ruby
## Code Before: module RSpecHelpers def relative_path(path) RSpec::Core::Metadata.relative_path(path) end def ignoring_warnings original = $VERBOSE $VERBOSE = nil result = yield $VERBOSE = original result end def with_safe_set_to_level_that_triggers_security_errors Thread.new do ignoring_warnings { $SAFE = 3 } yield end.join # $SAFE is not supported on Rubinius unless defined?(Rubinius) expect($SAFE).to eql 0 # $SAFE should not have changed in this thread. end end end ## Instruction: Fix failing specs caused by $SAFE incompatibility on MRI 2.3 ArgumentError: $SAFE=2 to 4 are obsolete ## Code After: module RSpecHelpers SAFE_LEVEL_THAT_TRIGGERS_SECURITY_ERRORS = RUBY_VERSION >= '2.3' ? 1 : 3 def relative_path(path) RSpec::Core::Metadata.relative_path(path) end def ignoring_warnings original = $VERBOSE $VERBOSE = nil result = yield $VERBOSE = original result end def with_safe_set_to_level_that_triggers_security_errors Thread.new do ignoring_warnings { $SAFE = SAFE_LEVEL_THAT_TRIGGERS_SECURITY_ERRORS } yield end.join # $SAFE is not supported on Rubinius unless defined?(Rubinius) expect($SAFE).to eql 0 # $SAFE should not have changed in this thread. end end end
135f45c68d94038014b0bf4dfe55458e156accbd
metadata/uk.ac.swansea.eduroamcat.yml
metadata/uk.ac.swansea.eduroamcat.yml
Categories: - Internet License: Apache-2.0 SourceCode: https://github.com/GEANT/CAT-Android IssueTracker: https://github.com/GEANT/CAT-Android/issues Changelog: https://github.com/GEANT/CAT-Android/releases AutoName: eduroamCAT Description: |- ''EduroamCAT'' is an eduroam Configuration Assistant Tool corresponding to website https://cat.eduroam.org ''EduroamCAT'' allows users to configure their device for eduroam wireless networks. This tool requires a configuration file from your home institution in order acquire the configuration settings needed. These can also be discovered by the tool, if the institution has CAT configured. Due to limitations in the Android OS, the application needs to set up a screen lock if none is already set. The configuration file is in a standardised file format and can be obtained from eduroam Configuration Assistant Tool deployments (such as https://cat.eduroam.org and others). The tool also provides some status information on the eduroam connection. RepoType: git Repo: https://github.com/GEANT/CAT-Android Builds: - versionName: 1.2.10 versionCode: 55 commit: 1.2.12 gradle: - yes rm: - bin/dexedLibs/ AutoUpdateMode: Version %v UpdateCheckMode: Tags CurrentVersion: 1.2.10 CurrentVersionCode: 55
Categories: - Internet License: Apache-2.0 SourceCode: https://github.com/GEANT/CAT-Android IssueTracker: https://github.com/GEANT/CAT-Android/issues Changelog: https://github.com/GEANT/CAT-Android/releases AutoName: eduroamCAT Description: |- ''EduroamCAT'' is an eduroam Configuration Assistant Tool corresponding to website https://cat.eduroam.org ''EduroamCAT'' allows users to configure their device for eduroam wireless networks. This tool requires a configuration file from your home institution in order acquire the configuration settings needed. These can also be discovered by the tool, if the institution has CAT configured. Due to limitations in the Android OS, the application needs to set up a screen lock if none is already set. The configuration file is in a standardised file format and can be obtained from eduroam Configuration Assistant Tool deployments (such as https://cat.eduroam.org and others). The tool also provides some status information on the eduroam connection. RepoType: git Repo: https://github.com/GEANT/CAT-Android Builds: - versionName: 1.2.10 versionCode: 55 commit: 1.2.12 gradle: - yes rm: - bin/dexedLibs/ - versionName: 1.2.14 versionCode: 59 commit: 1.2.14 gradle: - yes rm: - bin/dexedLibs/ AutoUpdateMode: Version %v UpdateCheckMode: Tags CurrentVersion: 1.2.14 CurrentVersionCode: 59
Update eduroamCAT to 1.2.14 (59)
Update eduroamCAT to 1.2.14 (59)
YAML
agpl-3.0
f-droid/fdroiddata,f-droid/fdroiddata
yaml
## Code Before: Categories: - Internet License: Apache-2.0 SourceCode: https://github.com/GEANT/CAT-Android IssueTracker: https://github.com/GEANT/CAT-Android/issues Changelog: https://github.com/GEANT/CAT-Android/releases AutoName: eduroamCAT Description: |- ''EduroamCAT'' is an eduroam Configuration Assistant Tool corresponding to website https://cat.eduroam.org ''EduroamCAT'' allows users to configure their device for eduroam wireless networks. This tool requires a configuration file from your home institution in order acquire the configuration settings needed. These can also be discovered by the tool, if the institution has CAT configured. Due to limitations in the Android OS, the application needs to set up a screen lock if none is already set. The configuration file is in a standardised file format and can be obtained from eduroam Configuration Assistant Tool deployments (such as https://cat.eduroam.org and others). The tool also provides some status information on the eduroam connection. RepoType: git Repo: https://github.com/GEANT/CAT-Android Builds: - versionName: 1.2.10 versionCode: 55 commit: 1.2.12 gradle: - yes rm: - bin/dexedLibs/ AutoUpdateMode: Version %v UpdateCheckMode: Tags CurrentVersion: 1.2.10 CurrentVersionCode: 55 ## Instruction: Update eduroamCAT to 1.2.14 (59) ## Code After: Categories: - Internet License: Apache-2.0 SourceCode: https://github.com/GEANT/CAT-Android IssueTracker: https://github.com/GEANT/CAT-Android/issues Changelog: https://github.com/GEANT/CAT-Android/releases AutoName: eduroamCAT Description: |- ''EduroamCAT'' is an eduroam Configuration Assistant Tool corresponding to website https://cat.eduroam.org ''EduroamCAT'' allows users to configure their device for eduroam wireless networks. This tool requires a configuration file from your home institution in order acquire the configuration settings needed. These can also be discovered by the tool, if the institution has CAT configured. Due to limitations in the Android OS, the application needs to set up a screen lock if none is already set. The configuration file is in a standardised file format and can be obtained from eduroam Configuration Assistant Tool deployments (such as https://cat.eduroam.org and others). The tool also provides some status information on the eduroam connection. RepoType: git Repo: https://github.com/GEANT/CAT-Android Builds: - versionName: 1.2.10 versionCode: 55 commit: 1.2.12 gradle: - yes rm: - bin/dexedLibs/ - versionName: 1.2.14 versionCode: 59 commit: 1.2.14 gradle: - yes rm: - bin/dexedLibs/ AutoUpdateMode: Version %v UpdateCheckMode: Tags CurrentVersion: 1.2.14 CurrentVersionCode: 59
e412a68afe691913525245d2a8a3a8e9e3ba532d
python/xicore.py
python/xicore.py
import sys import struct import json def sendraw(buf): sys.stdout.write(struct.pack("<q", len(buf))) sys.stdout.write(buf) sys.stdout.flush() def send(obj): sendraw(json.dumps(obj)) def mainloop(): text = '' while True: sizebuf = sys.stdin.read(8) if len(sizebuf) == 0: return (size,) = struct.unpack("<q", sizebuf) cmd, arg = json.loads(sys.stdin.read(size)) print >> sys.stderr, cmd, arg if cmd == 'key': chars = arg['chars'] if chars == u'\x7f': if len(text): text = text[:-1] else: text += chars send(['settext', text]) mainloop()
import sys import struct import json def sendraw(buf): sys.stdout.write(struct.pack("<q", len(buf))) sys.stdout.write(buf) sys.stdout.flush() def send(obj): sendraw(json.dumps(obj)) def mainloop(): text = '' while True: sizebuf = sys.stdin.read(8) if len(sizebuf) == 0: return (size,) = struct.unpack("<q", sizebuf) cmd, arg = json.loads(sys.stdin.read(size)) print >> sys.stderr, cmd, arg if cmd == 'key': chars = arg['chars'] if chars == u'\x7f': if len(text): text = text[:-1] else: text += chars send(['settext', text]) mainloop()
Replace tab indentation with 4 spaces
Replace tab indentation with 4 spaces
Python
apache-2.0
google/xi-editor,google/xi-editor,fuchsia-mirror/third_party-xi-editor,modelorganism/xi-editor,modelorganism/xi-editor,fuchsia-mirror/third_party-xi-editor,fuchsia-mirror/third_party-xi-editor,google/xi-editor,google/xi-editor,fuchsia-mirror/third_party-xi-editor,modelorganism/xi-editor
python
## Code Before: import sys import struct import json def sendraw(buf): sys.stdout.write(struct.pack("<q", len(buf))) sys.stdout.write(buf) sys.stdout.flush() def send(obj): sendraw(json.dumps(obj)) def mainloop(): text = '' while True: sizebuf = sys.stdin.read(8) if len(sizebuf) == 0: return (size,) = struct.unpack("<q", sizebuf) cmd, arg = json.loads(sys.stdin.read(size)) print >> sys.stderr, cmd, arg if cmd == 'key': chars = arg['chars'] if chars == u'\x7f': if len(text): text = text[:-1] else: text += chars send(['settext', text]) mainloop() ## Instruction: Replace tab indentation with 4 spaces ## Code After: import sys import struct import json def sendraw(buf): sys.stdout.write(struct.pack("<q", len(buf))) sys.stdout.write(buf) sys.stdout.flush() def send(obj): sendraw(json.dumps(obj)) def mainloop(): text = '' while True: sizebuf = sys.stdin.read(8) if len(sizebuf) == 0: return (size,) = struct.unpack("<q", sizebuf) cmd, arg = json.loads(sys.stdin.read(size)) print >> sys.stderr, cmd, arg if cmd == 'key': chars = arg['chars'] if chars == u'\x7f': if len(text): text = text[:-1] else: text += chars send(['settext', text]) mainloop()
bed569476cfc65be024019920db776ae2a669ce5
CHANGELOG.md
CHANGELOG.md
All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). ## 1.0.0 - 2015-08-28 Initial version
All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). ## [Unreleased][unreleased] ## 1.0.0 - 2015-08-28 Initial version [unreleased]: https://github.com/JoeBengalen/Assert/compare/1.0.0...master
Add unreleased section to the changelog
Add unreleased section to the changelog
Markdown
mit
JoeBengalen/Assert
markdown
## Code Before: All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). ## 1.0.0 - 2015-08-28 Initial version ## Instruction: Add unreleased section to the changelog ## Code After: All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). ## [Unreleased][unreleased] ## 1.0.0 - 2015-08-28 Initial version [unreleased]: https://github.com/JoeBengalen/Assert/compare/1.0.0...master
b405aa7441999ca60ee64eb55b8d04ba983ed677
tasks/build.js
tasks/build.js
var log = require('color-log'), runSequenceGenerator = require('run-sequence'), createBundleTasks = require('./utils/createBundleTasks'); module.exports = function(gulp, options) { var tasks; tasks = createBundleTasks(gulp, options); /* Full build */ gulp.task(options.taskPrefix + 'build', function(callback) { var runSequence = runSequenceGenerator.use(gulp), buildTasks = [], browserifyCompleteFn = function() { log.mark('[BROWSERIFY] complete!'); callback(); }; if (!options.styles.skip) { buildTasks.push(options.taskPrefix + 'build-styles'); } if (!options.copy.skip) { buildTasks.push(options.taskPrefix + 'copy-resources'); } if (!options.browserify.skip) { buildTasks.push(options.taskPrefix + 'build-app'); tasks.browserify.createBundler(); } if (options.clean.skip) { runSequence(options.taskPrefix + 'jshint', buildTasks, browserifyCompleteFn); } else { runSequence(options.taskPrefix + 'jshint', options.taskPrefix + 'clean', buildTasks, browserifyCompleteFn); } }); // Alias default to do the build. After this file is run the default task can be overridden if desired. gulp.task('default', [options.taskPrefix + 'build']); };
var log = require('color-log'), runSequenceGenerator = require('run-sequence'), createBundleTasks = require('./utils/createBundleTasks'); function build(callback) { var runSequence = runSequenceGenerator.use(gulp), buildTasks = [], browserifyCompleteFn = function() { log.mark('[BROWSERIFY] complete!'); callback(); }; if (!options.styles.skip) { buildTasks.push(options.taskPrefix + 'build-styles'); } if (!options.copy.skip) { buildTasks.push(options.taskPrefix + 'copy-resources'); } if (!options.browserify.skip) { buildTasks.push(options.taskPrefix + 'build-app'); tasks.browserify.createBundler(); } if (options.clean.skip) { runSequence(options.taskPrefix + 'jshint', buildTasks, browserifyCompleteFn); } else { runSequence(options.taskPrefix + 'jshint', options.taskPrefix + 'clean', buildTasks, browserifyCompleteFn); } } module.exports = function(gulp, options) { var tasks = createBundleTasks(gulp, options); /* Full build */ gulp.task(options.taskPrefix + 'build', build); // Alias default to do the build. After this file is run the default task can be overridden if desired. gulp.task('default', build); };
Fix task def for gulp 4
Fix task def for gulp 4
JavaScript
mit
vecnatechnologies/quick-sip
javascript
## Code Before: var log = require('color-log'), runSequenceGenerator = require('run-sequence'), createBundleTasks = require('./utils/createBundleTasks'); module.exports = function(gulp, options) { var tasks; tasks = createBundleTasks(gulp, options); /* Full build */ gulp.task(options.taskPrefix + 'build', function(callback) { var runSequence = runSequenceGenerator.use(gulp), buildTasks = [], browserifyCompleteFn = function() { log.mark('[BROWSERIFY] complete!'); callback(); }; if (!options.styles.skip) { buildTasks.push(options.taskPrefix + 'build-styles'); } if (!options.copy.skip) { buildTasks.push(options.taskPrefix + 'copy-resources'); } if (!options.browserify.skip) { buildTasks.push(options.taskPrefix + 'build-app'); tasks.browserify.createBundler(); } if (options.clean.skip) { runSequence(options.taskPrefix + 'jshint', buildTasks, browserifyCompleteFn); } else { runSequence(options.taskPrefix + 'jshint', options.taskPrefix + 'clean', buildTasks, browserifyCompleteFn); } }); // Alias default to do the build. After this file is run the default task can be overridden if desired. gulp.task('default', [options.taskPrefix + 'build']); }; ## Instruction: Fix task def for gulp 4 ## Code After: var log = require('color-log'), runSequenceGenerator = require('run-sequence'), createBundleTasks = require('./utils/createBundleTasks'); function build(callback) { var runSequence = runSequenceGenerator.use(gulp), buildTasks = [], browserifyCompleteFn = function() { log.mark('[BROWSERIFY] complete!'); callback(); }; if (!options.styles.skip) { buildTasks.push(options.taskPrefix + 'build-styles'); } if (!options.copy.skip) { buildTasks.push(options.taskPrefix + 'copy-resources'); } if (!options.browserify.skip) { buildTasks.push(options.taskPrefix + 'build-app'); tasks.browserify.createBundler(); } if (options.clean.skip) { runSequence(options.taskPrefix + 'jshint', buildTasks, browserifyCompleteFn); } else { runSequence(options.taskPrefix + 'jshint', options.taskPrefix + 'clean', buildTasks, browserifyCompleteFn); } } module.exports = function(gulp, options) { var tasks = createBundleTasks(gulp, options); /* Full build */ gulp.task(options.taskPrefix + 'build', build); // Alias default to do the build. After this file is run the default task can be overridden if desired. gulp.task('default', build); };
4ed4ff81180c1e9ee497e17e35955a935c8df760
layouts/partials/shell-content.html
layouts/partials/shell-content.html
<div class="shell-intro shell-content"> <div class="shell-title">Try NumPy</div> <div class="shell-content-message">Enable the interactive shell</div> </div> <div class="shell-wait shell-content" style="display: none;"> <div class="shell-title">While we wait...</div> <div class="shell-content-message">Don't forget to check out the <a href="https://numpy.org/doc/stable" target="_blank">docs</a></div> </div> <div class="shell-lesson shell-content" style="display: none;"> {{partial "shell-lesson.html" | print | markdownify}} </div>
<div class="shell-intro shell-content"> <div class="shell-title">Try NumPy</div> <div class="shell-content-message">Enable the interactive shell</div> </div> <div class="shell-wait shell-content" style="display: none;"> <div class="shell-title">While we wait...</div> <div class="shell-content-message"> <p>Launching container on mybinder.org...</p> <p>Don't forget to check out the <a href="https://numpy.org/doc/stable" target="_blank">docs</a></p> </div> </div> <div class="shell-lesson shell-content" style="display: none;"> {{partial "shell-lesson.html" | print | markdownify}} </div>
Add message to interactive shell about mybinder.org on launch
Add message to interactive shell about mybinder.org on launch Addresses comment on gh-316
HTML
bsd-3-clause
numpy/numpy.org,numpy/numpy.org,numpy/numpy.org,numpy/numpy.org
html
## Code Before: <div class="shell-intro shell-content"> <div class="shell-title">Try NumPy</div> <div class="shell-content-message">Enable the interactive shell</div> </div> <div class="shell-wait shell-content" style="display: none;"> <div class="shell-title">While we wait...</div> <div class="shell-content-message">Don't forget to check out the <a href="https://numpy.org/doc/stable" target="_blank">docs</a></div> </div> <div class="shell-lesson shell-content" style="display: none;"> {{partial "shell-lesson.html" | print | markdownify}} </div> ## Instruction: Add message to interactive shell about mybinder.org on launch Addresses comment on gh-316 ## Code After: <div class="shell-intro shell-content"> <div class="shell-title">Try NumPy</div> <div class="shell-content-message">Enable the interactive shell</div> </div> <div class="shell-wait shell-content" style="display: none;"> <div class="shell-title">While we wait...</div> <div class="shell-content-message"> <p>Launching container on mybinder.org...</p> <p>Don't forget to check out the <a href="https://numpy.org/doc/stable" target="_blank">docs</a></p> </div> </div> <div class="shell-lesson shell-content" style="display: none;"> {{partial "shell-lesson.html" | print | markdownify}} </div>
2dc3288fca2c67207dcca0690ec7ea460bf58a31
README.md
README.md
![Funkis](https://raw.githubusercontent.com/mstade/funkis/master/logo.png) This library aims to be a fully fledged environment for functional programming in JavaScript. It provides a number of functions common to functional programming, ranging from low-level constructs to high-level abstractions. Funkis is work in progress, and APIs change quickly while the library is still being developed. Please don't use it for anything, or at least do so at your own risk. Beyond the [tests][1] there is no documentation available – good luck! [1]: test Status ------ [![Build Status](https://travis-ci.org/mstade/funkis.png?branch=master)](https://travis-ci.org/mstade/funkis) [![Coverage Status](https://coveralls.io/repos/mstade/funkis/badge.png?branch=master)](https://coveralls.io/r/mstade/funkis?branch=master)
![Funkis](https://raw.githubusercontent.com/mstade/funkis/master/logo.png) This library aims to be a fully fledged environment for functional programming in JavaScript. It provides a number of functions common to functional programming, ranging from low-level constructs to high-level abstractions. Funkis is work in progress, and APIs change quickly while the library is still being developed. Please don't use it for anything, or at least do so at your own risk. Beyond the [tests][1] there is no documentation available – good luck! [1]: test Status ------ [![Build Status](http://img.shields.io/travis/mstade/funkis.svg?style=flat-square)](https://travis-ci.org/mstade/funkis) [![Coverage Status](http://img.shields.io/coveralls/mstade/funkis.svg?style=flat-square)](https://coveralls.io/r/mstade/funkis?branch=master)
Update shields to nice flat style
Update shields to nice flat style
Markdown
mit
mstade/funkis
markdown
## Code Before: ![Funkis](https://raw.githubusercontent.com/mstade/funkis/master/logo.png) This library aims to be a fully fledged environment for functional programming in JavaScript. It provides a number of functions common to functional programming, ranging from low-level constructs to high-level abstractions. Funkis is work in progress, and APIs change quickly while the library is still being developed. Please don't use it for anything, or at least do so at your own risk. Beyond the [tests][1] there is no documentation available – good luck! [1]: test Status ------ [![Build Status](https://travis-ci.org/mstade/funkis.png?branch=master)](https://travis-ci.org/mstade/funkis) [![Coverage Status](https://coveralls.io/repos/mstade/funkis/badge.png?branch=master)](https://coveralls.io/r/mstade/funkis?branch=master) ## Instruction: Update shields to nice flat style ## Code After: ![Funkis](https://raw.githubusercontent.com/mstade/funkis/master/logo.png) This library aims to be a fully fledged environment for functional programming in JavaScript. It provides a number of functions common to functional programming, ranging from low-level constructs to high-level abstractions. Funkis is work in progress, and APIs change quickly while the library is still being developed. Please don't use it for anything, or at least do so at your own risk. Beyond the [tests][1] there is no documentation available – good luck! [1]: test Status ------ [![Build Status](http://img.shields.io/travis/mstade/funkis.svg?style=flat-square)](https://travis-ci.org/mstade/funkis) [![Coverage Status](http://img.shields.io/coveralls/mstade/funkis.svg?style=flat-square)](https://coveralls.io/r/mstade/funkis?branch=master)
421f66077373d10704f05b2b441abf3014456f23
lib/node_modules/@stdlib/utils/eval/lib/index.js
lib/node_modules/@stdlib/utils/eval/lib/index.js
'use strict'; // EXPORTS // module.exports = eval;
'use strict'; /** * Alias for `eval` global. * * @module @stdlib/utils/eval * * @example * var evil = require( '@stdlib/utils/@stdlib/utils/eval' ); * * var v = evil( '5*4*3*2*1' ); * // returns 120 */ // MODULES // var evil = eval; // EXPORTS // module.exports = evil;
Add JSDoc annotations with examples
Add JSDoc annotations with examples
JavaScript
apache-2.0
stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib
javascript
## Code Before: 'use strict'; // EXPORTS // module.exports = eval; ## Instruction: Add JSDoc annotations with examples ## Code After: 'use strict'; /** * Alias for `eval` global. * * @module @stdlib/utils/eval * * @example * var evil = require( '@stdlib/utils/@stdlib/utils/eval' ); * * var v = evil( '5*4*3*2*1' ); * // returns 120 */ // MODULES // var evil = eval; // EXPORTS // module.exports = evil;
6cb3b9ee4d0773ff2daccf663a2962bbf593b5cf
test/battle_server.coffee
test/battle_server.coffee
{BattleServer} = require '../server' {Engine} = require '../engine' sinon = require 'sinon' describe 'BattleServer', -> describe '#queuePlayer', -> it "adds a new player to the server's queue", -> server = new BattleServer() server.queuePlayer({}) server.queuedPlayers().should.have.length 1 describe '#beginBattles', -> it 'tells the engine to create battles', -> engine = new Engine() server = new BattleServer(engine) stub = sinon.stub(engine, 'createBattle') server.queuePlayer({}) server.queuePlayer({}) server.beginBattles() stub.called.should.be.true
{BattleServer} = require '../server' {Engine} = require '../engine' sinon = require 'sinon' describe 'BattleServer', -> describe '#queuePlayer', -> it "adds a new player to the server's queue", -> server = new BattleServer() server.queuePlayer({}) server.queuedPlayers().should.have.length 1 describe '#beginBattles', -> it 'tells the engine to create battles', -> engine = new Engine() server = new BattleServer(engine) stub = sinon.stub(engine, 'createBattle') server.queuePlayer({}) server.queuePlayer({}) server.beginBattles() stub.called.should.be.true it 'emits the "start battle" event for each player', -> engine = new Engine() server = new BattleServer(engine) player = { emit: -> } sinon.stub(engine, 'createBattle') mock = sinon.mock(player) mock.expects('emit').twice().withArgs('start battle') server.queuePlayer(player) server.queuePlayer(player) server.beginBattles() mock.verify()
Add test for whether players get an emitted event.
Add test for whether players get an emitted event.
CoffeeScript
mit
6/battletower,sarenji/pokebattle-sim,pepijndevos/battletower,sarenji/pokebattle-sim,sarenji/pokebattle-sim,askii93/battletower
coffeescript
## Code Before: {BattleServer} = require '../server' {Engine} = require '../engine' sinon = require 'sinon' describe 'BattleServer', -> describe '#queuePlayer', -> it "adds a new player to the server's queue", -> server = new BattleServer() server.queuePlayer({}) server.queuedPlayers().should.have.length 1 describe '#beginBattles', -> it 'tells the engine to create battles', -> engine = new Engine() server = new BattleServer(engine) stub = sinon.stub(engine, 'createBattle') server.queuePlayer({}) server.queuePlayer({}) server.beginBattles() stub.called.should.be.true ## Instruction: Add test for whether players get an emitted event. ## Code After: {BattleServer} = require '../server' {Engine} = require '../engine' sinon = require 'sinon' describe 'BattleServer', -> describe '#queuePlayer', -> it "adds a new player to the server's queue", -> server = new BattleServer() server.queuePlayer({}) server.queuedPlayers().should.have.length 1 describe '#beginBattles', -> it 'tells the engine to create battles', -> engine = new Engine() server = new BattleServer(engine) stub = sinon.stub(engine, 'createBattle') server.queuePlayer({}) server.queuePlayer({}) server.beginBattles() stub.called.should.be.true it 'emits the "start battle" event for each player', -> engine = new Engine() server = new BattleServer(engine) player = { emit: -> } sinon.stub(engine, 'createBattle') mock = sinon.mock(player) mock.expects('emit').twice().withArgs('start battle') server.queuePlayer(player) server.queuePlayer(player) server.beginBattles() mock.verify()
10627ddd98f6b26668c00e041c76094ffa00fe8a
app/views/groups/_people.erb
app/views/groups/_people.erb
<h2><%= I18n.t('people.person', :count => @group.people.count) %></h2> <% if group_people_count > 25 and params[:action] == 'show' %> <p> (<%= I18n.t('groups.25_of') %> <%= group_people_count %>) <%= link_to I18n.t('groups.show_all'), group_memberships_path(@group) %> </p> <% end %> <table> <% @group.memberships.all(params[:action] == 'show' ? {:include => :person, :limit => 25, :order => sql_random} : {:include => :person, :order => 'people.last_name, people.first_name'}).each do |membership| %> <% if person = membership.person %> <tr> <td> <a href="<%= url_for person %>"> <%= render :partial => 'people/thumbnail', :locals => {:person => person} %> </a> </td> <td class="person"> <%= link_to h(person.name), person %> <% if person.birthday_soon? %> <br/> <span class="small"> <%= image_tag('birthday.png', :alt => I18n.t('privacies.birthday'), :class => 'icon') %> <%= person.birthday.to_s(:date_without_year) %> </span> <% end %> </td> </tr> <% end %> <% end %> </table>
<h2><%= I18n.t('people.person', :count => group_people_count = @group.people.count) %></h2> <% if group_people_count > 25 and params[:action] == 'show' %> <p> (<%= I18n.t('groups.25_of') %> <%= group_people_count %>) <%= link_to I18n.t('groups.show_all'), group_memberships_path(@group) %> </p> <% end %> <table> <% @group.memberships.all(params[:action] == 'show' ? {:include => :person, :limit => 25, :order => sql_random} : {:include => :person, :order => 'people.last_name, people.first_name'}).each do |membership| %> <% if person = membership.person %> <tr> <td> <a href="<%= url_for person %>"> <%= render :partial => 'people/thumbnail', :locals => {:person => person} %> </a> </td> <td class="person"> <%= link_to h(person.name), person %> <% if person.birthday_soon? %> <br/> <span class="small"> <%= image_tag('birthday.png', :alt => I18n.t('privacies.birthday'), :class => 'icon') %> <%= person.birthday.to_s(:date_without_year) %> </span> <% end %> </td> </tr> <% end %> <% end %> </table>
Fix bug showing group people.
Fix bug showing group people.
HTML+ERB
agpl-3.0
AVee/onebody,pgmcgee/onebody,nerdnorth/remote-workers-app,ferdinandrosario/onebody,moss-zc/sns_shop,fadiwissa/onebody,hooray4me/onebody,davidleach/onebody,dorman/onebody,ebennaga/onebody,klarkc/onebody,Capriatto/onebody,mattraykowski/onebody,cessien/onebody,pgmcgee/onebody,hooray4me/onebody2,kevinjqiu/onebody,tochman/onebody,seethemhigh/onebody,fadiwissa/onebody,brunoocasali/onebody,nerdnorth/remote-workers-app,hooray4me/onebody2,ebennaga/onebody,mattraykowski/onebody,Capriatto/onebody,hooray4me/onebody2,ebennaga/onebody,cessien/onebody,kevinjqiu/onebody,acbilimoria/onebody,nerdnorth/remote-workers-app,acbilimoria/onebody,hooray4me/onebody,AVee/onebody,samuels410/church-portal,samuels410/church-portal,Capriatto/onebody,hschin/onebody,powerchurch/onebody,0612800232/sns_shop,kevinjqiu/onebody,seethemhigh/onebody,hooray4me/onebody2,seethemhigh/onebody,tmecklem/onebody,tmecklem/onebody,nerdnorth/remote-workers-app,acbilimoria/onebody,mattraykowski/onebody,tmecklem/onebody,AVee/onebody,tochman/onebody,moss-zc/sns_shop,klarkc/onebody,cessien/onebody,pgmcgee/onebody,brunoocasali/onebody,hschin/onebody,tochman/onebody,dorman/onebody,hschin/onebody,kevinjqiu/onebody,0612800232/sns_shop,calsaviour/onebody,ferdinandrosario/onebody,calsaviour/onebody,powerchurch/onebody,hschin/onebody,fadiwissa/onebody,acbilimoria/onebody,hooray4me/onebody,tochman/onebody,moss-zc/sns_shop,fadiwissa/onebody,moss-zc/sns_shop,0612800232/sns_shop,dorman/onebody,cessien/onebody,brunoocasali/onebody,klarkc/onebody,pgmcgee/onebody,davidleach/onebody,ferdinandrosario/onebody,AVee/onebody,brunoocasali/onebody,seethemhigh/onebody,mattraykowski/onebody,davidleach/onebody,dorman/onebody,klarkc/onebody,calsaviour/onebody,Capriatto/onebody,hooray4me/onebody,moss-zc/sns_shop,ferdinandrosario/onebody,davidleach/onebody,powerchurch/onebody,calsaviour/onebody,ebennaga/onebody,powerchurch/onebody,tmecklem/onebody
html+erb
## Code Before: <h2><%= I18n.t('people.person', :count => @group.people.count) %></h2> <% if group_people_count > 25 and params[:action] == 'show' %> <p> (<%= I18n.t('groups.25_of') %> <%= group_people_count %>) <%= link_to I18n.t('groups.show_all'), group_memberships_path(@group) %> </p> <% end %> <table> <% @group.memberships.all(params[:action] == 'show' ? {:include => :person, :limit => 25, :order => sql_random} : {:include => :person, :order => 'people.last_name, people.first_name'}).each do |membership| %> <% if person = membership.person %> <tr> <td> <a href="<%= url_for person %>"> <%= render :partial => 'people/thumbnail', :locals => {:person => person} %> </a> </td> <td class="person"> <%= link_to h(person.name), person %> <% if person.birthday_soon? %> <br/> <span class="small"> <%= image_tag('birthday.png', :alt => I18n.t('privacies.birthday'), :class => 'icon') %> <%= person.birthday.to_s(:date_without_year) %> </span> <% end %> </td> </tr> <% end %> <% end %> </table> ## Instruction: Fix bug showing group people. ## Code After: <h2><%= I18n.t('people.person', :count => group_people_count = @group.people.count) %></h2> <% if group_people_count > 25 and params[:action] == 'show' %> <p> (<%= I18n.t('groups.25_of') %> <%= group_people_count %>) <%= link_to I18n.t('groups.show_all'), group_memberships_path(@group) %> </p> <% end %> <table> <% @group.memberships.all(params[:action] == 'show' ? {:include => :person, :limit => 25, :order => sql_random} : {:include => :person, :order => 'people.last_name, people.first_name'}).each do |membership| %> <% if person = membership.person %> <tr> <td> <a href="<%= url_for person %>"> <%= render :partial => 'people/thumbnail', :locals => {:person => person} %> </a> </td> <td class="person"> <%= link_to h(person.name), person %> <% if person.birthday_soon? %> <br/> <span class="small"> <%= image_tag('birthday.png', :alt => I18n.t('privacies.birthday'), :class => 'icon') %> <%= person.birthday.to_s(:date_without_year) %> </span> <% end %> </td> </tr> <% end %> <% end %> </table>
a18045740433895def8e827e4af669a7ea507ae3
components/spacer/inner-row-spacer.html
components/spacer/inner-row-spacer.html
<tr> <td class="spacer" height="40" style="font-size: 40px; line-height: 40px; margin: 0; padding: 0;">&nbsp;</td> </tr>
<tr> <td class="spacer" height="40" style="font-size: 40px; line-height: 40px; mso-line-height-rule: exactly; padding: 0;">&nbsp;</td> </tr>
Fix Outlook line-height for inner row spacer.
Fix Outlook line-height for inner row spacer.
HTML
mit
ThemeMountain/tm-pine
html
## Code Before: <tr> <td class="spacer" height="40" style="font-size: 40px; line-height: 40px; margin: 0; padding: 0;">&nbsp;</td> </tr> ## Instruction: Fix Outlook line-height for inner row spacer. ## Code After: <tr> <td class="spacer" height="40" style="font-size: 40px; line-height: 40px; mso-line-height-rule: exactly; padding: 0;">&nbsp;</td> </tr>
bc0ea691835aee4ae8542c65fb0c8361c6b93393
src/legacy/js/functions/_loadCreateScreen.js
src/legacy/js/functions/_loadCreateScreen.js
function loadCreateScreen(parentUrl, collectionId, type, collectionData) { var isDataVis = false; // Flag for template to show correct options in select // Load data vis creator or ordinary publisher creator if (collectionData && collectionData.collectionOwner == "DATA_VISUALISATION") { isDataVis = true; type = 'visualisation'; } var html = templates.workCreate({"dataVis": isDataVis}); $('.workspace-menu').html(html); loadCreator(parentUrl, collectionId, type, collectionData); $('#pagetype').focus(); }
function loadCreateScreen(parentUrl, collectionId, type, collectionData) { var isDataVis = type === "visualisation"; // Flag for template to show correct options in select var html = templates.workCreate({"dataVis": isDataVis}); $('.workspace-menu').html(html); loadCreator(parentUrl, collectionId, type, collectionData); $('#pagetype').focus(); }
Fix create screen for visualisation
Fix create screen for visualisation
JavaScript
mit
ONSdigital/florence,ONSdigital/florence,ONSdigital/florence,ONSdigital/florence
javascript
## Code Before: function loadCreateScreen(parentUrl, collectionId, type, collectionData) { var isDataVis = false; // Flag for template to show correct options in select // Load data vis creator or ordinary publisher creator if (collectionData && collectionData.collectionOwner == "DATA_VISUALISATION") { isDataVis = true; type = 'visualisation'; } var html = templates.workCreate({"dataVis": isDataVis}); $('.workspace-menu').html(html); loadCreator(parentUrl, collectionId, type, collectionData); $('#pagetype').focus(); } ## Instruction: Fix create screen for visualisation ## Code After: function loadCreateScreen(parentUrl, collectionId, type, collectionData) { var isDataVis = type === "visualisation"; // Flag for template to show correct options in select var html = templates.workCreate({"dataVis": isDataVis}); $('.workspace-menu').html(html); loadCreator(parentUrl, collectionId, type, collectionData); $('#pagetype').focus(); }
64f479ca73a666835902828315114c560b48e9f1
README.md
README.md
Cloud CNC is an online CNC lathe simulator. It lets you edit and simulate CNC lathe code online. This is an HTML5 application with no server side interaction. The code is parsed in JS and simulation is performed using HTML5 Canvas and web workers for multithreading. Other features include simulation speed control, pause/resume & breakpoints for pausing the program at particular source lines. Visit [https://cnc-lathe-simulator.appspot.com/](https://cnc-lathe-simulator.appspot.com/) and hit the Start button to see the simulation. [![IMAGE ALT TEXT HERE](https://img.youtube.com/vi/BTF41bNq6_4/0.jpg)](https://www.youtube.com/watch?v=BTF41bNq6_4)
Cloud CNC is an online CNC lathe simulator. It lets you edit and simulate CNC lathe code online. This is an HTML5 application with no server side interaction. The code is parsed in JS and simulation is performed using HTML5 Canvas and web workers for multithreading. Other features include simulation speed control, pause/resume & breakpoints for pausing the program at particular source lines. Visit [https://cnc-lathe-simulator.appspot.com/](https://cnc-lathe-simulator.appspot.com/) and hit the Start button to see the simulation. Click the following image to view a screencast showing a simulation [![IMAGE ALT TEXT HERE](https://img.youtube.com/vi/BTF41bNq6_4/0.jpg)](https://www.youtube.com/watch?v=BTF41bNq6_4)
Add details about the video link
Add details about the video link
Markdown
apache-2.0
parambirs/cloudcnc,parambirs/cloudcnc,parambirs/cloudcnc,parambirs/cloudcnc
markdown
## Code Before: Cloud CNC is an online CNC lathe simulator. It lets you edit and simulate CNC lathe code online. This is an HTML5 application with no server side interaction. The code is parsed in JS and simulation is performed using HTML5 Canvas and web workers for multithreading. Other features include simulation speed control, pause/resume & breakpoints for pausing the program at particular source lines. Visit [https://cnc-lathe-simulator.appspot.com/](https://cnc-lathe-simulator.appspot.com/) and hit the Start button to see the simulation. [![IMAGE ALT TEXT HERE](https://img.youtube.com/vi/BTF41bNq6_4/0.jpg)](https://www.youtube.com/watch?v=BTF41bNq6_4) ## Instruction: Add details about the video link ## Code After: Cloud CNC is an online CNC lathe simulator. It lets you edit and simulate CNC lathe code online. This is an HTML5 application with no server side interaction. The code is parsed in JS and simulation is performed using HTML5 Canvas and web workers for multithreading. Other features include simulation speed control, pause/resume & breakpoints for pausing the program at particular source lines. Visit [https://cnc-lathe-simulator.appspot.com/](https://cnc-lathe-simulator.appspot.com/) and hit the Start button to see the simulation. Click the following image to view a screencast showing a simulation [![IMAGE ALT TEXT HERE](https://img.youtube.com/vi/BTF41bNq6_4/0.jpg)](https://www.youtube.com/watch?v=BTF41bNq6_4)
4e6e3ad0809bcc7bb538450d9953b6c4162d8907
app/views/newsletter/subscriptions/_form.html.erb
app/views/newsletter/subscriptions/_form.html.erb
<%= form_tag(subscription_path, class: 'newsletter', remote: true) do %> <h3 class="newsletter__heading"><%= t('newsletter.heading') %></h3> <ul class="list-benefits list-benefits--sm"> <% t('newsletter.benefits').each do |benefit| %> <li><%= benefit %></li> <% end %> </ul> <%= label_tag('subscription[email]', 'Email', class: 'visually-hidden') %> <div class="newsletter__form-controls js-newsletter-form"> <p class="newsletter__error js-newsletter-error-msg">Please provide a valid email</p> <%= email_field_tag('subscription[email]', nil, class: 'newsletter__input') %> <%= button_tag('Sign up', type: 'submit', class: 'button button--input newsletter__button') %> </div> <% end %>
<%= form_tag(subscription_path, class: 'newsletter', remote: true) do %> <%= hidden_field_tag :authenticity_token, form_authenticity_token -%> <h3 class="newsletter__heading"><%= t('newsletter.heading') %></h3> <ul class="list-benefits list-benefits--sm"> <% t('newsletter.benefits').each do |benefit| %> <li><%= benefit %></li> <% end %> </ul> <%= label_tag('subscription[email]', 'Email', class: 'visually-hidden') %> <div class="newsletter__form-controls js-newsletter-form"> <p class="newsletter__error js-newsletter-error-msg">Please provide a valid email</p> <%= email_field_tag('subscription[email]', nil, class: 'newsletter__input') %> <%= button_tag('Sign up', type: 'submit', class: 'button button--input newsletter__button') %> </div> <% end %>
Add authenticity token to newsletter sign up form.
Add authenticity token to newsletter sign up form.
HTML+ERB
mit
moneyadviceservice/frontend,moneyadviceservice/frontend,moneyadviceservice/frontend,moneyadviceservice/frontend
html+erb
## Code Before: <%= form_tag(subscription_path, class: 'newsletter', remote: true) do %> <h3 class="newsletter__heading"><%= t('newsletter.heading') %></h3> <ul class="list-benefits list-benefits--sm"> <% t('newsletter.benefits').each do |benefit| %> <li><%= benefit %></li> <% end %> </ul> <%= label_tag('subscription[email]', 'Email', class: 'visually-hidden') %> <div class="newsletter__form-controls js-newsletter-form"> <p class="newsletter__error js-newsletter-error-msg">Please provide a valid email</p> <%= email_field_tag('subscription[email]', nil, class: 'newsletter__input') %> <%= button_tag('Sign up', type: 'submit', class: 'button button--input newsletter__button') %> </div> <% end %> ## Instruction: Add authenticity token to newsletter sign up form. ## Code After: <%= form_tag(subscription_path, class: 'newsletter', remote: true) do %> <%= hidden_field_tag :authenticity_token, form_authenticity_token -%> <h3 class="newsletter__heading"><%= t('newsletter.heading') %></h3> <ul class="list-benefits list-benefits--sm"> <% t('newsletter.benefits').each do |benefit| %> <li><%= benefit %></li> <% end %> </ul> <%= label_tag('subscription[email]', 'Email', class: 'visually-hidden') %> <div class="newsletter__form-controls js-newsletter-form"> <p class="newsletter__error js-newsletter-error-msg">Please provide a valid email</p> <%= email_field_tag('subscription[email]', nil, class: 'newsletter__input') %> <%= button_tag('Sign up', type: 'submit', class: 'button button--input newsletter__button') %> </div> <% end %>
537e9b1e749f9d198a85b1b4b0303975542753f1
static/templates/confirm_dialog/confirm_deactivate_bot.hbs
static/templates/confirm_dialog/confirm_deactivate_bot.hbs
<p> {{#tr}} When you deactivate <z-user></z-user>. {{#*inline "z-user"}}<strong>{{username}}</strong>{{#if email}} &lt;{{email}}&gt;{{/if}}{{/inline}} {{/tr}} </p> <p>{{t "They will not send messages or take any other actions." }}</p>
<p> {{#tr}} When you deactivate <z-user></z-user>. {{#*inline "z-user"}}<strong>{{username}}</strong>{{#if email}} &lt;{{email}}&gt;{{/if}}{{/inline}} {{/tr}} </p> <p>{{t "A deactivated bot cannot send messages, access data, or take any other action." }}</p>
Improve wording for deactivate bot modal.
settings: Improve wording for deactivate bot modal.
Handlebars
apache-2.0
zulip/zulip,rht/zulip,rht/zulip,zulip/zulip,andersk/zulip,andersk/zulip,zulip/zulip,andersk/zulip,rht/zulip,zulip/zulip,zulip/zulip,zulip/zulip,rht/zulip,andersk/zulip,andersk/zulip,andersk/zulip,rht/zulip,andersk/zulip,zulip/zulip,rht/zulip,rht/zulip
handlebars
## Code Before: <p> {{#tr}} When you deactivate <z-user></z-user>. {{#*inline "z-user"}}<strong>{{username}}</strong>{{#if email}} &lt;{{email}}&gt;{{/if}}{{/inline}} {{/tr}} </p> <p>{{t "They will not send messages or take any other actions." }}</p> ## Instruction: settings: Improve wording for deactivate bot modal. ## Code After: <p> {{#tr}} When you deactivate <z-user></z-user>. {{#*inline "z-user"}}<strong>{{username}}</strong>{{#if email}} &lt;{{email}}&gt;{{/if}}{{/inline}} {{/tr}} </p> <p>{{t "A deactivated bot cannot send messages, access data, or take any other action." }}</p>
72fa8d372f8603f0175bf54b88a86a4e92c1f8e7
.travis.yml
.travis.yml
language: python python: # We don't actually use the Travis Python, but this keeps it organized. - "3.5" # - "3.6" install: - source libs/travis-conda-scripts/scripts/config.sh - bash -ex libs/travis-conda-scripts/scripts/travis_install.sh script: - source libs/travis-conda-scripts/scripts/config.sh - bash -ex libs/travis-conda-scripts/scripts/build.sh - bash -ex libs/travis-conda-scripts/scripts/install_package.sh exdir - bash -ex libs/travis-conda-scripts/scripts/doctest.sh after_success: - source libs/travis-conda-scripts/scripts/config.sh - bash -ex libs/travis-conda-scripts/scripts/upload.sh deploy: skip_cleanup: true
language: python python: # We don't actually use the Travis Python, but this keeps it organized. - "3.5" # - "3.6" install: - source libs/travis-conda-scripts/scripts/config.sh - bash -ex libs/travis-conda-scripts/scripts/travis_install.sh script: - source libs/travis-conda-scripts/scripts/config.sh - bash -ex libs/travis-conda-scripts/scripts/build.sh - bash -ex libs/travis-conda-scripts/scripts/install_package.sh exdir - bash -ex libs/travis-conda-scripts/scripts/doctest.sh - bash -ex libs/travis-conda-scripts/scripts/upload.sh deploy: skip_cleanup: true
Move upload to script to alert on upload failures
Move upload to script to alert on upload failures
YAML
mit
CINPLA/exdir,CINPLA/exdir,CINPLA/exdir
yaml
## Code Before: language: python python: # We don't actually use the Travis Python, but this keeps it organized. - "3.5" # - "3.6" install: - source libs/travis-conda-scripts/scripts/config.sh - bash -ex libs/travis-conda-scripts/scripts/travis_install.sh script: - source libs/travis-conda-scripts/scripts/config.sh - bash -ex libs/travis-conda-scripts/scripts/build.sh - bash -ex libs/travis-conda-scripts/scripts/install_package.sh exdir - bash -ex libs/travis-conda-scripts/scripts/doctest.sh after_success: - source libs/travis-conda-scripts/scripts/config.sh - bash -ex libs/travis-conda-scripts/scripts/upload.sh deploy: skip_cleanup: true ## Instruction: Move upload to script to alert on upload failures ## Code After: language: python python: # We don't actually use the Travis Python, but this keeps it organized. - "3.5" # - "3.6" install: - source libs/travis-conda-scripts/scripts/config.sh - bash -ex libs/travis-conda-scripts/scripts/travis_install.sh script: - source libs/travis-conda-scripts/scripts/config.sh - bash -ex libs/travis-conda-scripts/scripts/build.sh - bash -ex libs/travis-conda-scripts/scripts/install_package.sh exdir - bash -ex libs/travis-conda-scripts/scripts/doctest.sh - bash -ex libs/travis-conda-scripts/scripts/upload.sh deploy: skip_cleanup: true
d916d064a3ba52b4c8e6f4a3c082fd52ccf2681a
doc/phonopy/external-tools.rst
doc/phonopy/external-tools.rst
.. _external_tools: External tools =============== Here external tools related to phonopy but supported by the groups out of the phonopy project are listed. Each of the tools is not supported by the phonopy project because of the difficulties of the maintainance and the test by main developers of phonopy under current style of phonopy development. However useful tools should be known. If developers want to use here to notify their tools, please contact via the phonopy mailing list. LADYtools ---------- https://github.com/ladyteam/ladytools/wiki .. |sflogo| image:: http://sflogo.sourceforge.net/sflogo.php?group_id=161614&type=1 :target: http://sourceforge.net |sflogo|
.. _external_tools: External tools =============== Here external tools related to phonopy but supported by the groups out of the phonopy project are listed. Each of the tools is not supported by the phonopy project because of the difficulties of the maintainance and the test by main developers of phonopy under current style of phonopy development. However useful tools should be known. If developers want to use here to notify their tools, please contact via the phonopy mailing list. LADYtools ---------- A set of helpful tolls for ab initio calculation software packages like ABINIT VASP CRYSTAL etc. https://github.com/ladyteam/ladytools/wiki SNAXS interface ---------------- Simulating Neutron And X-ray Scans; a tool for condensed-matter scientists studying phonons using neutron scattering. https://github.com/danparshall/snaxs .. |sflogo| image:: http://sflogo.sourceforge.net/sflogo.php?group_id=161614&type=1 :target: http://sourceforge.net |sflogo|
Update manual for an external tool
Update manual for an external tool
reStructuredText
bsd-3-clause
atztogo/phonopy,atztogo/phonopy,atztogo/phonopy,atztogo/phonopy
restructuredtext
## Code Before: .. _external_tools: External tools =============== Here external tools related to phonopy but supported by the groups out of the phonopy project are listed. Each of the tools is not supported by the phonopy project because of the difficulties of the maintainance and the test by main developers of phonopy under current style of phonopy development. However useful tools should be known. If developers want to use here to notify their tools, please contact via the phonopy mailing list. LADYtools ---------- https://github.com/ladyteam/ladytools/wiki .. |sflogo| image:: http://sflogo.sourceforge.net/sflogo.php?group_id=161614&type=1 :target: http://sourceforge.net |sflogo| ## Instruction: Update manual for an external tool ## Code After: .. _external_tools: External tools =============== Here external tools related to phonopy but supported by the groups out of the phonopy project are listed. Each of the tools is not supported by the phonopy project because of the difficulties of the maintainance and the test by main developers of phonopy under current style of phonopy development. However useful tools should be known. If developers want to use here to notify their tools, please contact via the phonopy mailing list. LADYtools ---------- A set of helpful tolls for ab initio calculation software packages like ABINIT VASP CRYSTAL etc. https://github.com/ladyteam/ladytools/wiki SNAXS interface ---------------- Simulating Neutron And X-ray Scans; a tool for condensed-matter scientists studying phonons using neutron scattering. https://github.com/danparshall/snaxs .. |sflogo| image:: http://sflogo.sourceforge.net/sflogo.php?group_id=161614&type=1 :target: http://sourceforge.net |sflogo|
7f5f353897b48bf6f9c30787989cf03c229127a3
app/templates/src/test/javascript/spec/helpers/_httpBackend.js
app/templates/src/test/javascript/spec/helpers/_httpBackend.js
function mockApiAccountCall() { inject(function($httpBackend) { $httpBackend.whenGET(/api\/account.*/).respond({}); }); } function mockI18nCalls() { inject(function($httpBackend) { $httpBackend.whenGET(/i18n\/[a-z][a-z]\/.+\.json/).respond({}); }); }
function mockApiAccountCall() { inject(function($httpBackend) { $httpBackend.whenGET(/api\/account.*/).respond({}); }); } function mockI18nCalls() { inject(function($httpBackend) { $httpBackend.whenGET(/i18n\/.*\/.+\.json/).respond({}); }); }
Fix build issue for adding Chinese Simplified ("zh-cn") language
Fix build issue for adding Chinese Simplified ("zh-cn") language
JavaScript
apache-2.0
stevehouel/generator-jhipster,rifatdover/generator-jhipster,gzsombor/generator-jhipster,danielpetisme/generator-jhipster,atomfrede/generator-jhipster,sendilkumarn/generator-jhipster,vivekmore/generator-jhipster,eosimosu/generator-jhipster,liseri/generator-jhipster,erikkemperman/generator-jhipster,Tcharl/generator-jhipster,dynamicguy/generator-jhipster,jhipster/generator-jhipster,gmarziou/generator-jhipster,xetys/generator-jhipster,mosoft521/generator-jhipster,sohibegit/generator-jhipster,sohibegit/generator-jhipster,danielpetisme/generator-jhipster,yongli82/generator-jhipster,lrkwz/generator-jhipster,danielpetisme/generator-jhipster,maniacneron/generator-jhipster,vivekmore/generator-jhipster,rkohel/generator-jhipster,eosimosu/generator-jhipster,dalbelap/generator-jhipster,wmarques/generator-jhipster,siliconharborlabs/generator-jhipster,JulienMrgrd/generator-jhipster,dalbelap/generator-jhipster,liseri/generator-jhipster,mosoft521/generator-jhipster,nkolosnjaji/generator-jhipster,eosimosu/generator-jhipster,deepu105/generator-jhipster,dimeros/generator-jhipster,cbornet/generator-jhipster,gmarziou/generator-jhipster,ziogiugno/generator-jhipster,ctamisier/generator-jhipster,robertmilowski/generator-jhipster,sohibegit/generator-jhipster,ramzimaalej/generator-jhipster,robertmilowski/generator-jhipster,cbornet/generator-jhipster,jkutner/generator-jhipster,baskeboler/generator-jhipster,gzsombor/generator-jhipster,stevehouel/generator-jhipster,jkutner/generator-jhipster,gzsombor/generator-jhipster,baskeboler/generator-jhipster,ctamisier/generator-jhipster,siliconharborlabs/generator-jhipster,lrkwz/generator-jhipster,hdurix/generator-jhipster,jhipster/generator-jhipster,ctamisier/generator-jhipster,baskeboler/generator-jhipster,maniacneron/generator-jhipster,JulienMrgrd/generator-jhipster,erikkemperman/generator-jhipster,rifatdover/generator-jhipster,yongli82/generator-jhipster,JulienMrgrd/generator-jhipster,rkohel/generator-jhipster,danielpetisme/generator-jhipster,dalbelap/generator-jhipster,liseri/generator-jhipster,Tcharl/generator-jhipster,jhipster/generator-jhipster,sendilkumarn/generator-jhipster,dimeros/generator-jhipster,jkutner/generator-jhipster,mraible/generator-jhipster,robertmilowski/generator-jhipster,ctamisier/generator-jhipster,pascalgrimaud/generator-jhipster,rkohel/generator-jhipster,Tcharl/generator-jhipster,vivekmore/generator-jhipster,mraible/generator-jhipster,duderoot/generator-jhipster,hdurix/generator-jhipster,ziogiugno/generator-jhipster,robertmilowski/generator-jhipster,wmarques/generator-jhipster,ruddell/generator-jhipster,eosimosu/generator-jhipster,wmarques/generator-jhipster,siliconharborlabs/generator-jhipster,vivekmore/generator-jhipster,xetys/generator-jhipster,cbornet/generator-jhipster,yongli82/generator-jhipster,ziogiugno/generator-jhipster,PierreBesson/generator-jhipster,gzsombor/generator-jhipster,deepu105/generator-jhipster,cbornet/generator-jhipster,jkutner/generator-jhipster,deepu105/generator-jhipster,deepu105/generator-jhipster,liseri/generator-jhipster,gzsombor/generator-jhipster,stevehouel/generator-jhipster,PierreBesson/generator-jhipster,nkolosnjaji/generator-jhipster,deepu105/generator-jhipster,mraible/generator-jhipster,dalbelap/generator-jhipster,erikkemperman/generator-jhipster,gmarziou/generator-jhipster,danielpetisme/generator-jhipster,PierreBesson/generator-jhipster,dimeros/generator-jhipster,liseri/generator-jhipster,PierreBesson/generator-jhipster,hdurix/generator-jhipster,ramzimaalej/generator-jhipster,dynamicguy/generator-jhipster,ziogiugno/generator-jhipster,jhipster/generator-jhipster,stevehouel/generator-jhipster,dimeros/generator-jhipster,baskeboler/generator-jhipster,pascalgrimaud/generator-jhipster,yongli82/generator-jhipster,ctamisier/generator-jhipster,hdurix/generator-jhipster,eosimosu/generator-jhipster,nkolosnjaji/generator-jhipster,erikkemperman/generator-jhipster,lrkwz/generator-jhipster,maniacneron/generator-jhipster,sendilkumarn/generator-jhipster,stevehouel/generator-jhipster,mosoft521/generator-jhipster,sendilkumarn/generator-jhipster,duderoot/generator-jhipster,PierreBesson/generator-jhipster,maniacneron/generator-jhipster,gmarziou/generator-jhipster,hdurix/generator-jhipster,baskeboler/generator-jhipster,ziogiugno/generator-jhipster,rkohel/generator-jhipster,duderoot/generator-jhipster,cbornet/generator-jhipster,dimeros/generator-jhipster,ruddell/generator-jhipster,jkutner/generator-jhipster,pascalgrimaud/generator-jhipster,maniacneron/generator-jhipster,nkolosnjaji/generator-jhipster,gmarziou/generator-jhipster,sohibegit/generator-jhipster,mraible/generator-jhipster,rkohel/generator-jhipster,siliconharborlabs/generator-jhipster,ruddell/generator-jhipster,dynamicguy/generator-jhipster,duderoot/generator-jhipster,siliconharborlabs/generator-jhipster,duderoot/generator-jhipster,atomfrede/generator-jhipster,ramzimaalej/generator-jhipster,dalbelap/generator-jhipster,pascalgrimaud/generator-jhipster,sendilkumarn/generator-jhipster,dynamicguy/generator-jhipster,lrkwz/generator-jhipster,atomfrede/generator-jhipster,jhipster/generator-jhipster,sohibegit/generator-jhipster,wmarques/generator-jhipster,Tcharl/generator-jhipster,erikkemperman/generator-jhipster,pascalgrimaud/generator-jhipster,atomfrede/generator-jhipster,mosoft521/generator-jhipster,nkolosnjaji/generator-jhipster,mosoft521/generator-jhipster,vivekmore/generator-jhipster,mraible/generator-jhipster,atomfrede/generator-jhipster,JulienMrgrd/generator-jhipster,JulienMrgrd/generator-jhipster,Tcharl/generator-jhipster,wmarques/generator-jhipster,xetys/generator-jhipster,ruddell/generator-jhipster,ruddell/generator-jhipster,yongli82/generator-jhipster,xetys/generator-jhipster,robertmilowski/generator-jhipster,rifatdover/generator-jhipster,lrkwz/generator-jhipster
javascript
## Code Before: function mockApiAccountCall() { inject(function($httpBackend) { $httpBackend.whenGET(/api\/account.*/).respond({}); }); } function mockI18nCalls() { inject(function($httpBackend) { $httpBackend.whenGET(/i18n\/[a-z][a-z]\/.+\.json/).respond({}); }); } ## Instruction: Fix build issue for adding Chinese Simplified ("zh-cn") language ## Code After: function mockApiAccountCall() { inject(function($httpBackend) { $httpBackend.whenGET(/api\/account.*/).respond({}); }); } function mockI18nCalls() { inject(function($httpBackend) { $httpBackend.whenGET(/i18n\/.*\/.+\.json/).respond({}); }); }
d5d92cef19ea0f2d723c394fed09643b0e9cd9a5
Deployment/CSF.Zpt.Documentation/Website/css/manpage_exports.css
Deployment/CSF.Zpt.Documentation/Website/css/manpage_exports.css
.main_page_content .manpage_export h2 { border-bottom: 1px solid #CDC998; text-transform: lowercase; } .main_page_content .manpage_export h2::first-letter { text-transform: uppercase; } .main_page_content .manpage_export a { display: none; } .main_page_content .manpage_export b { font-weight: bold; font-style: italic; } .main_page_content .manpage_export dt:first-child, .main_page_content .manpage_export dd:first-child { margin-top: 0; }
.main_page_content .manpage_export h2 { border-bottom: 1px solid #CDC998; text-transform: lowercase; } .main_page_content .manpage_export h2::first-letter { text-transform: uppercase; } .main_page_content .manpage_export a { display: none; } .main_page_content .manpage_export b { font-weight: bold; font-style: italic; } .main_page_content .manpage_export i { padding-bottom: 2px; border-bottom: 1px solid #555; font-family: 'Droid Sans Mono', monospace; } .main_page_content .manpage_export dt:first-child, .main_page_content .manpage_export dd:first-child { margin-top: 0; }
Improve styling for HTML exports of manpages
Improve styling for HTML exports of manpages
CSS
mit
csf-dev/ZPT-Sharp,csf-dev/ZPT-Sharp
css
## Code Before: .main_page_content .manpage_export h2 { border-bottom: 1px solid #CDC998; text-transform: lowercase; } .main_page_content .manpage_export h2::first-letter { text-transform: uppercase; } .main_page_content .manpage_export a { display: none; } .main_page_content .manpage_export b { font-weight: bold; font-style: italic; } .main_page_content .manpage_export dt:first-child, .main_page_content .manpage_export dd:first-child { margin-top: 0; } ## Instruction: Improve styling for HTML exports of manpages ## Code After: .main_page_content .manpage_export h2 { border-bottom: 1px solid #CDC998; text-transform: lowercase; } .main_page_content .manpage_export h2::first-letter { text-transform: uppercase; } .main_page_content .manpage_export a { display: none; } .main_page_content .manpage_export b { font-weight: bold; font-style: italic; } .main_page_content .manpage_export i { padding-bottom: 2px; border-bottom: 1px solid #555; font-family: 'Droid Sans Mono', monospace; } .main_page_content .manpage_export dt:first-child, .main_page_content .manpage_export dd:first-child { margin-top: 0; }
48352e09b418cf4cce6629210208536375aa4837
packages.txt
packages.txt
Remove atomatigit in favor of git plus
Remove atomatigit in favor of git plus
Text
mit
substantial/atomfiles,substantial/atomfiles
text
e09f5854f072e84dbda9e0f4ef2705b4a46373bf
src/clients/lib/perl/pm/XMMSClient/Sync.pm
src/clients/lib/perl/pm/XMMSClient/Sync.pm
package Audio::XMMSClient::Sync; use strict; use warnings; use Audio::XMMSClient; use Scalar::Util qw/blessed/; sub new { my $base = shift; my $c = Audio::XMMSClient->new( @_ ); return $base->new_from( $c ); } sub new_from { my ($base, $c) = @_; my $self = bless \$c, $base; return $self; } our $AUTOLOAD; sub AUTOLOAD { my ($self) = @_; (my $func = $AUTOLOAD) =~ s/.*:://; unless ($$self->can($func)) { croak (qq{Can't locate object method "$func" via package Audio::XMMSClient::Sync}); } { no strict 'refs'; *$AUTOLOAD = sub { shift->sync_request( $func, @_ ) }; &$AUTOLOAD; } } sub sync_request { my $self = shift; my $request = shift; my $resp = $$self->$request(@_); if (blessed $resp && $resp->isa('Audio::XMMSClient::Result')) { $resp->wait; if ($resp->iserror) { croak ($resp->get_error); } $resp = $resp->value; } return $resp; } 1;
package Audio::XMMSClient::Sync; use strict; use warnings; use Audio::XMMSClient; use Scalar::Util qw/blessed/; sub new { my $base = shift; my $c = Audio::XMMSClient->new( @_ ); return $base->new_from( $c ); } sub new_from { my ($base, $c) = @_; my $self = bless \$c, $base; return $self; } our $AUTOLOAD; sub AUTOLOAD { my ($self) = @_; (my $func = $AUTOLOAD) =~ s/.*:://; unless ($$self->can($func)) { require Carp; Carp::croak (qq{Can't locate object method "$func" via package Audio::XMMSClient::Sync}); } { no strict 'refs'; *$AUTOLOAD = sub { shift->sync_request( $func, @_ ) }; &$AUTOLOAD; } } sub sync_request { my $self = shift; my $request = shift; my $resp = $$self->$request(@_); if (blessed $resp && $resp->isa('Audio::XMMSClient::Result')) { $resp->wait; if ($resp->iserror) { require Carp; Carp::croak ($resp->get_error); } $resp = $resp->value; } return $resp; } 1;
Fix error handling in the sync wrapper of the perl bindings.
OTHER: Fix error handling in the sync wrapper of the perl bindings.
Perl
lgpl-2.1
dreamerc/xmms2,xmms2/xmms2-stable,six600110/xmms2,chrippa/xmms2,oneman/xmms2-oneman-old,dreamerc/xmms2,oneman/xmms2-oneman-old,krad-radio/xmms2-krad,theeternalsw0rd/xmms2,mantaraya36/xmms2-mantaraya36,oneman/xmms2-oneman-old,oneman/xmms2-oneman,mantaraya36/xmms2-mantaraya36,krad-radio/xmms2-krad,chrippa/xmms2,krad-radio/xmms2-krad,oneman/xmms2-oneman,six600110/xmms2,chrippa/xmms2,xmms2/xmms2-stable,chrippa/xmms2,xmms2/xmms2-stable,theefer/xmms2,oneman/xmms2-oneman,theefer/xmms2,theefer/xmms2,six600110/xmms2,oneman/xmms2-oneman-old,six600110/xmms2,theeternalsw0rd/xmms2,theefer/xmms2,theefer/xmms2,dreamerc/xmms2,theeternalsw0rd/xmms2,oneman/xmms2-oneman,krad-radio/xmms2-krad,theeternalsw0rd/xmms2,theeternalsw0rd/xmms2,dreamerc/xmms2,xmms2/xmms2-stable,chrippa/xmms2,oneman/xmms2-oneman,mantaraya36/xmms2-mantaraya36,oneman/xmms2-oneman-old,theeternalsw0rd/xmms2,chrippa/xmms2,six600110/xmms2,theefer/xmms2,oneman/xmms2-oneman,krad-radio/xmms2-krad,krad-radio/xmms2-krad,six600110/xmms2,dreamerc/xmms2,xmms2/xmms2-stable,theefer/xmms2,xmms2/xmms2-stable,mantaraya36/xmms2-mantaraya36,mantaraya36/xmms2-mantaraya36,mantaraya36/xmms2-mantaraya36,mantaraya36/xmms2-mantaraya36,oneman/xmms2-oneman
perl
## Code Before: package Audio::XMMSClient::Sync; use strict; use warnings; use Audio::XMMSClient; use Scalar::Util qw/blessed/; sub new { my $base = shift; my $c = Audio::XMMSClient->new( @_ ); return $base->new_from( $c ); } sub new_from { my ($base, $c) = @_; my $self = bless \$c, $base; return $self; } our $AUTOLOAD; sub AUTOLOAD { my ($self) = @_; (my $func = $AUTOLOAD) =~ s/.*:://; unless ($$self->can($func)) { croak (qq{Can't locate object method "$func" via package Audio::XMMSClient::Sync}); } { no strict 'refs'; *$AUTOLOAD = sub { shift->sync_request( $func, @_ ) }; &$AUTOLOAD; } } sub sync_request { my $self = shift; my $request = shift; my $resp = $$self->$request(@_); if (blessed $resp && $resp->isa('Audio::XMMSClient::Result')) { $resp->wait; if ($resp->iserror) { croak ($resp->get_error); } $resp = $resp->value; } return $resp; } 1; ## Instruction: OTHER: Fix error handling in the sync wrapper of the perl bindings. ## Code After: package Audio::XMMSClient::Sync; use strict; use warnings; use Audio::XMMSClient; use Scalar::Util qw/blessed/; sub new { my $base = shift; my $c = Audio::XMMSClient->new( @_ ); return $base->new_from( $c ); } sub new_from { my ($base, $c) = @_; my $self = bless \$c, $base; return $self; } our $AUTOLOAD; sub AUTOLOAD { my ($self) = @_; (my $func = $AUTOLOAD) =~ s/.*:://; unless ($$self->can($func)) { require Carp; Carp::croak (qq{Can't locate object method "$func" via package Audio::XMMSClient::Sync}); } { no strict 'refs'; *$AUTOLOAD = sub { shift->sync_request( $func, @_ ) }; &$AUTOLOAD; } } sub sync_request { my $self = shift; my $request = shift; my $resp = $$self->$request(@_); if (blessed $resp && $resp->isa('Audio::XMMSClient::Result')) { $resp->wait; if ($resp->iserror) { require Carp; Carp::croak ($resp->get_error); } $resp = $resp->value; } return $resp; } 1;
e8e326fe39623ea04082553d1293b1e79c3611f6
proto/ho.py
proto/ho.py
import sys from board import Board, BoardView from utils import clear, getch def main(): board = Board(19, 19) view = BoardView(board) def move(): board.move(*view.cursor) view.redraw() def exit(): sys.exit(0) KEYS = { 'w': view.cursor_up, 'r': view.cursor_down, 'a': view.cursor_left, 's': view.cursor_right, 'x': move, '\x1b': exit, } while True: # Print board clear() sys.stdout.write('{0}\n'.format(view)) sys.stdout.write('Black: {black} -- White: {white}\n'.format(**board.score)) sys.stdout.write('{0}\'s move... '.format(board.turn)) # Get action c = getch() try: # Execute selected action KEYS[c]() except KeyError: # Action not found, do nothing pass if __name__ == '__main__': main()
import sys from board import Board, BoardView from utils import clear, getch def main(): board = Board(19, 19) view = BoardView(board) err = None def move(): board.move(*view.cursor) view.redraw() def exit(): sys.exit(0) KEYS = { 'w': view.cursor_up, 'r': view.cursor_down, 'a': view.cursor_left, 's': view.cursor_right, 'x': move, '\x1b': exit, } while True: # Print board clear() sys.stdout.write('{0}\n'.format(view)) sys.stdout.write('Black: {black} <===> White: {white}\n'.format(**board.score)) sys.stdout.write('{0}\'s move... '.format(board.turn)) if err: sys.stdout.write(err + '\n') err = None # Get action c = getch() try: # Execute selected action KEYS[c]() except Board.BoardError as be: # Board error (move on top of other piece, suicidal move, etc.) err = be.message except KeyError: # Action not found, do nothing pass if __name__ == '__main__': main()
Add error handling to main game loop
Add error handling to main game loop
Python
mit
davesque/go.py
python
## Code Before: import sys from board import Board, BoardView from utils import clear, getch def main(): board = Board(19, 19) view = BoardView(board) def move(): board.move(*view.cursor) view.redraw() def exit(): sys.exit(0) KEYS = { 'w': view.cursor_up, 'r': view.cursor_down, 'a': view.cursor_left, 's': view.cursor_right, 'x': move, '\x1b': exit, } while True: # Print board clear() sys.stdout.write('{0}\n'.format(view)) sys.stdout.write('Black: {black} -- White: {white}\n'.format(**board.score)) sys.stdout.write('{0}\'s move... '.format(board.turn)) # Get action c = getch() try: # Execute selected action KEYS[c]() except KeyError: # Action not found, do nothing pass if __name__ == '__main__': main() ## Instruction: Add error handling to main game loop ## Code After: import sys from board import Board, BoardView from utils import clear, getch def main(): board = Board(19, 19) view = BoardView(board) err = None def move(): board.move(*view.cursor) view.redraw() def exit(): sys.exit(0) KEYS = { 'w': view.cursor_up, 'r': view.cursor_down, 'a': view.cursor_left, 's': view.cursor_right, 'x': move, '\x1b': exit, } while True: # Print board clear() sys.stdout.write('{0}\n'.format(view)) sys.stdout.write('Black: {black} <===> White: {white}\n'.format(**board.score)) sys.stdout.write('{0}\'s move... '.format(board.turn)) if err: sys.stdout.write(err + '\n') err = None # Get action c = getch() try: # Execute selected action KEYS[c]() except Board.BoardError as be: # Board error (move on top of other piece, suicidal move, etc.) err = be.message except KeyError: # Action not found, do nothing pass if __name__ == '__main__': main()
081be4ec2ed0d13f26bf00891255a9af31756cf0
codecov.yml
codecov.yml
ignore: - "Example" - "test-server" - "docs" - "Pods" comment: layout: "header, reach, diff, flags, files, footer" behavior: default require_changes: no branches: null paths: null coverage: notify: slack: default: url: "https://hooks.slack.com/services/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" threshold: 1% only_pulls: false branches: null flags: null paths: null
ignore: - "Example" - "test-server" - "docs" - "Pods" comment: layout: "header, reach, diff, flags, files, footer" behavior: default require_changes: no branches: null paths: null coverage: notify: slack: default: threshold: 1% only_pulls: false branches: null flags: null paths: null
Remove Slack URL and set up with ENV variables from CI
Remove Slack URL and set up with ENV variables from CI
YAML
mit
Qminder/swift-api,Qminder/swift-api,Qminder/swift-api
yaml
## Code Before: ignore: - "Example" - "test-server" - "docs" - "Pods" comment: layout: "header, reach, diff, flags, files, footer" behavior: default require_changes: no branches: null paths: null coverage: notify: slack: default: url: "https://hooks.slack.com/services/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" threshold: 1% only_pulls: false branches: null flags: null paths: null ## Instruction: Remove Slack URL and set up with ENV variables from CI ## Code After: ignore: - "Example" - "test-server" - "docs" - "Pods" comment: layout: "header, reach, diff, flags, files, footer" behavior: default require_changes: no branches: null paths: null coverage: notify: slack: default: threshold: 1% only_pulls: false branches: null flags: null paths: null
323aa0e62342a4268f8a88de8a5e4f7376c37ee3
package.json
package.json
{ "name": "timevirtualizer", "version": "0.0.5", "author": "Eugene Batalov <[email protected]>", "contributors": [{ "name": "Alexandr Yanenko", "email": "[email protected]" }], "description": "Allows to manually manipulate time flow inside JavaScript program", "main": "./lib/TimeVirtualizer.js", "repository": { "type": "git", "url": "https://github.com/yanenkoa/jstimevirtualizer.git" }, "license": "MIT", "devDependencies": { "karma": "^0.13.8", "karma-browserify": "^4.3.0", "karma-chrome-launcher": "^0.2.0", "karma-jasmine": "^0.3.6", "browserify": "^11.0.0", "webworkify": "^1.0.2" }, "scripts": { "build": "browserify lib/TimeVirtualizer.js -o dist/assembledTimeVirtualizer.js" } }
{ "name": "timevirtualizer", "version": "0.0.5", "author": "Eugene Batalov <[email protected]>", "contributors": [{ "name": "Alexandr Yanenko", "email": "[email protected]" }], "description": "Allows to manually manipulate time flow inside JavaScript program", "main": "./lib/TimeVirtualizer.js", "repository": { "type": "git", "url": "https://github.com/yanenkoa/jstimevirtualizer.git" }, "license": "MIT", "devDependencies": { "karma": "^0.13.8", "karma-browserify": "^4.3.0", "karma-chrome-launcher": "^0.2.0", "karma-jasmine": "^0.3.6" }, "dependencies": { "browserify": "^11.0.0", "webworkify": "^1.0.2" }, "scripts": { "build": "browserify lib/TimeVirtualizer.js -o dist/assembledTimeVirtualizer.js" } }
Add 'webworkify' and 'browserify' to 'dependencies'
Add 'webworkify' and 'browserify' to 'dependencies'
JSON
mit
yanenkoa/jstimevirtualizer,eabatalov/jstimevirtualizer,eabatalov/jstimevirtualizer,yanenkoa/jstimevirtualizer
json
## Code Before: { "name": "timevirtualizer", "version": "0.0.5", "author": "Eugene Batalov <[email protected]>", "contributors": [{ "name": "Alexandr Yanenko", "email": "[email protected]" }], "description": "Allows to manually manipulate time flow inside JavaScript program", "main": "./lib/TimeVirtualizer.js", "repository": { "type": "git", "url": "https://github.com/yanenkoa/jstimevirtualizer.git" }, "license": "MIT", "devDependencies": { "karma": "^0.13.8", "karma-browserify": "^4.3.0", "karma-chrome-launcher": "^0.2.0", "karma-jasmine": "^0.3.6", "browserify": "^11.0.0", "webworkify": "^1.0.2" }, "scripts": { "build": "browserify lib/TimeVirtualizer.js -o dist/assembledTimeVirtualizer.js" } } ## Instruction: Add 'webworkify' and 'browserify' to 'dependencies' ## Code After: { "name": "timevirtualizer", "version": "0.0.5", "author": "Eugene Batalov <[email protected]>", "contributors": [{ "name": "Alexandr Yanenko", "email": "[email protected]" }], "description": "Allows to manually manipulate time flow inside JavaScript program", "main": "./lib/TimeVirtualizer.js", "repository": { "type": "git", "url": "https://github.com/yanenkoa/jstimevirtualizer.git" }, "license": "MIT", "devDependencies": { "karma": "^0.13.8", "karma-browserify": "^4.3.0", "karma-chrome-launcher": "^0.2.0", "karma-jasmine": "^0.3.6" }, "dependencies": { "browserify": "^11.0.0", "webworkify": "^1.0.2" }, "scripts": { "build": "browserify lib/TimeVirtualizer.js -o dist/assembledTimeVirtualizer.js" } }
dd39bca37562f7871893088a712be197d6457d4e
app/serializers/sessions_serializer.rb
app/serializers/sessions_serializer.rb
class SessionsSerializer attr_accessor :sessions def initialize(sessions) @sessions = sessions end def type(session) # handle DUBLADO3DDUBLADO and DUBLADODUBLADO3D return session.type unless session.type.include?('DUBLADO') "DUBLADO#{session.type.gsub('DUBLADO', '')}" end def to_message sessions.map do |session| [ "Horário: #{ session.time }", "#{ session.room }", "#{ session.cine.name } - #{ session.cine.location }", "#{ type(session) }" ].join("\n") end.join("\n \n") end def empty_message "Eita Giovana! Não achei sessões para esse filme :/" end end
class SessionsSerializer attr_accessor :sessions def initialize(sessions) @sessions = sessions end def type(session) # handle DUBLADO3DDUBLADO and DUBLADODUBLADO3D return session.type unless session.type.include?('DUBLADO') "DUBLADO#{session.type.gsub('DUBLADO', '')}" end def to_message return empty_message if sessions.empty? sessions.map do |session| [ "Horário: #{ session.time }", "#{ session.room }", "#{ session.cine.name } - #{ session.cine.location }", "#{ type(session) }" ].join("\n") end.join("\n \n") end def empty_message "Eita Giovana! Não achei sessões para esse filme :/" end end
Add empty message for sessions
Add empty message for sessions
Ruby
mit
tegon/ingresso-bot,tegon/cineminha-bot
ruby
## Code Before: class SessionsSerializer attr_accessor :sessions def initialize(sessions) @sessions = sessions end def type(session) # handle DUBLADO3DDUBLADO and DUBLADODUBLADO3D return session.type unless session.type.include?('DUBLADO') "DUBLADO#{session.type.gsub('DUBLADO', '')}" end def to_message sessions.map do |session| [ "Horário: #{ session.time }", "#{ session.room }", "#{ session.cine.name } - #{ session.cine.location }", "#{ type(session) }" ].join("\n") end.join("\n \n") end def empty_message "Eita Giovana! Não achei sessões para esse filme :/" end end ## Instruction: Add empty message for sessions ## Code After: class SessionsSerializer attr_accessor :sessions def initialize(sessions) @sessions = sessions end def type(session) # handle DUBLADO3DDUBLADO and DUBLADODUBLADO3D return session.type unless session.type.include?('DUBLADO') "DUBLADO#{session.type.gsub('DUBLADO', '')}" end def to_message return empty_message if sessions.empty? sessions.map do |session| [ "Horário: #{ session.time }", "#{ session.room }", "#{ session.cine.name } - #{ session.cine.location }", "#{ type(session) }" ].join("\n") end.join("\n \n") end def empty_message "Eita Giovana! Não achei sessões para esse filme :/" end end
db04f2d7fa0797092a9829a73fca50ce83fcb01e
client/components/Avatar.jsx
client/components/Avatar.jsx
import React from 'react'; import PropTypes from 'prop-types'; import webpackConfig from '../../config/webpack'; import './components.less'; const env = process.env.NODE_ENV === 'development' ? 'dev' : 'build'; const publishPath = webpackConfig[env].assetsPublicPath + webpackConfig[env].assetsSubDirectory; const avatarFallback = `${publishPath}/avatar/0.jpg`; const failTimes = new Map(); function noop() { } function handleError(e) { const times = failTimes.get(e.target) || 0; if (times >= 3) { return; } e.target.src = avatarFallback; failTimes.set(e.target, times + 1); } const Avatar = ({ src, size = 60, onClick = noop, className = '' }) => ( <img className={`component-avatar ${className}`} src={src} style={{ width: size, height: size, borderRadius: size / 2 }} onClick={onClick} onError={handleError} /> ); Avatar.propTypes = { src: PropTypes.string.isRequired, size: PropTypes.number, className: PropTypes.string, onClick: PropTypes.func, }; export default Avatar;
import React from 'react'; import PropTypes from 'prop-types'; import './components.less'; const avatarFallback = 'https://cdn.suisuijiang.com/fiora/avatar/0.jpg'; const failTimes = new Map(); function noop() { } function handleError(e) { const times = failTimes.get(e.target) || 0; if (times >= 2) { return; } e.target.src = avatarFallback; failTimes.set(e.target, times + 1); } const Avatar = ({ src, size = 60, onClick = noop, className = '' }) => ( <img className={`component-avatar ${className}`} src={src} style={{ width: size, height: size, borderRadius: size / 2 }} onClick={onClick} onError={handleError} /> ); Avatar.propTypes = { src: PropTypes.string.isRequired, size: PropTypes.number, className: PropTypes.string, onClick: PropTypes.func, }; export default Avatar;
Modify the wrong default avatar address
fix: Modify the wrong default avatar address
JSX
mit
yinxin630/fiora,yinxin630/fiora,yinxin630/fiora
jsx
## Code Before: import React from 'react'; import PropTypes from 'prop-types'; import webpackConfig from '../../config/webpack'; import './components.less'; const env = process.env.NODE_ENV === 'development' ? 'dev' : 'build'; const publishPath = webpackConfig[env].assetsPublicPath + webpackConfig[env].assetsSubDirectory; const avatarFallback = `${publishPath}/avatar/0.jpg`; const failTimes = new Map(); function noop() { } function handleError(e) { const times = failTimes.get(e.target) || 0; if (times >= 3) { return; } e.target.src = avatarFallback; failTimes.set(e.target, times + 1); } const Avatar = ({ src, size = 60, onClick = noop, className = '' }) => ( <img className={`component-avatar ${className}`} src={src} style={{ width: size, height: size, borderRadius: size / 2 }} onClick={onClick} onError={handleError} /> ); Avatar.propTypes = { src: PropTypes.string.isRequired, size: PropTypes.number, className: PropTypes.string, onClick: PropTypes.func, }; export default Avatar; ## Instruction: fix: Modify the wrong default avatar address ## Code After: import React from 'react'; import PropTypes from 'prop-types'; import './components.less'; const avatarFallback = 'https://cdn.suisuijiang.com/fiora/avatar/0.jpg'; const failTimes = new Map(); function noop() { } function handleError(e) { const times = failTimes.get(e.target) || 0; if (times >= 2) { return; } e.target.src = avatarFallback; failTimes.set(e.target, times + 1); } const Avatar = ({ src, size = 60, onClick = noop, className = '' }) => ( <img className={`component-avatar ${className}`} src={src} style={{ width: size, height: size, borderRadius: size / 2 }} onClick={onClick} onError={handleError} /> ); Avatar.propTypes = { src: PropTypes.string.isRequired, size: PropTypes.number, className: PropTypes.string, onClick: PropTypes.func, }; export default Avatar;
071f8a407e86e3bb95b5497fe99f12d7cced4396
install.sh
install.sh
add-apt-repository -y ppa:fkrull/deadsnakes apt-get update apt-get install -y libxml2 libxml2-dev libxslt1.1 libxslt1-dev libffi-dev libssl-dev libpq-dev #!/bin/bash for file in /u12pytpls/version/*; do $file done
add-apt-repository -y ppa:fkrull/deadsnakes apt-get update apt-get install -y libxml2 libxml2-dev libxslt1.1 libxslt1-dev libffi-dev libssl-dev libpq-dev libmysqlclient-dev #!/bin/bash for file in /u12pytpls/version/*; do $file done
Add libmysqlclient-dev to get mysql_config
Add libmysqlclient-dev to get mysql_config
Shell
mit
balavignesh-s/u12pytpls,dry-dock/u12pytpls
shell
## Code Before: add-apt-repository -y ppa:fkrull/deadsnakes apt-get update apt-get install -y libxml2 libxml2-dev libxslt1.1 libxslt1-dev libffi-dev libssl-dev libpq-dev #!/bin/bash for file in /u12pytpls/version/*; do $file done ## Instruction: Add libmysqlclient-dev to get mysql_config ## Code After: add-apt-repository -y ppa:fkrull/deadsnakes apt-get update apt-get install -y libxml2 libxml2-dev libxslt1.1 libxslt1-dev libffi-dev libssl-dev libpq-dev libmysqlclient-dev #!/bin/bash for file in /u12pytpls/version/*; do $file done
1ff1e21097895fe76ee54e19e1516dba355b0d9a
client/home/home.tpl.html
client/home/home.tpl.html
<div class="off-canvas-wrap" data-offcanvas> <div class="inner-wrap"> <!-- Off Canvas Menu --> <aside class="left-off-canvas-menu"> <!-- whatever you want goes here --> <div ui-view="sidebar"></div> </aside> <!-- main content goes here --> <div ui-view="graph"></div> <!-- close the off-canvas menu --> <!-- <a class="exit-off-canvas"></a> --> <a class="button small left-off-canvas-toggle">Menu</a> <span ng-controller="ModalDemoCtrl"> <script type="text/ng-template" id="myModalContent.html"> </script> <button class="button small" ng-click="open()">Upload a song</button> </span> <audio src={{sharedState.songPath}} controls auto-play></audio> {{sharedState.title}} - {{sharedState.artist}} </div> </div>
<div class="off-canvas-wrap" data-offcanvas> <div class="inner-wrap"> <!-- Off Canvas Menu --> <aside class="left-off-canvas-menu"> <!-- whatever you want goes here --> <div ui-view="sidebar"></div> </aside> <!-- main content goes here --> <div ui-view="graph"></div> <div class="menu top-bar"> <a class="button tiny left-off-canvas-toggle menu-icon">Menu</a> <span ng-controller="ModalDemoCtrl"> <button class="button tiny" ng-click="open()">Upload a song</button> </span> <audio src={{sharedState.songPath}} controls auto-play></audio> <span>{{sharedState.title}} - {{sharedState.artist}}</span> </div> </div> </div>
Change bottom bar a bit
Change bottom bar a bit
HTML
mit
mojsart/mojsart,jammiemountz/mojsart,jammiemountz/mojsart,jammiemountz/mojsart,mojsart/mojsart
html
## Code Before: <div class="off-canvas-wrap" data-offcanvas> <div class="inner-wrap"> <!-- Off Canvas Menu --> <aside class="left-off-canvas-menu"> <!-- whatever you want goes here --> <div ui-view="sidebar"></div> </aside> <!-- main content goes here --> <div ui-view="graph"></div> <!-- close the off-canvas menu --> <!-- <a class="exit-off-canvas"></a> --> <a class="button small left-off-canvas-toggle">Menu</a> <span ng-controller="ModalDemoCtrl"> <script type="text/ng-template" id="myModalContent.html"> </script> <button class="button small" ng-click="open()">Upload a song</button> </span> <audio src={{sharedState.songPath}} controls auto-play></audio> {{sharedState.title}} - {{sharedState.artist}} </div> </div> ## Instruction: Change bottom bar a bit ## Code After: <div class="off-canvas-wrap" data-offcanvas> <div class="inner-wrap"> <!-- Off Canvas Menu --> <aside class="left-off-canvas-menu"> <!-- whatever you want goes here --> <div ui-view="sidebar"></div> </aside> <!-- main content goes here --> <div ui-view="graph"></div> <div class="menu top-bar"> <a class="button tiny left-off-canvas-toggle menu-icon">Menu</a> <span ng-controller="ModalDemoCtrl"> <button class="button tiny" ng-click="open()">Upload a song</button> </span> <audio src={{sharedState.songPath}} controls auto-play></audio> <span>{{sharedState.title}} - {{sharedState.artist}}</span> </div> </div> </div>
20a08561bc1e08e4637aab7a0cd8cb54807a817c
config/database.yml
config/database.yml
development: prepared_statements: false adapter: postgresql database: discourse_development min_messages: warning pool: 5 timeout: 5000 host_names: ### Don't include the port number here. Change the "port" site setting instead, at /admin/site_settings. ### If you change this setting you will need to ### - restart sidekiq if you change this setting ### - rebake all to posts using: `RAILS_ENV=production bundle exec rake posts:rebake` - "localhost" # Warning: The database defined as "test" will be erased and # re-generated from your development database when you run "rake". # Do not set this db to the same as development or production. test: adapter: postgresql database: discourse_test min_messages: warning pool: 5 timeout: 5000 host_names: - test.localhost # profile db is used for benchmarking using the script/bench.rb script profile: prepared_statements: false adapter: postgresql database: discourse_profile min_messages: warning pool: 5 timeout: 5000 host_names: - "localhost" # You may be surprised production is not here, it is sourced from application.rb using a monkey patch # This is done for 2 reasons # # 1. we need to support blank settings correctly and rendering nothing in yaml/erb is a PITA # 2. why go from object -> yaml -> object, pointless
development: prepared_statements: false adapter: postgresql database: discourse_development min_messages: warning pool: 5 timeout: 5000 host_names: ### Don't include the port number here. Change the "port" site setting instead, at /admin/site_settings. ### If you change this setting you will need to ### - restart sidekiq if you change this setting ### - rebake all to posts using: `RAILS_ENV=production bundle exec rake posts:rebake` - "localhost" # Warning: The database defined as "test" will be erased and # re-generated from your development database when you run "rake". # Do not set this db to the same as development or production. test: prepared_statements: false adapter: postgresql database: discourse_test min_messages: warning pool: 5 timeout: 5000 host_names: - test.localhost # profile db is used for benchmarking using the script/bench.rb script profile: prepared_statements: false adapter: postgresql database: discourse_profile min_messages: warning pool: 5 timeout: 5000 host_names: - "localhost" # You may be surprised production is not here, it is sourced from application.rb using a monkey patch # This is done for 2 reasons # # 1. we need to support blank settings correctly and rendering nothing in yaml/erb is a PITA # 2. why go from object -> yaml -> object, pointless
Make PgSQL happy ("ActiveRecord::StatementInvalid: PG::ProtocolViolation").
Make PgSQL happy ("ActiveRecord::StatementInvalid: PG::ProtocolViolation"). See https://meta.discourse.org/t/install-error-protocol-violation-with-postgresql/35160
YAML
mit
natefinch/discourse,natefinch/discourse
yaml
## Code Before: development: prepared_statements: false adapter: postgresql database: discourse_development min_messages: warning pool: 5 timeout: 5000 host_names: ### Don't include the port number here. Change the "port" site setting instead, at /admin/site_settings. ### If you change this setting you will need to ### - restart sidekiq if you change this setting ### - rebake all to posts using: `RAILS_ENV=production bundle exec rake posts:rebake` - "localhost" # Warning: The database defined as "test" will be erased and # re-generated from your development database when you run "rake". # Do not set this db to the same as development or production. test: adapter: postgresql database: discourse_test min_messages: warning pool: 5 timeout: 5000 host_names: - test.localhost # profile db is used for benchmarking using the script/bench.rb script profile: prepared_statements: false adapter: postgresql database: discourse_profile min_messages: warning pool: 5 timeout: 5000 host_names: - "localhost" # You may be surprised production is not here, it is sourced from application.rb using a monkey patch # This is done for 2 reasons # # 1. we need to support blank settings correctly and rendering nothing in yaml/erb is a PITA # 2. why go from object -> yaml -> object, pointless ## Instruction: Make PgSQL happy ("ActiveRecord::StatementInvalid: PG::ProtocolViolation"). See https://meta.discourse.org/t/install-error-protocol-violation-with-postgresql/35160 ## Code After: development: prepared_statements: false adapter: postgresql database: discourse_development min_messages: warning pool: 5 timeout: 5000 host_names: ### Don't include the port number here. Change the "port" site setting instead, at /admin/site_settings. ### If you change this setting you will need to ### - restart sidekiq if you change this setting ### - rebake all to posts using: `RAILS_ENV=production bundle exec rake posts:rebake` - "localhost" # Warning: The database defined as "test" will be erased and # re-generated from your development database when you run "rake". # Do not set this db to the same as development or production. test: prepared_statements: false adapter: postgresql database: discourse_test min_messages: warning pool: 5 timeout: 5000 host_names: - test.localhost # profile db is used for benchmarking using the script/bench.rb script profile: prepared_statements: false adapter: postgresql database: discourse_profile min_messages: warning pool: 5 timeout: 5000 host_names: - "localhost" # You may be surprised production is not here, it is sourced from application.rb using a monkey patch # This is done for 2 reasons # # 1. we need to support blank settings correctly and rendering nothing in yaml/erb is a PITA # 2. why go from object -> yaml -> object, pointless
1fa980a3a0ac518948d69e273c1ff501ff3f23b6
app/views/hub/topics/_topic.html.erb
app/views/hub/topics/_topic.html.erb
<%= render partial: 'topic_common', locals: { topic: topic, refresh_heads_bar: true } -%>
<%= render partial: 'topic_common', locals: { topic: topic, refresh_heads_bar: refresh_heads_bar } -%>
Refresh heads bar are required to get from index and show page.
Refresh heads bar are required to get from index and show page.
HTML+ERB
mit
bayetech/hubs,bayetech/hubs,bayetech/hubs,bayetech/hubs
html+erb
## Code Before: <%= render partial: 'topic_common', locals: { topic: topic, refresh_heads_bar: true } -%> ## Instruction: Refresh heads bar are required to get from index and show page. ## Code After: <%= render partial: 'topic_common', locals: { topic: topic, refresh_heads_bar: refresh_heads_bar } -%>
5970b784543cfedc8aa09dd405ab79d50e327bdb
index.js
index.js
'use strict'; var commentMarker = require('mdast-comment-marker'); module.exports = commentconfig; /* Modify `processor` to read configuration from comments. */ function commentconfig() { var Parser = this.Parser; var Compiler = this.Compiler; var block = Parser && Parser.prototype.blockTokenizers; var inline = Parser && Parser.prototype.inlineTokenizers; var compiler = Compiler && Compiler.prototype.visitors; if (block && block.html) { block.html = factory(block.html); } if (inline && inline.html) { inline.html = factory(inline.html); } if (compiler && compiler.html) { compiler.html = factory(compiler.html); } } /* Wrapper factory. */ function factory(original) { replacement.locator = original.locator; return replacement; /* Replacer for tokeniser or visitor. */ function replacement(node) { var self = this; var result = original.apply(self, arguments); var marker = commentMarker(result && result.type ? result : node); if (marker && marker.name === 'remark') { try { self.setOptions(marker.parameters); } catch (err) { self.file.fail(err.message, marker.node); } } return result; } }
'use strict'; var commentMarker = require('mdast-comment-marker'); module.exports = commentconfig; /* Modify `processor` to read configuration from comments. */ function commentconfig() { var proto = this.Parser && this.Parser.prototype; var Compiler = this.Compiler; var block = proto && proto.blockTokenizers; var inline = proto && proto.inlineTokenizers; var compiler = Compiler && Compiler.prototype && Compiler.prototype.visitors; if (block && block.html) { block.html = factory(block.html); } if (inline && inline.html) { inline.html = factory(inline.html); } if (compiler && compiler.html) { compiler.html = factory(compiler.html); } } /* Wrapper factory. */ function factory(original) { replacement.locator = original.locator; return replacement; /* Replacer for tokeniser or visitor. */ function replacement(node) { var self = this; var result = original.apply(self, arguments); var marker = commentMarker(result && result.type ? result : node); if (marker && marker.name === 'remark') { try { self.setOptions(marker.parameters); } catch (err) { self.file.fail(err.message, marker.node); } } return result; } }
Fix for non-remark parsers or compilers
Fix for non-remark parsers or compilers
JavaScript
mit
wooorm/mdast-comment-config,wooorm/remark-comment-config
javascript
## Code Before: 'use strict'; var commentMarker = require('mdast-comment-marker'); module.exports = commentconfig; /* Modify `processor` to read configuration from comments. */ function commentconfig() { var Parser = this.Parser; var Compiler = this.Compiler; var block = Parser && Parser.prototype.blockTokenizers; var inline = Parser && Parser.prototype.inlineTokenizers; var compiler = Compiler && Compiler.prototype.visitors; if (block && block.html) { block.html = factory(block.html); } if (inline && inline.html) { inline.html = factory(inline.html); } if (compiler && compiler.html) { compiler.html = factory(compiler.html); } } /* Wrapper factory. */ function factory(original) { replacement.locator = original.locator; return replacement; /* Replacer for tokeniser or visitor. */ function replacement(node) { var self = this; var result = original.apply(self, arguments); var marker = commentMarker(result && result.type ? result : node); if (marker && marker.name === 'remark') { try { self.setOptions(marker.parameters); } catch (err) { self.file.fail(err.message, marker.node); } } return result; } } ## Instruction: Fix for non-remark parsers or compilers ## Code After: 'use strict'; var commentMarker = require('mdast-comment-marker'); module.exports = commentconfig; /* Modify `processor` to read configuration from comments. */ function commentconfig() { var proto = this.Parser && this.Parser.prototype; var Compiler = this.Compiler; var block = proto && proto.blockTokenizers; var inline = proto && proto.inlineTokenizers; var compiler = Compiler && Compiler.prototype && Compiler.prototype.visitors; if (block && block.html) { block.html = factory(block.html); } if (inline && inline.html) { inline.html = factory(inline.html); } if (compiler && compiler.html) { compiler.html = factory(compiler.html); } } /* Wrapper factory. */ function factory(original) { replacement.locator = original.locator; return replacement; /* Replacer for tokeniser or visitor. */ function replacement(node) { var self = this; var result = original.apply(self, arguments); var marker = commentMarker(result && result.type ? result : node); if (marker && marker.name === 'remark') { try { self.setOptions(marker.parameters); } catch (err) { self.file.fail(err.message, marker.node); } } return result; } }
e4c288af36bf36188e5c1c25513877718883adb6
tests/integration/components/license-picker/component-test.js
tests/integration/components/license-picker/component-test.js
import Ember from 'ember'; import FakeServer, { stubRequest } from 'ember-cli-fake-server'; import config from 'ember-get-config'; import { moduleForComponent, test } from 'ember-qunit'; moduleForComponent('license-picker', 'Integration | Component | license picker', { integration: true }); function render(ctx, args) { let noop = () => {}; this.set('noop', noop); let licenses = [{ name: 'Without', text: 'This is a license without input fields', requiredFields: [] }, { name: 'No license', text: '{{yearRequired}} {{copyrightHolders}}', required_fields: ['yearRequired', 'copyrightHolders'] }] ctx.set('licenses', licenses); return ctx.render(Ember.HTMLBars.compile(`{{license-picker ${args && args.indexOf('editLicense') === -1 ? 'editLicense=(action noop)' : ''} allowDismiss=false licenses=licenses pressSubmit=(action noop) ${args || ''} }}`)); } test('it renders', function(assert) { render(this); assert.ok(true); }); test('default values cause autosave to trigger', function(assert) { let called = false; const autosaveFunc = () => { called = true; } this.set('autosaveFunc', autosaveFunc); let currentValues = {}; this.set('currentValues', currentValues); render(this, 'editLicense=autosaveFunc autosave=true currentValues=currentValues'); assert.ok(called); }); test('passing currentValues does not trigger autosave', function(assert) { let called = false; const autosaveFunc = () => { called = true; } this.set('autosaveFunc', autosaveFunc); let currentValues = { year: '2017', copyrightHolders: 'Henrique', nodeLicense: { id: 'a license' } }; this.set('currentValues', currentValues); render(this, 'editLicense=autosaveFunc autosave=true currentValues=currentValues'); assert.ok(!called); });
import Ember from 'ember'; import { moduleForComponent, test } from 'ember-qunit'; moduleForComponent('license-picker', 'Integration | Component | license picker', { integration: true }); function render(ctx, args) { ctx.set('currentValues', {}); ctx.set('noop', () => {}); ctx.set('licenses', [{ name: 'Without', text: 'This is a license without input fields', requiredFields: [] }, { name: 'No license', text: '{{yearRequired}} {{copyrightHolders}}', required_fields: ['yearRequired', 'copyrightHolders'] }]); return ctx.render(Ember.HTMLBars.compile(`{{license-picker ${args && args.indexOf('editLicense') === -1 ? 'editLicense=(action noop)' : ''} allowDismiss=false licenses=licenses currentValues=currentValues pressSubmit=(action noop) ${args || ''} }}`)); } test('it renders', function(assert) { render(this); assert.ok(true); });
Fix linting, remove tests dependent on observables
Fix linting, remove tests dependent on observables
JavaScript
apache-2.0
binoculars/ember-osf,CenterForOpenScience/ember-osf,binoculars/ember-osf,jamescdavis/ember-osf,baylee-d/ember-osf,crcresearch/ember-osf,jamescdavis/ember-osf,chrisseto/ember-osf,CenterForOpenScience/ember-osf,baylee-d/ember-osf,chrisseto/ember-osf,crcresearch/ember-osf
javascript
## Code Before: import Ember from 'ember'; import FakeServer, { stubRequest } from 'ember-cli-fake-server'; import config from 'ember-get-config'; import { moduleForComponent, test } from 'ember-qunit'; moduleForComponent('license-picker', 'Integration | Component | license picker', { integration: true }); function render(ctx, args) { let noop = () => {}; this.set('noop', noop); let licenses = [{ name: 'Without', text: 'This is a license without input fields', requiredFields: [] }, { name: 'No license', text: '{{yearRequired}} {{copyrightHolders}}', required_fields: ['yearRequired', 'copyrightHolders'] }] ctx.set('licenses', licenses); return ctx.render(Ember.HTMLBars.compile(`{{license-picker ${args && args.indexOf('editLicense') === -1 ? 'editLicense=(action noop)' : ''} allowDismiss=false licenses=licenses pressSubmit=(action noop) ${args || ''} }}`)); } test('it renders', function(assert) { render(this); assert.ok(true); }); test('default values cause autosave to trigger', function(assert) { let called = false; const autosaveFunc = () => { called = true; } this.set('autosaveFunc', autosaveFunc); let currentValues = {}; this.set('currentValues', currentValues); render(this, 'editLicense=autosaveFunc autosave=true currentValues=currentValues'); assert.ok(called); }); test('passing currentValues does not trigger autosave', function(assert) { let called = false; const autosaveFunc = () => { called = true; } this.set('autosaveFunc', autosaveFunc); let currentValues = { year: '2017', copyrightHolders: 'Henrique', nodeLicense: { id: 'a license' } }; this.set('currentValues', currentValues); render(this, 'editLicense=autosaveFunc autosave=true currentValues=currentValues'); assert.ok(!called); }); ## Instruction: Fix linting, remove tests dependent on observables ## Code After: import Ember from 'ember'; import { moduleForComponent, test } from 'ember-qunit'; moduleForComponent('license-picker', 'Integration | Component | license picker', { integration: true }); function render(ctx, args) { ctx.set('currentValues', {}); ctx.set('noop', () => {}); ctx.set('licenses', [{ name: 'Without', text: 'This is a license without input fields', requiredFields: [] }, { name: 'No license', text: '{{yearRequired}} {{copyrightHolders}}', required_fields: ['yearRequired', 'copyrightHolders'] }]); return ctx.render(Ember.HTMLBars.compile(`{{license-picker ${args && args.indexOf('editLicense') === -1 ? 'editLicense=(action noop)' : ''} allowDismiss=false licenses=licenses currentValues=currentValues pressSubmit=(action noop) ${args || ''} }}`)); } test('it renders', function(assert) { render(this); assert.ok(true); });
9618969bc90d3e375b9535e9444ac8593ea80e20
Technotes/RestoreToFactory.md
Technotes/RestoreToFactory.md
Here’s how to start over with untouched preferences and default feeds: 1. Quit Evergreen if it’s running. 2. Delete the application support folder. On the command line, do: `rm -rf ~/Library/Application\ Support/Evergreen/` 3. Delete the preferences. Just deleting the file won’t do the trick — it’s necessary to use the command line. Do: `defaults delete com.ranchero.Evergreen` Launch Evergreen. You should have the default feeds, and all preferences should be reset to their default settings.
Here’s how to start over with untouched preferences and default feeds: 1. Quit Evergreen if it’s running. 2. Delete the application support folder. On the command line, do: `rm -rf ~/Library/Application\ Support/Evergreen/` 3. Delete the preferences. Just deleting the file won’t do the trick — it’s necessary to use the command line. Do: `defaults delete com.ranchero.Evergreen` and then `killall cfprefsd` Launch Evergreen. You should have the default feeds, and all preferences should be reset to their default settings. #### Alternate version Run the [cleanPrefsAndData](./cleanPrefsAndData) script instead of doing the above manually.
Add note about the cleanPrefsAndData script.
Add note about the cleanPrefsAndData script.
Markdown
mit
brentsimmons/Evergreen,brentsimmons/Evergreen,brentsimmons/Evergreen,brentsimmons/Evergreen
markdown
## Code Before: Here’s how to start over with untouched preferences and default feeds: 1. Quit Evergreen if it’s running. 2. Delete the application support folder. On the command line, do: `rm -rf ~/Library/Application\ Support/Evergreen/` 3. Delete the preferences. Just deleting the file won’t do the trick — it’s necessary to use the command line. Do: `defaults delete com.ranchero.Evergreen` Launch Evergreen. You should have the default feeds, and all preferences should be reset to their default settings. ## Instruction: Add note about the cleanPrefsAndData script. ## Code After: Here’s how to start over with untouched preferences and default feeds: 1. Quit Evergreen if it’s running. 2. Delete the application support folder. On the command line, do: `rm -rf ~/Library/Application\ Support/Evergreen/` 3. Delete the preferences. Just deleting the file won’t do the trick — it’s necessary to use the command line. Do: `defaults delete com.ranchero.Evergreen` and then `killall cfprefsd` Launch Evergreen. You should have the default feeds, and all preferences should be reset to their default settings. #### Alternate version Run the [cleanPrefsAndData](./cleanPrefsAndData) script instead of doing the above manually.
e09f1665645814d15c55f85370c40ac9ac57827d
spec/rubocop/cop/force_spec.rb
spec/rubocop/cop/force_spec.rb
RSpec.describe RuboCop::Cop::Force do subject(:force) { described_class.new(cops) } let(:cops) { [double('cop1'), double('cop2')] } describe '.force_name' do it 'returns the class name without namespace' do expect(RuboCop::Cop::VariableForce.force_name).to eq('VariableForce') end end describe '#run_hook' do it 'invokes a hook in all cops' do expect(cops).to all(receive(:some_hook).with(:foo, :bar)) force.run_hook(:some_hook, :foo, :bar) end it 'does not invoke a hook if the cop does not respond to the hook' do expect(cops.last).to receive(:some_hook).with(:foo, :bar) force.run_hook(:some_hook, :foo, :bar) end end end
RSpec.describe RuboCop::Cop::Force do subject(:force) { described_class.new(cops) } let(:cops) do [ instance_double(RuboCop::Cop::Cop), instance_double(RuboCop::Cop::Cop) ] end describe '.force_name' do it 'returns the class name without namespace' do expect(RuboCop::Cop::VariableForce.force_name).to eq('VariableForce') end end describe '#run_hook' do it 'invokes a hook in all cops' do expect(cops).to all(receive(:message).with(:foo)) force.run_hook(:message, :foo) end end end
Use verifying doubles in Force spec
Use verifying doubles in Force spec
Ruby
mit
petehamilton/rubocop,deivid-rodriguez/rubocop,bquorning/rubocop,palkan/rubocop,petehamilton/rubocop,jmks/rubocop,meganemura/rubocop,jfelchner/rubocop,panthomakos/rubocop,bbatsov/rubocop,bquorning/rubocop,bbatsov/rubocop,rrosenblum/rubocop,mikegee/rubocop,vergenzt/rubocop,maxjacobson/rubocop,maxjacobson/rubocop,deivid-rodriguez/rubocop,vergenzt/rubocop,tejasbubane/rubocop,jmks/rubocop,bquorning/rubocop,tejasbubane/rubocop,meganemura/rubocop,mikegee/rubocop,mikegee/rubocop,tdeo/rubocop,sue445/rubocop,jmks/rubocop,petehamilton/rubocop,deivid-rodriguez/rubocop,vergenzt/rubocop,palkan/rubocop,tejasbubane/rubocop,sue445/rubocop,palkan/rubocop,smakagon/rubocop,meganemura/rubocop,smakagon/rubocop,tdeo/rubocop,rrosenblum/rubocop,maxjacobson/rubocop,panthomakos/rubocop,sue445/rubocop,rrosenblum/rubocop,tdeo/rubocop,jfelchner/rubocop,jfelchner/rubocop,panthomakos/rubocop
ruby
## Code Before: RSpec.describe RuboCop::Cop::Force do subject(:force) { described_class.new(cops) } let(:cops) { [double('cop1'), double('cop2')] } describe '.force_name' do it 'returns the class name without namespace' do expect(RuboCop::Cop::VariableForce.force_name).to eq('VariableForce') end end describe '#run_hook' do it 'invokes a hook in all cops' do expect(cops).to all(receive(:some_hook).with(:foo, :bar)) force.run_hook(:some_hook, :foo, :bar) end it 'does not invoke a hook if the cop does not respond to the hook' do expect(cops.last).to receive(:some_hook).with(:foo, :bar) force.run_hook(:some_hook, :foo, :bar) end end end ## Instruction: Use verifying doubles in Force spec ## Code After: RSpec.describe RuboCop::Cop::Force do subject(:force) { described_class.new(cops) } let(:cops) do [ instance_double(RuboCop::Cop::Cop), instance_double(RuboCop::Cop::Cop) ] end describe '.force_name' do it 'returns the class name without namespace' do expect(RuboCop::Cop::VariableForce.force_name).to eq('VariableForce') end end describe '#run_hook' do it 'invokes a hook in all cops' do expect(cops).to all(receive(:message).with(:foo)) force.run_hook(:message, :foo) end end end
771d430f93104d9b1b28665ec790bd9e0535f9a1
build/10-deps-apt.sh
build/10-deps-apt.sh
set -o errexit # Coffee counter # # LICENSE: MIT # # @project coffee # @package deployment # @author André Lademann <[email protected]> # Directories mkdir -p ~/.ssh # Install dependencies apt-get update &&\ apt-get install \ curl \ git-core \ firmware-ralink \ festival \ festival-doc \ festival-freebsoft-utils \ libsox-fmt-all \ mc \ nodered \ python-rpi.gpio \ sox \ vim \ wget \ wireless-tools # Current nodejs version npm cache clean -f npm install -g n n stable # Node-RED npm install -g node-red # Configure dependencies echo -e "\nsyntax on\nset background=dark\nset mouse=a\n" >> /etc/vim/vimrc
set -o errexit # Coffee counter # # LICENSE: MIT # # @project coffee # @package deployment # @author André Lademann <[email protected]> # Directories mkdir -p ~/.ssh # Install dependencies apt-get update &&\ apt-get install \ curl \ git-core \ firmware-ralink \ festival \ festival-doc \ festival-freebsoft-utils \ libsox-fmt-all \ mc \ nodered \ python-rpi.gpio \ sox \ vim \ wget \ wireless-tools # Install nodejs in version 6 npm cache clean -f npm install -g n n 6 # Node-RED npm install -g --unsafe-perm node-red # Configure dependencies echo -e "\nsyntax on\nset background=dark\nset mouse=a\n" >> /etc/vim/vimrc
Upgrade node to version 6
Upgrade node to version 6
Shell
mit
vergissberlin/coffee-bin,vergissberlin/coffee-bin,vergissberlin/raspberry-coffee,vergissberlin/raspberry-coffee,vergissberlin/raspberry-coffee,vergissberlin/coffee-bin
shell
## Code Before: set -o errexit # Coffee counter # # LICENSE: MIT # # @project coffee # @package deployment # @author André Lademann <[email protected]> # Directories mkdir -p ~/.ssh # Install dependencies apt-get update &&\ apt-get install \ curl \ git-core \ firmware-ralink \ festival \ festival-doc \ festival-freebsoft-utils \ libsox-fmt-all \ mc \ nodered \ python-rpi.gpio \ sox \ vim \ wget \ wireless-tools # Current nodejs version npm cache clean -f npm install -g n n stable # Node-RED npm install -g node-red # Configure dependencies echo -e "\nsyntax on\nset background=dark\nset mouse=a\n" >> /etc/vim/vimrc ## Instruction: Upgrade node to version 6 ## Code After: set -o errexit # Coffee counter # # LICENSE: MIT # # @project coffee # @package deployment # @author André Lademann <[email protected]> # Directories mkdir -p ~/.ssh # Install dependencies apt-get update &&\ apt-get install \ curl \ git-core \ firmware-ralink \ festival \ festival-doc \ festival-freebsoft-utils \ libsox-fmt-all \ mc \ nodered \ python-rpi.gpio \ sox \ vim \ wget \ wireless-tools # Install nodejs in version 6 npm cache clean -f npm install -g n n 6 # Node-RED npm install -g --unsafe-perm node-red # Configure dependencies echo -e "\nsyntax on\nset background=dark\nset mouse=a\n" >> /etc/vim/vimrc
7febb61addd29f2159f90d126714d78388350cba
lib/capistrano-deploy/newrelic.rb
lib/capistrano-deploy/newrelic.rb
require 'new_relic/recipes' module CapistranoDeploy module Newrelic def self.load_into(configuration) configuration.load do set(:new_relic_user) { (%x(git config user.name)).chomp } set(:current_revision) { capture("cd #{deploy_to} && git rev-parse HEAD").chomp } set(:link) { "https://api.newrelic.com/deployments.xml" } namespace :newrelic do task :notice_deployment do run "curl -H '#{new_relic_api_key}' -d 'deployment[app_name]=#{new_relic_app_name}' -d 'deployment[revision]=#{current_revision}' -d 'deployment[user]=#{new_relic_user}' #{link}" end end end end end end
require 'new_relic/recipes' module CapistranoDeploy module Newrelic def self.load_into(configuration) configuration.load do set(:new_relic_user) { (%x(git config user.name)).chomp } set(:current_revision) { capture("cd #{deploy_to} && git rev-parse HEAD").chomp } set(:link) { "https://api.newrelic.com/deployments.xml" } namespace :newrelic do task :notice_deployment do run "curl -H '#{new_relic_api_key}' -d 'deployment[app_name]=#{new_relic_app_name}' -d 'deployment[revision]=#{current_revision}' -d 'deployment[user]=#{new_relic_user}' -d deployment[description]='#{current_stage}' #{link}" end end end end end end
Add description to deployment hook
Add description to deployment hook * Add description variable that will hold the stage of the project on deploy.
Ruby
mit
amaabca/capistrano-amadeploy
ruby
## Code Before: require 'new_relic/recipes' module CapistranoDeploy module Newrelic def self.load_into(configuration) configuration.load do set(:new_relic_user) { (%x(git config user.name)).chomp } set(:current_revision) { capture("cd #{deploy_to} && git rev-parse HEAD").chomp } set(:link) { "https://api.newrelic.com/deployments.xml" } namespace :newrelic do task :notice_deployment do run "curl -H '#{new_relic_api_key}' -d 'deployment[app_name]=#{new_relic_app_name}' -d 'deployment[revision]=#{current_revision}' -d 'deployment[user]=#{new_relic_user}' #{link}" end end end end end end ## Instruction: Add description to deployment hook * Add description variable that will hold the stage of the project on deploy. ## Code After: require 'new_relic/recipes' module CapistranoDeploy module Newrelic def self.load_into(configuration) configuration.load do set(:new_relic_user) { (%x(git config user.name)).chomp } set(:current_revision) { capture("cd #{deploy_to} && git rev-parse HEAD").chomp } set(:link) { "https://api.newrelic.com/deployments.xml" } namespace :newrelic do task :notice_deployment do run "curl -H '#{new_relic_api_key}' -d 'deployment[app_name]=#{new_relic_app_name}' -d 'deployment[revision]=#{current_revision}' -d 'deployment[user]=#{new_relic_user}' -d deployment[description]='#{current_stage}' #{link}" end end end end end end
a96c345f57a957284ff7db0bfafdfc6c1c72a68e
salt/reactors/mitxpro/edxapp_highstate.sls
salt/reactors/mitxpro/edxapp_highstate.sls
edxapp_highstate: local.state.apply: - tgt: 'edx-*mitxpro-production-xpro-production-*' - queue: True - kwargs: pillar: edx: ansible_flags: '--tags install:configuration'
{% set payload = data['message']|load_json %} {% set instanceid = payload['Message']|load_json %} {% set ENVIRONMENT = 'mitxpro-production' %} edxapp_highstate: local.state.sls: - tgt: 'edx-{{ ENVIRONMENT }}-xpro-production-{{ instanceid['EC2InstanceId'].strip('i-') }}' - queue: True - arg: - edx.prod - kwargs: pillar: edx: ansible_flags: '--tags install:configuration'
Replace highstate with call to edx.deploy
Replace highstate with call to edx.deploy
SaltStack
bsd-3-clause
mitodl/salt-ops,mitodl/salt-ops
saltstack
## Code Before: edxapp_highstate: local.state.apply: - tgt: 'edx-*mitxpro-production-xpro-production-*' - queue: True - kwargs: pillar: edx: ansible_flags: '--tags install:configuration' ## Instruction: Replace highstate with call to edx.deploy ## Code After: {% set payload = data['message']|load_json %} {% set instanceid = payload['Message']|load_json %} {% set ENVIRONMENT = 'mitxpro-production' %} edxapp_highstate: local.state.sls: - tgt: 'edx-{{ ENVIRONMENT }}-xpro-production-{{ instanceid['EC2InstanceId'].strip('i-') }}' - queue: True - arg: - edx.prod - kwargs: pillar: edx: ansible_flags: '--tags install:configuration'
bc76461a2e78f6a3ccd09e66cccd6bcef526b92e
.bumpversion.cfg
.bumpversion.cfg
[bumpversion] current_version = 1.30.0 commit = True tag = True [bumpversion:file:setup.cfg] [bumpversion:file:pyglui/__init__.py] [bumpversion:file:pyglui/graph.pyx] [bumpversion:file:pyglui/ui.pyx]
[bumpversion] current_version = 1.30.0 commit = True tag = True [bumpversion:file:setup.cfg] [bumpversion:file:src/pyglui/__init__.py] [bumpversion:file:src/pyglui/graph.pyx] [bumpversion:file:src/pyglui/ui.pyx]
Fix file paths after module has been moved into src directory
.bump2version.cfg: Fix file paths after module has been moved into src directory
INI
mit
pupil-labs/pyglui,pupil-labs/pyglui
ini
## Code Before: [bumpversion] current_version = 1.30.0 commit = True tag = True [bumpversion:file:setup.cfg] [bumpversion:file:pyglui/__init__.py] [bumpversion:file:pyglui/graph.pyx] [bumpversion:file:pyglui/ui.pyx] ## Instruction: .bump2version.cfg: Fix file paths after module has been moved into src directory ## Code After: [bumpversion] current_version = 1.30.0 commit = True tag = True [bumpversion:file:setup.cfg] [bumpversion:file:src/pyglui/__init__.py] [bumpversion:file:src/pyglui/graph.pyx] [bumpversion:file:src/pyglui/ui.pyx]
e859feaed2e814ea26b19179f706f365323523d7
conda.recipe/build.sh
conda.recipe/build.sh
if [ "$(uname)" == "Darwin" ]; then # C++11 finagling for Mac OSX export CC=clang export CXX=clang++ export MACOSX_VERSION_MIN="10.9" CXXFLAGS="${CXXFLAGS} -mmacosx-version-min=${MACOSX_VERSION_MIN}" CXXFLAGS="${CXXFLAGS} -Wno-error=unused-command-line-argument" export LDFLAGS="${LDFLAGS} -mmacosx-version-min=${MACOSX_VERSION_MIN}" export LINKFLAGS="${LDFLAGS}" export MACOSX_DEPLOYMENT_TARGET=10.9 # make sure clang-format is installed # e.g. brew install clang-format # make sure autoreconf can be found # e.g. brew install autoconf # for graphviz, also brew install autogen libtool fi make install PREFIX=$PREFIX
if [ "$(uname)" == "Darwin" ]; then # C++11 finagling for Mac OSX export CC=clang export CXX=clang++ export MACOSX_VERSION_MIN="10.9" CXXFLAGS="${CXXFLAGS} -mmacosx-version-min=${MACOSX_VERSION_MIN}" CXXFLAGS="${CXXFLAGS} -Wno-error=unused-command-line-argument" export LDFLAGS="${LDFLAGS} -mmacosx-version-min=${MACOSX_VERSION_MIN}" export LINKFLAGS="${LDFLAGS}" export MACOSX_DEPLOYMENT_TARGET=10.9 # make sure clang-format is installed # e.g. brew install clang-format # make sure autoreconf can be found # e.g. brew install autoconf # for graphviz, also brew install autogen libtool fi make install PREFIX=$PREFIX # add the /util directory to the PATH inside this conda env # http://conda.pydata.org/docs/using/envs.html#saved-environment-variables cat << EOF > ${PKG_NAME}-env-activate.sh #!/usr/bin/env bash export PRE_${PKG_NAME}_PATH=\$PATH export PATH=\$CONDA_PREFIX/util:$PATH EOF cat << EOF > ${PKG_NAME}-env-deactivate.sh #!/usr/bin/env bash export PATH=\$PRE_${PKG_NAME}_PATH unset PRE_${PKG_NAME}_PATH EOF mkdir -p $PREFIX/etc/conda/activate.d mkdir -p $PREFIX/etc/conda/deactivate.d mv ${PKG_NAME}-env-activate.sh $PREFIX/etc/conda/activate.d mv ${PKG_NAME}-env-deactivate.sh $PREFIX/etc/conda/deactivate.d
Add the deepdive util dir to PATH for the conda env
Add the deepdive util dir to PATH for the conda env
Shell
apache-2.0
sky-xu/deepdive,sky-xu/deepdive,HazyResearch/deepdive,HazyResearch/deepdive,HazyResearch/deepdive,shahin/deepdive,shahin/deepdive,HazyResearch/deepdive
shell
## Code Before: if [ "$(uname)" == "Darwin" ]; then # C++11 finagling for Mac OSX export CC=clang export CXX=clang++ export MACOSX_VERSION_MIN="10.9" CXXFLAGS="${CXXFLAGS} -mmacosx-version-min=${MACOSX_VERSION_MIN}" CXXFLAGS="${CXXFLAGS} -Wno-error=unused-command-line-argument" export LDFLAGS="${LDFLAGS} -mmacosx-version-min=${MACOSX_VERSION_MIN}" export LINKFLAGS="${LDFLAGS}" export MACOSX_DEPLOYMENT_TARGET=10.9 # make sure clang-format is installed # e.g. brew install clang-format # make sure autoreconf can be found # e.g. brew install autoconf # for graphviz, also brew install autogen libtool fi make install PREFIX=$PREFIX ## Instruction: Add the deepdive util dir to PATH for the conda env ## Code After: if [ "$(uname)" == "Darwin" ]; then # C++11 finagling for Mac OSX export CC=clang export CXX=clang++ export MACOSX_VERSION_MIN="10.9" CXXFLAGS="${CXXFLAGS} -mmacosx-version-min=${MACOSX_VERSION_MIN}" CXXFLAGS="${CXXFLAGS} -Wno-error=unused-command-line-argument" export LDFLAGS="${LDFLAGS} -mmacosx-version-min=${MACOSX_VERSION_MIN}" export LINKFLAGS="${LDFLAGS}" export MACOSX_DEPLOYMENT_TARGET=10.9 # make sure clang-format is installed # e.g. brew install clang-format # make sure autoreconf can be found # e.g. brew install autoconf # for graphviz, also brew install autogen libtool fi make install PREFIX=$PREFIX # add the /util directory to the PATH inside this conda env # http://conda.pydata.org/docs/using/envs.html#saved-environment-variables cat << EOF > ${PKG_NAME}-env-activate.sh #!/usr/bin/env bash export PRE_${PKG_NAME}_PATH=\$PATH export PATH=\$CONDA_PREFIX/util:$PATH EOF cat << EOF > ${PKG_NAME}-env-deactivate.sh #!/usr/bin/env bash export PATH=\$PRE_${PKG_NAME}_PATH unset PRE_${PKG_NAME}_PATH EOF mkdir -p $PREFIX/etc/conda/activate.d mkdir -p $PREFIX/etc/conda/deactivate.d mv ${PKG_NAME}-env-activate.sh $PREFIX/etc/conda/activate.d mv ${PKG_NAME}-env-deactivate.sh $PREFIX/etc/conda/deactivate.d
e538186d1c9d71b160dbde070ce5cefdcea7cc62
lib/olaf/tasks/test_task.rb
lib/olaf/tasks/test_task.rb
require 'ci/reporter/rake/minitest' require 'rake/testtask' OL_TEST_HELPER = File.join(File.dirname(__FILE__), "..", "test_helpers") Rake::TestTask.new do |t| t.libs << "test" t.ruby_opts.concat ["-r", OL_TEST_HELPER] # Helper FIRST t.test_files = FileList['test/**/*_test.rb'] t.verbose = true end
require 'ci/reporter/rake/minitest' require 'rake/testtask' OL_TEST_HELPER = File.join(File.dirname(__FILE__), "..", "test_helpers") Rake::TestTask.new do |t| t.libs << "test" t.ruby_opts.concat ["-r", OL_TEST_HELPER] # Helper FIRST t.test_files = FileList['test/**/*_test.rb'] - FileList['test/integration/*_test.rb'] t.verbose = true end Rake::TestTask.new("test:integration") do |t| t.libs << "test" t.ruby_opts.concat ["-r", OL_TEST_HELPER] # Helper FIRST t.test_files = FileList['test/integration/*_test.rb'] t.verbose = true end
Add test:integration to all Olaf Rakefiles, currently unused. VAL-232
Add test:integration to all Olaf Rakefiles, currently unused. VAL-232
Ruby
mit
onlive/olaf,onlive/olaf
ruby
## Code Before: require 'ci/reporter/rake/minitest' require 'rake/testtask' OL_TEST_HELPER = File.join(File.dirname(__FILE__), "..", "test_helpers") Rake::TestTask.new do |t| t.libs << "test" t.ruby_opts.concat ["-r", OL_TEST_HELPER] # Helper FIRST t.test_files = FileList['test/**/*_test.rb'] t.verbose = true end ## Instruction: Add test:integration to all Olaf Rakefiles, currently unused. VAL-232 ## Code After: require 'ci/reporter/rake/minitest' require 'rake/testtask' OL_TEST_HELPER = File.join(File.dirname(__FILE__), "..", "test_helpers") Rake::TestTask.new do |t| t.libs << "test" t.ruby_opts.concat ["-r", OL_TEST_HELPER] # Helper FIRST t.test_files = FileList['test/**/*_test.rb'] - FileList['test/integration/*_test.rb'] t.verbose = true end Rake::TestTask.new("test:integration") do |t| t.libs << "test" t.ruby_opts.concat ["-r", OL_TEST_HELPER] # Helper FIRST t.test_files = FileList['test/integration/*_test.rb'] t.verbose = true end
34ce387f6cf3b06beb7edab6376f98a0b6e2aae1
src/test/java/org/jstanier/InputParserTest.java
src/test/java/org/jstanier/InputParserTest.java
package org.jstanier; import static org.mockito.Mockito.when; import java.io.StringReader; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.InjectMocks; import org.mockito.Mock; import org.mockito.Mockito; import org.mockito.runners.MockitoJUnitRunner; import com.jstanier.InputParser; import com.jstanier.InputReader; @RunWith(MockitoJUnitRunner.class) public class InputParserTest { private static final String ONE_LINE_VALID_CSV = "1,\"The content of your tweet\""; @Mock private InputReader inputReader; @InjectMocks private InputParser inputParser; @Test public void parseInput_givenGivenOneCsvLine_thenOneTweetToScheduleIsReturned() { when(inputReader.getInputReader(Mockito.anyString())).thenReturn( new StringReader(ONE_LINE_VALID_CSV)); inputParser.parseInput(ONE_LINE_VALID_CSV); } }
package org.jstanier; import static org.mockito.Mockito.when; import java.io.StringReader; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.InjectMocks; import org.mockito.Mock; import org.mockito.Mockito; import org.mockito.runners.MockitoJUnitRunner; import com.jstanier.InputParser; import com.jstanier.InputReader; @RunWith(MockitoJUnitRunner.class) public class InputParserTest { private static final String ONE_LINE_VALID_CSV = "1,\"The content of your tweet\""; private static final String ONE_LINE_INVALID_DELIMITER_CSV = "1;\"The content of your tweet\""; private static final String NUMBER_STRING = "1"; @Mock private InputReader inputReader; @InjectMocks private InputParser inputParser; @Test public void parseInput_givenGivenOneCsvLine_thenOneTweetToScheduleIsReturned() { when(inputReader.getInputReader(Mockito.anyString())).thenReturn( new StringReader(ONE_LINE_VALID_CSV)); inputParser.parseInput(ONE_LINE_VALID_CSV); } @Test(expected = NumberFormatException.class) public void parseInput_givenGivenOneCsvLineWithInvalidDelimiter_thenANumberFormatExceptionIsThrown() { when(inputReader.getInputReader(Mockito.anyString())).thenReturn( new StringReader(ONE_LINE_INVALID_DELIMITER_CSV)); inputParser.parseInput(ONE_LINE_INVALID_DELIMITER_CSV); } @Test(expected = ArrayIndexOutOfBoundsException.class) public void parseInput_givenAStringWithOnlyANumber_thenAnArrayIndexOutOfBoundsExceptionIsThrown() { when(inputReader.getInputReader(Mockito.anyString())).thenReturn( new StringReader(NUMBER_STRING)); inputParser.parseInput(NUMBER_STRING); } }
Add tests for incorrect input
Add tests for incorrect input
Java
mit
jstanier/tweet-scheduler
java
## Code Before: package org.jstanier; import static org.mockito.Mockito.when; import java.io.StringReader; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.InjectMocks; import org.mockito.Mock; import org.mockito.Mockito; import org.mockito.runners.MockitoJUnitRunner; import com.jstanier.InputParser; import com.jstanier.InputReader; @RunWith(MockitoJUnitRunner.class) public class InputParserTest { private static final String ONE_LINE_VALID_CSV = "1,\"The content of your tweet\""; @Mock private InputReader inputReader; @InjectMocks private InputParser inputParser; @Test public void parseInput_givenGivenOneCsvLine_thenOneTweetToScheduleIsReturned() { when(inputReader.getInputReader(Mockito.anyString())).thenReturn( new StringReader(ONE_LINE_VALID_CSV)); inputParser.parseInput(ONE_LINE_VALID_CSV); } } ## Instruction: Add tests for incorrect input ## Code After: package org.jstanier; import static org.mockito.Mockito.when; import java.io.StringReader; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.InjectMocks; import org.mockito.Mock; import org.mockito.Mockito; import org.mockito.runners.MockitoJUnitRunner; import com.jstanier.InputParser; import com.jstanier.InputReader; @RunWith(MockitoJUnitRunner.class) public class InputParserTest { private static final String ONE_LINE_VALID_CSV = "1,\"The content of your tweet\""; private static final String ONE_LINE_INVALID_DELIMITER_CSV = "1;\"The content of your tweet\""; private static final String NUMBER_STRING = "1"; @Mock private InputReader inputReader; @InjectMocks private InputParser inputParser; @Test public void parseInput_givenGivenOneCsvLine_thenOneTweetToScheduleIsReturned() { when(inputReader.getInputReader(Mockito.anyString())).thenReturn( new StringReader(ONE_LINE_VALID_CSV)); inputParser.parseInput(ONE_LINE_VALID_CSV); } @Test(expected = NumberFormatException.class) public void parseInput_givenGivenOneCsvLineWithInvalidDelimiter_thenANumberFormatExceptionIsThrown() { when(inputReader.getInputReader(Mockito.anyString())).thenReturn( new StringReader(ONE_LINE_INVALID_DELIMITER_CSV)); inputParser.parseInput(ONE_LINE_INVALID_DELIMITER_CSV); } @Test(expected = ArrayIndexOutOfBoundsException.class) public void parseInput_givenAStringWithOnlyANumber_thenAnArrayIndexOutOfBoundsExceptionIsThrown() { when(inputReader.getInputReader(Mockito.anyString())).thenReturn( new StringReader(NUMBER_STRING)); inputParser.parseInput(NUMBER_STRING); } }
cde748dd75abf5979d2c36b54d3a585184fddddd
README.md
README.md
Run Your passenger nginx postgres ruby the simple way ## Cron/whenever is not working It's probably because bundler command is not found. To ensure that env path is included in cron add `env :PATH, ENV['PATH']` to `schedule.rb` ## Customize image ```Dockerfile FROM ipepe/pnpr:v2-ruby-2.7.5-staging RUN /home/webapp/.rbenv/bin/rbenv install 2.7.5 && \ /home/webapp/.rbenv/bin/rbenv global 2.7.5 \ RUN rm /home/webapp/webapp/on_startup.d/090_wait_for_postgres.sh RUN echo "sleep 100" > /home/webapp/webapp/on_startup.d/015_sleep_100.sh ``` ## TODO: * fix symbolic links * dockerfile testing * foreman as process keeper?
Run Your passenger nginx postgres ruby the simple way ## Cron/whenever is not working It's probably because bundler command is not found. To ensure that env path is included in cron add `env :PATH, ENV['PATH']` to `schedule.rb` ## Customize image ### Other (second) ruby version ```Dockerfile FROM ipepe/pnpr:v2-ruby-2.7.5-staging RUN /home/webapp/.rbenv/bin/rbenv install 2.7.5 && \ /home/webapp/.rbenv/bin/rbenv global 2.7.5 \ RUN rm /home/webapp/webapp/on_startup.d/090_wait_for_postgres.sh RUN echo "sleep 100" > /home/webapp/webapp/on_startup.d/015_sleep_100.sh ``` ### Other node version ```Dockerfile FROM ipepe/pnpr:v2-staging-ruby-2.7.5 # Install nodejs RUN n 12.19.0 && npm install -g npm # addtionally install yarn RUN npm install -g yarn ```
Add example how to customize image
Add example how to customize image
Markdown
apache-2.0
ipepe/pnpr
markdown
## Code Before: Run Your passenger nginx postgres ruby the simple way ## Cron/whenever is not working It's probably because bundler command is not found. To ensure that env path is included in cron add `env :PATH, ENV['PATH']` to `schedule.rb` ## Customize image ```Dockerfile FROM ipepe/pnpr:v2-ruby-2.7.5-staging RUN /home/webapp/.rbenv/bin/rbenv install 2.7.5 && \ /home/webapp/.rbenv/bin/rbenv global 2.7.5 \ RUN rm /home/webapp/webapp/on_startup.d/090_wait_for_postgres.sh RUN echo "sleep 100" > /home/webapp/webapp/on_startup.d/015_sleep_100.sh ``` ## TODO: * fix symbolic links * dockerfile testing * foreman as process keeper? ## Instruction: Add example how to customize image ## Code After: Run Your passenger nginx postgres ruby the simple way ## Cron/whenever is not working It's probably because bundler command is not found. To ensure that env path is included in cron add `env :PATH, ENV['PATH']` to `schedule.rb` ## Customize image ### Other (second) ruby version ```Dockerfile FROM ipepe/pnpr:v2-ruby-2.7.5-staging RUN /home/webapp/.rbenv/bin/rbenv install 2.7.5 && \ /home/webapp/.rbenv/bin/rbenv global 2.7.5 \ RUN rm /home/webapp/webapp/on_startup.d/090_wait_for_postgres.sh RUN echo "sleep 100" > /home/webapp/webapp/on_startup.d/015_sleep_100.sh ``` ### Other node version ```Dockerfile FROM ipepe/pnpr:v2-staging-ruby-2.7.5 # Install nodejs RUN n 12.19.0 && npm install -g npm # addtionally install yarn RUN npm install -g yarn ```
fa42824209a89bc8fd731f4605738b9fc8738e52
git_hooks/prepare-commit-msg/jira.sh
git_hooks/prepare-commit-msg/jira.sh
id=`git rev-parse --abbrev-ref HEAD | grep -e "^\(feature\|hotfix\)\{1\}" | sed "s/\(feature\|hotfix\)\///g"` if [[ "$id" != "" ]]; then sed -i "1s/^/$id:/" $1 fi;
if [[ `grep -iE "[A-Z]{3,}-[0-9]{1,}:\s+.*" "$1"` != "" ]]; then exit 0 fi id=`git rev-parse --abbrev-ref HEAD | grep -e "^\(feature\|hotfix\)\{1\}" | sed "s/\(feature\|hotfix\)\/\([A-Z]\+\-[0-9]\+\)\(-[0-9]\+\)*/\2/g"` if [[ "$id" != "" ]]; then sed -i "1s/^/$id: /" $1 fi;
Update hook to do not add ticket id when it is already present
Update hook to do not add ticket id when it is already present
Shell
mit
dbestevez/dotfiles
shell
## Code Before: id=`git rev-parse --abbrev-ref HEAD | grep -e "^\(feature\|hotfix\)\{1\}" | sed "s/\(feature\|hotfix\)\///g"` if [[ "$id" != "" ]]; then sed -i "1s/^/$id:/" $1 fi; ## Instruction: Update hook to do not add ticket id when it is already present ## Code After: if [[ `grep -iE "[A-Z]{3,}-[0-9]{1,}:\s+.*" "$1"` != "" ]]; then exit 0 fi id=`git rev-parse --abbrev-ref HEAD | grep -e "^\(feature\|hotfix\)\{1\}" | sed "s/\(feature\|hotfix\)\/\([A-Z]\+\-[0-9]\+\)\(-[0-9]\+\)*/\2/g"` if [[ "$id" != "" ]]; then sed -i "1s/^/$id: /" $1 fi;
d209020be5369345e04ba5d5cdd30cd8538409a1
tt/utils.py
tt/utils.py
def without_spaces(the_str): return "".join(the_str.split())
def without_spaces(the_str): return "".join(the_str.split()) def listwise_to_str(the_list): return list(map(str, the_list))
Add utility method for converting all elements in list to string.
Add utility method for converting all elements in list to string.
Python
mit
welchbj/tt,welchbj/tt,welchbj/tt
python
## Code Before: def without_spaces(the_str): return "".join(the_str.split()) ## Instruction: Add utility method for converting all elements in list to string. ## Code After: def without_spaces(the_str): return "".join(the_str.split()) def listwise_to_str(the_list): return list(map(str, the_list))
63b24aed01d8cc566c983f547f087557ece2f7d5
README.md
README.md
OpenIRC ======== IRC for everyone! ### Project Goal Making open source alternative of [IRCCloud] ### Intructions ```bash # Building client-side codes cd client npm install # Install dependencies npm test # Static type checking (flow) npm run build # Build everything in production mode (flow + webpack) npm run watch # Run webpack in watch mode ``` ```bash # Running server cd server npm install # Install dependencies npm test # Static type checking (flow) npm run build # Build everything in production mode (flow + babel) npm run watch # Run babel in watch mode npm start [port] # Start the server. Default port is 4321 ``` ### Directory structure ```bash # Client side codes ▾ client/ .flowconfig ▸ node_modules/ ▸ src/ # Client-side assets (js, css, ...) package.json # Client-side libraries webpack.config.js # Server side codes ▾ server/ .babelrc .flowconfig ▸ dist/ # Build results of server-side codes ▸ node_modules/ ▾ public/ # Files that will be statically served ▸ build/ # Build results of client-side assets ... index.html ▸ src/ # Server-side codes (node.js) package.json # Server-side libraries ``` -------- [GNU AGPL 3.0 License](LICENSE.md) [IRCCloud]: https://www.irccloud.com/
OpenIRC ======== IRC for everyone! ### Project Goal Making open source alternative of [IRCCloud] ### Intructions ```bash # Building client-side codes cd client yarn # Install dependencies yarn test # Static type checking (flow) yarn build # Build everything in production mode (flow + webpack) yarn watch # Run webpack in watch mode ``` ```bash # Running server cd server yarn # Install dependencies yarn test # Static type checking (flow) yarn build # Build everything in production mode (flow + babel) yarn watch # Run babel in watch mode yarn start [port] # Start the server. Default port is 4321 ``` ### Directory structure ```bash # Client side codes ▾ client/ .flowconfig ▸ node_modules/ ▸ src/ # Client-side assets (js, css, ...) package.json # Client-side libraries webpack.config.js # Server side codes ▾ server/ .babelrc .flowconfig ▸ dist/ # Build results of server-side codes ▸ node_modules/ ▾ public/ # Files that will be statically served ▸ build/ # Build results of client-side assets ... index.html ▸ src/ # Server-side codes (node.js) package.json # Server-side libraries ``` -------- [GNU AGPL 3.0 License](LICENSE.md) [IRCCloud]: https://www.irccloud.com/
Replace instructions with yarn package manager
Replace instructions with yarn package manager
Markdown
agpl-3.0
openirc/openirc,openirc/openirc,openirc/openirc,openirc/openirc
markdown
## Code Before: OpenIRC ======== IRC for everyone! ### Project Goal Making open source alternative of [IRCCloud] ### Intructions ```bash # Building client-side codes cd client npm install # Install dependencies npm test # Static type checking (flow) npm run build # Build everything in production mode (flow + webpack) npm run watch # Run webpack in watch mode ``` ```bash # Running server cd server npm install # Install dependencies npm test # Static type checking (flow) npm run build # Build everything in production mode (flow + babel) npm run watch # Run babel in watch mode npm start [port] # Start the server. Default port is 4321 ``` ### Directory structure ```bash # Client side codes ▾ client/ .flowconfig ▸ node_modules/ ▸ src/ # Client-side assets (js, css, ...) package.json # Client-side libraries webpack.config.js # Server side codes ▾ server/ .babelrc .flowconfig ▸ dist/ # Build results of server-side codes ▸ node_modules/ ▾ public/ # Files that will be statically served ▸ build/ # Build results of client-side assets ... index.html ▸ src/ # Server-side codes (node.js) package.json # Server-side libraries ``` -------- [GNU AGPL 3.0 License](LICENSE.md) [IRCCloud]: https://www.irccloud.com/ ## Instruction: Replace instructions with yarn package manager ## Code After: OpenIRC ======== IRC for everyone! ### Project Goal Making open source alternative of [IRCCloud] ### Intructions ```bash # Building client-side codes cd client yarn # Install dependencies yarn test # Static type checking (flow) yarn build # Build everything in production mode (flow + webpack) yarn watch # Run webpack in watch mode ``` ```bash # Running server cd server yarn # Install dependencies yarn test # Static type checking (flow) yarn build # Build everything in production mode (flow + babel) yarn watch # Run babel in watch mode yarn start [port] # Start the server. Default port is 4321 ``` ### Directory structure ```bash # Client side codes ▾ client/ .flowconfig ▸ node_modules/ ▸ src/ # Client-side assets (js, css, ...) package.json # Client-side libraries webpack.config.js # Server side codes ▾ server/ .babelrc .flowconfig ▸ dist/ # Build results of server-side codes ▸ node_modules/ ▾ public/ # Files that will be statically served ▸ build/ # Build results of client-side assets ... index.html ▸ src/ # Server-side codes (node.js) package.json # Server-side libraries ``` -------- [GNU AGPL 3.0 License](LICENSE.md) [IRCCloud]: https://www.irccloud.com/
115438d4ea6dde1eeaf68054b8f7606a28e13009
challenges-completed.js
challenges-completed.js
var ipc = require('ipc') var userData = require('./user-data.js') document.addEventListener('DOMContentLoaded', function (event) { var data = userData.getData() updateIndex(data.contents) ipc.on('confirm-clear-response', function (response) { if (response === 1) return else clearAllChallenges() }) var clearAllButton = document.getElementById('clear-all-challenges') clearAllButton.addEventListener('click', function () { for (var chal in data) { if (data[chal].completed) { data[chal].completed = false var completedElement = '#' + chal + ' .completed-challenge-list' document.querySelector(completedElement).remove() } } userData.updateData(data, function (err) { // this takes in a challenge, which you're not doing if (err) return console.log(err) }) }) function updateIndex (data) { for (var chal in data) { if (data[chal].completed) { var currentText = document.getElementById(chal).innerHTML var completedText = "<span class='completed-challenge-list'>[ Completed ]</span>" document.getElementById(chal).innerHTML = completedText + ' ' + currentText } } } })
var ipc = require('ipc') var fs = require('fs') var userData = require('./user-data.js') document.addEventListener('DOMContentLoaded', function (event) { var data = userData.getData() var clearAllButton = document.getElementById('clear-all-challenges') updateIndex(data.contents) ipc.on('confirm-clear-response', function (response) { if (response === 1) return else clearAllChallenges(data) }) clearAllButton.addEventListener('click', function () { ipc.send('confirm-clear') }) function updateIndex (data) { for (var chal in data) { if (data[chal].completed) { var currentText = document.getElementById(chal).innerHTML var completedText = "<span class='completed-challenge-list'>[ Completed ]</span>" document.getElementById(chal).innerHTML = completedText + ' ' + currentText } } } }) function clearAllChallenges (data) { for (var chal in data.contents) { if (data.contents[chal].completed) { data.contents[chal].completed = false var completedElement = '#' + chal + ' .completed-challenge-list' document.querySelector(completedElement).remove() } } fs.writeFileSync(data.path, JSON.stringify(data.contents, null, 2)) }
Fix all the bugs in writing data and confirming clear
Fix all the bugs in writing data and confirming clear
JavaScript
bsd-2-clause
dice/git-it-electron,countryoven/git-it-electron,countryoven/git-it-electron,dice/git-it-electron,rets5s/git-it-electron,IonicaBizauKitchen/git-it-electron,jlord/git-it-electron,IonicaBizauKitchen/git-it-electron,countryoven/git-it-electron,shiftkey/git-it-electron,rets5s/git-it-electron,countryoven/git-it-electron,countryoven/git-it-electron,dice/git-it-electron,dice/git-it-electron,dice/git-it-electron,IonicaBizauKitchen/git-it-electron,dice/git-it-electron,countryoven/git-it-electron,IonicaBizauKitchen/git-it-electron,vongola12324/git-it-electron,jlord/git-it-electron,dice/git-it-electron,rets5s/git-it-electron,shiftkey/git-it-electron,shiftkey/git-it-electron,rets5s/git-it-electron,countryoven/git-it-electron,IonicaBizauKitchen/git-it-electron,jlord/git-it-electron,vongola12324/git-it-electron,jlord/git-it-electron,vongola12324/git-it-electron,IonicaBizauKitchen/git-it-electron,rets5s/git-it-electron,shiftkey/git-it-electron,shiftkey/git-it-electron,shiftkey/git-it-electron,vongola12324/git-it-electron,shiftkey/git-it-electron,rets5s/git-it-electron,jlord/git-it-electron,vongola12324/git-it-electron,IonicaBizauKitchen/git-it-electron,rets5s/git-it-electron,vongola12324/git-it-electron,jlord/git-it-electron,vongola12324/git-it-electron
javascript
## Code Before: var ipc = require('ipc') var userData = require('./user-data.js') document.addEventListener('DOMContentLoaded', function (event) { var data = userData.getData() updateIndex(data.contents) ipc.on('confirm-clear-response', function (response) { if (response === 1) return else clearAllChallenges() }) var clearAllButton = document.getElementById('clear-all-challenges') clearAllButton.addEventListener('click', function () { for (var chal in data) { if (data[chal].completed) { data[chal].completed = false var completedElement = '#' + chal + ' .completed-challenge-list' document.querySelector(completedElement).remove() } } userData.updateData(data, function (err) { // this takes in a challenge, which you're not doing if (err) return console.log(err) }) }) function updateIndex (data) { for (var chal in data) { if (data[chal].completed) { var currentText = document.getElementById(chal).innerHTML var completedText = "<span class='completed-challenge-list'>[ Completed ]</span>" document.getElementById(chal).innerHTML = completedText + ' ' + currentText } } } }) ## Instruction: Fix all the bugs in writing data and confirming clear ## Code After: var ipc = require('ipc') var fs = require('fs') var userData = require('./user-data.js') document.addEventListener('DOMContentLoaded', function (event) { var data = userData.getData() var clearAllButton = document.getElementById('clear-all-challenges') updateIndex(data.contents) ipc.on('confirm-clear-response', function (response) { if (response === 1) return else clearAllChallenges(data) }) clearAllButton.addEventListener('click', function () { ipc.send('confirm-clear') }) function updateIndex (data) { for (var chal in data) { if (data[chal].completed) { var currentText = document.getElementById(chal).innerHTML var completedText = "<span class='completed-challenge-list'>[ Completed ]</span>" document.getElementById(chal).innerHTML = completedText + ' ' + currentText } } } }) function clearAllChallenges (data) { for (var chal in data.contents) { if (data.contents[chal].completed) { data.contents[chal].completed = false var completedElement = '#' + chal + ' .completed-challenge-list' document.querySelector(completedElement).remove() } } fs.writeFileSync(data.path, JSON.stringify(data.contents, null, 2)) }
9dbf361770ad62a2fbcc0a30bab7d9fb0d54b189
_config.yml
_config.yml
--- url: http://www.lesliebeesleylmsw.com baseurl: '' compass: logo: "/images/officetree.png" author: Leslie Beesley, LMSW tagline: Adults · Children · Family description: include_content: true include_analytics: false markdown: kramdown highlighter: rouge permalink: pretty
--- url: http://lesliebeesleylmsw.github.io baseurl: '' compass: logo: "/images/officetree.png" author: Leslie Beesley, LMSW tagline: Adults · Children · Family description: include_content: true include_analytics: false markdown: kramdown highlighter: rouge permalink: pretty
Change site url for github testing
Change site url for github testing
YAML
mit
lesliebeesleylmsw/lesliebeesleylmsw.github.io,lesliebeesleylmsw/lesliebeesleylmsw.github.io
yaml
## Code Before: --- url: http://www.lesliebeesleylmsw.com baseurl: '' compass: logo: "/images/officetree.png" author: Leslie Beesley, LMSW tagline: Adults · Children · Family description: include_content: true include_analytics: false markdown: kramdown highlighter: rouge permalink: pretty ## Instruction: Change site url for github testing ## Code After: --- url: http://lesliebeesleylmsw.github.io baseurl: '' compass: logo: "/images/officetree.png" author: Leslie Beesley, LMSW tagline: Adults · Children · Family description: include_content: true include_analytics: false markdown: kramdown highlighter: rouge permalink: pretty
d0d28f6d00f855e9d6ba4f0c261802acce6456bc
test/lib/catissue/domain/address_test.rb
test/lib/catissue/domain/address_test.rb
require File.dirname(__FILE__) + '/../helpers/test_case' require 'caruby/helpers/uniquifier' class AddressTest < Test::Unit::TestCase include CaTissue::TestCase def setup super # make the unique test address @user = defaults.tissue_bank.coordinator @addr = @user.address end def test_defaults verify_defaults(@addr) end def test_zip_code @addr.zip_code = 55555 assert_equal('55555', @addr.zip_code, "Integer zip code value is not correctly transformed") end def test_save # Create the address. verify_save(@addr) # Modify the address. expected = @addr.street = "#{CaRuby::Uniquifier.qualifier} Elm St." verify_save(@addr) # Find the address. fetched = @addr.copy(:identifier).find assert_not_nil(fetched, "Address not saved") assert_equal(expected, fetched.street, "Address street not saved") end end
require File.dirname(__FILE__) + '/../helpers/test_case' require 'caruby/helpers/uniquifier' class AddressTest < Test::Unit::TestCase include CaTissue::TestCase def setup super # make the unique test address @user = defaults.tissue_bank.coordinator @addr = @user.address end def test_defaults verify_defaults(@addr) end def test_zip_code @addr.zip_code = 55555 assert_equal('55555', @addr.zip_code, "Integer zip code value is not correctly transformed") end def test_save # Create the address. verify_save(@addr) # Modify the address. expected = @addr.street = "#{CaRuby::Uniquifier.qualifier} Elm St." verify_save(@addr) end end
Address identifier is not set by caTissue in save result.
Address identifier is not set by caTissue in save result.
Ruby
mit
caruby/tissue,caruby/tissue,caruby/tissue
ruby
## Code Before: require File.dirname(__FILE__) + '/../helpers/test_case' require 'caruby/helpers/uniquifier' class AddressTest < Test::Unit::TestCase include CaTissue::TestCase def setup super # make the unique test address @user = defaults.tissue_bank.coordinator @addr = @user.address end def test_defaults verify_defaults(@addr) end def test_zip_code @addr.zip_code = 55555 assert_equal('55555', @addr.zip_code, "Integer zip code value is not correctly transformed") end def test_save # Create the address. verify_save(@addr) # Modify the address. expected = @addr.street = "#{CaRuby::Uniquifier.qualifier} Elm St." verify_save(@addr) # Find the address. fetched = @addr.copy(:identifier).find assert_not_nil(fetched, "Address not saved") assert_equal(expected, fetched.street, "Address street not saved") end end ## Instruction: Address identifier is not set by caTissue in save result. ## Code After: require File.dirname(__FILE__) + '/../helpers/test_case' require 'caruby/helpers/uniquifier' class AddressTest < Test::Unit::TestCase include CaTissue::TestCase def setup super # make the unique test address @user = defaults.tissue_bank.coordinator @addr = @user.address end def test_defaults verify_defaults(@addr) end def test_zip_code @addr.zip_code = 55555 assert_equal('55555', @addr.zip_code, "Integer zip code value is not correctly transformed") end def test_save # Create the address. verify_save(@addr) # Modify the address. expected = @addr.street = "#{CaRuby::Uniquifier.qualifier} Elm St." verify_save(@addr) end end
0907821993482c6f482dd6c8f710bb28475042aa
client/view/posts/posts_list.js
client/view/posts/posts_list.js
var postsData = [ { title: 'Introducing Julie', author: 'JulesWiz', url: 'http://ngjulie.meteor.com' }, { title: 'Verybite', author: 'Jules Verybite', url: 'http://verybite.com' }, { title: 'Julie Ng', author: 'Linked in', url: 'http://linkedin.com/julieasia' } ]; Template.postsList.helpers({ posts: function() { return Posts.find(); } });
var postsData = [ { title: 'Introducing Julie', author: 'JulesWiz', url: 'http://ngjulie.meteor.com' }, { title: 'Verybite', author: 'Jules Verybite', url: 'http://verybite.com' }, { title: 'Julie Ng', author: 'Linked in', url: 'http://linkedin.com/julieasia' } ]; Template.postsList.helpers({ posts: function() { return Posts.find({}, {sort: {submitted:-1}}); } });
Sort posts by submitted timestamp
Sort posts by submitted timestamp
JavaScript
mit
JulesWiz/microscope
javascript
## Code Before: var postsData = [ { title: 'Introducing Julie', author: 'JulesWiz', url: 'http://ngjulie.meteor.com' }, { title: 'Verybite', author: 'Jules Verybite', url: 'http://verybite.com' }, { title: 'Julie Ng', author: 'Linked in', url: 'http://linkedin.com/julieasia' } ]; Template.postsList.helpers({ posts: function() { return Posts.find(); } }); ## Instruction: Sort posts by submitted timestamp ## Code After: var postsData = [ { title: 'Introducing Julie', author: 'JulesWiz', url: 'http://ngjulie.meteor.com' }, { title: 'Verybite', author: 'Jules Verybite', url: 'http://verybite.com' }, { title: 'Julie Ng', author: 'Linked in', url: 'http://linkedin.com/julieasia' } ]; Template.postsList.helpers({ posts: function() { return Posts.find({}, {sort: {submitted:-1}}); } });
b215f92205a518d949a21f2658a23ab666f3b539
getbinaries.sh
getbinaries.sh
brew install mas # Install XCode mas install 497799835 sudo xcodebuild -license accept # Install gh command line brew install gh # Install zsh brew install zsh zsh-completions # Make zsh default shell chsh -s $(which zsh) # Install ohmyszsh sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" # Install nodenv brew install nodenv # Install NeoVim brew install neovim # Install Plug git clone https://github.com/k-takata/minpac.git ~/.config/nvim/pack/minpac/opt/minpac # Install 1Password mas install 1333542190 # Install Aware mas install 1082170746
brew install mas # Install XCode mas install 497799835 sudo xcodebuild -license accept # Install gh command line brew install gh # Install zsh brew install zsh zsh-completions # Make zsh default shell chsh -s $(which zsh) # Install ohmyszsh sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" # Install nodenv brew install nodenv # Install NeoVim brew install neovim # Install non-system Python3 brew install python # Install neovim python package pip3 install neovim # Install Plug git clone https://github.com/k-takata/minpac.git ~/.config/nvim/pack/minpac/opt/minpac # Install 1Password mas install 1333542190 # Install Aware mas install 1082170746
Add python fix for nvim
Add python fix for nvim
Shell
mit
pmarsceill/dotfiles
shell
## Code Before: brew install mas # Install XCode mas install 497799835 sudo xcodebuild -license accept # Install gh command line brew install gh # Install zsh brew install zsh zsh-completions # Make zsh default shell chsh -s $(which zsh) # Install ohmyszsh sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" # Install nodenv brew install nodenv # Install NeoVim brew install neovim # Install Plug git clone https://github.com/k-takata/minpac.git ~/.config/nvim/pack/minpac/opt/minpac # Install 1Password mas install 1333542190 # Install Aware mas install 1082170746 ## Instruction: Add python fix for nvim ## Code After: brew install mas # Install XCode mas install 497799835 sudo xcodebuild -license accept # Install gh command line brew install gh # Install zsh brew install zsh zsh-completions # Make zsh default shell chsh -s $(which zsh) # Install ohmyszsh sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" # Install nodenv brew install nodenv # Install NeoVim brew install neovim # Install non-system Python3 brew install python # Install neovim python package pip3 install neovim # Install Plug git clone https://github.com/k-takata/minpac.git ~/.config/nvim/pack/minpac/opt/minpac # Install 1Password mas install 1333542190 # Install Aware mas install 1082170746
65b4d3fcda2207e9913292621929d533be0ce33b
xgds_planner2/templates/handlebars/tabnav.handlebars
xgds_planner2/templates/handlebars/tabnav.handlebars
<ul id="tab-nav" class="row nav nav-tabs"> <li class="active" data-target="meta"><a>Meta</a></li> <li data-target="sequence"><a>Sequence</a></li> <li data-target="layers"><a>Layers</a></li> <li data-target="tools"><a>Tools</a></li> </ul> <div id="tab-content" class="row tab-content" style="margin-left: inherit;"> </div>
<ul id="tab-nav" class="row nav nav-tabs"> <li class="active" data-target="meta"><a>Meta</a></li> <li data-target="sequence"><a>Sequence</a></li> <li data-target="layers"><a>Layers</a></li> <!-- <li data-target="tools"><a>Tools</a></li> --> </ul> <div id="tab-content" class="row tab-content" style="margin-left: inherit;"> </div>
Disable tools tab ( since it has no content right now.)
Disable tools tab ( since it has no content right now.)
Handlebars
apache-2.0
xgds/xgds_planner2,xgds/xgds_planner2,xgds/xgds_planner2,xgds/xgds_planner2
handlebars
## Code Before: <ul id="tab-nav" class="row nav nav-tabs"> <li class="active" data-target="meta"><a>Meta</a></li> <li data-target="sequence"><a>Sequence</a></li> <li data-target="layers"><a>Layers</a></li> <li data-target="tools"><a>Tools</a></li> </ul> <div id="tab-content" class="row tab-content" style="margin-left: inherit;"> </div> ## Instruction: Disable tools tab ( since it has no content right now.) ## Code After: <ul id="tab-nav" class="row nav nav-tabs"> <li class="active" data-target="meta"><a>Meta</a></li> <li data-target="sequence"><a>Sequence</a></li> <li data-target="layers"><a>Layers</a></li> <!-- <li data-target="tools"><a>Tools</a></li> --> </ul> <div id="tab-content" class="row tab-content" style="margin-left: inherit;"> </div>
7b3189817a3cb7729b67cbd216f55345872d5f8f
CMakeLists.txt
CMakeLists.txt
project(Strain) itk_module_impl()
cmake_minimum_required(VERSION 2.8.9) project(Strain) if(NOT ITK_SOURCE_DIR) find_package(ITK REQUIRED) list(APPEND CMAKE_MODULE_PATH ${ITK_CMAKE_DIR}) include(ITKModuleExternal) else() itk_module_impl() endif()
Allow the module to be built externally.
ENH: Allow the module to be built externally.
Text
apache-2.0
KitwareMedical/ITKStrain,KitwareMedical/ITKStrain
text
## Code Before: project(Strain) itk_module_impl() ## Instruction: ENH: Allow the module to be built externally. ## Code After: cmake_minimum_required(VERSION 2.8.9) project(Strain) if(NOT ITK_SOURCE_DIR) find_package(ITK REQUIRED) list(APPEND CMAKE_MODULE_PATH ${ITK_CMAKE_DIR}) include(ITKModuleExternal) else() itk_module_impl() endif()
50a084e7894ae1b3586709cf488bd2260cbeb615
packages/eslint-config-eventbrite/rules/style.js
packages/eslint-config-eventbrite/rules/style.js
// The rules ultimately override any rules defined in legacy/rules/style.js module.exports = { rules: { // Enforce function expressions // http://eslint.org/docs/rules/func-style 'func-style': ['error', 'expression'], // enforce that `let` & `const` declarations are declared together // http://eslint.org/docs/rules/one-var 'one-var': ['error', 'never'] } };
// The rules ultimately override any rules defined in legacy/rules/style.js module.exports = { rules: { // Enforce function expressions // http://eslint.org/docs/rules/func-style 'func-style': ['error', 'expression'], // enforce that `let` & `const` declarations are declared together // http://eslint.org/docs/rules/one-var 'one-var': ['error', 'never'], // enforce spacing around infix operators // http://eslint.org/docs/rules/space-infix-ops 'space-infix-ops': 'error' } };
Add new rule for spacing around infix operators
Add new rule for spacing around infix operators
JavaScript
mit
eventbrite/javascript
javascript
## Code Before: // The rules ultimately override any rules defined in legacy/rules/style.js module.exports = { rules: { // Enforce function expressions // http://eslint.org/docs/rules/func-style 'func-style': ['error', 'expression'], // enforce that `let` & `const` declarations are declared together // http://eslint.org/docs/rules/one-var 'one-var': ['error', 'never'] } }; ## Instruction: Add new rule for spacing around infix operators ## Code After: // The rules ultimately override any rules defined in legacy/rules/style.js module.exports = { rules: { // Enforce function expressions // http://eslint.org/docs/rules/func-style 'func-style': ['error', 'expression'], // enforce that `let` & `const` declarations are declared together // http://eslint.org/docs/rules/one-var 'one-var': ['error', 'never'], // enforce spacing around infix operators // http://eslint.org/docs/rules/space-infix-ops 'space-infix-ops': 'error' } };
70b5e67b9e02092318fbc06d20424cc64bbfc82f
main/resources/extraterm.desktop
main/resources/extraterm.desktop
[Desktop Entry] Categories=System;TerminalEmulator; Comment[en_US]=Command line access Comment=Command line access Exec=bash -c '"$(dirname "%k")/extratermqt"' GenericName[en_US]=Terminal GenericName=Terminal Icon=extratermqt MimeType= Name[en_US]=ExtratermQt Name=ExtratermQt Terminal=false Type=Application X-DBUS-ServiceName= X-DBUS-StartupType= X-KDE-SubstituteUID=false X-KDE-Username=
[Desktop Entry] Name=ExtratermQt Exec=/opt/extratermqt/extratermqt Terminal=false Type=Application Comment=The swiss army chainsaw of terminal emulators Categories=System;TerminalEmulator;X-GNOME-Utilities; Icon=extratermqt
Use the correct .desktop file in the Debian package
Use the correct .desktop file in the Debian package
desktop
mit
sedwards2009/extraterm,sedwards2009/extraterm,sedwards2009/extraterm,sedwards2009/extraterm,sedwards2009/extraterm
desktop
## Code Before: [Desktop Entry] Categories=System;TerminalEmulator; Comment[en_US]=Command line access Comment=Command line access Exec=bash -c '"$(dirname "%k")/extratermqt"' GenericName[en_US]=Terminal GenericName=Terminal Icon=extratermqt MimeType= Name[en_US]=ExtratermQt Name=ExtratermQt Terminal=false Type=Application X-DBUS-ServiceName= X-DBUS-StartupType= X-KDE-SubstituteUID=false X-KDE-Username= ## Instruction: Use the correct .desktop file in the Debian package ## Code After: [Desktop Entry] Name=ExtratermQt Exec=/opt/extratermqt/extratermqt Terminal=false Type=Application Comment=The swiss army chainsaw of terminal emulators Categories=System;TerminalEmulator;X-GNOME-Utilities; Icon=extratermqt
02e8bcd20805747c4b3add9d05d407a185d50764
app/src/main/java/info/zamojski/soft/towercollector/utils/NotificationHelperBase.java
app/src/main/java/info/zamojski/soft/towercollector/utils/NotificationHelperBase.java
/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ package info.zamojski.soft.towercollector.utils; import android.content.Context; import android.os.Build; import android.view.View; import android.widget.Toast; import info.zamojski.soft.towercollector.CollectorService; import info.zamojski.soft.towercollector.R; import info.zamojski.soft.towercollector.UploaderService; import info.zamojski.soft.towercollector.tasks.ExportFileAsyncTask; public class NotificationHelperBase { protected static final String COLLECTOR_NOTIFICATION_CHANNEL_ID = "collector_notification_channel"; protected static final String UPLOADER_NOTIFICATION_CHANNEL_ID = "collector_notification_channel"; protected static final String OTHER_NOTIFICATION_CHANNEL_ID = "collector_notification_channel"; protected boolean isUsingNotificationChannel() { return (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O); } protected boolean isUsingNotificationPriority() { return (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN && Build.VERSION.SDK_INT < Build.VERSION_CODES.O); } }
/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ package info.zamojski.soft.towercollector.utils; import android.content.Context; import android.os.Build; import android.view.View; import android.widget.Toast; import info.zamojski.soft.towercollector.CollectorService; import info.zamojski.soft.towercollector.R; import info.zamojski.soft.towercollector.UploaderService; import info.zamojski.soft.towercollector.tasks.ExportFileAsyncTask; public class NotificationHelperBase { protected static final String COLLECTOR_NOTIFICATION_CHANNEL_ID = "collector_notification_channel"; protected static final String UPLOADER_NOTIFICATION_CHANNEL_ID = "uploader_notification_channel"; protected static final String OTHER_NOTIFICATION_CHANNEL_ID = "other_notification_channel"; protected boolean isUsingNotificationChannel() { return (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O); } protected boolean isUsingNotificationPriority() { return (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN && Build.VERSION.SDK_INT < Build.VERSION_CODES.O); } }
Fix incorrect notification channel ids,
Fix incorrect notification channel ids,
Java
mpl-2.0
zamojski/TowerCollector,zamojski/TowerCollector
java
## Code Before: /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ package info.zamojski.soft.towercollector.utils; import android.content.Context; import android.os.Build; import android.view.View; import android.widget.Toast; import info.zamojski.soft.towercollector.CollectorService; import info.zamojski.soft.towercollector.R; import info.zamojski.soft.towercollector.UploaderService; import info.zamojski.soft.towercollector.tasks.ExportFileAsyncTask; public class NotificationHelperBase { protected static final String COLLECTOR_NOTIFICATION_CHANNEL_ID = "collector_notification_channel"; protected static final String UPLOADER_NOTIFICATION_CHANNEL_ID = "collector_notification_channel"; protected static final String OTHER_NOTIFICATION_CHANNEL_ID = "collector_notification_channel"; protected boolean isUsingNotificationChannel() { return (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O); } protected boolean isUsingNotificationPriority() { return (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN && Build.VERSION.SDK_INT < Build.VERSION_CODES.O); } } ## Instruction: Fix incorrect notification channel ids, ## Code After: /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ package info.zamojski.soft.towercollector.utils; import android.content.Context; import android.os.Build; import android.view.View; import android.widget.Toast; import info.zamojski.soft.towercollector.CollectorService; import info.zamojski.soft.towercollector.R; import info.zamojski.soft.towercollector.UploaderService; import info.zamojski.soft.towercollector.tasks.ExportFileAsyncTask; public class NotificationHelperBase { protected static final String COLLECTOR_NOTIFICATION_CHANNEL_ID = "collector_notification_channel"; protected static final String UPLOADER_NOTIFICATION_CHANNEL_ID = "uploader_notification_channel"; protected static final String OTHER_NOTIFICATION_CHANNEL_ID = "other_notification_channel"; protected boolean isUsingNotificationChannel() { return (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O); } protected boolean isUsingNotificationPriority() { return (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN && Build.VERSION.SDK_INT < Build.VERSION_CODES.O); } }
df35acc291e2ab617c579037c19f36bb8ec8ec6f
app/views/people/show.html.erb
app/views/people/show.html.erb
<% content_for :title, person.title %> <%= render partial: "header", locals: { person: person } %> <div class="govuk-grid-row"> <div class="govuk-grid-column-one-third"> <%= render "govuk_publishing_components/components/image_card", { href: "#", image_src: person.image_url, image_alt: person.image_alt_text, description: "Contents", extra_links: [ { text: "Biography", href: "#biography" }, person.has_previous_roles? ? { text: "Previous roles", href: "#previous-roles" } : nil, ].compact } %> </div> <%= render partial: "biography", locals: { person: person } %> <%= render partial: "previous_roles", locals: { person: person } %> </div>
<% content_for :title, person.title %> <%= render partial: "header", locals: { person: person } %> <div class="govuk-grid-row"> <div class="govuk-grid-column-one-third"> <%= render "govuk_publishing_components/components/image_card", { href: "#", image_src: person.image_url, image_alt: person.image_alt_text, } %> <%= render "govuk_publishing_components/components/contents_list", { contents: [ { text: "Biography", href: "#biography" }, person.has_previous_roles? ? { text: "Previous roles", href: "#previous-roles" } : nil, ].compact } %> </div> <%= render partial: "biography", locals: { person: person } %> <%= render partial: "previous_roles", locals: { person: person } %> </div>
Use contents_list component for page contents
Use contents_list component for page contents This is a better component to use than the image card links.
HTML+ERB
mit
alphagov/collections,alphagov/collections,alphagov/collections,alphagov/collections
html+erb
## Code Before: <% content_for :title, person.title %> <%= render partial: "header", locals: { person: person } %> <div class="govuk-grid-row"> <div class="govuk-grid-column-one-third"> <%= render "govuk_publishing_components/components/image_card", { href: "#", image_src: person.image_url, image_alt: person.image_alt_text, description: "Contents", extra_links: [ { text: "Biography", href: "#biography" }, person.has_previous_roles? ? { text: "Previous roles", href: "#previous-roles" } : nil, ].compact } %> </div> <%= render partial: "biography", locals: { person: person } %> <%= render partial: "previous_roles", locals: { person: person } %> </div> ## Instruction: Use contents_list component for page contents This is a better component to use than the image card links. ## Code After: <% content_for :title, person.title %> <%= render partial: "header", locals: { person: person } %> <div class="govuk-grid-row"> <div class="govuk-grid-column-one-third"> <%= render "govuk_publishing_components/components/image_card", { href: "#", image_src: person.image_url, image_alt: person.image_alt_text, } %> <%= render "govuk_publishing_components/components/contents_list", { contents: [ { text: "Biography", href: "#biography" }, person.has_previous_roles? ? { text: "Previous roles", href: "#previous-roles" } : nil, ].compact } %> </div> <%= render partial: "biography", locals: { person: person } %> <%= render partial: "previous_roles", locals: { person: person } %> </div>
994bf99b2f454b08960a7d1dcab0a4855b01416a
circle.yml
circle.yml
machine: node: version: 4.0.0 dependencies: override: - npm install deployment: production: branch: master commands: - npm start - npm run deploy
machine: node: version: 4.0.0 dependencies: override: - npm install deployment: prod: branch: master commands: - npm start - aws s3 sync build s3://chocolate-free.com --delete
Change the deploy to s3
Change the deploy to s3
YAML
apache-2.0
Khaledgarbaya/chocolate-free-website,Khaledgarbaya/chocolate-free-website
yaml
## Code Before: machine: node: version: 4.0.0 dependencies: override: - npm install deployment: production: branch: master commands: - npm start - npm run deploy ## Instruction: Change the deploy to s3 ## Code After: machine: node: version: 4.0.0 dependencies: override: - npm install deployment: prod: branch: master commands: - npm start - aws s3 sync build s3://chocolate-free.com --delete
11393ce7d187e81c944a049ef04964eb461869ab
doc/contributing/build-commands.rst
doc/contributing/build-commands.rst
Build commands ============== Here are the commands you will find useful as a contributor: test ---- Runs all the tests, then all the test suites separately:: $ npm run test dev --- Builds ``remotestorage.js`` in the ``release/`` directory every time you change a file, using webpack in watch mode. This is useful when testing a change in remoteStorage.js with an app, for example by creating a symlink to ``release/remotestorage.js``. This build is not minified and includes comments:: $ npm run dev doc --- See :doc:`the Documentation section of the Contributing docs</contributing/docs>`
Build commands ============== Here are the commands you will find useful as a contributor: test ---- Runs all the tests, then all the test suites separately:: $ npm run test Run a specific test file:: $ node_modules/jaribu/bin/jaribu test/unit/remotestorage-suite.js dev --- Builds ``remotestorage.js`` in the ``release/`` directory every time you change a file, using webpack in watch mode. This is useful when testing a change in remoteStorage.js with an app, for example by creating a symlink to ``release/remotestorage.js``. This build is not minified and includes comments:: $ npm run dev doc --- See :doc:`the Documentation section of the Contributing docs</contributing/docs>`
Document how to run a specific test suite
Document how to run a specific test suite
reStructuredText
mit
remotestorage/remotestorage.js,remotestorage/remotestorage.js,theWebalyst/remotestorage.js,theWebalyst/remotestorage.js,remotestorage/remotestorage.js
restructuredtext
## Code Before: Build commands ============== Here are the commands you will find useful as a contributor: test ---- Runs all the tests, then all the test suites separately:: $ npm run test dev --- Builds ``remotestorage.js`` in the ``release/`` directory every time you change a file, using webpack in watch mode. This is useful when testing a change in remoteStorage.js with an app, for example by creating a symlink to ``release/remotestorage.js``. This build is not minified and includes comments:: $ npm run dev doc --- See :doc:`the Documentation section of the Contributing docs</contributing/docs>` ## Instruction: Document how to run a specific test suite ## Code After: Build commands ============== Here are the commands you will find useful as a contributor: test ---- Runs all the tests, then all the test suites separately:: $ npm run test Run a specific test file:: $ node_modules/jaribu/bin/jaribu test/unit/remotestorage-suite.js dev --- Builds ``remotestorage.js`` in the ``release/`` directory every time you change a file, using webpack in watch mode. This is useful when testing a change in remoteStorage.js with an app, for example by creating a symlink to ``release/remotestorage.js``. This build is not minified and includes comments:: $ npm run dev doc --- See :doc:`the Documentation section of the Contributing docs</contributing/docs>`
a7e50ae3176e5871907bfcb12eae24745768e61f
package.json
package.json
{ "name": "louisville.io", "version": "0.0.0", "description": "Louisville Tech Calendar", "main": "index.js", "scripts": { "download": "node download.js", "process": "node index.js", "unfold": "unfold site.json", "build": "npm run download && npm run process && npm run unfold" }, "author": "Eric Lathrop <[email protected]> (http://ericlathrop.com/)", "license": "MIT", "repository": { "type": "git", "url": "https://github.com/louisvilleio/loutechcal.git" }, "dependencies": { "async": "^1.2.1", "ical": "^0.4.0", "ramda": "^0.15.1", "unfold": "^0.3.2" } }
{ "name": "louisville.io", "version": "0.0.0", "description": "Louisville Tech Calendar", "main": "index.js", "scripts": { "download": "node download.js", "process": "node index.js", "unfold": "unfold site.json", "build": "npm run download && npm run process && npm run unfold" }, "author": "Eric Lathrop <[email protected]> (http://ericlathrop.com/)", "license": "MIT", "repository": { "type": "git", "url": "https://github.com/louisvilleio/loutechcal.git" }, "dependencies": { "async": "^1.2.1", "ical": "ericlathrop/ical.js#fix-rrule-dtstart", "ramda": "^0.15.1", "unfold": "^0.3.2" } }
Use fork of ical module until bugfix is merged.
Use fork of ical module until bugfix is merged. Close #11
JSON
mit
louisvilletech/louisvilletech.org,louisvilleio/louisville.io,louisvilletech/louisvilletech.org,louisvilleio/louisville.io,veronicarivera/louisville.io
json
## Code Before: { "name": "louisville.io", "version": "0.0.0", "description": "Louisville Tech Calendar", "main": "index.js", "scripts": { "download": "node download.js", "process": "node index.js", "unfold": "unfold site.json", "build": "npm run download && npm run process && npm run unfold" }, "author": "Eric Lathrop <[email protected]> (http://ericlathrop.com/)", "license": "MIT", "repository": { "type": "git", "url": "https://github.com/louisvilleio/loutechcal.git" }, "dependencies": { "async": "^1.2.1", "ical": "^0.4.0", "ramda": "^0.15.1", "unfold": "^0.3.2" } } ## Instruction: Use fork of ical module until bugfix is merged. Close #11 ## Code After: { "name": "louisville.io", "version": "0.0.0", "description": "Louisville Tech Calendar", "main": "index.js", "scripts": { "download": "node download.js", "process": "node index.js", "unfold": "unfold site.json", "build": "npm run download && npm run process && npm run unfold" }, "author": "Eric Lathrop <[email protected]> (http://ericlathrop.com/)", "license": "MIT", "repository": { "type": "git", "url": "https://github.com/louisvilleio/loutechcal.git" }, "dependencies": { "async": "^1.2.1", "ical": "ericlathrop/ical.js#fix-rrule-dtstart", "ramda": "^0.15.1", "unfold": "^0.3.2" } }
c92a56dc937dc414139e2bff958190cfb18de5d9
tests/basics/try2.py
tests/basics/try2.py
try: print("try 1") try: print("try 2") foo() except: print("except 2") bar() except: print("except 1") try: print("try 1") try: print("try 2") foo() except TypeError: print("except 2") bar() except NameError: print("except 1")
try: print("try 1") try: print("try 2") foo() except: print("except 2") bar() except: print("except 1") try: print("try 1") try: print("try 2") foo() except TypeError: print("except 2") bar() except NameError: print("except 1") # Check that exceptions across function boundaries work as expected def func1(): try: print("try func1") func2() except NameError: print("except func1") def func2(): try: print("try func2") foo() except TypeError: print("except func2") func1()
Add testcase with exception handler spread across functions.
Add testcase with exception handler spread across functions.
Python
mit
SHA2017-badge/micropython-esp32,skybird6672/micropython,vriera/micropython,SHA2017-badge/micropython-esp32,jimkmc/micropython,cnoviello/micropython,cloudformdesign/micropython,emfcamp/micropython,dhylands/micropython,xuxiaoxin/micropython,AriZuu/micropython,cloudformdesign/micropython,selste/micropython,ryannathans/micropython,pramasoul/micropython,hiway/micropython,jmarcelino/pycom-micropython,galenhz/micropython,bvernoux/micropython,TDAbboud/micropython,danicampora/micropython,dhylands/micropython,xhat/micropython,suda/micropython,noahwilliamsson/micropython,jmarcelino/pycom-micropython,dinau/micropython,bvernoux/micropython,firstval/micropython,bvernoux/micropython,utopiaprince/micropython,rubencabrera/micropython,ryannathans/micropython,deshipu/micropython,paul-xxx/micropython,micropython/micropython-esp32,warner83/micropython,ruffy91/micropython,emfcamp/micropython,henriknelson/micropython,kerneltask/micropython,jimkmc/micropython,henriknelson/micropython,infinnovation/micropython,xuxiaoxin/micropython,noahwilliamsson/micropython,tobbad/micropython,redbear/micropython,xuxiaoxin/micropython,dmazzella/micropython,lowRISC/micropython,neilh10/micropython,adafruit/micropython,kostyll/micropython,firstval/micropython,stonegithubs/micropython,slzatz/micropython,henriknelson/micropython,suda/micropython,adafruit/circuitpython,slzatz/micropython,aethaniel/micropython,vriera/micropython,martinribelotta/micropython,hosaka/micropython,TDAbboud/micropython,blmorris/micropython,AriZuu/micropython,vriera/micropython,utopiaprince/micropython,Peetz0r/micropython-esp32,aethaniel/micropython,Vogtinator/micropython,cnoviello/micropython,kerneltask/micropython,mgyenik/micropython,supergis/micropython,firstval/micropython,dinau/micropython,emfcamp/micropython,lowRISC/micropython,ernesto-g/micropython,EcmaXp/micropython,stonegithubs/micropython,PappaPeppar/micropython,ahotam/micropython,Vogtinator/micropython,micropython/micropython-esp32,xyb/micropython,jmarcelino/pycom-micropython,aitjcize/micropython,warner83/micropython,noahchense/micropython,martinribelotta/micropython,infinnovation/micropython,trezor/micropython,HenrikSolver/micropython,jlillest/micropython,dhylands/micropython,SHA2017-badge/micropython-esp32,mhoffma/micropython,SungEun-Steve-Kim/test-mp,dhylands/micropython,torwag/micropython,praemdonck/micropython,adamkh/micropython,ChuckM/micropython,feilongfl/micropython,torwag/micropython,puuu/micropython,pramasoul/micropython,ericsnowcurrently/micropython,tdautc19841202/micropython,ruffy91/micropython,AriZuu/micropython,feilongfl/micropython,vitiral/micropython,methoxid/micropystat,oopy/micropython,mgyenik/micropython,mpalomer/micropython,suda/micropython,kerneltask/micropython,stonegithubs/micropython,suda/micropython,deshipu/micropython,PappaPeppar/micropython,adamkh/micropython,hosaka/micropython,orionrobots/micropython,hosaka/micropython,galenhz/micropython,jlillest/micropython,bvernoux/micropython,deshipu/micropython,jimkmc/micropython,ryannathans/micropython,ruffy91/micropython,mgyenik/micropython,pfalcon/micropython,EcmaXp/micropython,Vogtinator/micropython,pramasoul/micropython,misterdanb/micropython,tobbad/micropython,matthewelse/micropython,tuc-osg/micropython,xhat/micropython,cwyark/micropython,praemdonck/micropython,MrSurly/micropython,neilh10/micropython,toolmacher/micropython,aitjcize/micropython,matthewelse/micropython,infinnovation/micropython,ganshun666/micropython,noahwilliamsson/micropython,praemdonck/micropython,lbattraw/micropython,turbinenreiter/micropython,drrk/micropython,AriZuu/micropython,Timmenem/micropython,heisewangluo/micropython,vriera/micropython,puuu/micropython,HenrikSolver/micropython,drrk/micropython,blazewicz/micropython,adafruit/circuitpython,slzatz/micropython,tobbad/micropython,noahchense/micropython,adafruit/micropython,mhoffma/micropython,pozetroninc/micropython,mpalomer/micropython,dxxb/micropython,cwyark/micropython,danicampora/micropython,HenrikSolver/micropython,turbinenreiter/micropython,kostyll/micropython,danicampora/micropython,cwyark/micropython,cnoviello/micropython,dmazzella/micropython,trezor/micropython,lbattraw/micropython,misterdanb/micropython,jmarcelino/pycom-micropython,jmarcelino/pycom-micropython,supergis/micropython,TDAbboud/micropython,omtinez/micropython,feilongfl/micropython,selste/micropython,jlillest/micropython,alex-march/micropython,mianos/micropython,lowRISC/micropython,tralamazza/micropython,kostyll/micropython,swegener/micropython,methoxid/micropystat,swegener/micropython,pfalcon/micropython,rubencabrera/micropython,mianos/micropython,PappaPeppar/micropython,rubencabrera/micropython,Peetz0r/micropython-esp32,noahchense/micropython,alex-robbins/micropython,pozetroninc/micropython,ChuckM/micropython,matthewelse/micropython,trezor/micropython,emfcamp/micropython,ChuckM/micropython,omtinez/micropython,ahotam/micropython,warner83/micropython,mhoffma/micropython,KISSMonX/micropython,cloudformdesign/micropython,hiway/micropython,paul-xxx/micropython,xyb/micropython,galenhz/micropython,methoxid/micropystat,blazewicz/micropython,neilh10/micropython,ganshun666/micropython,torwag/micropython,skybird6672/micropython,supergis/micropython,aitjcize/micropython,firstval/micropython,noahwilliamsson/micropython,warner83/micropython,pfalcon/micropython,aitjcize/micropython,adafruit/micropython,bvernoux/micropython,EcmaXp/micropython,alex-march/micropython,HenrikSolver/micropython,Timmenem/micropython,torwag/micropython,chrisdearman/micropython,pozetroninc/micropython,tuc-osg/micropython,kostyll/micropython,micropython/micropython-esp32,MrSurly/micropython,xuxiaoxin/micropython,SHA2017-badge/micropython-esp32,hiway/micropython,drrk/micropython,xuxiaoxin/micropython,ganshun666/micropython,heisewangluo/micropython,toolmacher/micropython,dinau/micropython,Timmenem/micropython,AriZuu/micropython,lbattraw/micropython,chrisdearman/micropython,vriera/micropython,orionrobots/micropython,selste/micropython,omtinez/micropython,skybird6672/micropython,dinau/micropython,xhat/micropython,TDAbboud/micropython,adafruit/circuitpython,adafruit/circuitpython,praemdonck/micropython,torwag/micropython,orionrobots/micropython,paul-xxx/micropython,oopy/micropython,neilh10/micropython,xhat/micropython,ahotam/micropython,SungEun-Steve-Kim/test-mp,drrk/micropython,danicampora/micropython,utopiaprince/micropython,xyb/micropython,blmorris/micropython,Vogtinator/micropython,paul-xxx/micropython,selste/micropython,tdautc19841202/micropython,MrSurly/micropython,dxxb/micropython,cwyark/micropython,tdautc19841202/micropython,vitiral/micropython,toolmacher/micropython,pramasoul/micropython,deshipu/micropython,tralamazza/micropython,swegener/micropython,hosaka/micropython,paul-xxx/micropython,feilongfl/micropython,alex-march/micropython,mpalomer/micropython,tdautc19841202/micropython,Vogtinator/micropython,ericsnowcurrently/micropython,xyb/micropython,jlillest/micropython,alex-robbins/micropython,infinnovation/micropython,oopy/micropython,cnoviello/micropython,mpalomer/micropython,adafruit/circuitpython,neilh10/micropython,adamkh/micropython,toolmacher/micropython,emfcamp/micropython,ChuckM/micropython,mpalomer/micropython,warner83/micropython,SungEun-Steve-Kim/test-mp,methoxid/micropystat,ceramos/micropython,slzatz/micropython,MrSurly/micropython-esp32,skybird6672/micropython,ganshun666/micropython,KISSMonX/micropython,adamkh/micropython,pozetroninc/micropython,Peetz0r/micropython-esp32,kerneltask/micropython,micropython/micropython-esp32,ericsnowcurrently/micropython,ruffy91/micropython,KISSMonX/micropython,chrisdearman/micropython,dxxb/micropython,turbinenreiter/micropython,tdautc19841202/micropython,dhylands/micropython,deshipu/micropython,turbinenreiter/micropython,blazewicz/micropython,adamkh/micropython,PappaPeppar/micropython,infinnovation/micropython,xhat/micropython,hiway/micropython,MrSurly/micropython,SHA2017-badge/micropython-esp32,misterdanb/micropython,ericsnowcurrently/micropython,EcmaXp/micropython,galenhz/micropython,mianos/micropython,ernesto-g/micropython,ceramos/micropython,lbattraw/micropython,alex-march/micropython,cloudformdesign/micropython,adafruit/circuitpython,orionrobots/micropython,puuu/micropython,alex-robbins/micropython,tuc-osg/micropython,ChuckM/micropython,dmazzella/micropython,supergis/micropython,trezor/micropython,vitiral/micropython,redbear/micropython,utopiaprince/micropython,misterdanb/micropython,lowRISC/micropython,ryannathans/micropython,dinau/micropython,drrk/micropython,ernesto-g/micropython,hosaka/micropython,mhoffma/micropython,noahwilliamsson/micropython,ceramos/micropython,adafruit/micropython,MrSurly/micropython-esp32,tobbad/micropython,supergis/micropython,kerneltask/micropython,martinribelotta/micropython,ernesto-g/micropython,blmorris/micropython,EcmaXp/micropython,ernesto-g/micropython,alex-robbins/micropython,alex-march/micropython,mhoffma/micropython,ericsnowcurrently/micropython,ceramos/micropython,noahchense/micropython,TDAbboud/micropython,pozetroninc/micropython,MrSurly/micropython-esp32,KISSMonX/micropython,Peetz0r/micropython-esp32,martinribelotta/micropython,blmorris/micropython,noahchense/micropython,jimkmc/micropython,skybird6672/micropython,Peetz0r/micropython-esp32,matthewelse/micropython,dxxb/micropython,SungEun-Steve-Kim/test-mp,aethaniel/micropython,aethaniel/micropython,heisewangluo/micropython,lowRISC/micropython,tuc-osg/micropython,blazewicz/micropython,omtinez/micropython,MrSurly/micropython-esp32,vitiral/micropython,misterdanb/micropython,PappaPeppar/micropython,selste/micropython,lbattraw/micropython,ahotam/micropython,turbinenreiter/micropython,rubencabrera/micropython,suda/micropython,aethaniel/micropython,cnoviello/micropython,cloudformdesign/micropython,tralamazza/micropython,trezor/micropython,danicampora/micropython,mgyenik/micropython,tobbad/micropython,mianos/micropython,MrSurly/micropython,SungEun-Steve-Kim/test-mp,HenrikSolver/micropython,vitiral/micropython,redbear/micropython,micropython/micropython-esp32,ganshun666/micropython,toolmacher/micropython,stonegithubs/micropython,swegener/micropython,mgyenik/micropython,puuu/micropython,martinribelotta/micropython,pfalcon/micropython,jlillest/micropython,chrisdearman/micropython,Timmenem/micropython,heisewangluo/micropython,Timmenem/micropython,alex-robbins/micropython,slzatz/micropython,ceramos/micropython,dxxb/micropython,puuu/micropython,pfalcon/micropython,henriknelson/micropython,praemdonck/micropython,KISSMonX/micropython,galenhz/micropython,matthewelse/micropython,utopiaprince/micropython,redbear/micropython,mianos/micropython,feilongfl/micropython,xyb/micropython,tuc-osg/micropython,MrSurly/micropython-esp32,redbear/micropython,swegener/micropython,firstval/micropython,stonegithubs/micropython,pramasoul/micropython,ryannathans/micropython,methoxid/micropystat,oopy/micropython,chrisdearman/micropython,rubencabrera/micropython,ruffy91/micropython,ahotam/micropython,adafruit/micropython,omtinez/micropython,blazewicz/micropython,heisewangluo/micropython,kostyll/micropython,matthewelse/micropython,tralamazza/micropython,hiway/micropython,blmorris/micropython,jimkmc/micropython,henriknelson/micropython,dmazzella/micropython,cwyark/micropython,oopy/micropython,orionrobots/micropython
python
## Code Before: try: print("try 1") try: print("try 2") foo() except: print("except 2") bar() except: print("except 1") try: print("try 1") try: print("try 2") foo() except TypeError: print("except 2") bar() except NameError: print("except 1") ## Instruction: Add testcase with exception handler spread across functions. ## Code After: try: print("try 1") try: print("try 2") foo() except: print("except 2") bar() except: print("except 1") try: print("try 1") try: print("try 2") foo() except TypeError: print("except 2") bar() except NameError: print("except 1") # Check that exceptions across function boundaries work as expected def func1(): try: print("try func1") func2() except NameError: print("except func1") def func2(): try: print("try func2") foo() except TypeError: print("except func2") func1()
0b035cc68a9bf7f7ac8431b551a6c53fe881c24d
app/AppKernel.php
app/AppKernel.php
<?php use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Config\Loader\LoaderInterface; class AppKernel extends Kernel { public function registerBundles() { $bundles = array( new Symfony\Bundle\FrameworkBundle\FrameworkBundle(), new Symfony\Bundle\SecurityBundle\SecurityBundle(), new Symfony\Bundle\TwigBundle\TwigBundle(), new Symfony\Bundle\MonologBundle\MonologBundle(), new Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle(), new Symfony\Bundle\AsseticBundle\AsseticBundle(), new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(), new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(), ); if (in_array($this->getEnvironment(), array('dev', 'test'))) { $bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle(); $bundles[] = new Sensio\Bundle\DistributionBundle\SensioDistributionBundle(); $bundles[] = new Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle(); } return $bundles; } public function registerContainerConfiguration(LoaderInterface $loader) { $loader->load(__DIR__.'/config/config_'.$this->getEnvironment().'.yml'); } }
<?php use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Config\Loader\LoaderInterface; class AppKernel extends Kernel { public function registerBundles() { $bundles = array( new Symfony\Bundle\FrameworkBundle\FrameworkBundle(), new Symfony\Bundle\SecurityBundle\SecurityBundle(), new Symfony\Bundle\TwigBundle\TwigBundle(), new Symfony\Bundle\MonologBundle\MonologBundle(), new Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle(), new Symfony\Bundle\AsseticBundle\AsseticBundle(), new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(), new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(), new Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle(), ); if (in_array($this->getEnvironment(), array('dev', 'test'))) { $bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle(); $bundles[] = new Sensio\Bundle\DistributionBundle\SensioDistributionBundle(); $bundles[] = new Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle(); } return $bundles; } public function registerContainerConfiguration(LoaderInterface $loader) { $loader->load(__DIR__.'/config/config_'.$this->getEnvironment().'.yml'); } }
Add bundles to the kernel
Add bundles to the kernel
PHP
mit
aMarcireau/balloscope,aMarcireau/balloscope
php
## Code Before: <?php use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Config\Loader\LoaderInterface; class AppKernel extends Kernel { public function registerBundles() { $bundles = array( new Symfony\Bundle\FrameworkBundle\FrameworkBundle(), new Symfony\Bundle\SecurityBundle\SecurityBundle(), new Symfony\Bundle\TwigBundle\TwigBundle(), new Symfony\Bundle\MonologBundle\MonologBundle(), new Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle(), new Symfony\Bundle\AsseticBundle\AsseticBundle(), new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(), new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(), ); if (in_array($this->getEnvironment(), array('dev', 'test'))) { $bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle(); $bundles[] = new Sensio\Bundle\DistributionBundle\SensioDistributionBundle(); $bundles[] = new Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle(); } return $bundles; } public function registerContainerConfiguration(LoaderInterface $loader) { $loader->load(__DIR__.'/config/config_'.$this->getEnvironment().'.yml'); } } ## Instruction: Add bundles to the kernel ## Code After: <?php use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Config\Loader\LoaderInterface; class AppKernel extends Kernel { public function registerBundles() { $bundles = array( new Symfony\Bundle\FrameworkBundle\FrameworkBundle(), new Symfony\Bundle\SecurityBundle\SecurityBundle(), new Symfony\Bundle\TwigBundle\TwigBundle(), new Symfony\Bundle\MonologBundle\MonologBundle(), new Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle(), new Symfony\Bundle\AsseticBundle\AsseticBundle(), new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(), new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(), new Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle(), ); if (in_array($this->getEnvironment(), array('dev', 'test'))) { $bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle(); $bundles[] = new Sensio\Bundle\DistributionBundle\SensioDistributionBundle(); $bundles[] = new Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle(); } return $bundles; } public function registerContainerConfiguration(LoaderInterface $loader) { $loader->load(__DIR__.'/config/config_'.$this->getEnvironment().'.yml'); } }
00f9645de09737da9e1862c5604087a65b3bdafa
_wiki/Main_Page.md
_wiki/Main_Page.md
--- title: Main Page --- ![Wurst Client logo](https://cloud.githubusercontent.com/assets/10100202/8269115/0df480ba-179c-11e5-9eb9-30ce637a0827.png) ## About Wurst The Wurst Client is a Minecraft hacked client made by Alexander01998. It contains a large variety of cheats that allow you to do things that you couldn't do in vanilla Minecraft. Wurst is meant as an all-in-one solution for cheating in PVP games, griefing and trolling. Most of its features can bypass server plugins like NoCheat+, AntiAura, MAC, etc. that are supposed to prevent people from cheating. The features in Wurst are divided into three main categories: [mods](/wiki/Mods/), [commands](/wiki/Commands/) and [special features](/wiki/Special_Features/). All of the features can be managed through the Navigator mod. Since January 25 2015, Wurst is an open source project on [GitHub](https://github.com/Wurst-Imperium/Wurst-Client) and is looking for [contributors](/wiki/Contributing/part1/).
--- title: Main Page labels: - stub --- ![Wurst Client logo](https://cloud.githubusercontent.com/assets/10100202/8269115/0df480ba-179c-11e5-9eb9-30ce637a0827.png) ## About Wurst The Wurst Client is a Minecraft hacked client made by Alexander01998. It contains a large variety of cheats that allow you to do things that you couldn't do in vanilla Minecraft. Wurst is meant as an all-in-one solution for cheating in PVP games, griefing and trolling. Most of its features can bypass server plugins like NoCheat+, AntiAura, MAC, etc. that are supposed to prevent people from cheating. The features in Wurst are divided into three main categories: [mods](/wiki/Mods/), [commands](/wiki/Commands/) and [special features](/wiki/Special_Features/). All of the features can be managed through the Navigator mod. Since January 25 2015, Wurst is an open source project on [GitHub](https://github.com/Wurst-Imperium/Wurst-Client) and is looking for [contributors](/wiki/Contributing/part1/).
Add stub label to main page
:book: Add stub label to main page
Markdown
mpl-2.0
Voldemart/voldemart.github.io
markdown
## Code Before: --- title: Main Page --- ![Wurst Client logo](https://cloud.githubusercontent.com/assets/10100202/8269115/0df480ba-179c-11e5-9eb9-30ce637a0827.png) ## About Wurst The Wurst Client is a Minecraft hacked client made by Alexander01998. It contains a large variety of cheats that allow you to do things that you couldn't do in vanilla Minecraft. Wurst is meant as an all-in-one solution for cheating in PVP games, griefing and trolling. Most of its features can bypass server plugins like NoCheat+, AntiAura, MAC, etc. that are supposed to prevent people from cheating. The features in Wurst are divided into three main categories: [mods](/wiki/Mods/), [commands](/wiki/Commands/) and [special features](/wiki/Special_Features/). All of the features can be managed through the Navigator mod. Since January 25 2015, Wurst is an open source project on [GitHub](https://github.com/Wurst-Imperium/Wurst-Client) and is looking for [contributors](/wiki/Contributing/part1/). ## Instruction: :book: Add stub label to main page ## Code After: --- title: Main Page labels: - stub --- ![Wurst Client logo](https://cloud.githubusercontent.com/assets/10100202/8269115/0df480ba-179c-11e5-9eb9-30ce637a0827.png) ## About Wurst The Wurst Client is a Minecraft hacked client made by Alexander01998. It contains a large variety of cheats that allow you to do things that you couldn't do in vanilla Minecraft. Wurst is meant as an all-in-one solution for cheating in PVP games, griefing and trolling. Most of its features can bypass server plugins like NoCheat+, AntiAura, MAC, etc. that are supposed to prevent people from cheating. The features in Wurst are divided into three main categories: [mods](/wiki/Mods/), [commands](/wiki/Commands/) and [special features](/wiki/Special_Features/). All of the features can be managed through the Navigator mod. Since January 25 2015, Wurst is an open source project on [GitHub](https://github.com/Wurst-Imperium/Wurst-Client) and is looking for [contributors](/wiki/Contributing/part1/).
cf16c64e378f64d2267f75444c568aed895f940c
setup.py
setup.py
import platform, sys from distutils.core import setup from distextend import * packages, package_data = findPackages("countershape") setup( name = "countershape", version = "0.1", description = "A framework for rendering static documentation.", author = "Nullcube Pty Ltd", author_email = "[email protected]", url = "http://dev.nullcube.com", packages = packages, package_data = package_data, scripts = ["cshape"], )
import platform, sys from distutils.core import setup from distextend import * packages, package_data = findPackages("countershape") setup( name = "countershape", version = "0.1", description = "A framework for rendering static documentation.", author = "Nullcube Pty Ltd", author_email = "[email protected]", url = "http://dev.nullcube.com", packages = packages, package_data = package_data, scripts = ["cshape", "csblog"], )
Add csblog to installed scripts.
Add csblog to installed scripts.
Python
mit
mhils/countershape,samtaufa/countershape,cortesi/countershape,cortesi/countershape,samtaufa/countershape,mhils/countershape
python
## Code Before: import platform, sys from distutils.core import setup from distextend import * packages, package_data = findPackages("countershape") setup( name = "countershape", version = "0.1", description = "A framework for rendering static documentation.", author = "Nullcube Pty Ltd", author_email = "[email protected]", url = "http://dev.nullcube.com", packages = packages, package_data = package_data, scripts = ["cshape"], ) ## Instruction: Add csblog to installed scripts. ## Code After: import platform, sys from distutils.core import setup from distextend import * packages, package_data = findPackages("countershape") setup( name = "countershape", version = "0.1", description = "A framework for rendering static documentation.", author = "Nullcube Pty Ltd", author_email = "[email protected]", url = "http://dev.nullcube.com", packages = packages, package_data = package_data, scripts = ["cshape", "csblog"], )
f70dc45b36782c3cd27abec11df608b5826d429a
footer.php
footer.php
<?php /** * The template for displaying the footer. * * Contains the closing of the #content div and all content after * * @package socket.io-website */ ?> </div><!-- #content --> <footer id="colophon" class="site-footer" role="contentinfo"> <div class="site-info"> <span class="footer-left">SOCKET.IO IS OPEN-SOURCE (MIT) AND RUN BY <a href="#">CONTRIBUTORS</a></span> <span class="footer-right"><a href="http://automattic.com">SUPPORTED BY<div id="a8c-image"></div></a></span> </div><!-- .site-info --> </footer><!-- #colophon --> </div><!-- #page --> <?php wp_footer(); ?> <script src="http://code.jquery.com/jquery-1.9.1.min.js"></script> <script src="http://cdn.socket.io/socket.io-1.0.0-pre5.js"></script> <script src="/wp-content/themes/socket.io-website/js/javascripts.js"></script> <?php if (is_home()): ?> <script src="/wp-content/themes/socket.io-website/js/home.js"></script> <?php endif; ?> </body> </html>
<?php /** * The template for displaying the footer. * * Contains the closing of the #content div and all content after * * @package socket.io-website */ ?> </div><!-- #content --> <footer id="colophon" class="site-footer" role="contentinfo"> <div class="site-info"> <span class="footer-left">SOCKET.IO IS OPEN-SOURCE (MIT) AND RUN BY <a href="https://github.com/LearnBoost/socket.io/graphs/contributors">CONTRIBUTORS</a></span> <span class="footer-right"><a href="http://automattic.com">SUPPORTED BY<div id="a8c-image"></div></a></span> </div><!-- .site-info --> </footer><!-- #colophon --> </div><!-- #page --> <?php wp_footer(); ?> <script src="http://code.jquery.com/jquery-1.9.1.min.js"></script> <script src="http://cdn.socket.io/socket.io-1.0.0-pre5.js"></script> <script src="/wp-content/themes/socket.io-website/js/javascripts.js"></script> <?php if (is_home()): ?> <script src="/wp-content/themes/socket.io-website/js/home.js"></script> <?php endif; ?> </body> </html>
Add link to contributors graph
Add link to contributors graph
PHP
mit
Automattic/socket.io-website,davidcelis/socket.io-website,davidcelis/socket.io-website,Automattic/socket.io-website,Automattic/socket.io-website
php
## Code Before: <?php /** * The template for displaying the footer. * * Contains the closing of the #content div and all content after * * @package socket.io-website */ ?> </div><!-- #content --> <footer id="colophon" class="site-footer" role="contentinfo"> <div class="site-info"> <span class="footer-left">SOCKET.IO IS OPEN-SOURCE (MIT) AND RUN BY <a href="#">CONTRIBUTORS</a></span> <span class="footer-right"><a href="http://automattic.com">SUPPORTED BY<div id="a8c-image"></div></a></span> </div><!-- .site-info --> </footer><!-- #colophon --> </div><!-- #page --> <?php wp_footer(); ?> <script src="http://code.jquery.com/jquery-1.9.1.min.js"></script> <script src="http://cdn.socket.io/socket.io-1.0.0-pre5.js"></script> <script src="/wp-content/themes/socket.io-website/js/javascripts.js"></script> <?php if (is_home()): ?> <script src="/wp-content/themes/socket.io-website/js/home.js"></script> <?php endif; ?> </body> </html> ## Instruction: Add link to contributors graph ## Code After: <?php /** * The template for displaying the footer. * * Contains the closing of the #content div and all content after * * @package socket.io-website */ ?> </div><!-- #content --> <footer id="colophon" class="site-footer" role="contentinfo"> <div class="site-info"> <span class="footer-left">SOCKET.IO IS OPEN-SOURCE (MIT) AND RUN BY <a href="https://github.com/LearnBoost/socket.io/graphs/contributors">CONTRIBUTORS</a></span> <span class="footer-right"><a href="http://automattic.com">SUPPORTED BY<div id="a8c-image"></div></a></span> </div><!-- .site-info --> </footer><!-- #colophon --> </div><!-- #page --> <?php wp_footer(); ?> <script src="http://code.jquery.com/jquery-1.9.1.min.js"></script> <script src="http://cdn.socket.io/socket.io-1.0.0-pre5.js"></script> <script src="/wp-content/themes/socket.io-website/js/javascripts.js"></script> <?php if (is_home()): ?> <script src="/wp-content/themes/socket.io-website/js/home.js"></script> <?php endif; ?> </body> </html>
3ddd22e1ade2716f96439e7d1e3b044217c44b2a
src/adts/adts_list.h
src/adts/adts_list.h
/** ************************************************************************** * \details * ************************************************************************** */ #define ADTS_LIST_BYTES (32) #define ADTS_LIST_ELEM_BYTES (32) /** ************************************************************************** * \details * ************************************************************************** */ typedef struct { char reserved[ ADTS_LIST_BYTES ]; } adts_list_t; typedef struct { char reserved[ ADTS_LIST_ELEM_BYTES ]; } adts_list_elem_t; void utest_adts_list( void ); #endif /* _H_ADTS_LIST */
/** ************************************************************************** * \details * ************************************************************************** */ #define ADTS_LIST_BYTES (32) #define ADTS_LIST_ELEM_BYTES (32) /** ************************************************************************** * \details * ************************************************************************** */ typedef struct { const char reserved[ ADTS_LIST_BYTES ]; } adts_list_t; typedef struct { const char reserved[ ADTS_LIST_ELEM_BYTES ]; } adts_list_elem_t; void utest_adts_list( void ); #endif /* _H_ADTS_LIST */
Make list.h non-modifiabe in ADT
Make list.h non-modifiabe in ADT
C
mit
78613/sample,78613/sample
c
## Code Before: /** ************************************************************************** * \details * ************************************************************************** */ #define ADTS_LIST_BYTES (32) #define ADTS_LIST_ELEM_BYTES (32) /** ************************************************************************** * \details * ************************************************************************** */ typedef struct { char reserved[ ADTS_LIST_BYTES ]; } adts_list_t; typedef struct { char reserved[ ADTS_LIST_ELEM_BYTES ]; } adts_list_elem_t; void utest_adts_list( void ); #endif /* _H_ADTS_LIST */ ## Instruction: Make list.h non-modifiabe in ADT ## Code After: /** ************************************************************************** * \details * ************************************************************************** */ #define ADTS_LIST_BYTES (32) #define ADTS_LIST_ELEM_BYTES (32) /** ************************************************************************** * \details * ************************************************************************** */ typedef struct { const char reserved[ ADTS_LIST_BYTES ]; } adts_list_t; typedef struct { const char reserved[ ADTS_LIST_ELEM_BYTES ]; } adts_list_elem_t; void utest_adts_list( void ); #endif /* _H_ADTS_LIST */
dcf625e2d65d965838f4081cedc1cc60678c99ef
lib/xregexp.js
lib/xregexp.js
const xRegExp = require('xregexp'); module.exports = function(regexp, flags) { const lines = regexp.split('\n'); return xRegExp( lines.map((line) => line.replace(/\s+#.+/, '')).join('\n'), flags ); };
const xRegExp = require('xregexp'); module.exports = (regexp, flags) => { const lines = regexp.split('\n'); return xRegExp( lines.map((line) => line.replace(/\s+#.+/, ' ')).join('\n'), flags ); };
Use a single space in xRegExp wrapper
Use a single space in xRegExp wrapper Removing all whitespace here is dangerous and could cause bugs if it ends up removing spaces between a numbered backreference (e.g. \1) and a literal number (e.g. 1). To make this safer, I am replacing it with a single space, which will then be converted by xRegExp to `(?:)` if we are using the `x` flag.
JavaScript
mit
trotzig/import-js,trotzig/import-js,trotzig/import-js,Galooshi/import-js
javascript
## Code Before: const xRegExp = require('xregexp'); module.exports = function(regexp, flags) { const lines = regexp.split('\n'); return xRegExp( lines.map((line) => line.replace(/\s+#.+/, '')).join('\n'), flags ); }; ## Instruction: Use a single space in xRegExp wrapper Removing all whitespace here is dangerous and could cause bugs if it ends up removing spaces between a numbered backreference (e.g. \1) and a literal number (e.g. 1). To make this safer, I am replacing it with a single space, which will then be converted by xRegExp to `(?:)` if we are using the `x` flag. ## Code After: const xRegExp = require('xregexp'); module.exports = (regexp, flags) => { const lines = regexp.split('\n'); return xRegExp( lines.map((line) => line.replace(/\s+#.+/, ' ')).join('\n'), flags ); };
0477c534180e91a679215be7e1f15c8e801ba583
install/install.sh
install/install.sh
set -e # Update package list apk upgrade -q -U -a # Default server RAM if [ -z "$RAM" ]; then memory_limit=$(expr $(cat /sys/fs/cgroup/memory/memory.limit_in_bytes) / 1024 / 1024) memory_free=$(free -m | awk 'NR==2{printf $2}') export RAM=$(($memory_limit > $memory_free ? $memory_free : $memory_limit)) fi # Call sub scripts cd "$(dirname "$0")" for script in *; do if echo "$script" | grep -Eq "^[0-9]"; then /bin/sh "$script" fi done # Clean rm -rf /var/cache/apk/* rm -rf /tmp/* rm -rf "$(dirname "$0")"
set -e # Update package list apk upgrade -q -U -a # Default server RAM if [ -z "$RAM" ]; then memory_limit=$(expr $(cat /sys/fs/cgroup/memory/memory.limit_in_bytes) / 1024 / 1024) memory_free=$(free -m | awk 'NR==2{printf $2}') export RAM=$(($memory_limit > $memory_free ? $memory_free : $memory_limit)) fi # Fix domain separator export DOMAINS=$(echo "$DOMAINS" | sed -e 's/[,; ]\+/ /g') # Call sub scripts cd "$(dirname "$0")" for script in *; do if echo "$script" | grep -Eq "^[0-9]"; then /bin/sh "$script" fi done # Clean rm -rf /var/cache/apk/* rm -rf /tmp/* rm -rf "$(dirname "$0")"
Allow [,; ] as domains separator
Allow [,; ] as domains separator
Shell
mit
blunt1337/docker-alpine-nginx-php7,blunt1337/docker-alpine-nginx-php7
shell
## Code Before: set -e # Update package list apk upgrade -q -U -a # Default server RAM if [ -z "$RAM" ]; then memory_limit=$(expr $(cat /sys/fs/cgroup/memory/memory.limit_in_bytes) / 1024 / 1024) memory_free=$(free -m | awk 'NR==2{printf $2}') export RAM=$(($memory_limit > $memory_free ? $memory_free : $memory_limit)) fi # Call sub scripts cd "$(dirname "$0")" for script in *; do if echo "$script" | grep -Eq "^[0-9]"; then /bin/sh "$script" fi done # Clean rm -rf /var/cache/apk/* rm -rf /tmp/* rm -rf "$(dirname "$0")" ## Instruction: Allow [,; ] as domains separator ## Code After: set -e # Update package list apk upgrade -q -U -a # Default server RAM if [ -z "$RAM" ]; then memory_limit=$(expr $(cat /sys/fs/cgroup/memory/memory.limit_in_bytes) / 1024 / 1024) memory_free=$(free -m | awk 'NR==2{printf $2}') export RAM=$(($memory_limit > $memory_free ? $memory_free : $memory_limit)) fi # Fix domain separator export DOMAINS=$(echo "$DOMAINS" | sed -e 's/[,; ]\+/ /g') # Call sub scripts cd "$(dirname "$0")" for script in *; do if echo "$script" | grep -Eq "^[0-9]"; then /bin/sh "$script" fi done # Clean rm -rf /var/cache/apk/* rm -rf /tmp/* rm -rf "$(dirname "$0")"
6ea06013e45f2a3c87c06011e30992cd30f32276
lib/ey-core/models/server_usage.rb
lib/ey-core/models/server_usage.rb
class Ey::Core::Client::ServerUsage < Ey::Core::Model extend Ey::Core::Associations attribute :start_at, type: :time attribute :end_at, type: :time attribute :report_time, type: :time attribute :flavor attribute :dedicated attribute :location attribute :deis has_one :environment has_one :provider end
class Ey::Core::Client::ServerUsage < Ey::Core::Model extend Ey::Core::Associations attribute :start_at, type: :time attribute :end_at, type: :time attribute :report_time, type: :time attribute :flavor attribute :dedicated attribute :location attribute :deis attribute :provisioned_id has_one :environment has_one :provider end
Add provisioned_id attribute to ServerUsage
Add provisioned_id attribute to ServerUsage
Ruby
mit
engineyard/core-client-rb
ruby
## Code Before: class Ey::Core::Client::ServerUsage < Ey::Core::Model extend Ey::Core::Associations attribute :start_at, type: :time attribute :end_at, type: :time attribute :report_time, type: :time attribute :flavor attribute :dedicated attribute :location attribute :deis has_one :environment has_one :provider end ## Instruction: Add provisioned_id attribute to ServerUsage ## Code After: class Ey::Core::Client::ServerUsage < Ey::Core::Model extend Ey::Core::Associations attribute :start_at, type: :time attribute :end_at, type: :time attribute :report_time, type: :time attribute :flavor attribute :dedicated attribute :location attribute :deis attribute :provisioned_id has_one :environment has_one :provider end
a497e5747530941cec420c19eeed90f07ddb9398
app/helpers/milestones_helper.rb
app/helpers/milestones_helper.rb
module MilestonesHelper def progress_tag_for(progress_bar) text = number_to_percentage(progress_bar.percentage, precision: 0) content_tag :span do content_tag(:span, "", "data-text": text, style: "width: #{progress_bar.percentage}%;") + content_tag(:progress, text, class: progress_bar.primary? ? "primary" : "", max: ProgressBar::RANGE.max, value: progress_bar.percentage) end end end
module MilestonesHelper def progress_tag_for(progress_bar) text = number_to_percentage(progress_bar.percentage, precision: 0) content_tag :div, class: "progress", role: "progressbar", "aria-valuenow": "#{progress_bar.percentage}", "aria-valuetext": "#{progress_bar.percentage}%", "aria-valuemax": ProgressBar::RANGE.max, "aria-valuemin": "0", tabindex: "0" do content_tag(:span, "", class: "progress-meter", style: "width: #{progress_bar.percentage}%;") + content_tag(:p, text, class: "progress-meter-text") end end end
Replace progress tag to div class progress
Replace progress tag to div class progress
Ruby
agpl-3.0
AyuntamientoPuertoReal/decidePuertoReal,usabi/consul_san_borondon,consul/consul,consul/consul,consul/consul,usabi/consul_san_borondon,consul/consul,AyuntamientoMadrid/participacion,AyuntamientoMadrid/participacion,consul/consul,AyuntamientoPuertoReal/decidePuertoReal,AyuntamientoMadrid/participacion,usabi/consul_san_borondon,AyuntamientoMadrid/participacion,AyuntamientoPuertoReal/decidePuertoReal,usabi/consul_san_borondon
ruby
## Code Before: module MilestonesHelper def progress_tag_for(progress_bar) text = number_to_percentage(progress_bar.percentage, precision: 0) content_tag :span do content_tag(:span, "", "data-text": text, style: "width: #{progress_bar.percentage}%;") + content_tag(:progress, text, class: progress_bar.primary? ? "primary" : "", max: ProgressBar::RANGE.max, value: progress_bar.percentage) end end end ## Instruction: Replace progress tag to div class progress ## Code After: module MilestonesHelper def progress_tag_for(progress_bar) text = number_to_percentage(progress_bar.percentage, precision: 0) content_tag :div, class: "progress", role: "progressbar", "aria-valuenow": "#{progress_bar.percentage}", "aria-valuetext": "#{progress_bar.percentage}%", "aria-valuemax": ProgressBar::RANGE.max, "aria-valuemin": "0", tabindex: "0" do content_tag(:span, "", class: "progress-meter", style: "width: #{progress_bar.percentage}%;") + content_tag(:p, text, class: "progress-meter-text") end end end
97262b2abc361150f1e5a7b286433d53e3eb5b8e
.travis.yml
.travis.yml
language: python python: - "3.5" - "3.6" - "3.7" - "3.8" env: global: - PYTHONPATH=$PYTHONPATH:$TRAVIS_BUILD_DIR:$TRAVIS_BUILD_DIR/source - CPLUS_INCLUDE_PATH=/usr/include/gdal - C_INCLUDE_PATH=/usr/include/gdal cache: directories: - $GDALINST - ~/.cache/pip addons: apt: packages: - gdal-bin - libproj-dev - libhdf5-serial-dev - libpng-dev - libgdal-dev - libatlas-dev - libatlas-base-dev - gfortran - netcdf-bin - libnetcdf-dev before_install: - "pip install GDAL==1.10" - "pip install rasterio" - "pip install trefoil" - "pip install --upgrade setuptools" install: - "python setup.py install" script: - "py.test ."
language: python python: - "3.8" - "3.7" - "3.6" env: global: - PYTHONPATH=$PYTHONPATH:$TRAVIS_BUILD_DIR:$TRAVIS_BUILD_DIR/source - CPLUS_INCLUDE_PATH=/usr/include/gdal - C_INCLUDE_PATH=/usr/include/gdal cache: directories: - $GDALINST - ~/.cache/pip addons: apt: packages: - gdal-bin - libproj-dev - libhdf5-serial-dev - libpng-dev - libgdal-dev - libatlas-dev - libatlas-base-dev - gfortran - netcdf-bin - libnetcdf-dev before_install: - "pip install GDAL==1.10" - "pip install rasterio" - "pip install trefoil" - "pip install --upgrade setuptools" install: - "python setup.py install" script: - "py.test ."
Remove Py3.5 from test configuration
Remove Py3.5 from test configuration
YAML
bsd-3-clause
consbio/ncdjango,consbio/ncdjango
yaml
## Code Before: language: python python: - "3.5" - "3.6" - "3.7" - "3.8" env: global: - PYTHONPATH=$PYTHONPATH:$TRAVIS_BUILD_DIR:$TRAVIS_BUILD_DIR/source - CPLUS_INCLUDE_PATH=/usr/include/gdal - C_INCLUDE_PATH=/usr/include/gdal cache: directories: - $GDALINST - ~/.cache/pip addons: apt: packages: - gdal-bin - libproj-dev - libhdf5-serial-dev - libpng-dev - libgdal-dev - libatlas-dev - libatlas-base-dev - gfortran - netcdf-bin - libnetcdf-dev before_install: - "pip install GDAL==1.10" - "pip install rasterio" - "pip install trefoil" - "pip install --upgrade setuptools" install: - "python setup.py install" script: - "py.test ." ## Instruction: Remove Py3.5 from test configuration ## Code After: language: python python: - "3.8" - "3.7" - "3.6" env: global: - PYTHONPATH=$PYTHONPATH:$TRAVIS_BUILD_DIR:$TRAVIS_BUILD_DIR/source - CPLUS_INCLUDE_PATH=/usr/include/gdal - C_INCLUDE_PATH=/usr/include/gdal cache: directories: - $GDALINST - ~/.cache/pip addons: apt: packages: - gdal-bin - libproj-dev - libhdf5-serial-dev - libpng-dev - libgdal-dev - libatlas-dev - libatlas-base-dev - gfortran - netcdf-bin - libnetcdf-dev before_install: - "pip install GDAL==1.10" - "pip install rasterio" - "pip install trefoil" - "pip install --upgrade setuptools" install: - "python setup.py install" script: - "py.test ."
af73b1ab0db173737c2d8b6f0e8e3c2a09bdaed0
plugins/fstab.rb
plugins/fstab.rb
Ohai.plugin(:Fstab) do provides 'fstab' collect_data(:linux) do fstab Mash.new fstab_entries = Array.new f = File.open('/etc/fstab') f.each_line do |line| fstab_entries.push(line) unless line.start_with?('#') end fstab_return = Hash.new entry_hash = Hash.new fstab_entries.each do |entry| line = entry.split unless line.empty? entry_hash[line[0]] = { 'mount point' => line[1], 'type' => line[2], 'options' => line[3].split("'"), 'dump' => line[4], 'pass' => line[5] } end end fstab_return['fstab'] = entry_hash fstab.merge!(fstab_return) unless fstab_return.empty? end end
Ohai.plugin(:Fstab) do provides 'fstab' collect_data(:linux) do fstab Mash.new fstab_entries = Array.new f = File.open('/etc/fstab') f.each_line do |line| fstab_entries.push(line) unless line.start_with?('#') end fstab_return = Hash.new entry_hash = Hash.new fstab_entries.each do |entry| line = entry.split next if line.empty? entry_hash[line[0]] = { 'mount point' => line[1], 'type' => line[2], 'options' => line[3].split("'"), 'dump' => line[4], 'pass' => line[5] } end fstab_return['fstab'] = entry_hash fstab.merge!(fstab_return) unless fstab_return.empty? end end
Use next to skip iteration per rubocop
Use next to skip iteration per rubocop
Ruby
apache-2.0
jarosser06/ohai-plugins,rackerlabs/ohai-plugins,rackerlabs/ohai-plugins,jarosser06/ohai-plugins
ruby
## Code Before: Ohai.plugin(:Fstab) do provides 'fstab' collect_data(:linux) do fstab Mash.new fstab_entries = Array.new f = File.open('/etc/fstab') f.each_line do |line| fstab_entries.push(line) unless line.start_with?('#') end fstab_return = Hash.new entry_hash = Hash.new fstab_entries.each do |entry| line = entry.split unless line.empty? entry_hash[line[0]] = { 'mount point' => line[1], 'type' => line[2], 'options' => line[3].split("'"), 'dump' => line[4], 'pass' => line[5] } end end fstab_return['fstab'] = entry_hash fstab.merge!(fstab_return) unless fstab_return.empty? end end ## Instruction: Use next to skip iteration per rubocop ## Code After: Ohai.plugin(:Fstab) do provides 'fstab' collect_data(:linux) do fstab Mash.new fstab_entries = Array.new f = File.open('/etc/fstab') f.each_line do |line| fstab_entries.push(line) unless line.start_with?('#') end fstab_return = Hash.new entry_hash = Hash.new fstab_entries.each do |entry| line = entry.split next if line.empty? entry_hash[line[0]] = { 'mount point' => line[1], 'type' => line[2], 'options' => line[3].split("'"), 'dump' => line[4], 'pass' => line[5] } end fstab_return['fstab'] = entry_hash fstab.merge!(fstab_return) unless fstab_return.empty? end end
e2520735a0b6afcee7d54f0f6a085ef7999f7d43
lib/runtime/runtimes/base.js
lib/runtime/runtimes/base.js
const stack = require('../stack'); const evaluate = require('../evaluate'); const stdlib = require('../../stdlib'); const parse = require('../../parser/parse'); class BaseRuntime { constructor() { this.stack = stack(); this.lexicon = stdlib; } loadWords(words) { this.lexicon = Object.assign(this.lexicon, words); } reset() { this.stack.unstack(); this.lexicon = stdlib; } evaluate(source) { const ast = parse(source); evaluate(ast, this); } } module.exports = BaseRuntime;
const stack = require('../stack'); const evaluate = require('../evaluate'); const stdlib = require('../../stdlib'); const parse = require('../../parser/parse'); class BaseRuntime { constructor() { this.stack = stack(); this.lexicon = stdlib; } loadWords(words) { this.lexicon = Object.assign(this.lexicon, words); } reset() { this.stack.unstack(); this.lexicon = stdlib; } evaluate(source) { const ast = parse(source); if(ast == null) { throw new Error('Parse error!'); } evaluate(ast, this); } } module.exports = BaseRuntime;
Add a condition to throw parse error on empty AST
Add a condition to throw parse error on empty AST
JavaScript
mit
mollerse/ait-lang
javascript
## Code Before: const stack = require('../stack'); const evaluate = require('../evaluate'); const stdlib = require('../../stdlib'); const parse = require('../../parser/parse'); class BaseRuntime { constructor() { this.stack = stack(); this.lexicon = stdlib; } loadWords(words) { this.lexicon = Object.assign(this.lexicon, words); } reset() { this.stack.unstack(); this.lexicon = stdlib; } evaluate(source) { const ast = parse(source); evaluate(ast, this); } } module.exports = BaseRuntime; ## Instruction: Add a condition to throw parse error on empty AST ## Code After: const stack = require('../stack'); const evaluate = require('../evaluate'); const stdlib = require('../../stdlib'); const parse = require('../../parser/parse'); class BaseRuntime { constructor() { this.stack = stack(); this.lexicon = stdlib; } loadWords(words) { this.lexicon = Object.assign(this.lexicon, words); } reset() { this.stack.unstack(); this.lexicon = stdlib; } evaluate(source) { const ast = parse(source); if(ast == null) { throw new Error('Parse error!'); } evaluate(ast, this); } } module.exports = BaseRuntime;
8e27bc18a6fe3f59b067a1fbb7cc92649a4270af
RateMyTalkAtMobOS/Classes/Model/RMTRating.swift
RateMyTalkAtMobOS/Classes/Model/RMTRating.swift
@objc(RMTRating) class RMTRating: _RMTRating { class func deleteAllExceptMyRatings(finishedCallback: () -> Void) { dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), { () -> Void in let userUUID = NSUserDefaults.standardUserDefaults().userUUID let moc: NSManagedObjectContext = NSManagedObjectContext.MR_defaultContext() let predicate = NSPredicate(format: "%K != %@", RMTRatingAttributes.userUUID.rawValue, userUUID) var objectsToDelete: [RMTRating] = RMTRating.MR_findAllWithPredicate(predicate, inContext: moc) as [RMTRating] for rating in objectsToDelete { moc.deleteObject(rating) } moc.MR_saveToPersistentStoreWithCompletion({ (saved, error) -> Void in dispatch_async(dispatch_get_main_queue(), { () -> Void in finishedCallback() }) }) }) } }
@objc(RMTRating) class RMTRating: _RMTRating { class func deleteAllExceptMyRatings(finishedCallback: () -> Void) { dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), { () -> Void in let userUUID = NSUserDefaults.standardUserDefaults().userUUID let moc: NSManagedObjectContext = NSManagedObjectContext.MR_contextForCurrentThread() let predicate = NSPredicate(format: "%K != %@", RMTRatingAttributes.userUUID.rawValue, userUUID) var objectsToDelete: [RMTRating] = RMTRating.MR_findAllWithPredicate(predicate, inContext: moc) as [RMTRating] for rating in objectsToDelete { rating.ratingCategory?.removeRatingsObject(rating) moc.deleteObject(rating) } moc.MR_saveToPersistentStoreWithCompletion({ (saved, error) -> Void in dispatch_async(dispatch_get_main_queue(), { () -> Void in finishedCallback() }) }) }) } }
Use thread context for deleting the ratings.
Use thread context for deleting the ratings.
Swift
bsd-3-clause
grigaci/RateMyTalkAtMobOS,grigaci/RateMyTalkAtMobOS,grigaci/RateMyTalkAtMobOS
swift
## Code Before: @objc(RMTRating) class RMTRating: _RMTRating { class func deleteAllExceptMyRatings(finishedCallback: () -> Void) { dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), { () -> Void in let userUUID = NSUserDefaults.standardUserDefaults().userUUID let moc: NSManagedObjectContext = NSManagedObjectContext.MR_defaultContext() let predicate = NSPredicate(format: "%K != %@", RMTRatingAttributes.userUUID.rawValue, userUUID) var objectsToDelete: [RMTRating] = RMTRating.MR_findAllWithPredicate(predicate, inContext: moc) as [RMTRating] for rating in objectsToDelete { moc.deleteObject(rating) } moc.MR_saveToPersistentStoreWithCompletion({ (saved, error) -> Void in dispatch_async(dispatch_get_main_queue(), { () -> Void in finishedCallback() }) }) }) } } ## Instruction: Use thread context for deleting the ratings. ## Code After: @objc(RMTRating) class RMTRating: _RMTRating { class func deleteAllExceptMyRatings(finishedCallback: () -> Void) { dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), { () -> Void in let userUUID = NSUserDefaults.standardUserDefaults().userUUID let moc: NSManagedObjectContext = NSManagedObjectContext.MR_contextForCurrentThread() let predicate = NSPredicate(format: "%K != %@", RMTRatingAttributes.userUUID.rawValue, userUUID) var objectsToDelete: [RMTRating] = RMTRating.MR_findAllWithPredicate(predicate, inContext: moc) as [RMTRating] for rating in objectsToDelete { rating.ratingCategory?.removeRatingsObject(rating) moc.deleteObject(rating) } moc.MR_saveToPersistentStoreWithCompletion({ (saved, error) -> Void in dispatch_async(dispatch_get_main_queue(), { () -> Void in finishedCallback() }) }) }) } }
b1382a56b1a85b58ac204cc73a755df8520672e4
helpers/fs.ts
helpers/fs.ts
import * as fs from "fs-extra"; import * as recursiveReaddir from "recursive-readdir"; export default class HelperFS { /** * Provides functionality of deprecated fs.exists() * See https://github.com/nodejs/node/issues/1592 */ public static async exists(filename: string): Promise<boolean> { try { await fs.access(filename); return true; } catch (err) { return false; } } /** * Provides functionality of deprecated fs.existsSync() * See https://github.com/nodejs/node/issues/1592 */ public static existsSync(filename: string): boolean { try { fs.accessSync(filename); return true; } catch (ex) { return false; } } /** * Maps the recursive-readdir module to a Promise interface. */ public static recursiveReaddir(path: string): Promise<string[]> { return new Promise<string[]>((resolve, reject) => { recursiveReaddir(path, (err: Error, files: string[]) => { if (err) { reject(err); } else { resolve(files); } }); }); } }
import * as fs from "fs-extra"; import * as recursiveReaddir from "recursive-readdir"; export default class HelperFS { /** * DEPRECATED: use `fs-extra`.pathExists() * Provides functionality of deprecated fs.exists() * See https://github.com/nodejs/node/issues/1592 */ public static async exists(filename: string): Promise<boolean> { try { await fs.access(filename); return true; } catch (err) { return false; } } /** * DEPRECATED: use `fs-extra`.pathExistsSync() * Provides functionality of deprecated fs.existsSync() * See https://github.com/nodejs/node/issues/1592 */ public static existsSync(filename: string): boolean { try { fs.accessSync(filename); return true; } catch (ex) { return false; } } /** * Maps the recursive-readdir module to a Promise interface. */ public static recursiveReaddir(path: string): Promise<string[]> { return new Promise<string[]>((resolve, reject) => { recursiveReaddir(path, (err: Error, files: string[]) => { if (err) { reject(err); } else { resolve(files); } }); }); } }
Mark FS helpers as deprecated
Mark FS helpers as deprecated
TypeScript
mit
crossroads-education/eta,crossroads-education/eta
typescript
## Code Before: import * as fs from "fs-extra"; import * as recursiveReaddir from "recursive-readdir"; export default class HelperFS { /** * Provides functionality of deprecated fs.exists() * See https://github.com/nodejs/node/issues/1592 */ public static async exists(filename: string): Promise<boolean> { try { await fs.access(filename); return true; } catch (err) { return false; } } /** * Provides functionality of deprecated fs.existsSync() * See https://github.com/nodejs/node/issues/1592 */ public static existsSync(filename: string): boolean { try { fs.accessSync(filename); return true; } catch (ex) { return false; } } /** * Maps the recursive-readdir module to a Promise interface. */ public static recursiveReaddir(path: string): Promise<string[]> { return new Promise<string[]>((resolve, reject) => { recursiveReaddir(path, (err: Error, files: string[]) => { if (err) { reject(err); } else { resolve(files); } }); }); } } ## Instruction: Mark FS helpers as deprecated ## Code After: import * as fs from "fs-extra"; import * as recursiveReaddir from "recursive-readdir"; export default class HelperFS { /** * DEPRECATED: use `fs-extra`.pathExists() * Provides functionality of deprecated fs.exists() * See https://github.com/nodejs/node/issues/1592 */ public static async exists(filename: string): Promise<boolean> { try { await fs.access(filename); return true; } catch (err) { return false; } } /** * DEPRECATED: use `fs-extra`.pathExistsSync() * Provides functionality of deprecated fs.existsSync() * See https://github.com/nodejs/node/issues/1592 */ public static existsSync(filename: string): boolean { try { fs.accessSync(filename); return true; } catch (ex) { return false; } } /** * Maps the recursive-readdir module to a Promise interface. */ public static recursiveReaddir(path: string): Promise<string[]> { return new Promise<string[]>((resolve, reject) => { recursiveReaddir(path, (err: Error, files: string[]) => { if (err) { reject(err); } else { resolve(files); } }); }); } }
a34920c4f7952421729148eebb9009b2a1722a9a
.travis.yml
.travis.yml
branches: only: - 'master' - 'develop' language: ruby rvm: - 2.1 - 2.0 env: - DB=postgres BUILD_TYPE=other - DB=mysql BUILD_TYPE=other - DB=postgres BUILD_TYPE=cucumber - DB=mysql BUILD_TYPE=cucumber bundler_args: "--without development production heroku" script: "./script/ci/build.sh" notifications: irc: channels: - "irc.freenode.org:6667#diaspora-dev"
language: ruby rvm: - 2.1 - 2.0 env: - DB=postgres BUILD_TYPE=other - DB=mysql BUILD_TYPE=other - DB=postgres BUILD_TYPE=cucumber - DB=mysql BUILD_TYPE=cucumber sudo: false branches: only: - 'master' - 'develop' bundler_args: "--without development production heroku --jobs 3 --retry 3" script: "./script/ci/build.sh" notifications: irc: channels: - "irc.freenode.org:6667#diaspora-dev"
Use the new build env on Travis
Use the new build env on Travis faster better stronger
YAML
agpl-3.0
Flaburgan/diaspora,jhass/diaspora,geraspora/diaspora,despora/diaspora,Amadren/diaspora,KentShikama/diaspora,Flaburgan/diaspora,jhass/diaspora,spixi/diaspora,diaspora/diaspora,spixi/diaspora,spixi/diaspora,jhass/diaspora,Flaburgan/diaspora,KentShikama/diaspora,SuperTux88/diaspora,Muhannes/diaspora,despora/diaspora,diaspora/diaspora,spixi/diaspora,Muhannes/diaspora,SuperTux88/diaspora,diaspora/diaspora,SuperTux88/diaspora,SuperTux88/diaspora,diaspora/diaspora,Muhannes/diaspora,geraspora/diaspora,KentShikama/diaspora,jhass/diaspora,Amadren/diaspora,Amadren/diaspora,Amadren/diaspora,Muhannes/diaspora,KentShikama/diaspora,Flaburgan/diaspora,despora/diaspora,geraspora/diaspora,despora/diaspora,geraspora/diaspora
yaml
## Code Before: branches: only: - 'master' - 'develop' language: ruby rvm: - 2.1 - 2.0 env: - DB=postgres BUILD_TYPE=other - DB=mysql BUILD_TYPE=other - DB=postgres BUILD_TYPE=cucumber - DB=mysql BUILD_TYPE=cucumber bundler_args: "--without development production heroku" script: "./script/ci/build.sh" notifications: irc: channels: - "irc.freenode.org:6667#diaspora-dev" ## Instruction: Use the new build env on Travis faster better stronger ## Code After: language: ruby rvm: - 2.1 - 2.0 env: - DB=postgres BUILD_TYPE=other - DB=mysql BUILD_TYPE=other - DB=postgres BUILD_TYPE=cucumber - DB=mysql BUILD_TYPE=cucumber sudo: false branches: only: - 'master' - 'develop' bundler_args: "--without development production heroku --jobs 3 --retry 3" script: "./script/ci/build.sh" notifications: irc: channels: - "irc.freenode.org:6667#diaspora-dev"