commit stringlengths 40 40 | old_file stringlengths 4 184 | new_file stringlengths 4 184 | old_contents stringlengths 1 3.6k | new_contents stringlengths 5 3.38k | subject stringlengths 15 778 | message stringlengths 16 6.74k | lang stringclasses 201 values | license stringclasses 13 values | repos stringlengths 6 116k | config stringclasses 201 values | content stringlengths 137 7.24k | diff stringlengths 26 5.55k | diff_length int64 1 123 | relative_diff_length float64 0.01 89 | n_lines_added int64 0 108 | n_lines_deleted int64 0 106 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
da553961ab8950c2ae8f1299ba8071b491e649e8 | nginx/nginx-notes.md | nginx/nginx-notes.md |
NGiNX has one master process and several worker processes. The main purpose
of the master process is to read and evaluate configuration, and maintain
worker processes. Worker processes do actual processing of requests.
The way NGiNX and its modules work is determined in the configuration file.
## Starting, Stopping, and Reloading Configuration
See https://nginx.org/en/docs/beginners_guide.html for details.
```sh
$ nginx -s signal
```
where the signal is one of
* stop β fast shutdown
* quit β graceful shutdown
* reload β reloading the configuration file
* reopen β reopening the log files
|
NGiNX has one master process and several worker processes. The main purpose
of the master process is to read and evaluate configuration, and maintain
worker processes. Worker processes do actual processing of requests.
The way NGiNX and its modules work is determined in the configuration file.
## Starting, Stopping, and Reloading Configuration
See https://nginx.org/en/docs/beginners_guide.html for details.
```sh
$ nginx -s signal
```
where the signal is one of
* stop β fast shutdown
* quit β graceful shutdown
* reload β reloading the configuration file
* reopen β reopening the log files
## Configuration
### Structure
```nginx
# Comments begin with "#".
# Simple directives (as opposed to block directives) are allowed in various
# contexts including the main context.
#
# The main context currently only allows four block directives: "events",
# "http", "mail", and "stream". However, "mail" and "stream" are not available
# by default.
# Note: Only directives that are available by default are shown below. Many
# other directives can be made available by rebuilding from source with certain
# options specified.
simple_directive param1 param2 ...;
# ...
simple_directive param1 param2 ...;
events {
simple_directive param1 param2 ...;
# ...
simple_directive param1 param2 ...;
}
http {
# The "http" context only allows simple directives and "server" directives.
simple_directive param1 param2 ...;
# ...
simple_directive param1 param2 ...;
charset_map charset1 charset2 {
#...
}
geo [$address] $variable {
#...
}
map string $variable {
# ...
}
split_clients string $variable {
#...
}
types {
# ...
}
server {
# The "server" context only allows simple directives and "location" directives.
simple_directive param1 param2 ...;
# ...
simple_directive param1 param2 ...;
if (condition) {
#...
}
types {
# ...
}
location path {
# The "location" context only allows simple directives and other "location"
# directives.
simple_directive param1 param2 ...;
# ...
simple_directive param1 param2 ...;
if (condition) {
#...
}
types {
# ...
}
}
}
# ...
server {
# ...
}
}
```
| Add a Configuration Structure Section | Add a Configuration Structure Section | Markdown | mit | dhurlburtusa/shortcuts,dhurlburtusa/shortcuts | markdown | ## Code Before:
NGiNX has one master process and several worker processes. The main purpose
of the master process is to read and evaluate configuration, and maintain
worker processes. Worker processes do actual processing of requests.
The way NGiNX and its modules work is determined in the configuration file.
## Starting, Stopping, and Reloading Configuration
See https://nginx.org/en/docs/beginners_guide.html for details.
```sh
$ nginx -s signal
```
where the signal is one of
* stop β fast shutdown
* quit β graceful shutdown
* reload β reloading the configuration file
* reopen β reopening the log files
## Instruction:
Add a Configuration Structure Section
## Code After:
NGiNX has one master process and several worker processes. The main purpose
of the master process is to read and evaluate configuration, and maintain
worker processes. Worker processes do actual processing of requests.
The way NGiNX and its modules work is determined in the configuration file.
## Starting, Stopping, and Reloading Configuration
See https://nginx.org/en/docs/beginners_guide.html for details.
```sh
$ nginx -s signal
```
where the signal is one of
* stop β fast shutdown
* quit β graceful shutdown
* reload β reloading the configuration file
* reopen β reopening the log files
## Configuration
### Structure
```nginx
# Comments begin with "#".
# Simple directives (as opposed to block directives) are allowed in various
# contexts including the main context.
#
# The main context currently only allows four block directives: "events",
# "http", "mail", and "stream". However, "mail" and "stream" are not available
# by default.
# Note: Only directives that are available by default are shown below. Many
# other directives can be made available by rebuilding from source with certain
# options specified.
simple_directive param1 param2 ...;
# ...
simple_directive param1 param2 ...;
events {
simple_directive param1 param2 ...;
# ...
simple_directive param1 param2 ...;
}
http {
# The "http" context only allows simple directives and "server" directives.
simple_directive param1 param2 ...;
# ...
simple_directive param1 param2 ...;
charset_map charset1 charset2 {
#...
}
geo [$address] $variable {
#...
}
map string $variable {
# ...
}
split_clients string $variable {
#...
}
types {
# ...
}
server {
# The "server" context only allows simple directives and "location" directives.
simple_directive param1 param2 ...;
# ...
simple_directive param1 param2 ...;
if (condition) {
#...
}
types {
# ...
}
location path {
# The "location" context only allows simple directives and other "location"
# directives.
simple_directive param1 param2 ...;
# ...
simple_directive param1 param2 ...;
if (condition) {
#...
}
types {
# ...
}
}
}
# ...
server {
# ...
}
}
```
|
NGiNX has one master process and several worker processes. The main purpose
of the master process is to read and evaluate configuration, and maintain
worker processes. Worker processes do actual processing of requests.
The way NGiNX and its modules work is determined in the configuration file.
+
## Starting, Stopping, and Reloading Configuration
See https://nginx.org/en/docs/beginners_guide.html for details.
```sh
$ nginx -s signal
```
where the signal is one of
* stop β fast shutdown
* quit β graceful shutdown
* reload β reloading the configuration file
* reopen β reopening the log files
+
+
+ ## Configuration
+
+ ### Structure
+
+ ```nginx
+ # Comments begin with "#".
+
+ # Simple directives (as opposed to block directives) are allowed in various
+ # contexts including the main context.
+ #
+ # The main context currently only allows four block directives: "events",
+ # "http", "mail", and "stream". However, "mail" and "stream" are not available
+ # by default.
+
+ # Note: Only directives that are available by default are shown below. Many
+ # other directives can be made available by rebuilding from source with certain
+ # options specified.
+
+ simple_directive param1 param2 ...;
+ # ...
+ simple_directive param1 param2 ...;
+
+ events {
+ simple_directive param1 param2 ...;
+ # ...
+ simple_directive param1 param2 ...;
+ }
+
+ http {
+ # The "http" context only allows simple directives and "server" directives.
+
+ simple_directive param1 param2 ...;
+ # ...
+ simple_directive param1 param2 ...;
+
+ charset_map charset1 charset2 {
+ #...
+ }
+
+ geo [$address] $variable {
+ #...
+ }
+
+ map string $variable {
+ # ...
+ }
+
+ split_clients string $variable {
+ #...
+ }
+
+ types {
+ # ...
+ }
+
+ server {
+ # The "server" context only allows simple directives and "location" directives.
+
+ simple_directive param1 param2 ...;
+ # ...
+ simple_directive param1 param2 ...;
+
+ if (condition) {
+ #...
+ }
+
+ types {
+ # ...
+ }
+
+ location path {
+ # The "location" context only allows simple directives and other "location"
+ # directives.
+
+ simple_directive param1 param2 ...;
+ # ...
+ simple_directive param1 param2 ...;
+
+ if (condition) {
+ #...
+ }
+
+ types {
+ # ...
+ }
+ }
+ }
+
+ # ...
+
+ server {
+ # ...
+ }
+ }
+ ``` | 98 | 4.666667 | 98 | 0 |
76f87d87de139a997d4839f59008d4827cf4cbb1 | Casks/libreoffice.rb | Casks/libreoffice.rb | class Libreoffice < Cask
homepage 'https://www.libreoffice.org/'
version '4.3.0'
if Hardware::CPU.is_32_bit? or MacOS.version < :mountain_lion
url "https://download.documentfoundation.org/libreoffice/stable/#{version}/mac/x86/LibreOffice_#{version}_MacOS_x86.dmg"
sha256 '31b84237db80f655aabcc3962c4a5e4fd84318adb6db1b3b311a883f16af1164'
else
url "https://download.documentfoundation.org/libreoffice/stable/#{version}/mac/x86_64/LibreOffice_#{version}_MacOS_x86-64.dmg"
sha256 '80772ed238b2033233aa2867962cfbb6f701ae81b3f592971149f8e3e54504bf'
end
link 'LibreOffice.app'
end
| class Libreoffice < Cask
homepage 'https://www.libreoffice.org/'
version '4.3.1'
if Hardware::CPU.is_32_bit? or MacOS.version < :mountain_lion
url "https://download.documentfoundation.org/libreoffice/stable/#{version}/mac/x86/LibreOffice_#{version}_MacOS_x86.dmg"
sha256 'a2d507f643b952282ff5ce90ac227bea9bd412748ffcb93050db75256b2f803c'
else
url "https://download.documentfoundation.org/libreoffice/stable/#{version}/mac/x86_64/LibreOffice_#{version}_MacOS_x86-64.dmg"
sha256 '9a212ca4b77770c57f8b7ac375b5a98824c93dabd6e238dc019dc1139b6d3b7f'
end
link 'LibreOffice.app'
end
| Update LibreOffice to latest version 4.3.1 | Update LibreOffice to latest version 4.3.1 | Ruby | bsd-2-clause | atsuyim/homebrew-cask,kpearson/homebrew-cask,wesen/homebrew-cask,miku/homebrew-cask,flaviocamilo/homebrew-cask,hackhandslabs/homebrew-cask,arranubels/homebrew-cask,kostasdizas/homebrew-cask,christophermanning/homebrew-cask,uetchy/homebrew-cask,kei-yamazaki/homebrew-cask,SamiHiltunen/homebrew-cask,morsdyce/homebrew-cask,segiddins/homebrew-cask,zmwangx/homebrew-cask,lalyos/homebrew-cask,tsparber/homebrew-cask,miccal/homebrew-cask,mjdescy/homebrew-cask,amatos/homebrew-cask,nathanielvarona/homebrew-cask,ianyh/homebrew-cask,akiomik/homebrew-cask,colindunn/homebrew-cask,guerrero/homebrew-cask,lolgear/homebrew-cask,joaocc/homebrew-cask,rickychilcott/homebrew-cask,alexg0/homebrew-cask,vin047/homebrew-cask,ajbw/homebrew-cask,JacopKane/homebrew-cask,wizonesolutions/homebrew-cask,greg5green/homebrew-cask,jhowtan/homebrew-cask,mfpierre/homebrew-cask,dezon/homebrew-cask,wickedsp1d3r/homebrew-cask,paour/homebrew-cask,frapposelli/homebrew-cask,catap/homebrew-cask,Nitecon/homebrew-cask,anbotero/homebrew-cask,deanmorin/homebrew-cask,ftiff/homebrew-cask,reelsense/homebrew-cask,donbobka/homebrew-cask,artdevjs/homebrew-cask,josa42/homebrew-cask,ericbn/homebrew-cask,boecko/homebrew-cask,pablote/homebrew-cask,hellosky806/homebrew-cask,gilesdring/homebrew-cask,jedahan/homebrew-cask,aki77/homebrew-cask,kronicd/homebrew-cask,gustavoavellar/homebrew-cask,arronmabrey/homebrew-cask,m3nu/homebrew-cask,lantrix/homebrew-cask,JikkuJose/homebrew-cask,yuhki50/homebrew-cask,JosephViolago/homebrew-cask,winkelsdorf/homebrew-cask,Keloran/homebrew-cask,phpwutz/homebrew-cask,githubutilities/homebrew-cask,athrunsun/homebrew-cask,bendoerr/homebrew-cask,inz/homebrew-cask,xakraz/homebrew-cask,okket/homebrew-cask,enriclluelles/homebrew-cask,rogeriopradoj/homebrew-cask,mikem/homebrew-cask,Ibuprofen/homebrew-cask,kingthorin/homebrew-cask,mAAdhaTTah/homebrew-cask,Gasol/homebrew-cask,elseym/homebrew-cask,blogabe/homebrew-cask,rogeriopradoj/homebrew-cask,kronicd/homebrew-cask,samshadwell/homebrew-cask,faun/homebrew-cask,tolbkni/homebrew-cask,xyb/homebrew-cask,a1russell/homebrew-cask,blainesch/homebrew-cask,timsutton/homebrew-cask,pkq/homebrew-cask,slack4u/homebrew-cask,kesara/homebrew-cask,deiga/homebrew-cask,garborg/homebrew-cask,giannitm/homebrew-cask,theoriginalgri/homebrew-cask,mingzhi22/homebrew-cask,zchee/homebrew-cask,mkozjak/homebrew-cask,opsdev-ws/homebrew-cask,leonmachadowilcox/homebrew-cask,esebastian/homebrew-cask,elnappo/homebrew-cask,diguage/homebrew-cask,xcezx/homebrew-cask,alebcay/homebrew-cask,crzrcn/homebrew-cask,Hywan/homebrew-cask,yuhki50/homebrew-cask,xight/homebrew-cask,mwilmer/homebrew-cask,j13k/homebrew-cask,norio-nomura/homebrew-cask,cohei/homebrew-cask,hakamadare/homebrew-cask,mchlrmrz/homebrew-cask,jeroenj/homebrew-cask,nelsonjchen/homebrew-cask,nrlquaker/homebrew-cask,cedwardsmedia/homebrew-cask,bsiddiqui/homebrew-cask,gustavoavellar/homebrew-cask,kuno/homebrew-cask,zhuzihhhh/homebrew-cask,johndbritton/homebrew-cask,lieuwex/homebrew-cask,ky0615/homebrew-cask-1,yutarody/homebrew-cask,forevergenin/homebrew-cask,kolomiichenko/homebrew-cask,maxnordlund/homebrew-cask,mwek/homebrew-cask,bchatard/homebrew-cask,gyugyu/homebrew-cask,mkozjak/homebrew-cask,RJHsiao/homebrew-cask,buo/homebrew-cask,klane/homebrew-cask,tan9/homebrew-cask,mjdescy/homebrew-cask,djakarta-trap/homebrew-myCask,hakamadare/homebrew-cask,mattfelsen/homebrew-cask,blainesch/homebrew-cask,exherb/homebrew-cask,MerelyAPseudonym/homebrew-cask,opsdev-ws/homebrew-cask,mAAdhaTTah/homebrew-cask,mindriot101/homebrew-cask,otaran/homebrew-cask,josa42/homebrew-cask,esebastian/homebrew-cask,dvdoliveira/homebrew-cask,winkelsdorf/homebrew-cask,renard/homebrew-cask,lucasmezencio/homebrew-cask,chrisRidgers/homebrew-cask,gerrypower/homebrew-cask,xyb/homebrew-cask,timsutton/homebrew-cask,kingthorin/homebrew-cask,supriyantomaftuh/homebrew-cask,lalyos/homebrew-cask,jayshao/homebrew-cask,muan/homebrew-cask,garborg/homebrew-cask,guylabs/homebrew-cask,colindunn/homebrew-cask,pablote/homebrew-cask,klane/homebrew-cask,samdoran/homebrew-cask,thehunmonkgroup/homebrew-cask,mariusbutuc/homebrew-cask,aguynamedryan/homebrew-cask,csmith-palantir/homebrew-cask,samdoran/homebrew-cask,Whoaa512/homebrew-cask,joschi/homebrew-cask,pgr0ss/homebrew-cask,markthetech/homebrew-cask,mattfelsen/homebrew-cask,Amorymeltzer/homebrew-cask,sebcode/homebrew-cask,bkono/homebrew-cask,robbiethegeek/homebrew-cask,sirodoht/homebrew-cask,lucasmezencio/homebrew-cask,blogabe/homebrew-cask,timsutton/homebrew-cask,chuanxd/homebrew-cask,xiongchiamiov/homebrew-cask,sebcode/homebrew-cask,genewoo/homebrew-cask,MicTech/homebrew-cask,0xadada/homebrew-cask,guerrero/homebrew-cask,cliffcotino/homebrew-cask,otzy007/homebrew-cask,neil-ca-moore/homebrew-cask,n8henrie/homebrew-cask,johntrandall/homebrew-cask,bendoerr/homebrew-cask,prime8/homebrew-cask,seanorama/homebrew-cask,jellyfishcoder/homebrew-cask,johnjelinek/homebrew-cask,slnovak/homebrew-cask,sideci-sample/sideci-sample-homebrew-cask,jrwesolo/homebrew-cask,RJHsiao/homebrew-cask,huanzhang/homebrew-cask,djmonta/homebrew-cask,andrewdisley/homebrew-cask,morganestes/homebrew-cask,scribblemaniac/homebrew-cask,shanonvl/homebrew-cask,dunn/homebrew-cask,miguelfrde/homebrew-cask,Gasol/homebrew-cask,albertico/homebrew-cask,tedski/homebrew-cask,ky0615/homebrew-cask-1,fly19890211/homebrew-cask,huanzhang/homebrew-cask,santoshsahoo/homebrew-cask,stonehippo/homebrew-cask,vin047/homebrew-cask,kei-yamazaki/homebrew-cask,dwihn0r/homebrew-cask,mingzhi22/homebrew-cask,reitermarkus/homebrew-cask,buo/homebrew-cask,victorpopkov/homebrew-cask,napaxton/homebrew-cask,wmorin/homebrew-cask,goxberry/homebrew-cask,johnste/homebrew-cask,mwean/homebrew-cask,renaudguerin/homebrew-cask,paulbreslin/homebrew-cask,coneman/homebrew-cask,jgarber623/homebrew-cask,jangalinski/homebrew-cask,iAmGhost/homebrew-cask,chrisRidgers/homebrew-cask,miccal/homebrew-cask,ericbn/homebrew-cask,ahvigil/homebrew-cask,yumitsu/homebrew-cask,mahori/homebrew-cask,nysthee/homebrew-cask,scribblemaniac/homebrew-cask,wKovacs64/homebrew-cask,renard/homebrew-cask,psibre/homebrew-cask,My2ndAngelic/homebrew-cask,franklouwers/homebrew-cask,reitermarkus/homebrew-cask,dustinblackman/homebrew-cask,nivanchikov/homebrew-cask,iamso/homebrew-cask,jhowtan/homebrew-cask,jgarber623/homebrew-cask,delphinus35/homebrew-cask,psibre/homebrew-cask,fazo96/homebrew-cask,gguillotte/homebrew-cask,rhendric/homebrew-cask,anbotero/homebrew-cask,BenjaminHCCarr/homebrew-cask,andrewschleifer/homebrew-cask,bsiddiqui/homebrew-cask,mchlrmrz/homebrew-cask,jen20/homebrew-cask,wastrachan/homebrew-cask,gord1anknot/homebrew-cask,aktau/homebrew-cask,bdhess/homebrew-cask,a-x-/homebrew-cask,BenjaminHCCarr/homebrew-cask,carlmod/homebrew-cask,thomanq/homebrew-cask,rubenerd/homebrew-cask,wuman/homebrew-cask,LaurentFough/homebrew-cask,dlovitch/homebrew-cask,claui/homebrew-cask,inta/homebrew-cask,kkdd/homebrew-cask,napaxton/homebrew-cask,ahundt/homebrew-cask,jiashuw/homebrew-cask,gmkey/homebrew-cask,kongslund/homebrew-cask,kevyau/homebrew-cask,ajbw/homebrew-cask,n0ts/homebrew-cask,winkelsdorf/homebrew-cask,supriyantomaftuh/homebrew-cask,kteru/homebrew-cask,dspeckhard/homebrew-cask,robertgzr/homebrew-cask,kevyau/homebrew-cask,underyx/homebrew-cask,nathansgreen/homebrew-cask,corbt/homebrew-cask,mhubig/homebrew-cask,fanquake/homebrew-cask,reelsense/homebrew-cask,vitorgalvao/homebrew-cask,caskroom/homebrew-cask,linc01n/homebrew-cask,inz/homebrew-cask,gibsjose/homebrew-cask,riyad/homebrew-cask,gyndav/homebrew-cask,13k/homebrew-cask,jeanregisser/homebrew-cask,slnovak/homebrew-cask,JoelLarson/homebrew-cask,fazo96/homebrew-cask,jpodlech/homebrew-cask,taherio/homebrew-cask,dvdoliveira/homebrew-cask,morganestes/homebrew-cask,chino/homebrew-cask,colindean/homebrew-cask,diogodamiani/homebrew-cask,theoriginalgri/homebrew-cask,puffdad/homebrew-cask,rajiv/homebrew-cask,dwkns/homebrew-cask,jpmat296/homebrew-cask,kolomiichenko/homebrew-cask,lvicentesanchez/homebrew-cask,sosedoff/homebrew-cask,nathanielvarona/homebrew-cask,joshka/homebrew-cask,mattrobenolt/homebrew-cask,crmne/homebrew-cask,akiomik/homebrew-cask,jayshao/homebrew-cask,robbiethegeek/homebrew-cask,albertico/homebrew-cask,paour/homebrew-cask,lifepillar/homebrew-cask,AdamCmiel/homebrew-cask,tjt263/homebrew-cask,My2ndAngelic/homebrew-cask,ahundt/homebrew-cask,tarwich/homebrew-cask,scottsuch/homebrew-cask,cobyism/homebrew-cask,skatsuta/homebrew-cask,leipert/homebrew-cask,rajiv/homebrew-cask,cobyism/homebrew-cask,mhubig/homebrew-cask,zmwangx/homebrew-cask,joschi/homebrew-cask,nshemonsky/homebrew-cask,royalwang/homebrew-cask,ericbn/homebrew-cask,vmrob/homebrew-cask,bkono/homebrew-cask,janlugt/homebrew-cask,joshka/homebrew-cask,mishari/homebrew-cask,a-x-/homebrew-cask,ninjahoahong/homebrew-cask,brianshumate/homebrew-cask,fly19890211/homebrew-cask,kpearson/homebrew-cask,JacopKane/homebrew-cask,chadcatlett/caskroom-homebrew-cask,mindriot101/homebrew-cask,hristozov/homebrew-cask,rajiv/homebrew-cask,kiliankoe/homebrew-cask,greg5green/homebrew-cask,andyli/homebrew-cask,larseggert/homebrew-cask,scw/homebrew-cask,kamilboratynski/homebrew-cask,codeurge/homebrew-cask,RickWong/homebrew-cask,AndreTheHunter/homebrew-cask,dieterdemeyer/homebrew-cask,jbeagley52/homebrew-cask,cliffcotino/homebrew-cask,moimikey/homebrew-cask,ddm/homebrew-cask,imgarylai/homebrew-cask,alexg0/homebrew-cask,mathbunnyru/homebrew-cask,doits/homebrew-cask,tsparber/homebrew-cask,tmoreira2020/homebrew,imgarylai/homebrew-cask,wayou/homebrew-cask,amatos/homebrew-cask,sanyer/homebrew-cask,xtian/homebrew-cask,sachin21/homebrew-cask,bosr/homebrew-cask,zerrot/homebrew-cask,williamboman/homebrew-cask,arronmabrey/homebrew-cask,adelinofaria/homebrew-cask,jawshooah/homebrew-cask,caskroom/homebrew-cask,sscotth/homebrew-cask,claui/homebrew-cask,ingorichter/homebrew-cask,ebraminio/homebrew-cask,malob/homebrew-cask,lukasbestle/homebrew-cask,mahori/homebrew-cask,seanzxx/homebrew-cask,qbmiller/homebrew-cask,joaoponceleao/homebrew-cask,ashishb/homebrew-cask,markhuber/homebrew-cask,qbmiller/homebrew-cask,JacopKane/homebrew-cask,Fedalto/homebrew-cask,danielbayley/homebrew-cask,gguillotte/homebrew-cask,victorpopkov/homebrew-cask,3van/homebrew-cask,JosephViolago/homebrew-cask,stevenmaguire/homebrew-cask,nrlquaker/homebrew-cask,lumaxis/homebrew-cask,6uclz1/homebrew-cask,diogodamiani/homebrew-cask,markhuber/homebrew-cask,tranc99/homebrew-cask,mahori/homebrew-cask,moimikey/homebrew-cask,kryhear/homebrew-cask,BenjaminHCCarr/homebrew-cask,andyshinn/homebrew-cask,donbobka/homebrew-cask,deizel/homebrew-cask,enriclluelles/homebrew-cask,patresi/homebrew-cask,asins/homebrew-cask,mathbunnyru/homebrew-cask,MerelyAPseudonym/homebrew-cask,retrography/homebrew-cask,englishm/homebrew-cask,FinalDes/homebrew-cask,mwilmer/homebrew-cask,lolgear/homebrew-cask,lauantai/homebrew-cask,barravi/homebrew-cask,nathanielvarona/homebrew-cask,skyyuan/homebrew-cask,tangestani/homebrew-cask,howie/homebrew-cask,kievechua/homebrew-cask,feigaochn/homebrew-cask,frapposelli/homebrew-cask,ashishb/homebrew-cask,jacobdam/homebrew-cask,neil-ca-moore/homebrew-cask,farmerchris/homebrew-cask,MichaelPei/homebrew-cask,Ephemera/homebrew-cask,askl56/homebrew-cask,SentinelWarren/homebrew-cask,moimikey/homebrew-cask,deiga/homebrew-cask,sysbot/homebrew-cask,JoelLarson/homebrew-cask,slack4u/homebrew-cask,adelinofaria/homebrew-cask,robertgzr/homebrew-cask,mikem/homebrew-cask,ksylvan/homebrew-cask,samshadwell/homebrew-cask,crmne/homebrew-cask,AndreTheHunter/homebrew-cask,yutarody/homebrew-cask,ksato9700/homebrew-cask,n8henrie/homebrew-cask,coneman/homebrew-cask,gyugyu/homebrew-cask,schneidmaster/homebrew-cask,mwek/homebrew-cask,petmoo/homebrew-cask,nrlquaker/homebrew-cask,wolflee/homebrew-cask,Bombenleger/homebrew-cask,mlocher/homebrew-cask,bchatard/homebrew-cask,mishari/homebrew-cask,boydj/homebrew-cask,shoichiaizawa/homebrew-cask,seanorama/homebrew-cask,jonathanwiesel/homebrew-cask,thii/homebrew-cask,syscrusher/homebrew-cask,coeligena/homebrew-customized,uetchy/homebrew-cask,antogg/homebrew-cask,adrianchia/homebrew-cask,andyshinn/homebrew-cask,sscotth/homebrew-cask,moogar0880/homebrew-cask,kievechua/homebrew-cask,gerrypower/homebrew-cask,a1russell/homebrew-cask,ddm/homebrew-cask,decrement/homebrew-cask,mattrobenolt/homebrew-cask,retbrown/homebrew-cask,0rax/homebrew-cask,julienlavergne/homebrew-cask,samnung/homebrew-cask,flaviocamilo/homebrew-cask,imgarylai/homebrew-cask,vigosan/homebrew-cask,RogerThiede/homebrew-cask,xyb/homebrew-cask,helloIAmPau/homebrew-cask,ywfwj2008/homebrew-cask,scottsuch/homebrew-cask,jaredsampson/homebrew-cask,mattrobenolt/homebrew-cask,freeslugs/homebrew-cask,jeroenseegers/homebrew-cask,casidiablo/homebrew-cask,tjnycum/homebrew-cask,troyxmccall/homebrew-cask,fharbe/homebrew-cask,gurghet/homebrew-cask,cprecioso/homebrew-cask,MisumiRize/homebrew-cask,gyndav/homebrew-cask,jacobbednarz/homebrew-cask,wickles/homebrew-cask,gilesdring/homebrew-cask,lukeadams/homebrew-cask,gerrymiller/homebrew-cask,moogar0880/homebrew-cask,drostron/homebrew-cask,rhendric/homebrew-cask,stevenmaguire/homebrew-cask,sachin21/homebrew-cask,andrewdisley/homebrew-cask,neverfox/homebrew-cask,guylabs/homebrew-cask,johnjelinek/homebrew-cask,pkq/homebrew-cask,asbachb/homebrew-cask,rogeriopradoj/homebrew-cask,afh/homebrew-cask,andersonba/homebrew-cask,tdsmith/homebrew-cask,julienlavergne/homebrew-cask,ldong/homebrew-cask,wastrachan/homebrew-cask,sanchezm/homebrew-cask,toonetown/homebrew-cask,tyage/homebrew-cask,Ketouem/homebrew-cask,lauantai/homebrew-cask,iAmGhost/homebrew-cask,doits/homebrew-cask,vigosan/homebrew-cask,drostron/homebrew-cask,ponychicken/homebrew-customcask,dictcp/homebrew-cask,chuanxd/homebrew-cask,uetchy/homebrew-cask,delphinus35/homebrew-cask,troyxmccall/homebrew-cask,unasuke/homebrew-cask,chino/homebrew-cask,jpmat296/homebrew-cask,Nitecon/homebrew-cask,wesen/homebrew-cask,barravi/homebrew-cask,feniix/homebrew-cask,fwiesel/homebrew-cask,christer155/homebrew-cask,jamesmlees/homebrew-cask,andyli/homebrew-cask,optikfluffel/homebrew-cask,jawshooah/homebrew-cask,kirikiriyamama/homebrew-cask,cohei/homebrew-cask,nickpellant/homebrew-cask,d/homebrew-cask,lantrix/homebrew-cask,sanchezm/homebrew-cask,MisumiRize/homebrew-cask,dlovitch/homebrew-cask,Saklad5/homebrew-cask,gmkey/homebrew-cask,stephenwade/homebrew-cask,wizonesolutions/homebrew-cask,jangalinski/homebrew-cask,hristozov/homebrew-cask,Ketouem/homebrew-cask,shonjir/homebrew-cask,zeusdeux/homebrew-cask,nightscape/homebrew-cask,cclauss/homebrew-cask,bgandon/homebrew-cask,lukasbestle/homebrew-cask,riyad/homebrew-cask,xight/homebrew-cask,jedahan/homebrew-cask,michelegera/homebrew-cask,paulbreslin/homebrew-cask,kTitan/homebrew-cask,jasmas/homebrew-cask,jpodlech/homebrew-cask,ianyh/homebrew-cask,flada-auxv/homebrew-cask,jeroenj/homebrew-cask,mathbunnyru/homebrew-cask,retrography/homebrew-cask,helloIAmPau/homebrew-cask,josa42/homebrew-cask,mchlrmrz/homebrew-cask,LaurentFough/homebrew-cask,santoshsahoo/homebrew-cask,zeusdeux/homebrew-cask,daften/homebrew-cask,englishm/homebrew-cask,jmeridth/homebrew-cask,maxnordlund/homebrew-cask,Amorymeltzer/homebrew-cask,brianshumate/homebrew-cask,bcomnes/homebrew-cask,alexg0/homebrew-cask,stephenwade/homebrew-cask,iamso/homebrew-cask,yurrriq/homebrew-cask,Fedalto/homebrew-cask,hvisage/homebrew-cask,Hywan/homebrew-cask,rickychilcott/homebrew-cask,alebcay/homebrew-cask,wmorin/homebrew-cask,fharbe/homebrew-cask,hellosky806/homebrew-cask,bcaceiro/homebrew-cask,dictcp/homebrew-cask,aktau/homebrew-cask,singingwolfboy/homebrew-cask,adrianchia/homebrew-cask,boecko/homebrew-cask,jrwesolo/homebrew-cask,mrmachine/homebrew-cask,wKovacs64/homebrew-cask,stephenwade/homebrew-cask,adriweb/homebrew-cask,MoOx/homebrew-cask,boydj/homebrew-cask,pinut/homebrew-cask,sirodoht/homebrew-cask,andrewschleifer/homebrew-cask,exherb/homebrew-cask,ohammersmith/homebrew-cask,moonboots/homebrew-cask,jellyfishcoder/homebrew-cask,jconley/homebrew-cask,kongslund/homebrew-cask,sjackman/homebrew-cask,devmynd/homebrew-cask,afdnlw/homebrew-cask,farmerchris/homebrew-cask,jiashuw/homebrew-cask,jppelteret/homebrew-cask,fkrone/homebrew-cask,shishi/homebrew-cask,SentinelWarren/homebrew-cask,adrianchia/homebrew-cask,kamilboratynski/homebrew-cask,skatsuta/homebrew-cask,3van/homebrew-cask,toonetown/homebrew-cask,CameronGarrett/homebrew-cask,Ngrd/homebrew-cask,petmoo/homebrew-cask,moonboots/homebrew-cask,onlynone/homebrew-cask,julionc/homebrew-cask,ingorichter/homebrew-cask,malford/homebrew-cask,codeurge/homebrew-cask,antogg/homebrew-cask,AnastasiaSulyagina/homebrew-cask,wayou/homebrew-cask,catap/homebrew-cask,tjnycum/homebrew-cask,wickedsp1d3r/homebrew-cask,nicolas-brousse/homebrew-cask,hanxue/caskroom,gord1anknot/homebrew-cask,leipert/homebrew-cask,freeslugs/homebrew-cask,tyage/homebrew-cask,jmeridth/homebrew-cask,alebcay/homebrew-cask,bcomnes/homebrew-cask,tedbundyjr/homebrew-cask,Labutin/homebrew-cask,afh/homebrew-cask,cblecker/homebrew-cask,scribblemaniac/homebrew-cask,axodys/homebrew-cask,asins/homebrew-cask,kostasdizas/homebrew-cask,Philosoft/homebrew-cask,syscrusher/homebrew-cask,MircoT/homebrew-cask,colindean/homebrew-cask,kTitan/homebrew-cask,koenrh/homebrew-cask,seanzxx/homebrew-cask,rkJun/homebrew-cask,tedbundyjr/homebrew-cask,shishi/homebrew-cask,CameronGarrett/homebrew-cask,JosephViolago/homebrew-cask,sanyer/homebrew-cask,jeroenseegers/homebrew-cask,jonathanwiesel/homebrew-cask,yumitsu/homebrew-cask,cblecker/homebrew-cask,xakraz/homebrew-cask,0rax/homebrew-cask,feigaochn/homebrew-cask,sysbot/homebrew-cask,kesara/homebrew-cask,dunn/homebrew-cask,underyx/homebrew-cask,epmatsw/homebrew-cask,kteru/homebrew-cask,sparrc/homebrew-cask,jppelteret/homebrew-cask,faun/homebrew-cask,lukeadams/homebrew-cask,coeligena/homebrew-customized,taherio/homebrew-cask,howie/homebrew-cask,fanquake/homebrew-cask,fkrone/homebrew-cask,jaredsampson/homebrew-cask,sscotth/homebrew-cask,bric3/homebrew-cask,mjgardner/homebrew-cask,hanxue/caskroom,xalep/homebrew-cask,goxberry/homebrew-cask,Saklad5/homebrew-cask,kassi/homebrew-cask,afdnlw/homebrew-cask,jspahrsummers/homebrew-cask,valepert/homebrew-cask,tdsmith/homebrew-cask,stonehippo/homebrew-cask,sjackman/homebrew-cask,Ngrd/homebrew-cask,elyscape/homebrew-cask,JikkuJose/homebrew-cask,chrisfinazzo/homebrew-cask,asbachb/homebrew-cask,antogg/homebrew-cask,retbrown/homebrew-cask,patresi/homebrew-cask,sosedoff/homebrew-cask,stigkj/homebrew-caskroom-cask,spruceb/homebrew-cask,remko/homebrew-cask,kkdd/homebrew-cask,williamboman/homebrew-cask,optikfluffel/homebrew-cask,wolflee/homebrew-cask,stevehedrick/homebrew-cask,MatzFan/homebrew-cask,tmoreira2020/homebrew,paulombcosta/homebrew-cask,n0ts/homebrew-cask,tedski/homebrew-cask,astorije/homebrew-cask,sparrc/homebrew-cask,mlocher/homebrew-cask,danielgomezrico/homebrew-cask,bosr/homebrew-cask,dictcp/homebrew-cask,usami-k/homebrew-cask,RogerThiede/homebrew-cask,AnastasiaSulyagina/homebrew-cask,ksato9700/homebrew-cask,jspahrsummers/homebrew-cask,squid314/homebrew-cask,csmith-palantir/homebrew-cask,tan9/homebrew-cask,dustinblackman/homebrew-cask,ctrevino/homebrew-cask,KosherBacon/homebrew-cask,shorshe/homebrew-cask,Amorymeltzer/homebrew-cask,BahtiyarB/homebrew-cask,devmynd/homebrew-cask,6uclz1/homebrew-cask,joaocc/homebrew-cask,mgryszko/homebrew-cask,gyndav/homebrew-cask,ch3n2k/homebrew-cask,af/homebrew-cask,dcondrey/homebrew-cask,nysthee/homebrew-cask,tjt263/homebrew-cask,blogabe/homebrew-cask,nicolas-brousse/homebrew-cask,ohammersmith/homebrew-cask,m3nu/homebrew-cask,lcasey001/homebrew-cask,mjgardner/homebrew-cask,rubenerd/homebrew-cask,valepert/homebrew-cask,Ephemera/homebrew-cask,miguelfrde/homebrew-cask,johnste/homebrew-cask,hovancik/homebrew-cask,bric3/homebrew-cask,ldong/homebrew-cask,ninjahoahong/homebrew-cask,prime8/homebrew-cask,cfillion/homebrew-cask,xcezx/homebrew-cask,artdevjs/homebrew-cask,daften/homebrew-cask,tangestani/homebrew-cask,ctrevino/homebrew-cask,xalep/homebrew-cask,usami-k/homebrew-cask,qnm/homebrew-cask,nathancahill/homebrew-cask,johan/homebrew-cask,fwiesel/homebrew-cask,y00rb/homebrew-cask,shanonvl/homebrew-cask,genewoo/homebrew-cask,L2G/homebrew-cask,andersonba/homebrew-cask,deiga/homebrew-cask,tolbkni/homebrew-cask,sanyer/homebrew-cask,optikfluffel/homebrew-cask,Cottser/homebrew-cask,d/homebrew-cask,michelegera/homebrew-cask,gabrielizaias/homebrew-cask,julionc/homebrew-cask,kiliankoe/homebrew-cask,vitorgalvao/homebrew-cask,FinalDes/homebrew-cask,djmonta/homebrew-cask,hackhandslabs/homebrew-cask,epardee/homebrew-cask,malob/homebrew-cask,danielgomezrico/homebrew-cask,muan/homebrew-cask,arranubels/homebrew-cask,otaran/homebrew-cask,casidiablo/homebrew-cask,lumaxis/homebrew-cask,ch3n2k/homebrew-cask,bric3/homebrew-cask,hvisage/homebrew-cask,perfide/homebrew-cask,vmrob/homebrew-cask,stevehedrick/homebrew-cask,zorosteven/homebrew-cask,decrement/homebrew-cask,13k/homebrew-cask,hyuna917/homebrew-cask,mauricerkelly/homebrew-cask,ftiff/homebrew-cask,ptb/homebrew-cask,hovancik/homebrew-cask,shoichiaizawa/homebrew-cask,SamiHiltunen/homebrew-cask,inta/homebrew-cask,nickpellant/homebrew-cask,gregkare/homebrew-cask,L2G/homebrew-cask,perfide/homebrew-cask,ywfwj2008/homebrew-cask,coeligena/homebrew-customized,sohtsuka/homebrew-cask,jtriley/homebrew-cask,scottsuch/homebrew-cask,larseggert/homebrew-cask,remko/homebrew-cask,qnm/homebrew-cask,ahvigil/homebrew-cask,johan/homebrew-cask,morsdyce/homebrew-cask,cprecioso/homebrew-cask,Philosoft/homebrew-cask,nathancahill/homebrew-cask,zhuzihhhh/homebrew-cask,yutarody/homebrew-cask,deizel/homebrew-cask,kassi/homebrew-cask,mfpierre/homebrew-cask,chrisfinazzo/homebrew-cask,okket/homebrew-cask,zerrot/homebrew-cask,christer155/homebrew-cask,jamesmlees/homebrew-cask,sideci-sample/sideci-sample-homebrew-cask,ayohrling/homebrew-cask,askl56/homebrew-cask,shoichiaizawa/homebrew-cask,christophermanning/homebrew-cask,danielbayley/homebrew-cask,chrisfinazzo/homebrew-cask,dieterdemeyer/homebrew-cask,githubutilities/homebrew-cask,aguynamedryan/homebrew-cask,rcuza/homebrew-cask,xight/homebrew-cask,dspeckhard/homebrew-cask,jgarber623/homebrew-cask,katoquro/homebrew-cask,linc01n/homebrew-cask,dwkns/homebrew-cask,mgryszko/homebrew-cask,phpwutz/homebrew-cask,dcondrey/homebrew-cask,AdamCmiel/homebrew-cask,haha1903/homebrew-cask,MichaelPei/homebrew-cask,Labutin/homebrew-cask,ksylvan/homebrew-cask,af/homebrew-cask,epmatsw/homebrew-cask,kryhear/homebrew-cask,diguage/homebrew-cask,yurrriq/homebrew-cask,mokagio/homebrew-cask,nelsonjchen/homebrew-cask,kuno/homebrew-cask,a1russell/homebrew-cask,ponychicken/homebrew-customcask,flada-auxv/homebrew-cask,franklouwers/homebrew-cask,forevergenin/homebrew-cask,joshka/homebrew-cask,rkJun/homebrew-cask,yurikoles/homebrew-cask,gwaldo/homebrew-cask,xiongchiamiov/homebrew-cask,shonjir/homebrew-cask,mokagio/homebrew-cask,malob/homebrew-cask,adriweb/homebrew-cask,miccal/homebrew-cask,thomanq/homebrew-cask,Whoaa512/homebrew-cask,FredLackeyOfficial/homebrew-cask,gregkare/homebrew-cask,sgnh/homebrew-cask,illusionfield/homebrew-cask,zchee/homebrew-cask,rcuza/homebrew-cask,epardee/homebrew-cask,mrmachine/homebrew-cask,pgr0ss/homebrew-cask,jen20/homebrew-cask,pkq/homebrew-cask,tjnycum/homebrew-cask,jconley/homebrew-cask,sohtsuka/homebrew-cask,royalwang/homebrew-cask,scw/homebrew-cask,singingwolfboy/homebrew-cask,ptb/homebrew-cask,gwaldo/homebrew-cask,0xadada/homebrew-cask,jacobbednarz/homebrew-cask,lifepillar/homebrew-cask,RickWong/homebrew-cask,lieuwex/homebrew-cask,corbt/homebrew-cask,paour/homebrew-cask,vuquoctuan/homebrew-cask,squid314/homebrew-cask,jasmas/homebrew-cask,FranklinChen/homebrew-cask,Dremora/homebrew-cask,bdhess/homebrew-cask,janlugt/homebrew-cask,stigkj/homebrew-caskroom-cask,jalaziz/homebrew-cask,jeanregisser/homebrew-cask,malford/homebrew-cask,nshemonsky/homebrew-cask,johntrandall/homebrew-cask,miku/homebrew-cask,elseym/homebrew-cask,onlynone/homebrew-cask,danielbayley/homebrew-cask,neverfox/homebrew-cask,MircoT/homebrew-cask,lvicentesanchez/homebrew-cask,joaoponceleao/homebrew-cask,tarwich/homebrew-cask,claui/homebrew-cask,xtian/homebrew-cask,samnung/homebrew-cask,jalaziz/homebrew-cask,atsuyim/homebrew-cask,j13k/homebrew-cask,mariusbutuc/homebrew-cask,cobyism/homebrew-cask,thehunmonkgroup/homebrew-cask,lcasey001/homebrew-cask,andrewdisley/homebrew-cask,FredLackeyOfficial/homebrew-cask,paulombcosta/homebrew-cask,m3nu/homebrew-cask,wickles/homebrew-cask,shonjir/homebrew-cask,mauricerkelly/homebrew-cask,cedwardsmedia/homebrew-cask,nivanchikov/homebrew-cask,jbeagley52/homebrew-cask,chadcatlett/caskroom-homebrew-cask,jalaziz/homebrew-cask,giannitm/homebrew-cask,nathansgreen/homebrew-cask,sgnh/homebrew-cask,julionc/homebrew-cask,otzy007/homebrew-cask,gabrielizaias/homebrew-cask,cblecker/homebrew-cask,alloy/homebrew-cask,pacav69/homebrew-cask,bgandon/homebrew-cask,dwihn0r/homebrew-cask,haha1903/homebrew-cask,singingwolfboy/homebrew-cask,mazehall/homebrew-cask,Dremora/homebrew-cask,markthetech/homebrew-cask,FranklinChen/homebrew-cask,jacobdam/homebrew-cask,wuman/homebrew-cask,ayohrling/homebrew-cask,cfillion/homebrew-cask,crzrcn/homebrew-cask,segiddins/homebrew-cask,ebraminio/homebrew-cask,wmorin/homebrew-cask,koenrh/homebrew-cask,pinut/homebrew-cask,renaudguerin/homebrew-cask,elyscape/homebrew-cask,reitermarkus/homebrew-cask,djakarta-trap/homebrew-myCask,spruceb/homebrew-cask,shorshe/homebrew-cask,thii/homebrew-cask,gerrymiller/homebrew-cask,katoquro/homebrew-cask,aki77/homebrew-cask,MatzFan/homebrew-cask,feniix/homebrew-cask,hyuna917/homebrew-cask,norio-nomura/homebrew-cask,kirikiriyamama/homebrew-cask,Keloran/homebrew-cask,stonehippo/homebrew-cask,pacav69/homebrew-cask,bcaceiro/homebrew-cask,neverfox/homebrew-cask,vuquoctuan/homebrew-cask,alloy/homebrew-cask,tranc99/homebrew-cask,deanmorin/homebrew-cask,carlmod/homebrew-cask,athrunsun/homebrew-cask,joschi/homebrew-cask,gurghet/homebrew-cask,astorije/homebrew-cask,dezon/homebrew-cask,mazehall/homebrew-cask,hanxue/caskroom,Ephemera/homebrew-cask,MoOx/homebrew-cask,tangestani/homebrew-cask,KosherBacon/homebrew-cask,elnappo/homebrew-cask,y00rb/homebrew-cask,Ibuprofen/homebrew-cask,mwean/homebrew-cask,illusionfield/homebrew-cask,BahtiyarB/homebrew-cask,gibsjose/homebrew-cask,leonmachadowilcox/homebrew-cask,unasuke/homebrew-cask,jtriley/homebrew-cask,zorosteven/homebrew-cask,yurikoles/homebrew-cask,axodys/homebrew-cask,johndbritton/homebrew-cask,puffdad/homebrew-cask,kingthorin/homebrew-cask,Bombenleger/homebrew-cask,kesara/homebrew-cask,skyyuan/homebrew-cask,MicTech/homebrew-cask,schneidmaster/homebrew-cask,cclauss/homebrew-cask,esebastian/homebrew-cask,mjgardner/homebrew-cask,yurikoles/homebrew-cask,nightscape/homebrew-cask,Cottser/homebrew-cask | ruby | ## Code Before:
class Libreoffice < Cask
homepage 'https://www.libreoffice.org/'
version '4.3.0'
if Hardware::CPU.is_32_bit? or MacOS.version < :mountain_lion
url "https://download.documentfoundation.org/libreoffice/stable/#{version}/mac/x86/LibreOffice_#{version}_MacOS_x86.dmg"
sha256 '31b84237db80f655aabcc3962c4a5e4fd84318adb6db1b3b311a883f16af1164'
else
url "https://download.documentfoundation.org/libreoffice/stable/#{version}/mac/x86_64/LibreOffice_#{version}_MacOS_x86-64.dmg"
sha256 '80772ed238b2033233aa2867962cfbb6f701ae81b3f592971149f8e3e54504bf'
end
link 'LibreOffice.app'
end
## Instruction:
Update LibreOffice to latest version 4.3.1
## Code After:
class Libreoffice < Cask
homepage 'https://www.libreoffice.org/'
version '4.3.1'
if Hardware::CPU.is_32_bit? or MacOS.version < :mountain_lion
url "https://download.documentfoundation.org/libreoffice/stable/#{version}/mac/x86/LibreOffice_#{version}_MacOS_x86.dmg"
sha256 'a2d507f643b952282ff5ce90ac227bea9bd412748ffcb93050db75256b2f803c'
else
url "https://download.documentfoundation.org/libreoffice/stable/#{version}/mac/x86_64/LibreOffice_#{version}_MacOS_x86-64.dmg"
sha256 '9a212ca4b77770c57f8b7ac375b5a98824c93dabd6e238dc019dc1139b6d3b7f'
end
link 'LibreOffice.app'
end
| class Libreoffice < Cask
homepage 'https://www.libreoffice.org/'
- version '4.3.0'
? ^
+ version '4.3.1'
? ^
if Hardware::CPU.is_32_bit? or MacOS.version < :mountain_lion
url "https://download.documentfoundation.org/libreoffice/stable/#{version}/mac/x86/LibreOffice_#{version}_MacOS_x86.dmg"
- sha256 '31b84237db80f655aabcc3962c4a5e4fd84318adb6db1b3b311a883f16af1164'
+ sha256 'a2d507f643b952282ff5ce90ac227bea9bd412748ffcb93050db75256b2f803c'
else
url "https://download.documentfoundation.org/libreoffice/stable/#{version}/mac/x86_64/LibreOffice_#{version}_MacOS_x86-64.dmg"
- sha256 '80772ed238b2033233aa2867962cfbb6f701ae81b3f592971149f8e3e54504bf'
+ sha256 '9a212ca4b77770c57f8b7ac375b5a98824c93dabd6e238dc019dc1139b6d3b7f'
end
link 'LibreOffice.app'
end | 6 | 0.428571 | 3 | 3 |
34eb34f52920b4ff6ca25a8ee12c3e5b960d8224 | container/root/app/public/index.php | container/root/app/public/index.php | <?php
// NOTE: this file+folder should be replaced by the child app
$stdout = fopen( "php://stdout", 'w' );
$stderr = fopen( "php://stderr", 'w' );
fwrite( $stdout, 'Using STDOUT pipe for output' );
fwrite( $stderr, 'Using STDERR pipe for output' );
phpinfo();
// Use the below form to test uploads
?>
<form method="post" action="/" enctype="multipart/form-data">
<p>
Please specify a file, or a set of files:<br>
<input type="file" name="datafile">
</p>
<div>
<input type="submit" value="Send">
</div>
</form>
| <?php
// NOTE: this file+folder should be replaced by the child app
$stdout = fopen( "php://stdout", 'w' );
$stderr = fopen( "php://stderr", 'w' );
fwrite( $stdout, 'Using STDOUT pipe for output' );
fwrite( $stderr, 'Using STDERR pipe for output' );
echo "PHP Version " . PHP_VERSION;
| Remove phpinfo() & replace with simple echo for testing | Remove phpinfo() & replace with simple echo for testing
By default phpinfo can expose credentials in environment
variables. An unsuspecting developer may accidentally deploy
without replacing this index.php first. Using `echo` is a safer
option.
| PHP | mit | bryanlatten/docker-php,bryanlatten/docker-php | php | ## Code Before:
<?php
// NOTE: this file+folder should be replaced by the child app
$stdout = fopen( "php://stdout", 'w' );
$stderr = fopen( "php://stderr", 'w' );
fwrite( $stdout, 'Using STDOUT pipe for output' );
fwrite( $stderr, 'Using STDERR pipe for output' );
phpinfo();
// Use the below form to test uploads
?>
<form method="post" action="/" enctype="multipart/form-data">
<p>
Please specify a file, or a set of files:<br>
<input type="file" name="datafile">
</p>
<div>
<input type="submit" value="Send">
</div>
</form>
## Instruction:
Remove phpinfo() & replace with simple echo for testing
By default phpinfo can expose credentials in environment
variables. An unsuspecting developer may accidentally deploy
without replacing this index.php first. Using `echo` is a safer
option.
## Code After:
<?php
// NOTE: this file+folder should be replaced by the child app
$stdout = fopen( "php://stdout", 'w' );
$stderr = fopen( "php://stderr", 'w' );
fwrite( $stdout, 'Using STDOUT pipe for output' );
fwrite( $stderr, 'Using STDERR pipe for output' );
echo "PHP Version " . PHP_VERSION;
| <?php
// NOTE: this file+folder should be replaced by the child app
$stdout = fopen( "php://stdout", 'w' );
$stderr = fopen( "php://stderr", 'w' );
fwrite( $stdout, 'Using STDOUT pipe for output' );
fwrite( $stderr, 'Using STDERR pipe for output' );
+ echo "PHP Version " . PHP_VERSION;
- phpinfo();
-
- // Use the below form to test uploads
- ?>
-
- <form method="post" action="/" enctype="multipart/form-data">
- <p>
- Please specify a file, or a set of files:<br>
- <input type="file" name="datafile">
- </p>
- <div>
- <input type="submit" value="Send">
- </div>
- </form> | 15 | 0.652174 | 1 | 14 |
b9fc96ee87b86997381ca7d854934d9cf7eeb408 | lib/sensors.rb | lib/sensors.rb | require 'yaml'
require 'ownet'
module SAAL
class Sensors
include Enumerable
def initialize(opts)
@defs = YAML::load(File.new(opts[:conf]))
end
# Implements the get methods to fetch a specific sensor
def method_missing(name, *args)
name = name.to_s
if args.size == 0 && @defs.include?(name)
Sensor.new @defs[name]
else
raise NoMethodError, "undefined method \"#{name}\" for #{self}"
end
end
def each
@defs.each{ |name, value| yield name, Sensor.new(value)}
end
end
class Sensor
attr_reader :name, :serial
def initialize(defs)
@name = defs['name']
@serial = defs['onewire']['serial']
@connect_opts = {}
@connect_opts[:server] = defs['onewire']['server'] if defs['onewire']['server']
@connect_opts[:port] = defs['onewire']['port'] if defs['onewire']['port']
end
def read
begin
OWNet::Connection.new(@connect_opts).read(@serial)
rescue Exception
nil
end
end
def read_uncached
begin
OWNet::Connection.new.read('/uncached'+@serial)
rescue Exception
nil
end
end
end
end
| require 'yaml'
require 'ownet'
module SAAL
class Sensors
include Enumerable
def initialize(opts)
@defs = YAML::load(File.new(opts[:conf]))
end
# Implements the get methods to fetch a specific sensor
def method_missing(name, *args)
name = name.to_s
if args.size == 0 && @defs.include?(name)
Sensor.new @defs[name]
else
raise NoMethodError, "undefined method \"#{name}\" for #{self}"
end
end
def each
@defs.each{ |name, value| yield name, Sensor.new(value)}
end
end
class Sensor
attr_reader :name, :serial
def initialize(defs)
@name = defs['name']
@serial = defs['onewire']['serial']
@connect_opts = {}
@connect_opts[:server] = defs['onewire']['server'] if defs['onewire']['server']
@connect_opts[:port] = defs['onewire']['port'] if defs['onewire']['port']
end
def read
begin
OWNet::Connection.new(@connect_opts).read(@serial)
rescue Exception
nil
end
end
def read_uncached
begin
OWNet::Connection.new(@connect_opts).read('/uncached'+@serial)
rescue Exception
nil
end
end
end
end
| Add the connection settings to the uncached case as well. | Add the connection settings to the uncached case as well.
| Ruby | lgpl-2.1 | pedrocr/saal,pedrocr/saal | ruby | ## Code Before:
require 'yaml'
require 'ownet'
module SAAL
class Sensors
include Enumerable
def initialize(opts)
@defs = YAML::load(File.new(opts[:conf]))
end
# Implements the get methods to fetch a specific sensor
def method_missing(name, *args)
name = name.to_s
if args.size == 0 && @defs.include?(name)
Sensor.new @defs[name]
else
raise NoMethodError, "undefined method \"#{name}\" for #{self}"
end
end
def each
@defs.each{ |name, value| yield name, Sensor.new(value)}
end
end
class Sensor
attr_reader :name, :serial
def initialize(defs)
@name = defs['name']
@serial = defs['onewire']['serial']
@connect_opts = {}
@connect_opts[:server] = defs['onewire']['server'] if defs['onewire']['server']
@connect_opts[:port] = defs['onewire']['port'] if defs['onewire']['port']
end
def read
begin
OWNet::Connection.new(@connect_opts).read(@serial)
rescue Exception
nil
end
end
def read_uncached
begin
OWNet::Connection.new.read('/uncached'+@serial)
rescue Exception
nil
end
end
end
end
## Instruction:
Add the connection settings to the uncached case as well.
## Code After:
require 'yaml'
require 'ownet'
module SAAL
class Sensors
include Enumerable
def initialize(opts)
@defs = YAML::load(File.new(opts[:conf]))
end
# Implements the get methods to fetch a specific sensor
def method_missing(name, *args)
name = name.to_s
if args.size == 0 && @defs.include?(name)
Sensor.new @defs[name]
else
raise NoMethodError, "undefined method \"#{name}\" for #{self}"
end
end
def each
@defs.each{ |name, value| yield name, Sensor.new(value)}
end
end
class Sensor
attr_reader :name, :serial
def initialize(defs)
@name = defs['name']
@serial = defs['onewire']['serial']
@connect_opts = {}
@connect_opts[:server] = defs['onewire']['server'] if defs['onewire']['server']
@connect_opts[:port] = defs['onewire']['port'] if defs['onewire']['port']
end
def read
begin
OWNet::Connection.new(@connect_opts).read(@serial)
rescue Exception
nil
end
end
def read_uncached
begin
OWNet::Connection.new(@connect_opts).read('/uncached'+@serial)
rescue Exception
nil
end
end
end
end
| require 'yaml'
require 'ownet'
module SAAL
class Sensors
include Enumerable
def initialize(opts)
@defs = YAML::load(File.new(opts[:conf]))
end
# Implements the get methods to fetch a specific sensor
def method_missing(name, *args)
name = name.to_s
if args.size == 0 && @defs.include?(name)
Sensor.new @defs[name]
else
raise NoMethodError, "undefined method \"#{name}\" for #{self}"
end
end
def each
@defs.each{ |name, value| yield name, Sensor.new(value)}
end
end
class Sensor
attr_reader :name, :serial
def initialize(defs)
@name = defs['name']
@serial = defs['onewire']['serial']
@connect_opts = {}
@connect_opts[:server] = defs['onewire']['server'] if defs['onewire']['server']
@connect_opts[:port] = defs['onewire']['port'] if defs['onewire']['port']
end
def read
begin
OWNet::Connection.new(@connect_opts).read(@serial)
rescue Exception
nil
end
end
def read_uncached
begin
- OWNet::Connection.new.read('/uncached'+@serial)
+ OWNet::Connection.new(@connect_opts).read('/uncached'+@serial)
? +++++++++++++++
rescue Exception
nil
end
end
end
end | 2 | 0.037037 | 1 | 1 |
8e4c4056ab95fc443dd4e4ab6a3c7a63cf5ab6ba | app/package.json | app/package.json | {
"author": "Adam Salma <adam3salma@gmail.com>",
"name": "Lurka",
"version": "0.8.0",
"description": "A desktop app for viewing online messaging boards such as 4chan and reddit",
"main": "index.js",
"license": "MIT",
"private": true,
"dependencies": {
"axios": "^0.15.2",
"classnames": "^2.2.5",
"express": "4.14.0",
"jquery": "^3.1.1",
"moment": "^2.16.0",
"mousetrap": "^1.6.0",
"query-string": "^4.2.3",
"react": "^15.3.1",
"react-dom": "^15.3.1",
"react-redux": "4.4.5",
"redux": "^3.6.0",
"redux-logger": "^2.7.4",
"redux-thunk": "^2.1.0",
"requests": "^0.1.7",
"screenfull": "^3.0.2",
"uuid": "^2.0.3",
"velocity-animate": "^1.2.3"
}
}
| {
"author": "Adam Salma <adam3salma@gmail.com>",
"name": "Lurka",
"version": "0.8.0",
"description": "A desktop app for viewing online messaging boards such as 4chan and reddit",
"main": "index.js",
"license": "MIT",
"private": true,
"dependencies": {
"axios": "^0.15.3",
"classnames": "^2.2.5",
"express": "^4.14.0",
"jquery": "^3.1.1",
"moment": "^2.17.1",
"mousetrap": "^1.6.0",
"query-string": "^4.2.3",
"react": "^15.4.1",
"react-addons-css-transition-group": "^15.4.1",
"react-alert": "^1.0.14",
"react-dom": "^15.4.1",
"react-redux": "^4.4.6",
"redux": "^3.6.0",
"redux-logger": "^2.7.4",
"redux-thunk": "^2.1.0",
"request": "^2.79.0",
"screenfull": "^3.0.2",
"uuid": "^3.0.1",
"velocity-animate": "^1.3.1"
}
}
| Update app dependencies. Changes: +reactaddons-css-trans-group +react-alert +requests -request | Update app dependencies. Changes: +reactaddons-css-trans-group +react-alert +requests -request
| JSON | mit | AdamSalma/Lurka,AdamSalma/Lurka | json | ## Code Before:
{
"author": "Adam Salma <adam3salma@gmail.com>",
"name": "Lurka",
"version": "0.8.0",
"description": "A desktop app for viewing online messaging boards such as 4chan and reddit",
"main": "index.js",
"license": "MIT",
"private": true,
"dependencies": {
"axios": "^0.15.2",
"classnames": "^2.2.5",
"express": "4.14.0",
"jquery": "^3.1.1",
"moment": "^2.16.0",
"mousetrap": "^1.6.0",
"query-string": "^4.2.3",
"react": "^15.3.1",
"react-dom": "^15.3.1",
"react-redux": "4.4.5",
"redux": "^3.6.0",
"redux-logger": "^2.7.4",
"redux-thunk": "^2.1.0",
"requests": "^0.1.7",
"screenfull": "^3.0.2",
"uuid": "^2.0.3",
"velocity-animate": "^1.2.3"
}
}
## Instruction:
Update app dependencies. Changes: +reactaddons-css-trans-group +react-alert +requests -request
## Code After:
{
"author": "Adam Salma <adam3salma@gmail.com>",
"name": "Lurka",
"version": "0.8.0",
"description": "A desktop app for viewing online messaging boards such as 4chan and reddit",
"main": "index.js",
"license": "MIT",
"private": true,
"dependencies": {
"axios": "^0.15.3",
"classnames": "^2.2.5",
"express": "^4.14.0",
"jquery": "^3.1.1",
"moment": "^2.17.1",
"mousetrap": "^1.6.0",
"query-string": "^4.2.3",
"react": "^15.4.1",
"react-addons-css-transition-group": "^15.4.1",
"react-alert": "^1.0.14",
"react-dom": "^15.4.1",
"react-redux": "^4.4.6",
"redux": "^3.6.0",
"redux-logger": "^2.7.4",
"redux-thunk": "^2.1.0",
"request": "^2.79.0",
"screenfull": "^3.0.2",
"uuid": "^3.0.1",
"velocity-animate": "^1.3.1"
}
}
| {
"author": "Adam Salma <adam3salma@gmail.com>",
"name": "Lurka",
"version": "0.8.0",
"description": "A desktop app for viewing online messaging boards such as 4chan and reddit",
"main": "index.js",
"license": "MIT",
"private": true,
"dependencies": {
- "axios": "^0.15.2",
? ^
+ "axios": "^0.15.3",
? ^
"classnames": "^2.2.5",
- "express": "4.14.0",
+ "express": "^4.14.0",
? +
"jquery": "^3.1.1",
- "moment": "^2.16.0",
? ^ ^
+ "moment": "^2.17.1",
? ^ ^
"mousetrap": "^1.6.0",
"query-string": "^4.2.3",
- "react": "^15.3.1",
? ^
+ "react": "^15.4.1",
? ^
+ "react-addons-css-transition-group": "^15.4.1",
+ "react-alert": "^1.0.14",
- "react-dom": "^15.3.1",
? ^
+ "react-dom": "^15.4.1",
? ^
- "react-redux": "4.4.5",
? ^
+ "react-redux": "^4.4.6",
? + ^
"redux": "^3.6.0",
"redux-logger": "^2.7.4",
"redux-thunk": "^2.1.0",
- "requests": "^0.1.7",
? - ^^^
+ "request": "^2.79.0",
? ^ +++
"screenfull": "^3.0.2",
- "uuid": "^2.0.3",
? ^ ^
+ "uuid": "^3.0.1",
? ^ ^
- "velocity-animate": "^1.2.3"
? ^ ^
+ "velocity-animate": "^1.3.1"
? ^ ^
}
} | 20 | 0.714286 | 11 | 9 |
2344cb570468e877467e9da032b0221634d67fbf | source/sw.js | source/sw.js | importScripts('https://storage.googleapis.com/workbox-cdn/releases/4.3.1/workbox-sw.js');
workbox.core.skipWaiting();
workbox.precaching.precacheAndRoute([]);
| importScripts('https://storage.googleapis.com/workbox-cdn/releases/4.3.1/workbox-sw.js');
workbox.core.skipWaiting();
workbox.precaching.precacheAndRoute([]);
// NOTE: All HTML pages should be dynamically cached, and also constantly
// revalidated to make sure that the cache is always up-to-date.
const staticUrlRegex = /\/static\//;
const notStaticUrl = ({url}) => !staticUrlRegex.test(url);
workbox.routing.registerRoute(
notStaticUrl,
new workbox.strategies.StaleWhileRevalidate()
);
| Add runtime caching for HTML pages | Add runtime caching for HTML pages
| JavaScript | mit | arnellebalane/arnellebalane.com,arnellebalane/arnellebalane.com,arnellebalane/arnellebalane.com | javascript | ## Code Before:
importScripts('https://storage.googleapis.com/workbox-cdn/releases/4.3.1/workbox-sw.js');
workbox.core.skipWaiting();
workbox.precaching.precacheAndRoute([]);
## Instruction:
Add runtime caching for HTML pages
## Code After:
importScripts('https://storage.googleapis.com/workbox-cdn/releases/4.3.1/workbox-sw.js');
workbox.core.skipWaiting();
workbox.precaching.precacheAndRoute([]);
// NOTE: All HTML pages should be dynamically cached, and also constantly
// revalidated to make sure that the cache is always up-to-date.
const staticUrlRegex = /\/static\//;
const notStaticUrl = ({url}) => !staticUrlRegex.test(url);
workbox.routing.registerRoute(
notStaticUrl,
new workbox.strategies.StaleWhileRevalidate()
);
| importScripts('https://storage.googleapis.com/workbox-cdn/releases/4.3.1/workbox-sw.js');
workbox.core.skipWaiting();
workbox.precaching.precacheAndRoute([]);
+
+ // NOTE: All HTML pages should be dynamically cached, and also constantly
+ // revalidated to make sure that the cache is always up-to-date.
+
+ const staticUrlRegex = /\/static\//;
+ const notStaticUrl = ({url}) => !staticUrlRegex.test(url);
+
+ workbox.routing.registerRoute(
+ notStaticUrl,
+ new workbox.strategies.StaleWhileRevalidate()
+ ); | 11 | 2.75 | 11 | 0 |
f0f0f914ab9297ea4e3cce5b513ce3b38dd1660b | README.md | README.md |
Space apps 2016 project at Exeter
## Documentation
* Project Page https://2016.spaceappschallenge.org/challenges/mars/simspace/projects/sim-mars-colony
* Rules https://docs.google.com/document/d/1UbyTxflaE_qqUW7bQZTT9rddVc0G-lV7AoIDDXEdHVw/
* Presentation https://docs.google.com/presentation/d/10X-SpMQX23XyvBrc62rKG3asaTZKMDbjA-ci8Or-NvA/
## Locations
* Mars http://mars.nasa.gov/images/mars-globe-valles-marineris-enhanced-full.jpg
* Arsia Mons http://photojournal.jpl.nasa.gov/catalog/PIA02337
* Polar Regions https://commons.wikimedia.org/wiki/File:Martian_north_polar_cap.jpg
* Valles Marineris https://commons.wikimedia.org/wiki/File:016vallesmarineris_reduced0.25.jpg
## Fonts
* 30 Minutes to Mars http://www.richmcnabb.com/graphic-design/30-minutes-to-mars-font/
* Exo 2 http://ndiscovered.com/exo-2/
|
Space apps 2016 project at Exeter
## Documentation
* Space Apps Challenge [Project Page](https://2016.spaceappschallenge.org/challenges/mars/simspace/projects/sim-mars-colony)
* Official Game [Rules](https://docs.google.com/document/d/1UbyTxflaE_qqUW7bQZTT9rddVc0G-lV7AoIDDXEdHVw/)
* Project [Presentation](https://docs.google.com/presentation/d/10X-SpMQX23XyvBrc62rKG3asaTZKMDbjA-ci8Or-NvA/)
## Locations
* Mars http://mars.nasa.gov/images/mars-globe-valles-marineris-enhanced-full.jpg
* Arsia Mons http://photojournal.jpl.nasa.gov/catalog/PIA02337
* Polar Regions https://commons.wikimedia.org/wiki/File:Martian_north_polar_cap.jpg
* Valles Marineris https://commons.wikimedia.org/wiki/File:016vallesmarineris_reduced0.25.jpg
## Fonts
* 30 Minutes to Mars http://www.richmcnabb.com/graphic-design/30-minutes-to-mars-font/
* Exo 2 http://ndiscovered.com/exo-2/
| Use a bit of markdown to make it look prettier. | Use a bit of markdown to make it look prettier.
| Markdown | mit | wselwood/SimMarsColony | markdown | ## Code Before:
Space apps 2016 project at Exeter
## Documentation
* Project Page https://2016.spaceappschallenge.org/challenges/mars/simspace/projects/sim-mars-colony
* Rules https://docs.google.com/document/d/1UbyTxflaE_qqUW7bQZTT9rddVc0G-lV7AoIDDXEdHVw/
* Presentation https://docs.google.com/presentation/d/10X-SpMQX23XyvBrc62rKG3asaTZKMDbjA-ci8Or-NvA/
## Locations
* Mars http://mars.nasa.gov/images/mars-globe-valles-marineris-enhanced-full.jpg
* Arsia Mons http://photojournal.jpl.nasa.gov/catalog/PIA02337
* Polar Regions https://commons.wikimedia.org/wiki/File:Martian_north_polar_cap.jpg
* Valles Marineris https://commons.wikimedia.org/wiki/File:016vallesmarineris_reduced0.25.jpg
## Fonts
* 30 Minutes to Mars http://www.richmcnabb.com/graphic-design/30-minutes-to-mars-font/
* Exo 2 http://ndiscovered.com/exo-2/
## Instruction:
Use a bit of markdown to make it look prettier.
## Code After:
Space apps 2016 project at Exeter
## Documentation
* Space Apps Challenge [Project Page](https://2016.spaceappschallenge.org/challenges/mars/simspace/projects/sim-mars-colony)
* Official Game [Rules](https://docs.google.com/document/d/1UbyTxflaE_qqUW7bQZTT9rddVc0G-lV7AoIDDXEdHVw/)
* Project [Presentation](https://docs.google.com/presentation/d/10X-SpMQX23XyvBrc62rKG3asaTZKMDbjA-ci8Or-NvA/)
## Locations
* Mars http://mars.nasa.gov/images/mars-globe-valles-marineris-enhanced-full.jpg
* Arsia Mons http://photojournal.jpl.nasa.gov/catalog/PIA02337
* Polar Regions https://commons.wikimedia.org/wiki/File:Martian_north_polar_cap.jpg
* Valles Marineris https://commons.wikimedia.org/wiki/File:016vallesmarineris_reduced0.25.jpg
## Fonts
* 30 Minutes to Mars http://www.richmcnabb.com/graphic-design/30-minutes-to-mars-font/
* Exo 2 http://ndiscovered.com/exo-2/
|
Space apps 2016 project at Exeter
## Documentation
- * Project Page https://2016.spaceappschallenge.org/challenges/mars/simspace/projects/sim-mars-colony
? ^
+ * Space Apps Challenge [Project Page](https://2016.spaceappschallenge.org/challenges/mars/simspace/projects/sim-mars-colony)
? ++++++++++++++++++++++ ^^ +
- * Rules https://docs.google.com/document/d/1UbyTxflaE_qqUW7bQZTT9rddVc0G-lV7AoIDDXEdHVw/
? ^
+ * Official Game [Rules](https://docs.google.com/document/d/1UbyTxflaE_qqUW7bQZTT9rddVc0G-lV7AoIDDXEdHVw/)
? +++++++++++++++ ^^ +
- * Presentation https://docs.google.com/presentation/d/10X-SpMQX23XyvBrc62rKG3asaTZKMDbjA-ci8Or-NvA/
? ^
+ * Project [Presentation](https://docs.google.com/presentation/d/10X-SpMQX23XyvBrc62rKG3asaTZKMDbjA-ci8Or-NvA/)
? +++++++++ ^^ +
## Locations
* Mars http://mars.nasa.gov/images/mars-globe-valles-marineris-enhanced-full.jpg
* Arsia Mons http://photojournal.jpl.nasa.gov/catalog/PIA02337
* Polar Regions https://commons.wikimedia.org/wiki/File:Martian_north_polar_cap.jpg
* Valles Marineris https://commons.wikimedia.org/wiki/File:016vallesmarineris_reduced0.25.jpg
## Fonts
* 30 Minutes to Mars http://www.richmcnabb.com/graphic-design/30-minutes-to-mars-font/
* Exo 2 http://ndiscovered.com/exo-2/ | 6 | 0.3 | 3 | 3 |
32cd5d70d0aeecb2f166239c54438e25fff945f0 | README.md | README.md | es6draft
========
ECMAScript 6 compiler and runtime written in Java.
### Project Scope ###
Goals:
* Provide a test environment for the most recent ES6 drafts
Non-Goals:
* Fast, optimized ECMAScript 6 runtime or Java interoperability
### Implementation Status ###
[ECMAScript 6 draft rev. 21] [es6drafts].
[ECMAScript Internationalization API 2.0, draft 2013-02-28] [intldrafts]:
* basic support using the [ICU4J] [icu] library
* subclassing intentionally restricted to ES6 classes
### Build Instructions and Shell ###
The following environment variables need to be set to run the test cases:
* `TEST262_PATH`: test262 main directory
* `MOZILLA_PATH`: mozilla-central main directory
* `V8_PATH`: v8 main directory
* `TRACEUR_PATH`: traceur main directory
Alternatively skip the tests with `mvn -DskipTests=true package`.
To start the shell, use `./src/main/bin/repl.sh`.
[es6drafts]: http://wiki.ecmascript.org/doku.php?id=harmony:specification_drafts "Draft Specification for ES.next"
[intldrafts]: http://wiki.ecmascript.org/doku.php?id=globalization:specification_drafts "Specification Drafts for ECMAScript Internationalization API"
[icu]: http://site.icu-project.org/
| es6draft
========
ECMAScript 6 compiler and runtime written in Java.
### Project Scope ###
Goals:
* Provide a test environment for the most recent ES6 drafts
Non-Goals:
* Fast, optimized ECMAScript 6 runtime or Java interoperability
### Implementation Status ###
[ECMAScript 6 draft rev. 21] [es6drafts].
[ECMAScript Internationalization API 2.0, draft 2013-02-28] [intldrafts]:
* basic support using the [ICU4J] [icu] library
* subclassing intentionally restricted to ES6 classes
### Build Instructions and Shell ###
The following environment variables need to be set to run the test cases:
* `TEST262_PATH`: test262 main directory
* `MOZILLA_PATH`: mozilla-central main directory
* `V8_PATH`: v8 main directory
* `TRACEUR_PATH`: traceur main directory
Alternatively skip the tests with `mvn -DskipTests=true package`.
To start the shell, use `./bin/es6draft` (or `.\bin\es6draft.bat` on Windows®).
[es6drafts]: http://wiki.ecmascript.org/doku.php?id=harmony:specification_drafts "Draft Specification for ES.next"
[intldrafts]: http://wiki.ecmascript.org/doku.php?id=globalization:specification_drafts "Specification Drafts for ECMAScript Internationalization API"
[icu]: http://site.icu-project.org/
| Update readme to refer to newer start scripts | Update readme to refer to newer start scripts
| Markdown | mit | anba/es6draft,jugglinmike/es6draft,jugglinmike/es6draft,anba/es6draft,jugglinmike/es6draft,anba/es6draft,jugglinmike/es6draft | markdown | ## Code Before:
es6draft
========
ECMAScript 6 compiler and runtime written in Java.
### Project Scope ###
Goals:
* Provide a test environment for the most recent ES6 drafts
Non-Goals:
* Fast, optimized ECMAScript 6 runtime or Java interoperability
### Implementation Status ###
[ECMAScript 6 draft rev. 21] [es6drafts].
[ECMAScript Internationalization API 2.0, draft 2013-02-28] [intldrafts]:
* basic support using the [ICU4J] [icu] library
* subclassing intentionally restricted to ES6 classes
### Build Instructions and Shell ###
The following environment variables need to be set to run the test cases:
* `TEST262_PATH`: test262 main directory
* `MOZILLA_PATH`: mozilla-central main directory
* `V8_PATH`: v8 main directory
* `TRACEUR_PATH`: traceur main directory
Alternatively skip the tests with `mvn -DskipTests=true package`.
To start the shell, use `./src/main/bin/repl.sh`.
[es6drafts]: http://wiki.ecmascript.org/doku.php?id=harmony:specification_drafts "Draft Specification for ES.next"
[intldrafts]: http://wiki.ecmascript.org/doku.php?id=globalization:specification_drafts "Specification Drafts for ECMAScript Internationalization API"
[icu]: http://site.icu-project.org/
## Instruction:
Update readme to refer to newer start scripts
## Code After:
es6draft
========
ECMAScript 6 compiler and runtime written in Java.
### Project Scope ###
Goals:
* Provide a test environment for the most recent ES6 drafts
Non-Goals:
* Fast, optimized ECMAScript 6 runtime or Java interoperability
### Implementation Status ###
[ECMAScript 6 draft rev. 21] [es6drafts].
[ECMAScript Internationalization API 2.0, draft 2013-02-28] [intldrafts]:
* basic support using the [ICU4J] [icu] library
* subclassing intentionally restricted to ES6 classes
### Build Instructions and Shell ###
The following environment variables need to be set to run the test cases:
* `TEST262_PATH`: test262 main directory
* `MOZILLA_PATH`: mozilla-central main directory
* `V8_PATH`: v8 main directory
* `TRACEUR_PATH`: traceur main directory
Alternatively skip the tests with `mvn -DskipTests=true package`.
To start the shell, use `./bin/es6draft` (or `.\bin\es6draft.bat` on Windows®).
[es6drafts]: http://wiki.ecmascript.org/doku.php?id=harmony:specification_drafts "Draft Specification for ES.next"
[intldrafts]: http://wiki.ecmascript.org/doku.php?id=globalization:specification_drafts "Specification Drafts for ECMAScript Internationalization API"
[icu]: http://site.icu-project.org/
| es6draft
========
ECMAScript 6 compiler and runtime written in Java.
### Project Scope ###
Goals:
* Provide a test environment for the most recent ES6 drafts
Non-Goals:
* Fast, optimized ECMAScript 6 runtime or Java interoperability
### Implementation Status ###
[ECMAScript 6 draft rev. 21] [es6drafts].
[ECMAScript Internationalization API 2.0, draft 2013-02-28] [intldrafts]:
* basic support using the [ICU4J] [icu] library
* subclassing intentionally restricted to ES6 classes
### Build Instructions and Shell ###
The following environment variables need to be set to run the test cases:
* `TEST262_PATH`: test262 main directory
* `MOZILLA_PATH`: mozilla-central main directory
* `V8_PATH`: v8 main directory
* `TRACEUR_PATH`: traceur main directory
Alternatively skip the tests with `mvn -DskipTests=true package`.
- To start the shell, use `./src/main/bin/repl.sh`.
+ To start the shell, use `./bin/es6draft` (or `.\bin\es6draft.bat` on Windows®).
[es6drafts]: http://wiki.ecmascript.org/doku.php?id=harmony:specification_drafts "Draft Specification for ES.next"
[intldrafts]: http://wiki.ecmascript.org/doku.php?id=globalization:specification_drafts "Specification Drafts for ECMAScript Internationalization API"
[icu]: http://site.icu-project.org/ | 2 | 0.051282 | 1 | 1 |
c2bdd9ebc9b618f52c59a40e02c53790dfddc35d | protocols/jabber/googletalk/googletalkcalldialog.cpp | protocols/jabber/googletalk/googletalkcalldialog.cpp | /*
googletalkcalldialog.cpp - Google Talk and Google libjingle support
Copyright (c) 2009 by Pali RohΓ‘r <pali.rohar@gmail.com>
*************************************************************************
* *
* This library is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public *
* License as published by the Free Software Foundation; either *
* version 2 of the License, or (at your option) any later version. *
* *
*************************************************************************
*/
#include <QCloseEvent>
#include "googletalkcalldialog.h"
GoogleTalkCallDialog::GoogleTalkCallDialog(QWidget *parent): QDialog(parent) {
setupUi(this);
}
void GoogleTalkCallDialog::closeEvent(QCloseEvent * e) {
e->ignore();
emit(closed());
}
#include "googletalkcalldialog.moc"
| /*
googletalkcalldialog.cpp - Google Talk and Google libjingle support
Copyright (c) 2009 by Pali RohΓ‘r <pali.rohar@gmail.com>
*************************************************************************
* *
* This library is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public *
* License as published by the Free Software Foundation; either *
* version 2 of the License, or (at your option) any later version. *
* *
*************************************************************************
*/
#include "googletalkcalldialog.h"
#include <QCloseEvent>
GoogleTalkCallDialog::GoogleTalkCallDialog(QWidget *parent): QDialog(parent) {
setupUi(this);
}
void GoogleTalkCallDialog::closeEvent(QCloseEvent * e) {
e->ignore();
emit(closed());
}
#include "googletalkcalldialog.moc"
| Include missing headers & own header as first | protocols/jabber: Include missing headers & own header as first
This makes header files standalone and fixing krazy issues.
| C++ | lgpl-2.1 | josh-wambua/kopete,josh-wambua/kopete,Jtalk/kopete-fork-xep0136,Jtalk/kopete-fork-xep0136,josh-wambua/kopete,Jtalk/kopete-fork-xep0136,Jtalk/kopete-fork-xep0136,josh-wambua/kopete,josh-wambua/kopete,josh-wambua/kopete,Jtalk/kopete-fork-xep0136,josh-wambua/kopete,Jtalk/kopete-fork-xep0136 | c++ | ## Code Before:
/*
googletalkcalldialog.cpp - Google Talk and Google libjingle support
Copyright (c) 2009 by Pali RohΓ‘r <pali.rohar@gmail.com>
*************************************************************************
* *
* This library is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public *
* License as published by the Free Software Foundation; either *
* version 2 of the License, or (at your option) any later version. *
* *
*************************************************************************
*/
#include <QCloseEvent>
#include "googletalkcalldialog.h"
GoogleTalkCallDialog::GoogleTalkCallDialog(QWidget *parent): QDialog(parent) {
setupUi(this);
}
void GoogleTalkCallDialog::closeEvent(QCloseEvent * e) {
e->ignore();
emit(closed());
}
#include "googletalkcalldialog.moc"
## Instruction:
protocols/jabber: Include missing headers & own header as first
This makes header files standalone and fixing krazy issues.
## Code After:
/*
googletalkcalldialog.cpp - Google Talk and Google libjingle support
Copyright (c) 2009 by Pali RohΓ‘r <pali.rohar@gmail.com>
*************************************************************************
* *
* This library is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public *
* License as published by the Free Software Foundation; either *
* version 2 of the License, or (at your option) any later version. *
* *
*************************************************************************
*/
#include "googletalkcalldialog.h"
#include <QCloseEvent>
GoogleTalkCallDialog::GoogleTalkCallDialog(QWidget *parent): QDialog(parent) {
setupUi(this);
}
void GoogleTalkCallDialog::closeEvent(QCloseEvent * e) {
e->ignore();
emit(closed());
}
#include "googletalkcalldialog.moc"
| /*
googletalkcalldialog.cpp - Google Talk and Google libjingle support
Copyright (c) 2009 by Pali RohΓ‘r <pali.rohar@gmail.com>
*************************************************************************
* *
* This library is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public *
* License as published by the Free Software Foundation; either *
* version 2 of the License, or (at your option) any later version. *
* *
*************************************************************************
*/
+ #include "googletalkcalldialog.h"
+
#include <QCloseEvent>
-
- #include "googletalkcalldialog.h"
GoogleTalkCallDialog::GoogleTalkCallDialog(QWidget *parent): QDialog(parent) {
setupUi(this);
}
void GoogleTalkCallDialog::closeEvent(QCloseEvent * e) {
e->ignore();
emit(closed());
}
#include "googletalkcalldialog.moc"
| 4 | 0.133333 | 2 | 2 |
3ef4a95b6cab5c4efd83d7c9cb12eb8119ec4754 | conf.d/_mason-alias.fish | conf.d/_mason-alias.fish | alias pingtest 'ping google.com'
alias f 'find -L . -name'
alias p 'ps -ef'
alias pf 'ps -ef | grep'
alias disk-space 'df -h'
alias ipinfo 'curl ipinfo.io/ip'
function download-config
pushd ~/repos/server-setup/
git pull
popd
update-config
end
function update-config
. ~/.config/fish/config.fish
end
function find-string -d 'Find string in files'
grep -rnw . -H -e $argv
end
function does-exist
return (type $argv > /dev/null)
end
function last-of -d "Find the latest matching file"
ls -tr | grep $argv | tail -1
end
function check-last -d "Run less on the latest matching file"
set file (last-of $argv)
log info 'Checking file:'$file
less $file
end
function e -d 'Start the vim with proper permission'
if test -f $argv
if test -w $argv
vim $argv
else
sudo vim $argv
end
else
vim $argv
end
end | alias pingtest 'ping google.com'
alias f 'find -L . -name'
alias p 'ps -ef'
alias pf 'ps -ef | grep'
alias disk-space 'df -h'
alias ipinfo 'curl ipinfo.io/ip'
function download-config
pushd ~/repos/server-setup/
git pull
popd
update-config
end
function update-config
. ~/.config/fish/config.fish
end
function find-string -d 'Find string in files'
grep -rnw . -H -e $argv
end
function does-exist
return (type $argv > /dev/null)
end
function last-of -d "Find the latest matching file"
ls -tr | grep $argv | tail -1
end
function check-last -d "Run less on the latest matching file"
set file (last-of $argv)
log info 'Checking file:'$file
less $file
end
function e -d 'Start the vim with proper permission'
if test -f $argv
if test -w $argv
vim $argv
else
sudo vim $argv
end
else
vim $argv
end
end
function v -d 'View the files'
less -R $argv
end
| Add 'v' command to view file with color | Add 'v' command to view file with color
| fish | mit | masonwan/fish-config,masonwan/fish-config | fish | ## Code Before:
alias pingtest 'ping google.com'
alias f 'find -L . -name'
alias p 'ps -ef'
alias pf 'ps -ef | grep'
alias disk-space 'df -h'
alias ipinfo 'curl ipinfo.io/ip'
function download-config
pushd ~/repos/server-setup/
git pull
popd
update-config
end
function update-config
. ~/.config/fish/config.fish
end
function find-string -d 'Find string in files'
grep -rnw . -H -e $argv
end
function does-exist
return (type $argv > /dev/null)
end
function last-of -d "Find the latest matching file"
ls -tr | grep $argv | tail -1
end
function check-last -d "Run less on the latest matching file"
set file (last-of $argv)
log info 'Checking file:'$file
less $file
end
function e -d 'Start the vim with proper permission'
if test -f $argv
if test -w $argv
vim $argv
else
sudo vim $argv
end
else
vim $argv
end
end
## Instruction:
Add 'v' command to view file with color
## Code After:
alias pingtest 'ping google.com'
alias f 'find -L . -name'
alias p 'ps -ef'
alias pf 'ps -ef | grep'
alias disk-space 'df -h'
alias ipinfo 'curl ipinfo.io/ip'
function download-config
pushd ~/repos/server-setup/
git pull
popd
update-config
end
function update-config
. ~/.config/fish/config.fish
end
function find-string -d 'Find string in files'
grep -rnw . -H -e $argv
end
function does-exist
return (type $argv > /dev/null)
end
function last-of -d "Find the latest matching file"
ls -tr | grep $argv | tail -1
end
function check-last -d "Run less on the latest matching file"
set file (last-of $argv)
log info 'Checking file:'$file
less $file
end
function e -d 'Start the vim with proper permission'
if test -f $argv
if test -w $argv
vim $argv
else
sudo vim $argv
end
else
vim $argv
end
end
function v -d 'View the files'
less -R $argv
end
| alias pingtest 'ping google.com'
alias f 'find -L . -name'
alias p 'ps -ef'
alias pf 'ps -ef | grep'
alias disk-space 'df -h'
alias ipinfo 'curl ipinfo.io/ip'
function download-config
pushd ~/repos/server-setup/
git pull
popd
update-config
end
function update-config
. ~/.config/fish/config.fish
end
function find-string -d 'Find string in files'
grep -rnw . -H -e $argv
end
function does-exist
return (type $argv > /dev/null)
end
function last-of -d "Find the latest matching file"
ls -tr | grep $argv | tail -1
end
function check-last -d "Run less on the latest matching file"
set file (last-of $argv)
log info 'Checking file:'$file
less $file
end
function e -d 'Start the vim with proper permission'
if test -f $argv
if test -w $argv
vim $argv
else
sudo vim $argv
end
else
vim $argv
end
end
+ function v -d 'View the files'
+ less -R $argv
+ end | 3 | 0.075 | 3 | 0 |
f8a2a0732c2b3e28b32cc9d6e546b08185025d68 | gondor.yml | gondor.yml | key: 3CDGPCTEKNA
vcs: git
framework: django
requirements_file: requirements.txt
wsgi:
entry_point: fortuitus.wsgi:application
django:
manage.py: manage.py
on_deploy:
- manage.py collectstatic --noinput
- manage.py syncdb --noinput
- manage.py migrate --noinput
| key: 3CDGPCTEKNA
vcs: git
framework: django
requirements_file: requirements.txt
wsgi:
entry_point: fortuitus.wsgi:application
django:
manage.py: manage.py
on_deploy:
- manage.py collectstatic --noinput
- manage.py syncdb --noinput
- manage.py migrate --noinput
static_urls:
- /site_media:
root: site_media/
| Add static directory mapping for Gondor | Add static directory mapping for Gondor
| YAML | mit | elegion/djangodash2012,elegion/djangodash2012 | yaml | ## Code Before:
key: 3CDGPCTEKNA
vcs: git
framework: django
requirements_file: requirements.txt
wsgi:
entry_point: fortuitus.wsgi:application
django:
manage.py: manage.py
on_deploy:
- manage.py collectstatic --noinput
- manage.py syncdb --noinput
- manage.py migrate --noinput
## Instruction:
Add static directory mapping for Gondor
## Code After:
key: 3CDGPCTEKNA
vcs: git
framework: django
requirements_file: requirements.txt
wsgi:
entry_point: fortuitus.wsgi:application
django:
manage.py: manage.py
on_deploy:
- manage.py collectstatic --noinput
- manage.py syncdb --noinput
- manage.py migrate --noinput
static_urls:
- /site_media:
root: site_media/
| key: 3CDGPCTEKNA
vcs: git
framework: django
requirements_file: requirements.txt
wsgi:
entry_point: fortuitus.wsgi:application
django:
manage.py: manage.py
on_deploy:
- manage.py collectstatic --noinput
- manage.py syncdb --noinput
- manage.py migrate --noinput
+ static_urls:
+ - /site_media:
+ root: site_media/ | 3 | 0.25 | 3 | 0 |
531df7887cc241d98bd9f3a0d7e977735d5a64ac | README.md | README.md |
this package protects your content.
## Installation
### Bower
```
bower install nocopy
```
## Usage
Include nocopy.js in the head tag or at the very bottom of your document, just before the closing body tag (usually recommended for better performance).
| [](https://app.fossa.io/projects/git%2Bgithub.com%2Fkimchichef%2Fnocopy?ref=badge_shield)
this package protects your content.
## Installation
### Bower
```
bower install nocopy
```
## Usage
Include nocopy.js in the head tag or at the very bottom of your document, just before the closing body tag (usually recommended for better performance).
## License
[](https://app.fossa.io/projects/git%2Bgithub.com%2Fkimchichef%2Fnocopy?ref=badge_large) | Add license scan report and status | Add license scan report and status
Signed-off-by: fossabot <33ee59f62122b3df5dd1d28e3318bfde0d0db52e@fossa.io> | Markdown | mit | kimchichef/nocopy | markdown | ## Code Before:
this package protects your content.
## Installation
### Bower
```
bower install nocopy
```
## Usage
Include nocopy.js in the head tag or at the very bottom of your document, just before the closing body tag (usually recommended for better performance).
## Instruction:
Add license scan report and status
Signed-off-by: fossabot <33ee59f62122b3df5dd1d28e3318bfde0d0db52e@fossa.io>
## Code After:
[](https://app.fossa.io/projects/git%2Bgithub.com%2Fkimchichef%2Fnocopy?ref=badge_shield)
this package protects your content.
## Installation
### Bower
```
bower install nocopy
```
## Usage
Include nocopy.js in the head tag or at the very bottom of your document, just before the closing body tag (usually recommended for better performance).
## License
[](https://app.fossa.io/projects/git%2Bgithub.com%2Fkimchichef%2Fnocopy?ref=badge_large) | + [](https://app.fossa.io/projects/git%2Bgithub.com%2Fkimchichef%2Fnocopy?ref=badge_shield)
+
this package protects your content.
## Installation
### Bower
```
bower install nocopy
```
## Usage
Include nocopy.js in the head tag or at the very bottom of your document, just before the closing body tag (usually recommended for better performance).
+
+
+ ## License
+ [](https://app.fossa.io/projects/git%2Bgithub.com%2Fkimchichef%2Fnocopy?ref=badge_large) | 6 | 0.5 | 6 | 0 |
f7900e0ee8feca5b2f9c8e0c4ae3fb13d023258f | .travis.yml | .travis.yml | language: python
os:
- linux
git:
depth: 1
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- libstdc++-4.9-dev
python:
- "3.5"
- "3.6"
install:
- python setup.py install
script:
- cd partypi && python main.py
| language: python
os:
- linux
git:
depth: 1
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- libstdc++-4.9-dev
python:
- "3.5"
- "3.6"
install:
- sudo python setup.py install
script:
- cd partypi && sudo python main.py
| Add sudo to fix tensorflow build | Add sudo to fix tensorflow build
| YAML | mit | JustinShenk/party-pi,JustinShenk/party-pi,JustinShenk/party-pi | yaml | ## Code Before:
language: python
os:
- linux
git:
depth: 1
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- libstdc++-4.9-dev
python:
- "3.5"
- "3.6"
install:
- python setup.py install
script:
- cd partypi && python main.py
## Instruction:
Add sudo to fix tensorflow build
## Code After:
language: python
os:
- linux
git:
depth: 1
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- libstdc++-4.9-dev
python:
- "3.5"
- "3.6"
install:
- sudo python setup.py install
script:
- cd partypi && sudo python main.py
| language: python
os:
- linux
git:
depth: 1
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- libstdc++-4.9-dev
python:
- "3.5"
- "3.6"
install:
- - python setup.py install
+ - sudo python setup.py install
? +++++
script:
- - cd partypi && python main.py
+ - cd partypi && sudo python main.py
? +++++
| 4 | 0.2 | 2 | 2 |
aeaf7d61ee19e6ee3273c1fefe2e5323a195f132 | test/presence_channel_test.exs | test/presence_channel_test.exs | defmodule Poxa.PresenceChannelTest do
use ExUnit.Case
import SpawnHelper
import Poxa.PresenceChannel
test "return unique user ids currently subscribed" do
register_to_channel("presence-channel", {:user_id, :user_info})
spawn_registered_process("presence-channel", {:user_id, :user_info})
spawn_registered_process("presence-channel", {:user_id2, :user_info2})
assert users("presence-channel") == [:user_id, :user_id2]
end
test "return number of unique subscribed users" do
register_to_channel("presence-channel", {:user_id, :user_info})
spawn_registered_process("presence-channel", {:user_id2, :user_info2})
assert user_count("presence-channel") == 2
end
end
| defmodule Poxa.PresenceChannelTest do
use ExUnit.Case
import SpawnHelper
import Poxa.PresenceChannel
test "return unique user ids currently subscribed" do
register_to_channel("presence-channel-test", {:user_id, :user_info})
spawn_registered_process("presence-channel-test", {:user_id, :user_info})
spawn_registered_process("presence-channel-test", {:user_id2, :user_info2})
assert users("presence-channel-test") == [:user_id, :user_id2]
end
test "return number of unique subscribed users" do
register_to_channel("presence-channel-test2", {:user_id, :user_info})
spawn_registered_process("presence-channel-test2", {:user_id2, :user_info2})
assert user_count("presence-channel-test2") == 2
end
end
| Use isolated channel name on PresenceChannel test | Use isolated channel name on PresenceChannel test
| Elixir | mit | edgurgel/poxa,waffleio/poxa,joshk/poxa,RobertoSchneiders/poxa,joshk/poxa,edgurgel/poxa,waffleio/poxa,edgurgel/poxa,RobertoSchneiders/poxa | elixir | ## Code Before:
defmodule Poxa.PresenceChannelTest do
use ExUnit.Case
import SpawnHelper
import Poxa.PresenceChannel
test "return unique user ids currently subscribed" do
register_to_channel("presence-channel", {:user_id, :user_info})
spawn_registered_process("presence-channel", {:user_id, :user_info})
spawn_registered_process("presence-channel", {:user_id2, :user_info2})
assert users("presence-channel") == [:user_id, :user_id2]
end
test "return number of unique subscribed users" do
register_to_channel("presence-channel", {:user_id, :user_info})
spawn_registered_process("presence-channel", {:user_id2, :user_info2})
assert user_count("presence-channel") == 2
end
end
## Instruction:
Use isolated channel name on PresenceChannel test
## Code After:
defmodule Poxa.PresenceChannelTest do
use ExUnit.Case
import SpawnHelper
import Poxa.PresenceChannel
test "return unique user ids currently subscribed" do
register_to_channel("presence-channel-test", {:user_id, :user_info})
spawn_registered_process("presence-channel-test", {:user_id, :user_info})
spawn_registered_process("presence-channel-test", {:user_id2, :user_info2})
assert users("presence-channel-test") == [:user_id, :user_id2]
end
test "return number of unique subscribed users" do
register_to_channel("presence-channel-test2", {:user_id, :user_info})
spawn_registered_process("presence-channel-test2", {:user_id2, :user_info2})
assert user_count("presence-channel-test2") == 2
end
end
| defmodule Poxa.PresenceChannelTest do
use ExUnit.Case
import SpawnHelper
import Poxa.PresenceChannel
test "return unique user ids currently subscribed" do
- register_to_channel("presence-channel", {:user_id, :user_info})
+ register_to_channel("presence-channel-test", {:user_id, :user_info})
? +++++
- spawn_registered_process("presence-channel", {:user_id, :user_info})
+ spawn_registered_process("presence-channel-test", {:user_id, :user_info})
? +++++
- spawn_registered_process("presence-channel", {:user_id2, :user_info2})
+ spawn_registered_process("presence-channel-test", {:user_id2, :user_info2})
? +++++
- assert users("presence-channel") == [:user_id, :user_id2]
+ assert users("presence-channel-test") == [:user_id, :user_id2]
? +++++
end
test "return number of unique subscribed users" do
- register_to_channel("presence-channel", {:user_id, :user_info})
+ register_to_channel("presence-channel-test2", {:user_id, :user_info})
? ++++++
- spawn_registered_process("presence-channel", {:user_id2, :user_info2})
+ spawn_registered_process("presence-channel-test2", {:user_id2, :user_info2})
? ++++++
- assert user_count("presence-channel") == 2
+ assert user_count("presence-channel-test2") == 2
? ++++++
end
end | 14 | 0.7 | 7 | 7 |
f3937c77366dc5df4a1eb3b62a2f3452c539dbc4 | cms/models/settingmodels.py | cms/models/settingmodels.py | from django.contrib.auth.models import User
from django.db import models
from django.utils.translation import ugettext_lazy as _
from django.conf import settings
from cms.utils.compat.dj import force_unicode, python_2_unicode_compatible
@python_2_unicode_compatible
class UserSettings(models.Model):
user = models.ForeignKey(User, editable=False)
language = models.CharField(_("Language"), max_length=10, choices=settings.LANGUAGES,
help_text=_("The language for the admin interface and toolbar"))
clipboard = models.ForeignKey('cms.Placeholder', blank=True, null=True, editable=False)
class Meta:
verbose_name = _('user setting')
verbose_name_plural = _('user settings')
app_label = 'cms'
def __str__(self):
return force_unicode(self.user)
| from django.contrib.auth.models import User
from django.db import models
from django.utils.translation import ugettext_lazy as _
from django.conf import settings
from cms.utils.compat.dj import force_unicode, python_2_unicode_compatible
@python_2_unicode_compatible
class UserSettings(models.Model):
user = models.ForeignKey(User, editable=False, related_name='djangocms_usersettings')
language = models.CharField(_("Language"), max_length=10, choices=settings.LANGUAGES,
help_text=_("The language for the admin interface and toolbar"))
clipboard = models.ForeignKey('cms.Placeholder', blank=True, null=True, editable=False)
class Meta:
verbose_name = _('user setting')
verbose_name_plural = _('user settings')
app_label = 'cms'
def __str__(self):
return force_unicode(self.user)
| Define a custom related_name in UserSettings->User relation | Define a custom related_name in UserSettings->User relation
| Python | bsd-3-clause | vxsx/django-cms,netzkolchose/django-cms,owers19856/django-cms,MagicSolutions/django-cms,intip/django-cms,czpython/django-cms,Vegasvikk/django-cms,farhaadila/django-cms,saintbird/django-cms,astagi/django-cms,SachaMPS/django-cms,cyberintruder/django-cms,qnub/django-cms,stefanfoulis/django-cms,bittner/django-cms,AlexProfi/django-cms,sznekol/django-cms,DylannCordel/django-cms,yakky/django-cms,vstoykov/django-cms,stefanw/django-cms,jproffitt/django-cms,nostalgiaz/django-cms,MagicSolutions/django-cms,stefanfoulis/django-cms,rsalmaso/django-cms,evildmp/django-cms,wyg3958/django-cms,rscnt/django-cms,philippze/django-cms,keimlink/django-cms,youprofit/django-cms,selecsosi/django-cms,ScholzVolkmer/django-cms,SofiaReis/django-cms,divio/django-cms,petecummings/django-cms,sznekol/django-cms,youprofit/django-cms,jeffreylu9/django-cms,selecsosi/django-cms,irudayarajisawa/django-cms,bittner/django-cms,youprofit/django-cms,chkir/django-cms,frnhr/django-cms,360youlun/django-cms,rryan/django-cms,divio/django-cms,liuyisiyisi/django-cms,jrclaramunt/django-cms,rscnt/django-cms,yakky/django-cms,isotoma/django-cms,jeffreylu9/django-cms,mkoistinen/django-cms,takeshineshiro/django-cms,bittner/django-cms,vstoykov/django-cms,andyzsf/django-cms,netzkolchose/django-cms,andyzsf/django-cms,astagi/django-cms,jproffitt/django-cms,liuyisiyisi/django-cms,nostalgiaz/django-cms,wyg3958/django-cms,wuzhihui1123/django-cms,AlexProfi/django-cms,takeshineshiro/django-cms,isotoma/django-cms,memnonila/django-cms,evildmp/django-cms,bittner/django-cms,Jaccorot/django-cms,rsalmaso/django-cms,keimlink/django-cms,FinalAngel/django-cms,jsma/django-cms,rryan/django-cms,saintbird/django-cms,nimbis/django-cms,stefanw/django-cms,leture/django-cms,datakortet/django-cms,keimlink/django-cms,sephii/django-cms,Jaccorot/django-cms,kk9599/django-cms,intip/django-cms,Vegasvikk/django-cms,selecsosi/django-cms,robmagee/django-cms,jeffreylu9/django-cms,Vegasvikk/django-cms,jrief/django-cms,rsalmaso/django-cms,benzkji/django-cms,jproffitt/django-cms,philippze/django-cms,robmagee/django-cms,webu/django-cms,vxsx/django-cms,stefanw/django-cms,FinalAngel/django-cms,andyzsf/django-cms,jproffitt/django-cms,timgraham/django-cms,360youlun/django-cms,SmithsonianEnterprises/django-cms,iddqd1/django-cms,vxsx/django-cms,leture/django-cms,irudayarajisawa/django-cms,netzkolchose/django-cms,mkoistinen/django-cms,intgr/django-cms,SofiaReis/django-cms,cyberintruder/django-cms,datakortet/django-cms,Jaccorot/django-cms,intgr/django-cms,vad/django-cms,yakky/django-cms,owers19856/django-cms,czpython/django-cms,robmagee/django-cms,Livefyre/django-cms,nostalgiaz/django-cms,vxsx/django-cms,takeshineshiro/django-cms,AlexProfi/django-cms,saintbird/django-cms,owers19856/django-cms,jsma/django-cms,memnonila/django-cms,petecummings/django-cms,SmithsonianEnterprises/django-cms,stefanw/django-cms,josjevv/django-cms,jeffreylu9/django-cms,farhaadila/django-cms,nostalgiaz/django-cms,andyzsf/django-cms,petecummings/django-cms,chmberl/django-cms,intip/django-cms,rryan/django-cms,vad/django-cms,kk9599/django-cms,chmberl/django-cms,datakortet/django-cms,intgr/django-cms,sephii/django-cms,vstoykov/django-cms,chmberl/django-cms,chkir/django-cms,donce/django-cms,rryan/django-cms,wuzhihui1123/django-cms,liuyisiyisi/django-cms,wyg3958/django-cms,josjevv/django-cms,FinalAngel/django-cms,webu/django-cms,stefanfoulis/django-cms,evildmp/django-cms,SmithsonianEnterprises/django-cms,benzkji/django-cms,FinalAngel/django-cms,frnhr/django-cms,nimbis/django-cms,webu/django-cms,wuzhihui1123/django-cms,jrief/django-cms,donce/django-cms,SofiaReis/django-cms,jrclaramunt/django-cms,sephii/django-cms,timgraham/django-cms,vad/django-cms,philippze/django-cms,dhorelik/django-cms,divio/django-cms,donce/django-cms,ScholzVolkmer/django-cms,Livefyre/django-cms,vad/django-cms,selecsosi/django-cms,dhorelik/django-cms,benzkji/django-cms,jsma/django-cms,benzkji/django-cms,frnhr/django-cms,mkoistinen/django-cms,josjevv/django-cms,MagicSolutions/django-cms,timgraham/django-cms,mkoistinen/django-cms,Livefyre/django-cms,qnub/django-cms,farhaadila/django-cms,astagi/django-cms,datakortet/django-cms,DylannCordel/django-cms,intip/django-cms,memnonila/django-cms,nimbis/django-cms,isotoma/django-cms,irudayarajisawa/django-cms,netzkolchose/django-cms,360youlun/django-cms,SachaMPS/django-cms,stefanfoulis/django-cms,chkir/django-cms,qnub/django-cms,sznekol/django-cms,divio/django-cms,jrief/django-cms,sephii/django-cms,rsalmaso/django-cms,SachaMPS/django-cms,czpython/django-cms,kk9599/django-cms,iddqd1/django-cms,iddqd1/django-cms,nimbis/django-cms,ScholzVolkmer/django-cms,jrief/django-cms,cyberintruder/django-cms,DylannCordel/django-cms,dhorelik/django-cms,evildmp/django-cms,leture/django-cms,jsma/django-cms,czpython/django-cms,Livefyre/django-cms,jrclaramunt/django-cms,rscnt/django-cms,yakky/django-cms,frnhr/django-cms,intgr/django-cms,isotoma/django-cms,wuzhihui1123/django-cms | python | ## Code Before:
from django.contrib.auth.models import User
from django.db import models
from django.utils.translation import ugettext_lazy as _
from django.conf import settings
from cms.utils.compat.dj import force_unicode, python_2_unicode_compatible
@python_2_unicode_compatible
class UserSettings(models.Model):
user = models.ForeignKey(User, editable=False)
language = models.CharField(_("Language"), max_length=10, choices=settings.LANGUAGES,
help_text=_("The language for the admin interface and toolbar"))
clipboard = models.ForeignKey('cms.Placeholder', blank=True, null=True, editable=False)
class Meta:
verbose_name = _('user setting')
verbose_name_plural = _('user settings')
app_label = 'cms'
def __str__(self):
return force_unicode(self.user)
## Instruction:
Define a custom related_name in UserSettings->User relation
## Code After:
from django.contrib.auth.models import User
from django.db import models
from django.utils.translation import ugettext_lazy as _
from django.conf import settings
from cms.utils.compat.dj import force_unicode, python_2_unicode_compatible
@python_2_unicode_compatible
class UserSettings(models.Model):
user = models.ForeignKey(User, editable=False, related_name='djangocms_usersettings')
language = models.CharField(_("Language"), max_length=10, choices=settings.LANGUAGES,
help_text=_("The language for the admin interface and toolbar"))
clipboard = models.ForeignKey('cms.Placeholder', blank=True, null=True, editable=False)
class Meta:
verbose_name = _('user setting')
verbose_name_plural = _('user settings')
app_label = 'cms'
def __str__(self):
return force_unicode(self.user)
| from django.contrib.auth.models import User
from django.db import models
from django.utils.translation import ugettext_lazy as _
from django.conf import settings
from cms.utils.compat.dj import force_unicode, python_2_unicode_compatible
@python_2_unicode_compatible
class UserSettings(models.Model):
- user = models.ForeignKey(User, editable=False)
+ user = models.ForeignKey(User, editable=False, related_name='djangocms_usersettings')
language = models.CharField(_("Language"), max_length=10, choices=settings.LANGUAGES,
help_text=_("The language for the admin interface and toolbar"))
clipboard = models.ForeignKey('cms.Placeholder', blank=True, null=True, editable=False)
class Meta:
verbose_name = _('user setting')
verbose_name_plural = _('user settings')
app_label = 'cms'
def __str__(self):
return force_unicode(self.user)
| 2 | 0.086957 | 1 | 1 |
a318528b50b6271c0094cd5b38950897e9347123 | Casks/opera-developer.rb | Casks/opera-developer.rb | cask :v1 => 'opera-developer' do
version '29.0.1781.0'
sha256 'b3b24c1456722318eea3549169af43f268ccc0f015d3a8ad739bbe2c57a42d26'
url "http://get.geo.opera.com/pub/opera-developer/#{version}/mac/Opera_Developer_#{version}_Setup.dmg"
homepage 'http://www.opera.com/developer'
license :unknown
app 'Opera Developer.app'
end
| cask :v1 => 'opera-developer' do
version '29.0.1794.0'
sha256 'c6d875407a276a4b48a5d6b271ba5e40b7292c3734510635d74a56ccd7a1b6e8'
url "http://get.geo.opera.com/pub/opera-developer/#{version}/mac/Opera_Developer_#{version}_Setup.dmg"
homepage 'http://www.opera.com/developer'
license :unknown
app 'Opera Developer.app'
end
| Upgrade Opera Developer.app to 29.0.1794.0 | Upgrade Opera Developer.app to 29.0.1794.0
| Ruby | bsd-2-clause | caskroom/homebrew-versions,stigkj/homebrew-caskroom-versions,yurikoles/homebrew-versions,caskroom/homebrew-versions,mahori/homebrew-cask-versions,1zaman/homebrew-versions,ddinchev/homebrew-versions,hugoboos/homebrew-versions,mahori/homebrew-versions,wickedsp1d3r/homebrew-versions,zerrot/homebrew-versions,toonetown/homebrew-cask-versions,Ngrd/homebrew-versions,alebcay/homebrew-versions,hubwub/homebrew-versions,bey2lah/homebrew-versions,rogeriopradoj/homebrew-versions,digital-wonderland/homebrew-versions,lantrix/homebrew-versions,bondezbond/homebrew-versions,peterjosling/homebrew-versions,bondezbond/homebrew-versions,pkq/homebrew-versions,victorpopkov/homebrew-versions,yurikoles/homebrew-versions,gcds/homebrew-versions,bey2lah/homebrew-versions,mauricerkelly/homebrew-versions,Felerius/homebrew-versions,danielbayley/homebrew-versions,Ngrd/homebrew-versions,toonetown/homebrew-cask-versions,FinalDes/homebrew-versions,geggo98/homebrew-versions,wickedsp1d3r/homebrew-versions,hubwub/homebrew-versions,stigkj/homebrew-caskroom-versions,zorosteven/homebrew-versions,cprecioso/homebrew-versions,victorpopkov/homebrew-versions,pkq/homebrew-versions,RJHsiao/homebrew-versions,danielbayley/homebrew-versions,pinut/homebrew-versions,mauricerkelly/homebrew-versions,hugoboos/homebrew-versions,rogeriopradoj/homebrew-versions,404NetworkError/homebrew-versions,404NetworkError/homebrew-versions,RJHsiao/homebrew-versions,cprecioso/homebrew-versions,FinalDes/homebrew-versions,coeligena/homebrew-verscustomized,githubutilities/homebrew-versions,lantrix/homebrew-versions,peterjosling/homebrew-versions,delphinus35/homebrew-versions,a-x-/homebrew-versions | ruby | ## Code Before:
cask :v1 => 'opera-developer' do
version '29.0.1781.0'
sha256 'b3b24c1456722318eea3549169af43f268ccc0f015d3a8ad739bbe2c57a42d26'
url "http://get.geo.opera.com/pub/opera-developer/#{version}/mac/Opera_Developer_#{version}_Setup.dmg"
homepage 'http://www.opera.com/developer'
license :unknown
app 'Opera Developer.app'
end
## Instruction:
Upgrade Opera Developer.app to 29.0.1794.0
## Code After:
cask :v1 => 'opera-developer' do
version '29.0.1794.0'
sha256 'c6d875407a276a4b48a5d6b271ba5e40b7292c3734510635d74a56ccd7a1b6e8'
url "http://get.geo.opera.com/pub/opera-developer/#{version}/mac/Opera_Developer_#{version}_Setup.dmg"
homepage 'http://www.opera.com/developer'
license :unknown
app 'Opera Developer.app'
end
| cask :v1 => 'opera-developer' do
- version '29.0.1781.0'
? ^^
+ version '29.0.1794.0'
? ^^
- sha256 'b3b24c1456722318eea3549169af43f268ccc0f015d3a8ad739bbe2c57a42d26'
+ sha256 'c6d875407a276a4b48a5d6b271ba5e40b7292c3734510635d74a56ccd7a1b6e8'
url "http://get.geo.opera.com/pub/opera-developer/#{version}/mac/Opera_Developer_#{version}_Setup.dmg"
homepage 'http://www.opera.com/developer'
license :unknown
app 'Opera Developer.app'
end | 4 | 0.4 | 2 | 2 |
44f29fca2d261d52f32a0a8d29ab819e6f0be569 | lib/http/controllers/api/set_domain.js | lib/http/controllers/api/set_domain.js | var gateway = require(__dirname+'/../../../../');
module.exports = function(req, res){
gateway.config.set('DOMAIN', req.body.domain);
gateway.config.save(function(){
res.send({ 'DOMAIN': gateway.config.get('DOMAIN') });
});
};
| var gateway = require(__dirname+'/../../../../');
/*
* @requires Config
* @function setDomain
* @description Set the domain via http for use in the
* ripple.txt file and also as the email address for
* admin basic authentication.
* @param {String} domain
*/
module.exports = function(req, res){
gateway.config.set('DOMAIN', req.body.domain);
gateway.config.save(function(){
res.send({ 'DOMAIN': gateway.config.get('DOMAIN') });
});
};
| Add jsdoc to getDomain http call. | [DOC] Add jsdoc to getDomain http call.
| JavaScript | isc | xdv/gatewayd,xdv/gatewayd,zealord/gatewayd,crazyquark/gatewayd,zealord/gatewayd,whotooktwarden/gatewayd,whotooktwarden/gatewayd,Parkjeahwan/awegeeks,crazyquark/gatewayd,Parkjeahwan/awegeeks | javascript | ## Code Before:
var gateway = require(__dirname+'/../../../../');
module.exports = function(req, res){
gateway.config.set('DOMAIN', req.body.domain);
gateway.config.save(function(){
res.send({ 'DOMAIN': gateway.config.get('DOMAIN') });
});
};
## Instruction:
[DOC] Add jsdoc to getDomain http call.
## Code After:
var gateway = require(__dirname+'/../../../../');
/*
* @requires Config
* @function setDomain
* @description Set the domain via http for use in the
* ripple.txt file and also as the email address for
* admin basic authentication.
* @param {String} domain
*/
module.exports = function(req, res){
gateway.config.set('DOMAIN', req.body.domain);
gateway.config.save(function(){
res.send({ 'DOMAIN': gateway.config.get('DOMAIN') });
});
};
| var gateway = require(__dirname+'/../../../../');
+
+ /*
+ * @requires Config
+ * @function setDomain
+ * @description Set the domain via http for use in the
+ * ripple.txt file and also as the email address for
+ * admin basic authentication.
+ * @param {String} domain
+ */
module.exports = function(req, res){
gateway.config.set('DOMAIN', req.body.domain);
gateway.config.save(function(){
res.send({ 'DOMAIN': gateway.config.get('DOMAIN') });
});
}; | 9 | 0.9 | 9 | 0 |
ba147dae85b08fbcabf59f5fe88e56482b9eeeed | resources/views/components/breadcrumbs.blade.php | resources/views/components/breadcrumbs.blade.php | {{--
$breadcrumbs => array // [['display_name', 'relative_url']]
--}}
<nav class="mt-6 mb-2" aria-label="Breadcrumbs">
<ul class="list-reset text-sm">
@foreach($breadcrumbs as $key=>$crumb)
@if($key == 0)
<li class="inline">
<a href="/"><span class="text-black align-middle">@svg('home', 'w-4 h-4')</span><span class="visually-hidden">{{ strip_tags($crumb['display_name']) }}</span></a>
<span class="icon-right-open px-2"></span>
@elseif($key == (count($breadcrumbs) - 1))
<li class="font-bold text-green inline">
{{ $crumb['display_name'] }}
@else
<li class="inline">
<a href="{{ $crumb['relative_url'] }}" class="text-green hover:underline">{{ $crumb['display_name'] }}</a>
<span class="icon-right-open px-2"></span>
@endif
</li>
@endforeach
</ul>
</nav>
| {{--
$breadcrumbs => array // [['display_name', 'relative_url']]
--}}
<nav class="mt-6 mb-2" aria-label="Breadcrumbs">
<ul class="list-reset text-sm">
@foreach($breadcrumbs as $key=>$crumb)
@if($key == 0)
<li class="inline">
<a href="/"><span class="text-black align-middle">@svg('home', 'w-4 h-4')</span></a>
<span class="icon-right-open px-2"></span>
@elseif($key == (count($breadcrumbs) - 1))
<li class="font-bold text-green inline">
{{ $crumb['display_name'] }}
@else
<li class="inline">
<a href="{{ $crumb['relative_url'] }}" class="text-green hover:underline">{{ $crumb['display_name'] }}</a>
<span class="icon-right-open px-2"></span>
@endif
</li>
@endforeach
</ul>
</nav>
| Remove the visually hidden so it doesn't read Home twice | Remove the visually hidden so it doesn't read Home twice
| PHP | mit | waynestate/base-site,waynestate/base-site | php | ## Code Before:
{{--
$breadcrumbs => array // [['display_name', 'relative_url']]
--}}
<nav class="mt-6 mb-2" aria-label="Breadcrumbs">
<ul class="list-reset text-sm">
@foreach($breadcrumbs as $key=>$crumb)
@if($key == 0)
<li class="inline">
<a href="/"><span class="text-black align-middle">@svg('home', 'w-4 h-4')</span><span class="visually-hidden">{{ strip_tags($crumb['display_name']) }}</span></a>
<span class="icon-right-open px-2"></span>
@elseif($key == (count($breadcrumbs) - 1))
<li class="font-bold text-green inline">
{{ $crumb['display_name'] }}
@else
<li class="inline">
<a href="{{ $crumb['relative_url'] }}" class="text-green hover:underline">{{ $crumb['display_name'] }}</a>
<span class="icon-right-open px-2"></span>
@endif
</li>
@endforeach
</ul>
</nav>
## Instruction:
Remove the visually hidden so it doesn't read Home twice
## Code After:
{{--
$breadcrumbs => array // [['display_name', 'relative_url']]
--}}
<nav class="mt-6 mb-2" aria-label="Breadcrumbs">
<ul class="list-reset text-sm">
@foreach($breadcrumbs as $key=>$crumb)
@if($key == 0)
<li class="inline">
<a href="/"><span class="text-black align-middle">@svg('home', 'w-4 h-4')</span></a>
<span class="icon-right-open px-2"></span>
@elseif($key == (count($breadcrumbs) - 1))
<li class="font-bold text-green inline">
{{ $crumb['display_name'] }}
@else
<li class="inline">
<a href="{{ $crumb['relative_url'] }}" class="text-green hover:underline">{{ $crumb['display_name'] }}</a>
<span class="icon-right-open px-2"></span>
@endif
</li>
@endforeach
</ul>
</nav>
| {{--
$breadcrumbs => array // [['display_name', 'relative_url']]
--}}
<nav class="mt-6 mb-2" aria-label="Breadcrumbs">
<ul class="list-reset text-sm">
@foreach($breadcrumbs as $key=>$crumb)
@if($key == 0)
<li class="inline">
- <a href="/"><span class="text-black align-middle">@svg('home', 'w-4 h-4')</span><span class="visually-hidden">{{ strip_tags($crumb['display_name']) }}</span></a>
+ <a href="/"><span class="text-black align-middle">@svg('home', 'w-4 h-4')</span></a>
<span class="icon-right-open px-2"></span>
@elseif($key == (count($breadcrumbs) - 1))
<li class="font-bold text-green inline">
{{ $crumb['display_name'] }}
@else
<li class="inline">
<a href="{{ $crumb['relative_url'] }}" class="text-green hover:underline">{{ $crumb['display_name'] }}</a>
<span class="icon-right-open px-2"></span>
@endif
</li>
@endforeach
</ul>
</nav> | 2 | 0.090909 | 1 | 1 |
486968a19d4d7f05c33a0039c09f94006f885960 | src/utilities.js | src/utilities.js | import R from 'ramda';
import { NpmConfig, httpsGetPromise } from './helpers';
const addVersionProp = (val, key, obj) => obj[key] = { 'version': removeCaret(val) };
const removeCaret = R.replace(/\^/, '');
const isNotPrivate = R.compose(R.not, R.prop('private'));
const filterPrivate = R.filter(isNotPrivate);
const deeplyMerge = (obj1, obj2) => {
return R.keys(obj1).reduce((result, key) => {
result[key] = R.merge(obj1[key], obj2[key]);
return result;
}, {});
};
export const pickDownloads = (obj) => {
return R.keys(obj).reduce((result, key) => {
result[key] = R.pick(['downloads'], obj[key]);
return result;
}, {});
};
export const addNode = (obj) => {
obj.node = {
name : 'Node.js',
url : 'https://nodejs.org',
version : process.versions.node,
description : 'A JavaScript runtime β¨π’πβ¨',
downloads : 10000000 // A fake number since Node isn't downloaded on npm
};
return obj;
};
export const curriedMerge = R.curry(deeplyMerge);
export const formatVersionsAndFilterPrivate = R.compose(R.mapObjIndexed(addVersionProp), filterPrivate);
export const getNpmData = R.compose(httpsGetPromise, NpmConfig);
| import R from 'ramda';
import { NpmConfig, httpsGetPromise } from './helpers';
const addVersionProp = (val, key, obj) => obj[key] = { 'version': removeCaret(val) };
const removeCaret = R.replace(/\^/, '');
const isNotPrivate = R.compose(R.not, R.prop('private'));
const filterPrivate = R.filter(isNotPrivate);
const pickProps = R.curry(R.pick);
const deeplyMerge = (obj1, obj2) => {
return R.keys(obj1).reduce((result, key) => {
result[key] = R.merge(obj1[key], obj2[key]);
return result;
}, {});
};
export const addNode = (obj) => {
obj.node = {
name : 'Node.js',
url : 'https://nodejs.org',
version : process.versions.node,
description : 'A JavaScript runtime β¨π’πβ¨',
downloads : 10000000 // A fake number since Node isn't downloaded on npm
};
return obj;
};
export const pickDownloads = R.map(pickProps(['downloads']));
export const curriedMerge = R.curry(deeplyMerge);
export const formatVersionsAndFilterPrivate = R.compose(R.mapObjIndexed(addVersionProp), filterPrivate);
export const getNpmData = R.compose(httpsGetPromise, NpmConfig);
| Rewrite pickDownloads as Ramda function | refactor: Rewrite pickDownloads as Ramda function
| JavaScript | mit | cachilders/backpat,churchie317/backpat | javascript | ## Code Before:
import R from 'ramda';
import { NpmConfig, httpsGetPromise } from './helpers';
const addVersionProp = (val, key, obj) => obj[key] = { 'version': removeCaret(val) };
const removeCaret = R.replace(/\^/, '');
const isNotPrivate = R.compose(R.not, R.prop('private'));
const filterPrivate = R.filter(isNotPrivate);
const deeplyMerge = (obj1, obj2) => {
return R.keys(obj1).reduce((result, key) => {
result[key] = R.merge(obj1[key], obj2[key]);
return result;
}, {});
};
export const pickDownloads = (obj) => {
return R.keys(obj).reduce((result, key) => {
result[key] = R.pick(['downloads'], obj[key]);
return result;
}, {});
};
export const addNode = (obj) => {
obj.node = {
name : 'Node.js',
url : 'https://nodejs.org',
version : process.versions.node,
description : 'A JavaScript runtime β¨π’πβ¨',
downloads : 10000000 // A fake number since Node isn't downloaded on npm
};
return obj;
};
export const curriedMerge = R.curry(deeplyMerge);
export const formatVersionsAndFilterPrivate = R.compose(R.mapObjIndexed(addVersionProp), filterPrivate);
export const getNpmData = R.compose(httpsGetPromise, NpmConfig);
## Instruction:
refactor: Rewrite pickDownloads as Ramda function
## Code After:
import R from 'ramda';
import { NpmConfig, httpsGetPromise } from './helpers';
const addVersionProp = (val, key, obj) => obj[key] = { 'version': removeCaret(val) };
const removeCaret = R.replace(/\^/, '');
const isNotPrivate = R.compose(R.not, R.prop('private'));
const filterPrivate = R.filter(isNotPrivate);
const pickProps = R.curry(R.pick);
const deeplyMerge = (obj1, obj2) => {
return R.keys(obj1).reduce((result, key) => {
result[key] = R.merge(obj1[key], obj2[key]);
return result;
}, {});
};
export const addNode = (obj) => {
obj.node = {
name : 'Node.js',
url : 'https://nodejs.org',
version : process.versions.node,
description : 'A JavaScript runtime β¨π’πβ¨',
downloads : 10000000 // A fake number since Node isn't downloaded on npm
};
return obj;
};
export const pickDownloads = R.map(pickProps(['downloads']));
export const curriedMerge = R.curry(deeplyMerge);
export const formatVersionsAndFilterPrivate = R.compose(R.mapObjIndexed(addVersionProp), filterPrivate);
export const getNpmData = R.compose(httpsGetPromise, NpmConfig);
| import R from 'ramda';
import { NpmConfig, httpsGetPromise } from './helpers';
const addVersionProp = (val, key, obj) => obj[key] = { 'version': removeCaret(val) };
const removeCaret = R.replace(/\^/, '');
const isNotPrivate = R.compose(R.not, R.prop('private'));
const filterPrivate = R.filter(isNotPrivate);
+ const pickProps = R.curry(R.pick);
const deeplyMerge = (obj1, obj2) => {
return R.keys(obj1).reduce((result, key) => {
result[key] = R.merge(obj1[key], obj2[key]);
- return result;
- }, {});
- };
-
- export const pickDownloads = (obj) => {
- return R.keys(obj).reduce((result, key) => {
- result[key] = R.pick(['downloads'], obj[key]);
return result;
}, {});
};
export const addNode = (obj) => {
obj.node = {
name : 'Node.js',
url : 'https://nodejs.org',
version : process.versions.node,
description : 'A JavaScript runtime β¨π’πβ¨',
downloads : 10000000 // A fake number since Node isn't downloaded on npm
};
return obj;
};
+ export const pickDownloads = R.map(pickProps(['downloads']));
export const curriedMerge = R.curry(deeplyMerge);
export const formatVersionsAndFilterPrivate = R.compose(R.mapObjIndexed(addVersionProp), filterPrivate);
export const getNpmData = R.compose(httpsGetPromise, NpmConfig); | 9 | 0.25 | 2 | 7 |
4fa7cd484b48d9d8c98f7fa85fd058cbe20e04a3 | README.md | README.md | UserTile
========
This program is made to edit the Windows Vista and Windows 7 user "Tile" also called the "Profile Picture" by
modifying the binary blob stored under the registry key :
HKEY_LOCAL_MACHINE\SAM\SAM\Domains\Account\Users
Using the program
-----------------
As this part of the registry is normally usable only by the system you will need
[SysInternals PsExec](http://technet.microsoft.com/en-us/sysinternals/bb897553) to execute it under the "Local System"
account. For example to list all users stored in the registry run as an administrator :
psexec -S "C:\bin\UserTile.exe" --list
(All the path must be absolute)
Arguments
---------
### user, u
Must be specified for all commands that require an user name
### list, l
List the name of all users present in the registry
UserTile --list
### export, e
Export the tile to a bitmap file
UserTile --user vbfox --export C:\tile.bmp
### set, s
Set a new tile for the user. All the formats supported by the .Net framework are supported.
The image will be croped to a (centered) square, resized to 126x126 and converted to 16 bits per point colors.
UserTile --user vbfox --set C:\tile.jpg | UserTile
========
This program is made to edit the Windows Vista and Windows 7 user "Tile" also called the "Profile Picture" by
modifying the binary blob stored under the registry key :
HKEY_LOCAL_MACHINE\SAM\SAM\Domains\Account\Users
Using the program
-----------------
As this part of the registry is normally usable only by the system you will need
[SysInternals PsExec](http://technet.microsoft.com/en-us/sysinternals/bb897553) to execute it under the "Local System"
account. For example to list all users stored in the registry run as an administrator :
psexec -S "C:\bin\UserTile.exe" --list
(All the path must be absolute)
Arguments
---------
### user, u
Must be specified for all commands that require an user name
### list, l
List the name of all users present in the registry
UserTile --list
### export, e
Export the tile to a bitmap file
UserTile --user vbfox --export C:\tile.bmp
### set, s
Set a new tile for the user. All the formats supported by the .Net framework are supported.
The image will be croped to a (centered) square, resized to 126x126 and converted to 16 bits per pixel colors.
UserTile --user vbfox --set C:\tile.jpg
Thanks
------
I want to thank **Micah Rowland** and
[it's blog post on Xtreme Deployment](http://deployment.xtremeconsulting.com/2010/06/23/usertile-automation-part-1/)
for the first hints on where the tiles are stored and a basic analysis of the binary format. | Add a thanks section to the readme | Add a thanks section to the readme
| Markdown | bsd-2-clause | vbfox/UserTile | markdown | ## Code Before:
UserTile
========
This program is made to edit the Windows Vista and Windows 7 user "Tile" also called the "Profile Picture" by
modifying the binary blob stored under the registry key :
HKEY_LOCAL_MACHINE\SAM\SAM\Domains\Account\Users
Using the program
-----------------
As this part of the registry is normally usable only by the system you will need
[SysInternals PsExec](http://technet.microsoft.com/en-us/sysinternals/bb897553) to execute it under the "Local System"
account. For example to list all users stored in the registry run as an administrator :
psexec -S "C:\bin\UserTile.exe" --list
(All the path must be absolute)
Arguments
---------
### user, u
Must be specified for all commands that require an user name
### list, l
List the name of all users present in the registry
UserTile --list
### export, e
Export the tile to a bitmap file
UserTile --user vbfox --export C:\tile.bmp
### set, s
Set a new tile for the user. All the formats supported by the .Net framework are supported.
The image will be croped to a (centered) square, resized to 126x126 and converted to 16 bits per point colors.
UserTile --user vbfox --set C:\tile.jpg
## Instruction:
Add a thanks section to the readme
## Code After:
UserTile
========
This program is made to edit the Windows Vista and Windows 7 user "Tile" also called the "Profile Picture" by
modifying the binary blob stored under the registry key :
HKEY_LOCAL_MACHINE\SAM\SAM\Domains\Account\Users
Using the program
-----------------
As this part of the registry is normally usable only by the system you will need
[SysInternals PsExec](http://technet.microsoft.com/en-us/sysinternals/bb897553) to execute it under the "Local System"
account. For example to list all users stored in the registry run as an administrator :
psexec -S "C:\bin\UserTile.exe" --list
(All the path must be absolute)
Arguments
---------
### user, u
Must be specified for all commands that require an user name
### list, l
List the name of all users present in the registry
UserTile --list
### export, e
Export the tile to a bitmap file
UserTile --user vbfox --export C:\tile.bmp
### set, s
Set a new tile for the user. All the formats supported by the .Net framework are supported.
The image will be croped to a (centered) square, resized to 126x126 and converted to 16 bits per pixel colors.
UserTile --user vbfox --set C:\tile.jpg
Thanks
------
I want to thank **Micah Rowland** and
[it's blog post on Xtreme Deployment](http://deployment.xtremeconsulting.com/2010/06/23/usertile-automation-part-1/)
for the first hints on where the tiles are stored and a basic analysis of the binary format. | UserTile
========
This program is made to edit the Windows Vista and Windows 7 user "Tile" also called the "Profile Picture" by
modifying the binary blob stored under the registry key :
HKEY_LOCAL_MACHINE\SAM\SAM\Domains\Account\Users
Using the program
-----------------
As this part of the registry is normally usable only by the system you will need
[SysInternals PsExec](http://technet.microsoft.com/en-us/sysinternals/bb897553) to execute it under the "Local System"
account. For example to list all users stored in the registry run as an administrator :
psexec -S "C:\bin\UserTile.exe" --list
(All the path must be absolute)
Arguments
---------
### user, u
Must be specified for all commands that require an user name
### list, l
List the name of all users present in the registry
UserTile --list
### export, e
Export the tile to a bitmap file
UserTile --user vbfox --export C:\tile.bmp
### set, s
Set a new tile for the user. All the formats supported by the .Net framework are supported.
- The image will be croped to a (centered) square, resized to 126x126 and converted to 16 bits per point colors.
? - ^^
+ The image will be croped to a (centered) square, resized to 126x126 and converted to 16 bits per pixel colors.
? ^^^
UserTile --user vbfox --set C:\tile.jpg
+
+ Thanks
+ ------
+
+ I want to thank **Micah Rowland** and
+ [it's blog post on Xtreme Deployment](http://deployment.xtremeconsulting.com/2010/06/23/usertile-automation-part-1/)
+ for the first hints on where the tiles are stored and a basic analysis of the binary format. | 9 | 0.204545 | 8 | 1 |
b1303c38fc7fab5d450abe31c382c17c37890013 | src/components/ruler.vue | src/components/ruler.vue | <template>
<aside class="segel-ruler">
<ul>
<li v-for="n in 24">
<span v-bind:class="[n === new Date().getHours() + 1 ? 'current' : '']">
{{ ('0' + (n - 1)).slice(-2) }}
</span>
</li>
</ul>
</aside>
</template>
<script>
export default {};
</script>
| <template>
<aside class="segel-ruler">
<ul>
<li v-for="n in 24">
<span v-bind:class="[n === new Date().getHours() + 1 ? 'current' : '']">
{{ n - 1 | leadingZero }}
</span>
</li>
</ul>
</aside>
</template>
<script>
export default {
filters: {
leadingZero: function (value) {
return ('0' + value).slice(-2);
}
}
};
</script>
| Clean up template with filter. | Clean up template with filter.
| Vue | mit | mikaeljorhult/segel | vue | ## Code Before:
<template>
<aside class="segel-ruler">
<ul>
<li v-for="n in 24">
<span v-bind:class="[n === new Date().getHours() + 1 ? 'current' : '']">
{{ ('0' + (n - 1)).slice(-2) }}
</span>
</li>
</ul>
</aside>
</template>
<script>
export default {};
</script>
## Instruction:
Clean up template with filter.
## Code After:
<template>
<aside class="segel-ruler">
<ul>
<li v-for="n in 24">
<span v-bind:class="[n === new Date().getHours() + 1 ? 'current' : '']">
{{ n - 1 | leadingZero }}
</span>
</li>
</ul>
</aside>
</template>
<script>
export default {
filters: {
leadingZero: function (value) {
return ('0' + value).slice(-2);
}
}
};
</script>
| <template>
<aside class="segel-ruler">
<ul>
<li v-for="n in 24">
<span v-bind:class="[n === new Date().getHours() + 1 ? 'current' : '']">
- {{ ('0' + (n - 1)).slice(-2) }}
+ {{ n - 1 | leadingZero }}
</span>
</li>
</ul>
</aside>
</template>
<script>
- export default {};
? --
+ export default {
+ filters: {
+ leadingZero: function (value) {
+ return ('0' + value).slice(-2);
+ }
+ }
+ };
</script> | 10 | 0.666667 | 8 | 2 |
31b940425d4f5e2831a0dc0a5d58e3e89ebc9915 | _includes/meta_twitter.html | _includes/meta_twitter.html | <meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="@Chasmo90">
<meta name="twitter:creator" content="@Chasmo90">
<meta name="twitter:url" content="{{ page.url | replace:'index.html','' | prepend: site.baseurl | prepend: site.url }}">
<meta name="twitter:title" content="{% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %}">
<meta name="twitter:description" content="{% if page.description %}{{ page.description }}{% else %}{{ page.content | strip_html | truncatewords: 20 }}{% endif %}">
<meta name="twitter:image" content="https://s.gravatar.com/avatar/58e39d254d36d251391071682fe4dd8b?s=800">
| <meta name="twitter:card" content="summary">
<meta name="twitter:site" content="@Chasmo90">
<meta name="twitter:creator" content="@Chasmo90">
<meta name="twitter:url" content="{{ page.url | replace:'index.html','' | prepend: site.baseurl | prepend: site.url }}">
<meta name="twitter:title" content="{% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %}">
<meta name="twitter:description" content="{% if page.description %}{{ page.description }}{% else %}{{ page.content | strip_html | truncatewords: 20 }}{% endif %}">
<meta name="twitter:image" content="https://s.gravatar.com/avatar/58e39d254d36d251391071682fe4dd8b?s=800">
| Change twitter card layout to summary | Change twitter card layout to summary
| HTML | mit | MartinSeeler/MartinSeeler.github.io,MartinSeeler/MartinSeeler.github.io | html | ## Code Before:
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="@Chasmo90">
<meta name="twitter:creator" content="@Chasmo90">
<meta name="twitter:url" content="{{ page.url | replace:'index.html','' | prepend: site.baseurl | prepend: site.url }}">
<meta name="twitter:title" content="{% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %}">
<meta name="twitter:description" content="{% if page.description %}{{ page.description }}{% else %}{{ page.content | strip_html | truncatewords: 20 }}{% endif %}">
<meta name="twitter:image" content="https://s.gravatar.com/avatar/58e39d254d36d251391071682fe4dd8b?s=800">
## Instruction:
Change twitter card layout to summary
## Code After:
<meta name="twitter:card" content="summary">
<meta name="twitter:site" content="@Chasmo90">
<meta name="twitter:creator" content="@Chasmo90">
<meta name="twitter:url" content="{{ page.url | replace:'index.html','' | prepend: site.baseurl | prepend: site.url }}">
<meta name="twitter:title" content="{% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %}">
<meta name="twitter:description" content="{% if page.description %}{{ page.description }}{% else %}{{ page.content | strip_html | truncatewords: 20 }}{% endif %}">
<meta name="twitter:image" content="https://s.gravatar.com/avatar/58e39d254d36d251391071682fe4dd8b?s=800">
| - <meta name="twitter:card" content="summary_large_image">
? ------------
+ <meta name="twitter:card" content="summary">
<meta name="twitter:site" content="@Chasmo90">
<meta name="twitter:creator" content="@Chasmo90">
<meta name="twitter:url" content="{{ page.url | replace:'index.html','' | prepend: site.baseurl | prepend: site.url }}">
<meta name="twitter:title" content="{% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %}">
<meta name="twitter:description" content="{% if page.description %}{{ page.description }}{% else %}{{ page.content | strip_html | truncatewords: 20 }}{% endif %}">
<meta name="twitter:image" content="https://s.gravatar.com/avatar/58e39d254d36d251391071682fe4dd8b?s=800"> | 2 | 0.285714 | 1 | 1 |
f9fd799bb4ca2a7600ea8181609bcca7ddebdf55 | metadata/com.timvdalen.gizmooi.txt | metadata/com.timvdalen.gizmooi.txt | Categories:Multimedia
License:GPLv2
Web Site:https://github.com/timvdalen/gizmooi
Source Code:https://github.com/timvdalen/gizmooi
Issue Tracker:https://github.com/timvdalen/gizmooi/issues
Summary:Widget that displays pictures
Description:
Widget that will display a different nice photo each day.
.
Repo Type:git
Repo:https://github.com/timvdalen/gizmooi.git
Build:1.3,5
commit=a05b331
Auto Update Mode:None
Update Check Mode:RepoManifest
| Categories:Multimedia
License:GPLv2
Web Site:https://github.com/timvdalen/gizmooi
Source Code:https://github.com/timvdalen/gizmooi
Issue Tracker:https://github.com/timvdalen/gizmooi/issues
Auto Name:Gizmooi
Summary:Widget that displays pictures
Description:
Widget that will display a different nice photo each day.
.
Repo Type:git
Repo:https://github.com/timvdalen/gizmooi.git
Build:1.3,5
commit=a05b331
Auto Update Mode:None
Update Check Mode:RepoManifest
Current Version:1.3
Current Version Code:5
| Update CV of Gizmooi to 1.3 (5) | Update CV of Gizmooi to 1.3 (5)
| Text | agpl-3.0 | f-droid/fdroiddata,f-droid/fdroiddata,f-droid/fdroid-data | text | ## Code Before:
Categories:Multimedia
License:GPLv2
Web Site:https://github.com/timvdalen/gizmooi
Source Code:https://github.com/timvdalen/gizmooi
Issue Tracker:https://github.com/timvdalen/gizmooi/issues
Summary:Widget that displays pictures
Description:
Widget that will display a different nice photo each day.
.
Repo Type:git
Repo:https://github.com/timvdalen/gizmooi.git
Build:1.3,5
commit=a05b331
Auto Update Mode:None
Update Check Mode:RepoManifest
## Instruction:
Update CV of Gizmooi to 1.3 (5)
## Code After:
Categories:Multimedia
License:GPLv2
Web Site:https://github.com/timvdalen/gizmooi
Source Code:https://github.com/timvdalen/gizmooi
Issue Tracker:https://github.com/timvdalen/gizmooi/issues
Auto Name:Gizmooi
Summary:Widget that displays pictures
Description:
Widget that will display a different nice photo each day.
.
Repo Type:git
Repo:https://github.com/timvdalen/gizmooi.git
Build:1.3,5
commit=a05b331
Auto Update Mode:None
Update Check Mode:RepoManifest
Current Version:1.3
Current Version Code:5
| Categories:Multimedia
License:GPLv2
Web Site:https://github.com/timvdalen/gizmooi
Source Code:https://github.com/timvdalen/gizmooi
Issue Tracker:https://github.com/timvdalen/gizmooi/issues
+ Auto Name:Gizmooi
Summary:Widget that displays pictures
Description:
Widget that will display a different nice photo each day.
.
Repo Type:git
Repo:https://github.com/timvdalen/gizmooi.git
Build:1.3,5
commit=a05b331
Auto Update Mode:None
Update Check Mode:RepoManifest
+ Current Version:1.3
+ Current Version Code:5
| 3 | 0.15 | 3 | 0 |
ae1bb6aa1fca8268ee340009a507ee0a8d3b59d8 | src/package.json | src/package.json | {
"scripts": {
"build": "tsc -p .",
"postbuild": "npm run package",
"package": "tfx extension create",
"clean": "rimraf ./dist && rimraf ./*.vsix"
},
"devDependencies": {
"grunt": "^1.0.0",
"grunt-contrib-copy": "*",
"grunt-contrib-jasmine": "*",
"grunt-exec": "*",
"jasmine": "^2.5.1",
"rimraf": "^2.5.4",
"tfx-cli": "^0.3.45",
"typescript": "^2.2.0"
},
"dependencies": {
"@types/jquery": "^2.0.34",
"@types/q": "0.0.32"
},
"name": "",
"private": true,
"version": "0.0.0"
}
| {
"scripts": {
"build": "tsc -p .",
"postbuild": "npm run package",
"package": "tfx extension create",
"clean": "rimraf ./dist && rimraf ./*.vsix"
},
"devDependencies": {
"grunt": "^1.0.0",
"grunt-exec": "*",
"rimraf": "^2.5.4",
"tfx-cli": "^0.3.45"
},
"name": "",
"private": true,
"version": "0.0.0"
}
| Remove unused dependencies causing npm error. | Remove unused dependencies causing npm error. | JSON | mit | BlueBasher/WorkItemUpdater,BlueBasher/WorkItemUpdater | json | ## Code Before:
{
"scripts": {
"build": "tsc -p .",
"postbuild": "npm run package",
"package": "tfx extension create",
"clean": "rimraf ./dist && rimraf ./*.vsix"
},
"devDependencies": {
"grunt": "^1.0.0",
"grunt-contrib-copy": "*",
"grunt-contrib-jasmine": "*",
"grunt-exec": "*",
"jasmine": "^2.5.1",
"rimraf": "^2.5.4",
"tfx-cli": "^0.3.45",
"typescript": "^2.2.0"
},
"dependencies": {
"@types/jquery": "^2.0.34",
"@types/q": "0.0.32"
},
"name": "",
"private": true,
"version": "0.0.0"
}
## Instruction:
Remove unused dependencies causing npm error.
## Code After:
{
"scripts": {
"build": "tsc -p .",
"postbuild": "npm run package",
"package": "tfx extension create",
"clean": "rimraf ./dist && rimraf ./*.vsix"
},
"devDependencies": {
"grunt": "^1.0.0",
"grunt-exec": "*",
"rimraf": "^2.5.4",
"tfx-cli": "^0.3.45"
},
"name": "",
"private": true,
"version": "0.0.0"
}
| {
"scripts": {
"build": "tsc -p .",
"postbuild": "npm run package",
"package": "tfx extension create",
"clean": "rimraf ./dist && rimraf ./*.vsix"
},
"devDependencies": {
"grunt": "^1.0.0",
- "grunt-contrib-copy": "*",
- "grunt-contrib-jasmine": "*",
"grunt-exec": "*",
- "jasmine": "^2.5.1",
"rimraf": "^2.5.4",
- "tfx-cli": "^0.3.45",
? -
+ "tfx-cli": "^0.3.45"
- "typescript": "^2.2.0"
- },
- "dependencies": {
- "@types/jquery": "^2.0.34",
- "@types/q": "0.0.32"
},
"name": "",
"private": true,
"version": "0.0.0"
} | 10 | 0.4 | 1 | 9 |
31ed37be6c33a989ea17885a90c1ff853a31b047 | app/helpers/campaign_helper.rb | app/helpers/campaign_helper.rb | module CampaignHelper
def nav_link(link_text, link_path)
class_name = current_page?(link_path) ? 'active' : ''
content_tag(:li, class: 'nav__item', id: "#{params[:action]}-link") do
content_tag(:p) do
link_to(link_text, link_path, class: class_name)
end
end
end
def html_from_markdown(markdown)
converter = Redcarpet::Markdown.new(Redcarpet::Render::HTML)
raw converter.render(markdown)
end
end
| module CampaignHelper
def nav_link(link_text, link_path)
class_name = current_page?(link_path) ? 'active' : ''
content_tag(:li, class: 'nav__item', id: "#{params[:action]}-link") do
content_tag(:p) do
link_to(link_text, link_path, class: class_name)
end
end
end
def html_from_markdown(markdown)
return unless markdown
converter = Redcarpet::Markdown.new(Redcarpet::Render::HTML)
raw converter.render(markdown)
end
end
| Fix error with converting nil to markdown | Fix error with converting nil to markdown
| Ruby | mit | majakomel/WikiEduDashboard,alpha721/WikiEduDashboard,sejalkhatri/WikiEduDashboard,KarmaHater/WikiEduDashboard,WikiEducationFoundation/WikiEduDashboard,WikiEducationFoundation/WikiEduDashboard,sejalkhatri/WikiEduDashboard,KarmaHater/WikiEduDashboard,alpha721/WikiEduDashboard,alpha721/WikiEduDashboard,sejalkhatri/WikiEduDashboard,majakomel/WikiEduDashboard,WikiEducationFoundation/WikiEduDashboard,sejalkhatri/WikiEduDashboard,KarmaHater/WikiEduDashboard,alpha721/WikiEduDashboard,majakomel/WikiEduDashboard,sejalkhatri/WikiEduDashboard,KarmaHater/WikiEduDashboard,majakomel/WikiEduDashboard,WikiEducationFoundation/WikiEduDashboard,WikiEducationFoundation/WikiEduDashboard | ruby | ## Code Before:
module CampaignHelper
def nav_link(link_text, link_path)
class_name = current_page?(link_path) ? 'active' : ''
content_tag(:li, class: 'nav__item', id: "#{params[:action]}-link") do
content_tag(:p) do
link_to(link_text, link_path, class: class_name)
end
end
end
def html_from_markdown(markdown)
converter = Redcarpet::Markdown.new(Redcarpet::Render::HTML)
raw converter.render(markdown)
end
end
## Instruction:
Fix error with converting nil to markdown
## Code After:
module CampaignHelper
def nav_link(link_text, link_path)
class_name = current_page?(link_path) ? 'active' : ''
content_tag(:li, class: 'nav__item', id: "#{params[:action]}-link") do
content_tag(:p) do
link_to(link_text, link_path, class: class_name)
end
end
end
def html_from_markdown(markdown)
return unless markdown
converter = Redcarpet::Markdown.new(Redcarpet::Render::HTML)
raw converter.render(markdown)
end
end
| module CampaignHelper
def nav_link(link_text, link_path)
class_name = current_page?(link_path) ? 'active' : ''
content_tag(:li, class: 'nav__item', id: "#{params[:action]}-link") do
content_tag(:p) do
link_to(link_text, link_path, class: class_name)
end
end
end
def html_from_markdown(markdown)
+ return unless markdown
converter = Redcarpet::Markdown.new(Redcarpet::Render::HTML)
raw converter.render(markdown)
end
end | 1 | 0.0625 | 1 | 0 |
2397fb1699a29dd652aafae6a65169c6b6fa8a90 | .travis.yml | .travis.yml | sudo: false
language: python
python:
- "2.7"
- "3.3"
- "3.4"
- "3.5"
env:
-
- LANG=
- SPHINX=1
install:
- python setup.py --quiet install
- pip install pep8 pyflakes
- if [ "$SPHINX" -eq 1 ]; then pip install sphinx; fi
script:
- if [ "$SPHINX" -eq 1 ]; then ./rstcheck.py -h | grep 'Sphinx is enabled'; fi
- ./test_rstcheck.py
- ./test.bash
- pep8 ./*.py
- pyflakes ./*.py
| sudo: false
language: python
python:
- "2.7"
- "3.3"
- "3.4"
- "3.5"
- "3.6"
env:
-
- LANG=
- SPHINX=1
install:
- python setup.py --quiet install
- pip install pep8 pyflakes
- if [ "$SPHINX" -eq 1 ]; then pip install sphinx; fi
script:
- if [ "$SPHINX" -eq 1 ]; then ./rstcheck.py -h | grep 'Sphinx is enabled'; fi
- ./test_rstcheck.py
- ./test.bash
- pep8 ./*.py
- pyflakes ./*.py
| Enable Python 3.6 in Travis | Enable Python 3.6 in Travis
| YAML | mit | myint/rstcheck,sameersingh7/rstcheck,sameersingh7/rstcheck,myint/rstcheck | yaml | ## Code Before:
sudo: false
language: python
python:
- "2.7"
- "3.3"
- "3.4"
- "3.5"
env:
-
- LANG=
- SPHINX=1
install:
- python setup.py --quiet install
- pip install pep8 pyflakes
- if [ "$SPHINX" -eq 1 ]; then pip install sphinx; fi
script:
- if [ "$SPHINX" -eq 1 ]; then ./rstcheck.py -h | grep 'Sphinx is enabled'; fi
- ./test_rstcheck.py
- ./test.bash
- pep8 ./*.py
- pyflakes ./*.py
## Instruction:
Enable Python 3.6 in Travis
## Code After:
sudo: false
language: python
python:
- "2.7"
- "3.3"
- "3.4"
- "3.5"
- "3.6"
env:
-
- LANG=
- SPHINX=1
install:
- python setup.py --quiet install
- pip install pep8 pyflakes
- if [ "$SPHINX" -eq 1 ]; then pip install sphinx; fi
script:
- if [ "$SPHINX" -eq 1 ]; then ./rstcheck.py -h | grep 'Sphinx is enabled'; fi
- ./test_rstcheck.py
- ./test.bash
- pep8 ./*.py
- pyflakes ./*.py
| sudo: false
language: python
python:
- "2.7"
- "3.3"
- "3.4"
- "3.5"
+ - "3.6"
env:
-
- LANG=
- SPHINX=1
install:
- python setup.py --quiet install
- pip install pep8 pyflakes
- if [ "$SPHINX" -eq 1 ]; then pip install sphinx; fi
script:
- if [ "$SPHINX" -eq 1 ]; then ./rstcheck.py -h | grep 'Sphinx is enabled'; fi
- ./test_rstcheck.py
- ./test.bash
- pep8 ./*.py
- pyflakes ./*.py | 1 | 0.038462 | 1 | 0 |
ef0e2d96a50ac4cd539b9e332fc884b05302fd40 | src/Root.js | src/Root.js | import React from 'react';
import { BrowserRouter, Route, Switch } from 'react-router-dom';
import TopBar from './top-bar/top-bar';
import LandingPage from './landing-page/landing-page';
import ContactPage from './contact-page/contact-page';
import './Main.scss';
export default class Root extends React.Component {
render() {
return (
<div className="App">
<BrowserRouter>
<div>
<TopBar/>
<Switch>
<Route exact path="/" component={LandingPage}/>
<Route path="/contact" component={ContactPage}/>
</Switch>
</div>
</BrowserRouter>
</div>
);
}
}
| import React from 'react';
import { HashRouter, Route, Switch } from 'react-router-dom';
import TopBar from './top-bar/top-bar';
import LandingPage from './landing-page/landing-page';
import ContactPage from './contact-page/contact-page';
import './Main.scss';
export default class Root extends React.Component {
render() {
return (
<div className="App">
<HashRouter hashType={'hashbang'}>
<div>
<TopBar/>
<Switch>
<Route exact path="/" component={LandingPage}/>
<Route path="/contact" component={ContactPage}/>
</Switch>
</div>
</HashRouter>
</div>
);
}
}
| Use hashrouter due to s3 limitations | Use hashrouter due to s3 limitations
| JavaScript | apache-2.0 | cozzbp/example-react-app,cozzbp/example-react-app | javascript | ## Code Before:
import React from 'react';
import { BrowserRouter, Route, Switch } from 'react-router-dom';
import TopBar from './top-bar/top-bar';
import LandingPage from './landing-page/landing-page';
import ContactPage from './contact-page/contact-page';
import './Main.scss';
export default class Root extends React.Component {
render() {
return (
<div className="App">
<BrowserRouter>
<div>
<TopBar/>
<Switch>
<Route exact path="/" component={LandingPage}/>
<Route path="/contact" component={ContactPage}/>
</Switch>
</div>
</BrowserRouter>
</div>
);
}
}
## Instruction:
Use hashrouter due to s3 limitations
## Code After:
import React from 'react';
import { HashRouter, Route, Switch } from 'react-router-dom';
import TopBar from './top-bar/top-bar';
import LandingPage from './landing-page/landing-page';
import ContactPage from './contact-page/contact-page';
import './Main.scss';
export default class Root extends React.Component {
render() {
return (
<div className="App">
<HashRouter hashType={'hashbang'}>
<div>
<TopBar/>
<Switch>
<Route exact path="/" component={LandingPage}/>
<Route path="/contact" component={ContactPage}/>
</Switch>
</div>
</HashRouter>
</div>
);
}
}
| import React from 'react';
- import { BrowserRouter, Route, Switch } from 'react-router-dom';
? ^^^^ ^^
+ import { HashRouter, Route, Switch } from 'react-router-dom';
? ^^ ^
import TopBar from './top-bar/top-bar';
import LandingPage from './landing-page/landing-page';
import ContactPage from './contact-page/contact-page';
import './Main.scss';
export default class Root extends React.Component {
render() {
return (
<div className="App">
- <BrowserRouter>
+ <HashRouter hashType={'hashbang'}>
<div>
<TopBar/>
<Switch>
<Route exact path="/" component={LandingPage}/>
<Route path="/contact" component={ContactPage}/>
</Switch>
</div>
- </BrowserRouter>
? ^^^^ ^^
+ </HashRouter>
? ^^ ^
</div>
);
}
} | 6 | 0.24 | 3 | 3 |
9feb800985250c12ed35c3934cde0ef00dc3867e | drivers/tty/serial/uart/uart_driver.c | drivers/tty/serial/uart/uart_driver.c |
static int uart_write(const char *s);
static struct char_driver_operations uart_ops = {
.write = uart_write,
};
static struct char_driver uart_driver = {
.name = "UART",
};
void uart_init(void)
{
struct char_driver *uart = get_uart_driver_instance();
uart->ops = &uart_ops;
}
struct char_driver *
get_uart_driver_instance(void)
{
if (!uart_driver.ops)
uart_init();
return &uart_driver;
}
static int
uart_write(const char *s)
{
while (*s) {
while (*(UART0 + UARTFR) & UARTFR_TXFF)
;
*UART0 = *s;
s++;
}
return 0;
}
|
static int uart_write(const char *s);
static struct char_driver_operations uart_ops = {
.write = uart_write,
};
static struct char_driver uart_driver = {
.name = "UART",
};
static void
uart_init(void)
{
uart_driver.ops = &uart_ops;
}
struct char_driver *
get_uart_driver_instance(void)
{
if (!uart_driver.ops)
uart_init();
return &uart_driver;
}
static int
uart_write(const char *s)
{
while (*s) {
while (*(UART0 + UARTFR) & UARTFR_TXFF)
;
*UART0 = *s;
s++;
}
return 0;
}
| Fix circular reference but in uart_init() | Fix circular reference but in uart_init()
Don't call get_uart_driver_instance() from uart_init().
| C | bsd-3-clause | masami256/mini-arm-kernel | c | ## Code Before:
static int uart_write(const char *s);
static struct char_driver_operations uart_ops = {
.write = uart_write,
};
static struct char_driver uart_driver = {
.name = "UART",
};
void uart_init(void)
{
struct char_driver *uart = get_uart_driver_instance();
uart->ops = &uart_ops;
}
struct char_driver *
get_uart_driver_instance(void)
{
if (!uart_driver.ops)
uart_init();
return &uart_driver;
}
static int
uart_write(const char *s)
{
while (*s) {
while (*(UART0 + UARTFR) & UARTFR_TXFF)
;
*UART0 = *s;
s++;
}
return 0;
}
## Instruction:
Fix circular reference but in uart_init()
Don't call get_uart_driver_instance() from uart_init().
## Code After:
static int uart_write(const char *s);
static struct char_driver_operations uart_ops = {
.write = uart_write,
};
static struct char_driver uart_driver = {
.name = "UART",
};
static void
uart_init(void)
{
uart_driver.ops = &uart_ops;
}
struct char_driver *
get_uart_driver_instance(void)
{
if (!uart_driver.ops)
uart_init();
return &uart_driver;
}
static int
uart_write(const char *s)
{
while (*s) {
while (*(UART0 + UARTFR) & UARTFR_TXFF)
;
*UART0 = *s;
s++;
}
return 0;
}
|
static int uart_write(const char *s);
static struct char_driver_operations uart_ops = {
.write = uart_write,
};
static struct char_driver uart_driver = {
.name = "UART",
};
+ static void
- void uart_init(void)
? -----
+ uart_init(void)
{
- struct char_driver *uart = get_uart_driver_instance();
- uart->ops = &uart_ops;
? ^^
+ uart_driver.ops = &uart_ops;
? ^^^^^^^^
}
struct char_driver *
get_uart_driver_instance(void)
{
if (!uart_driver.ops)
uart_init();
return &uart_driver;
}
static int
uart_write(const char *s)
{
while (*s) {
while (*(UART0 + UARTFR) & UARTFR_TXFF)
;
*UART0 = *s;
s++;
}
return 0;
}
| 6 | 0.153846 | 3 | 3 |
d4dd95753f4b3bbcd2308de4b93350f2c10f5b8d | run_tests.sh | run_tests.sh | session_engines=(
"django.contrib.sessions.backends.db"
"django.contrib.sessions.backends.file"
"django.contrib.sessions.backends.cache"
"django.contrib.sessions.backends.cached_db"
"django.contrib.sessions.backends.signed_cookies"
)
for session in "${session_engines[@]}"
do
export SESSION_ENGINE=$session
tox -- --driver=Chrome
tox -- --driver=Firefox
tox -- --driver=PhantomJS
done
| session_engines=(
"django.contrib.sessions.backends.db"
"django.contrib.sessions.backends.file"
"django.contrib.sessions.backends.cache"
"django.contrib.sessions.backends.cached_db"
"django.contrib.sessions.backends.signed_cookies"
)
for session in "${session_engines[@]}"
do
export SESSION_ENGINE=$session
tox -- --driver=Chrome
tox -- --driver=Firefox
tox -- --driver=PhantomJS --liveserver=127.0.0.1:8000-8100
done
| Set live server domain to 127.0.0.1 for PhantomJs. Version 2.1 of PhantomJS will not accept cookies for locahost domain | Set live server domain to 127.0.0.1 for PhantomJs. Version 2.1 of PhantomJS will not accept cookies for locahost domain
| Shell | mit | feffe/django-selenium-login,feffe/django-selenium-login | shell | ## Code Before:
session_engines=(
"django.contrib.sessions.backends.db"
"django.contrib.sessions.backends.file"
"django.contrib.sessions.backends.cache"
"django.contrib.sessions.backends.cached_db"
"django.contrib.sessions.backends.signed_cookies"
)
for session in "${session_engines[@]}"
do
export SESSION_ENGINE=$session
tox -- --driver=Chrome
tox -- --driver=Firefox
tox -- --driver=PhantomJS
done
## Instruction:
Set live server domain to 127.0.0.1 for PhantomJs. Version 2.1 of PhantomJS will not accept cookies for locahost domain
## Code After:
session_engines=(
"django.contrib.sessions.backends.db"
"django.contrib.sessions.backends.file"
"django.contrib.sessions.backends.cache"
"django.contrib.sessions.backends.cached_db"
"django.contrib.sessions.backends.signed_cookies"
)
for session in "${session_engines[@]}"
do
export SESSION_ENGINE=$session
tox -- --driver=Chrome
tox -- --driver=Firefox
tox -- --driver=PhantomJS --liveserver=127.0.0.1:8000-8100
done
| session_engines=(
"django.contrib.sessions.backends.db"
"django.contrib.sessions.backends.file"
"django.contrib.sessions.backends.cache"
"django.contrib.sessions.backends.cached_db"
"django.contrib.sessions.backends.signed_cookies"
)
for session in "${session_engines[@]}"
do
export SESSION_ENGINE=$session
tox -- --driver=Chrome
tox -- --driver=Firefox
- tox -- --driver=PhantomJS
+ tox -- --driver=PhantomJS --liveserver=127.0.0.1:8000-8100
done | 2 | 0.133333 | 1 | 1 |
6443833b8ee6b6fd5f0577fc800ec875c6123d88 | README.md | README.md | tsaap-notes
===========
Micro-blogging tool for learners and teachers
[](https://travis-ci.org/TSaaP/tsaap-notes)
| tsaap-notes
===========
Micro-blogging tool for learners and teachers
[](https://travis-ci.org/TSaaP/tsaap-notes)
[](https://coveralls.io/github/TSaaP/tsaap-notes?branch=develop)
| Add coverage status in readme file. | Add coverage status in readme file.
| Markdown | agpl-3.0 | TSaaP/tsaap-notes,elaastic/elaastic-questions,elaastic/elaastic-questions,TSaaP/tsaap-notes,elaastic/elaastic-questions | markdown | ## Code Before:
tsaap-notes
===========
Micro-blogging tool for learners and teachers
[](https://travis-ci.org/TSaaP/tsaap-notes)
## Instruction:
Add coverage status in readme file.
## Code After:
tsaap-notes
===========
Micro-blogging tool for learners and teachers
[](https://travis-ci.org/TSaaP/tsaap-notes)
[](https://coveralls.io/github/TSaaP/tsaap-notes?branch=develop)
| tsaap-notes
===========
Micro-blogging tool for learners and teachers
[](https://travis-ci.org/TSaaP/tsaap-notes)
+ [](https://coveralls.io/github/TSaaP/tsaap-notes?branch=develop) | 1 | 0.166667 | 1 | 0 |
db07302a3cb1111d0bb3c00fc6d88ce2d259d707 | extensions/jackson/deployment/src/test/java/io/quarkus/jackson/deployment/JacksonTimeZonePropertiesTest.java | extensions/jackson/deployment/src/test/java/io/quarkus/jackson/deployment/JacksonTimeZonePropertiesTest.java | package io.quarkus.jackson.deployment;
import java.util.Calendar;
import java.util.Date;
import javax.inject.Inject;
import org.assertj.core.api.Assertions;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.RegisterExtension;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import io.quarkus.test.QuarkusUnitTest;
public class JacksonTimeZonePropertiesTest {
@RegisterExtension
static final QuarkusUnitTest config = new QuarkusUnitTest()
.withConfigurationResource("application-timezone-properties.properties");
@Inject
ObjectMapper objectMapper;
@Test
public void testTimezone() throws JsonProcessingException {
Assertions.assertThat(objectMapper.writeValueAsString(new Pojo(new Date(2021, Calendar.MARCH, 3, 11, 5))))
.contains("+07");
}
public static class Pojo {
private final Date date;
public Pojo(Date date) {
this.date = date;
}
public Date getDate() {
return date;
}
}
}
| package io.quarkus.jackson.deployment;
import java.time.LocalDateTime;
import java.time.Month;
import java.time.ZoneId;
import java.time.ZonedDateTime;
import java.util.Date;
import javax.inject.Inject;
import org.assertj.core.api.Assertions;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.RegisterExtension;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import io.quarkus.test.QuarkusUnitTest;
public class JacksonTimeZonePropertiesTest {
@RegisterExtension
static final QuarkusUnitTest config = new QuarkusUnitTest()
.withConfigurationResource("application-timezone-properties.properties");
@Inject
ObjectMapper objectMapper;
@Test
public void testTimezone() throws JsonProcessingException {
Assertions.assertThat(objectMapper.writeValueAsString(new Pojo(Date.from(
ZonedDateTime.of(LocalDateTime.of(2021, Month.MARCH, 3, 11, 5), ZoneId.of("GMT")).toInstant()))))
.contains("+07");
}
public static class Pojo {
private final Date date;
public Pojo(Date date) {
this.date = date;
}
public Date getDate() {
return date;
}
}
}
| Replace deprecated Date constructor use in Jackson test | Replace deprecated Date constructor use in Jackson test
| Java | apache-2.0 | quarkusio/quarkus,quarkusio/quarkus,quarkusio/quarkus,quarkusio/quarkus,quarkusio/quarkus | java | ## Code Before:
package io.quarkus.jackson.deployment;
import java.util.Calendar;
import java.util.Date;
import javax.inject.Inject;
import org.assertj.core.api.Assertions;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.RegisterExtension;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import io.quarkus.test.QuarkusUnitTest;
public class JacksonTimeZonePropertiesTest {
@RegisterExtension
static final QuarkusUnitTest config = new QuarkusUnitTest()
.withConfigurationResource("application-timezone-properties.properties");
@Inject
ObjectMapper objectMapper;
@Test
public void testTimezone() throws JsonProcessingException {
Assertions.assertThat(objectMapper.writeValueAsString(new Pojo(new Date(2021, Calendar.MARCH, 3, 11, 5))))
.contains("+07");
}
public static class Pojo {
private final Date date;
public Pojo(Date date) {
this.date = date;
}
public Date getDate() {
return date;
}
}
}
## Instruction:
Replace deprecated Date constructor use in Jackson test
## Code After:
package io.quarkus.jackson.deployment;
import java.time.LocalDateTime;
import java.time.Month;
import java.time.ZoneId;
import java.time.ZonedDateTime;
import java.util.Date;
import javax.inject.Inject;
import org.assertj.core.api.Assertions;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.RegisterExtension;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import io.quarkus.test.QuarkusUnitTest;
public class JacksonTimeZonePropertiesTest {
@RegisterExtension
static final QuarkusUnitTest config = new QuarkusUnitTest()
.withConfigurationResource("application-timezone-properties.properties");
@Inject
ObjectMapper objectMapper;
@Test
public void testTimezone() throws JsonProcessingException {
Assertions.assertThat(objectMapper.writeValueAsString(new Pojo(Date.from(
ZonedDateTime.of(LocalDateTime.of(2021, Month.MARCH, 3, 11, 5), ZoneId.of("GMT")).toInstant()))))
.contains("+07");
}
public static class Pojo {
private final Date date;
public Pojo(Date date) {
this.date = date;
}
public Date getDate() {
return date;
}
}
}
| package io.quarkus.jackson.deployment;
- import java.util.Calendar;
+ import java.time.LocalDateTime;
+ import java.time.Month;
+ import java.time.ZoneId;
+ import java.time.ZonedDateTime;
import java.util.Date;
import javax.inject.Inject;
import org.assertj.core.api.Assertions;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.RegisterExtension;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import io.quarkus.test.QuarkusUnitTest;
public class JacksonTimeZonePropertiesTest {
@RegisterExtension
static final QuarkusUnitTest config = new QuarkusUnitTest()
.withConfigurationResource("application-timezone-properties.properties");
@Inject
ObjectMapper objectMapper;
@Test
public void testTimezone() throws JsonProcessingException {
- Assertions.assertThat(objectMapper.writeValueAsString(new Pojo(new Date(2021, Calendar.MARCH, 3, 11, 5))))
? ---- ----------------------------------
+ Assertions.assertThat(objectMapper.writeValueAsString(new Pojo(Date.from(
? +++++
+ ZonedDateTime.of(LocalDateTime.of(2021, Month.MARCH, 3, 11, 5), ZoneId.of("GMT")).toInstant()))))
.contains("+07");
}
public static class Pojo {
private final Date date;
public Pojo(Date date) {
this.date = date;
}
public Date getDate() {
return date;
}
}
} | 8 | 0.181818 | 6 | 2 |
24afd810a1810160e45c06fa8cbf02bf39fb95e3 | timestrap/static/js/base.js | timestrap/static/js/base.js | // We use this function throughout all the things to send and recieve form our
// django-rest-framework API
function quickFetch(url, method, body) {
let csrftoken = Cookies.get('csrftoken');
method = (typeof method !== 'undefined') ? method : 'get';
// Give us back a promise we can .then() on, data can be accessed via
// .then(function(data) {console.log(data)})
return fetch(url, {
credentials: 'include',
headers: new Headers({
'content-type': 'application/json',
'X-CSRFToken': csrftoken
}),
method: method,
body: JSON.stringify(body)
}).then(function(response) {
// Delete response throws an error with .json().
// TODO: Figure out a proper way to return information on DELETE.
if (method != 'delete') {
return response.json();
}
});
}
// Append number with 0 if there is only 1 digit
function pad(num) {
num = num.toString();
if (num.length === 1) {
num = '0' + num;
}
return num;
}
// Convert a decimal duration to a string (0:00).
function durationToString(duration) {
if (typeof(duration) === 'number') {
let hours = Math.floor(duration);
let minutes = Math.round((duration - hours) * 60);
duration = hours + ':' + pad(minutes);
}
return duration;
}
| // We use this function throughout all the things to send and recieve form our
// django-rest-framework API
function quickFetch(url, method, body) {
let csrftoken = Cookies.get('csrftoken');
method = (typeof method !== 'undefined') ? method : 'get';
// Give us back a promise we can .then() on, data can be accessed via
// .then(function(data) {console.log(data)})
return fetch(url, {
credentials: 'include',
headers: new Headers({
'content-type': 'application/json',
'X-CSRFToken': csrftoken
}),
method: method,
body: JSON.stringify(body)
}).then(function(response) {
let result = null;
switch (response.status) {
case 200: // HTTP_200_OK
case 201: // HTTP_201_CREATED
result = response.json();
break;
default:
result = response;
break;
}
return result;
});
}
// Append number with 0 if there is only 1 digit
function pad(num) {
num = num.toString();
if (num.length === 1) {
num = '0' + num;
}
return num;
}
// Convert a decimal duration to a string (0:00).
function durationToString(duration) {
if (typeof(duration) === 'number') {
let hours = Math.floor(duration);
let minutes = Math.round((duration - hours) * 60);
duration = hours + ':' + pad(minutes);
}
return duration;
}
| Check response status codes in quickFetch. | Check response status codes in quickFetch.
| JavaScript | bsd-2-clause | muhleder/timestrap,Leahelisabeth/timestrap,muhleder/timestrap,cdubz/timestrap,Leahelisabeth/timestrap,overshard/timestrap,Leahelisabeth/timestrap,muhleder/timestrap,cdubz/timestrap,cdubz/timestrap,Leahelisabeth/timestrap,overshard/timestrap,overshard/timestrap | javascript | ## Code Before:
// We use this function throughout all the things to send and recieve form our
// django-rest-framework API
function quickFetch(url, method, body) {
let csrftoken = Cookies.get('csrftoken');
method = (typeof method !== 'undefined') ? method : 'get';
// Give us back a promise we can .then() on, data can be accessed via
// .then(function(data) {console.log(data)})
return fetch(url, {
credentials: 'include',
headers: new Headers({
'content-type': 'application/json',
'X-CSRFToken': csrftoken
}),
method: method,
body: JSON.stringify(body)
}).then(function(response) {
// Delete response throws an error with .json().
// TODO: Figure out a proper way to return information on DELETE.
if (method != 'delete') {
return response.json();
}
});
}
// Append number with 0 if there is only 1 digit
function pad(num) {
num = num.toString();
if (num.length === 1) {
num = '0' + num;
}
return num;
}
// Convert a decimal duration to a string (0:00).
function durationToString(duration) {
if (typeof(duration) === 'number') {
let hours = Math.floor(duration);
let minutes = Math.round((duration - hours) * 60);
duration = hours + ':' + pad(minutes);
}
return duration;
}
## Instruction:
Check response status codes in quickFetch.
## Code After:
// We use this function throughout all the things to send and recieve form our
// django-rest-framework API
function quickFetch(url, method, body) {
let csrftoken = Cookies.get('csrftoken');
method = (typeof method !== 'undefined') ? method : 'get';
// Give us back a promise we can .then() on, data can be accessed via
// .then(function(data) {console.log(data)})
return fetch(url, {
credentials: 'include',
headers: new Headers({
'content-type': 'application/json',
'X-CSRFToken': csrftoken
}),
method: method,
body: JSON.stringify(body)
}).then(function(response) {
let result = null;
switch (response.status) {
case 200: // HTTP_200_OK
case 201: // HTTP_201_CREATED
result = response.json();
break;
default:
result = response;
break;
}
return result;
});
}
// Append number with 0 if there is only 1 digit
function pad(num) {
num = num.toString();
if (num.length === 1) {
num = '0' + num;
}
return num;
}
// Convert a decimal duration to a string (0:00).
function durationToString(duration) {
if (typeof(duration) === 'number') {
let hours = Math.floor(duration);
let minutes = Math.round((duration - hours) * 60);
duration = hours + ':' + pad(minutes);
}
return duration;
}
| // We use this function throughout all the things to send and recieve form our
// django-rest-framework API
function quickFetch(url, method, body) {
let csrftoken = Cookies.get('csrftoken');
method = (typeof method !== 'undefined') ? method : 'get';
// Give us back a promise we can .then() on, data can be accessed via
// .then(function(data) {console.log(data)})
return fetch(url, {
credentials: 'include',
headers: new Headers({
'content-type': 'application/json',
'X-CSRFToken': csrftoken
}),
method: method,
body: JSON.stringify(body)
}).then(function(response) {
- // Delete response throws an error with .json().
- // TODO: Figure out a proper way to return information on DELETE.
- if (method != 'delete') {
+ let result = null;
+ switch (response.status) {
+ case 200: // HTTP_200_OK
+ case 201: // HTTP_201_CREATED
- return response.json();
? ^^^
+ result = response.json();
? ++++ +++ ^^
+ break;
+ default:
+ result = response;
+ break;
}
+ return result;
});
}
// Append number with 0 if there is only 1 digit
function pad(num) {
num = num.toString();
if (num.length === 1) {
num = '0' + num;
}
return num;
}
// Convert a decimal duration to a string (0:00).
function durationToString(duration) {
if (typeof(duration) === 'number') {
let hours = Math.floor(duration);
let minutes = Math.round((duration - hours) * 60);
duration = hours + ':' + pad(minutes);
}
return duration;
} | 14 | 0.311111 | 10 | 4 |
335c2003fa9b3fe9ca8fdf681db64d751c703ff8 | deep-patna.md | deep-patna.md | -gyan niketan
-DPS
-DAV
### visits
-Zoo
-planetum
### hotels
| -gyan niketan
-DPS
-DAV
### visits
-Zoo
-planetum
### hotels
-five star
-three star
-ashoka
| Add hotels to my file | Add hotels to my file
| Markdown | mit | 1405115/firewhales | markdown | ## Code Before:
-gyan niketan
-DPS
-DAV
### visits
-Zoo
-planetum
### hotels
## Instruction:
Add hotels to my file
## Code After:
-gyan niketan
-DPS
-DAV
### visits
-Zoo
-planetum
### hotels
-five star
-three star
-ashoka
| -gyan niketan
-DPS
-DAV
### visits
-Zoo
-planetum
### hotels
+ -five star
+ -three star
+ -ashoka | 3 | 0.333333 | 3 | 0 |
64bd046ba585b445680cd864bbc193a5c31df933 | lib/i18n/tasks/ar/generate.rb | lib/i18n/tasks/ar/generate.rb | module I18n
module Tasks
module Ar
module Generate
class << self
def model lang
result = Model.final_hash(lang).to_yaml
File.open("config/locales/activerecord.models.#{lang}.yml", 'w+') {|f| f.write(result) }
end
def models
I18n::Tasks::Ar::Config.locales.each{|locale| model(locale)}
end
end
end
end
end
end | module I18n
module Tasks
module Ar
module Generate
class << self
def model lang
result = Model.final_hash(lang).to_yaml
FileUtils.mkdir_p('config/locales') unless File.exists?('config/locales')
File.open("config/locales/activerecord.models.#{lang}.yml", 'w+') {|f| f.write(result) }
end
def models
I18n::Tasks::Ar::Config.locales.each{|locale| model(locale)}
end
end
end
end
end
end | Create folder if don't exist | Create folder if don't exist
| Ruby | mit | werein/i18n-tasks-ar,werein/i18n-tasks-ar,werein/i18n-tasks-ar | ruby | ## Code Before:
module I18n
module Tasks
module Ar
module Generate
class << self
def model lang
result = Model.final_hash(lang).to_yaml
File.open("config/locales/activerecord.models.#{lang}.yml", 'w+') {|f| f.write(result) }
end
def models
I18n::Tasks::Ar::Config.locales.each{|locale| model(locale)}
end
end
end
end
end
end
## Instruction:
Create folder if don't exist
## Code After:
module I18n
module Tasks
module Ar
module Generate
class << self
def model lang
result = Model.final_hash(lang).to_yaml
FileUtils.mkdir_p('config/locales') unless File.exists?('config/locales')
File.open("config/locales/activerecord.models.#{lang}.yml", 'w+') {|f| f.write(result) }
end
def models
I18n::Tasks::Ar::Config.locales.each{|locale| model(locale)}
end
end
end
end
end
end | module I18n
module Tasks
module Ar
module Generate
class << self
def model lang
result = Model.final_hash(lang).to_yaml
+ FileUtils.mkdir_p('config/locales') unless File.exists?('config/locales')
File.open("config/locales/activerecord.models.#{lang}.yml", 'w+') {|f| f.write(result) }
end
def models
I18n::Tasks::Ar::Config.locales.each{|locale| model(locale)}
end
end
end
end
end
end | 1 | 0.055556 | 1 | 0 |
9340480f46eb97d0774b77f47c316fe0bb4632e5 | dhash/dhblock_chash_srv.h | dhash/dhblock_chash_srv.h |
class pmaint;
struct block_info;
struct adb_keyaux_t;
enum adb_status;
// Internal implementation of content hash repair_job logic.
class rjchash;
class dhblock_chash_srv : public dhblock_srv {
friend class rjchash;
ptr<adb> cache_db;
pmaint *pmaint_obj;
void localqueue (u_int32_t frags, clnt_stat err, adb_status stat, vec<block_info> keys);
public:
dhblock_chash_srv (ptr<vnode> node, ptr<dhashcli> cli, str dbname, str dbext,
str desc, cbv donecb);
~dhblock_chash_srv ();
void start (bool randomize);
void stop ();
void store (chordID k, str d, cb_dhstat cb);
void offer (user_args *sbp, dhash_offer_arg *arg);
void stats (vec<dstat> &s);
void generate_repair_jobs ();
};
|
class pmaint;
struct block_info;
struct adb_keyaux_t;
enum adb_status;
// Internal implementation of content hash repair_job logic.
class rjchash;
class dhblock_chash_srv : public dhblock_srv {
friend class rjchash;
ptr<adb> cache_db;
pmaint *pmaint_obj;
void localqueue (u_int32_t frags, clnt_stat err, adb_status stat, vec<block_info> keys);
public:
dhblock_chash_srv (ptr<vnode> node, ptr<dhashcli> cli,
str desc, str dbname, str dbext, cbv donecb);
~dhblock_chash_srv ();
void start (bool randomize);
void stop ();
void store (chordID k, str d, cb_dhstat cb);
void offer (user_args *sbp, dhash_offer_arg *arg);
void stats (vec<dstat> &s);
void generate_repair_jobs ();
};
| Fix mis-named parameters in header. | Fix mis-named parameters in header.
| C | mit | weidezhang/dht,sit/dht,sit/dht,sit/dht,weidezhang/dht,weidezhang/dht,sit/dht,sit/dht,weidezhang/dht,weidezhang/dht | c | ## Code Before:
class pmaint;
struct block_info;
struct adb_keyaux_t;
enum adb_status;
// Internal implementation of content hash repair_job logic.
class rjchash;
class dhblock_chash_srv : public dhblock_srv {
friend class rjchash;
ptr<adb> cache_db;
pmaint *pmaint_obj;
void localqueue (u_int32_t frags, clnt_stat err, adb_status stat, vec<block_info> keys);
public:
dhblock_chash_srv (ptr<vnode> node, ptr<dhashcli> cli, str dbname, str dbext,
str desc, cbv donecb);
~dhblock_chash_srv ();
void start (bool randomize);
void stop ();
void store (chordID k, str d, cb_dhstat cb);
void offer (user_args *sbp, dhash_offer_arg *arg);
void stats (vec<dstat> &s);
void generate_repair_jobs ();
};
## Instruction:
Fix mis-named parameters in header.
## Code After:
class pmaint;
struct block_info;
struct adb_keyaux_t;
enum adb_status;
// Internal implementation of content hash repair_job logic.
class rjchash;
class dhblock_chash_srv : public dhblock_srv {
friend class rjchash;
ptr<adb> cache_db;
pmaint *pmaint_obj;
void localqueue (u_int32_t frags, clnt_stat err, adb_status stat, vec<block_info> keys);
public:
dhblock_chash_srv (ptr<vnode> node, ptr<dhashcli> cli,
str desc, str dbname, str dbext, cbv donecb);
~dhblock_chash_srv ();
void start (bool randomize);
void stop ();
void store (chordID k, str d, cb_dhstat cb);
void offer (user_args *sbp, dhash_offer_arg *arg);
void stats (vec<dstat> &s);
void generate_repair_jobs ();
};
|
class pmaint;
struct block_info;
struct adb_keyaux_t;
enum adb_status;
// Internal implementation of content hash repair_job logic.
class rjchash;
class dhblock_chash_srv : public dhblock_srv {
friend class rjchash;
ptr<adb> cache_db;
pmaint *pmaint_obj;
void localqueue (u_int32_t frags, clnt_stat err, adb_status stat, vec<block_info> keys);
public:
- dhblock_chash_srv (ptr<vnode> node, ptr<dhashcli> cli, str dbname, str dbext,
? ----------------------
+ dhblock_chash_srv (ptr<vnode> node, ptr<dhashcli> cli,
- str desc, cbv donecb);
+ str desc, str dbname, str dbext, cbv donecb);
~dhblock_chash_srv ();
void start (bool randomize);
void stop ();
void store (chordID k, str d, cb_dhstat cb);
void offer (user_args *sbp, dhash_offer_arg *arg);
void stats (vec<dstat> &s);
void generate_repair_jobs ();
};
| 4 | 0.125 | 2 | 2 |
77772a34ec10e96c276a29a5661806eaf15f3bd0 | src/Datenknoten/LigiBundle/Resources/views/Item/show.html.twig | src/Datenknoten/LigiBundle/Resources/views/Item/show.html.twig | {% extends 'LigiBundle::layout.html.twig' %}
{% block body -%}
<h1 class="ui dividing header">{{ entity.name }}</h1>
<p>{{ entity.description }}</p>
{% endblock %}
| {% extends 'LigiBundle::layout.html.twig' %}
{% block title %}{{ entity.name }}{% endblock title %}
{% block body -%}
<h1 class="ui dividing header">{{ entity.name }}</h1>
<div class="ui rounded right floated medium image">
<img src="/images/avatar2/large/matthew.png" />
</div>
<p>
{{ entity.description }}
</p>
<div class="ui divider"></div>
<a class="ui blue button" href="{{ path('ligi_item_edit', { 'id': entity.id }) }}">
{% trans %}Edit{% endtrans %}
</a>
{% endblock %}
| Rework the detail page of the item. | Rework the detail page of the item.
| Twig | agpl-3.0 | datenknoten/ligi,datenknoten/ligi,datenknoten/ligi | twig | ## Code Before:
{% extends 'LigiBundle::layout.html.twig' %}
{% block body -%}
<h1 class="ui dividing header">{{ entity.name }}</h1>
<p>{{ entity.description }}</p>
{% endblock %}
## Instruction:
Rework the detail page of the item.
## Code After:
{% extends 'LigiBundle::layout.html.twig' %}
{% block title %}{{ entity.name }}{% endblock title %}
{% block body -%}
<h1 class="ui dividing header">{{ entity.name }}</h1>
<div class="ui rounded right floated medium image">
<img src="/images/avatar2/large/matthew.png" />
</div>
<p>
{{ entity.description }}
</p>
<div class="ui divider"></div>
<a class="ui blue button" href="{{ path('ligi_item_edit', { 'id': entity.id }) }}">
{% trans %}Edit{% endtrans %}
</a>
{% endblock %}
| {% extends 'LigiBundle::layout.html.twig' %}
+
+ {% block title %}{{ entity.name }}{% endblock title %}
{% block body -%}
<h1 class="ui dividing header">{{ entity.name }}</h1>
+ <div class="ui rounded right floated medium image">
+ <img src="/images/avatar2/large/matthew.png" />
+ </div>
+
+ <p>
- <p>{{ entity.description }}</p>
? ^^^ ----
+ {{ entity.description }}
? ^^
+ </p>
+
+ <div class="ui divider"></div>
+
+ <a class="ui blue button" href="{{ path('ligi_item_edit', { 'id': entity.id }) }}">
+ {% trans %}Edit{% endtrans %}
+ </a>
+
{% endblock %} | 17 | 2.428571 | 16 | 1 |
37adedc040bc28f07c533429894a2c3517f8dfb4 | client/src/index.jsx | client/src/index.jsx | import 'aframe';
import 'babel-polyfill';
import React from 'react';
import ReactDOM from 'react-dom';
import { Router, Route, browserHistory } from 'react-router';
import App from './components/App.js';
import Home from './components/Home.js';
import Main from './components/Main.js';
ReactDOM.render((
<Router history={browserHistory}>
<Route path="/" component={App} >
</Route>
<Route path="/main" component={Main} >
</Route>
</Router>
), document.querySelector('.scene-container')); | import 'aframe';
import 'babel-polyfill';
import React from 'react';
import ReactDOM from 'react-dom';
import { Router, Route, browserHistory } from 'react-router';
import App from './components/App.js';
import Home from './components/Home.js';
import Main from './components/Main.js';
import Portfolio from './components/Portfolio.js';
import Skills from './components/Skills.js';
import Contact from './components/Contact.js';
import HackerWords from './components/HackerWords.js';
import Immerse from './components/Immerse.js';
import Goolp from './components/Goolp.js';
ReactDOM.render((
<Router history={browserHistory}>
<Route path="/" component={App} >
<Route path="/portfolio" component={Portfolio} />
<Route path="/skills" component={Skills} />
<Route path="/contact" component={Contact} />
<Route path="/hackerwords" component={HackerWords} />
<Route path="/immerse" component={Immerse} />
<Route path="/goolp" component={Goolp} />
</Route>
</Router>
), document.querySelector('.scene-container'));
| Modify and add new component routes | Modify and add new component routes
| JSX | mit | francoabaroa/happi,francoabaroa/happi | jsx | ## Code Before:
import 'aframe';
import 'babel-polyfill';
import React from 'react';
import ReactDOM from 'react-dom';
import { Router, Route, browserHistory } from 'react-router';
import App from './components/App.js';
import Home from './components/Home.js';
import Main from './components/Main.js';
ReactDOM.render((
<Router history={browserHistory}>
<Route path="/" component={App} >
</Route>
<Route path="/main" component={Main} >
</Route>
</Router>
), document.querySelector('.scene-container'));
## Instruction:
Modify and add new component routes
## Code After:
import 'aframe';
import 'babel-polyfill';
import React from 'react';
import ReactDOM from 'react-dom';
import { Router, Route, browserHistory } from 'react-router';
import App from './components/App.js';
import Home from './components/Home.js';
import Main from './components/Main.js';
import Portfolio from './components/Portfolio.js';
import Skills from './components/Skills.js';
import Contact from './components/Contact.js';
import HackerWords from './components/HackerWords.js';
import Immerse from './components/Immerse.js';
import Goolp from './components/Goolp.js';
ReactDOM.render((
<Router history={browserHistory}>
<Route path="/" component={App} >
<Route path="/portfolio" component={Portfolio} />
<Route path="/skills" component={Skills} />
<Route path="/contact" component={Contact} />
<Route path="/hackerwords" component={HackerWords} />
<Route path="/immerse" component={Immerse} />
<Route path="/goolp" component={Goolp} />
</Route>
</Router>
), document.querySelector('.scene-container'));
| import 'aframe';
import 'babel-polyfill';
import React from 'react';
import ReactDOM from 'react-dom';
import { Router, Route, browserHistory } from 'react-router';
import App from './components/App.js';
import Home from './components/Home.js';
import Main from './components/Main.js';
+ import Portfolio from './components/Portfolio.js';
+ import Skills from './components/Skills.js';
+ import Contact from './components/Contact.js';
+ import HackerWords from './components/HackerWords.js';
+ import Immerse from './components/Immerse.js';
+ import Goolp from './components/Goolp.js';
ReactDOM.render((
<Router history={browserHistory}>
<Route path="/" component={App} >
- </Route>
+ <Route path="/portfolio" component={Portfolio} />
- <Route path="/main" component={Main} >
? ^^ ^ ^^ ^
+ <Route path="/skills" component={Skills} />
? ++ ^^ ^^^ ^^ ^^^ +
+ <Route path="/contact" component={Contact} />
+ <Route path="/hackerwords" component={HackerWords} />
+ <Route path="/immerse" component={Immerse} />
+ <Route path="/goolp" component={Goolp} />
</Route>
</Router>
), document.querySelector('.scene-container')); | 14 | 0.777778 | 12 | 2 |
8991bb0fdd44d03349df3938c3686e5ec45bea30 | .travis.yml | .travis.yml | language: python
python:
- "3.6"
install:
- pip install .[build]
script:
- pytest
| language: python
cache: pip
stages:
- format
- test
python:
- "3.6"
- "3.7"
- "3.8"
install:
- pip install .[build]
script: pytest
jobs:
include:
- stage: format
install: pip install black
script: black --check --verbose cosima_cookbook test | Check code formatting in Travis | Check code formatting in Travis
| YAML | apache-2.0 | OceansAus/cosima-cookbook | yaml | ## Code Before:
language: python
python:
- "3.6"
install:
- pip install .[build]
script:
- pytest
## Instruction:
Check code formatting in Travis
## Code After:
language: python
cache: pip
stages:
- format
- test
python:
- "3.6"
- "3.7"
- "3.8"
install:
- pip install .[build]
script: pytest
jobs:
include:
- stage: format
install: pip install black
script: black --check --verbose cosima_cookbook test | language: python
+ cache: pip
+ stages:
+ - format
+ - test
python:
- "3.6"
+ - "3.7"
+ - "3.8"
install:
- pip install .[build]
- script:
- - pytest
+ script: pytest
+ jobs:
+ include:
+ - stage: format
+ install: pip install black
+ script: black --check --verbose cosima_cookbook test | 14 | 2 | 12 | 2 |
027cc4f4bb98627ecbb7dc191034115628941660 | spec/find_spec.rb | spec/find_spec.rb | require 'fourflusher'
describe Fourflusher::SimControl do
let(:simctl) { Fourflusher::SimControl.new }
describe 'finding simulators' do
it 'can list all usable simulators' do
sims = simctl.usable_simulators
os_names = sims.map(&:os_name).uniq.sort
expect(sims.count).to eq 15
expect(sims.first.name).to eq 'iPhone 4s'
expect(sims.first.os_name).to eq 'iOS'
expect(sims.last.name).to eq 'Apple Watch - 42mm'
expect(sims.last.os_name).to eq 'watchOS'
expect(os_names).to eq %w(iOS tvOS watchOS)
end
it 'can find a specific simulator' do
sim = simctl.simulator('iPhone 6s')
expect(sim.name).to eq 'iPhone 6s'
end
it 'can find a specific simulator for a minimum iOS version' do
sim = simctl.simulator('iPhone 6s', '8.1')
expect(sim.name).to eq 'iPhone 6s'
end
it 'will fail if the minimum iOS version cannot be satisfied' do
sim = simctl.simulator('iPhone 6s', '10.0')
expect(sim).to eq nil
end
end
end
| require 'fourflusher'
describe Fourflusher::SimControl do
let(:simctl) { Fourflusher::SimControl.new }
describe 'finding simulators' do
it 'can list all usable simulators' do
sims = simctl.usable_simulators
os_names = sims.map(&:os_name).uniq.sort
# This check is silly, but I am too lazy to come up with sth better
expect(sims.count).to eq (ENV['TRAVIS'] == 'true') ? 73 : 15
expect(sims.first.name).to eq 'iPhone 4s'
expect(sims.first.os_name).to eq 'iOS'
expect(sims.last.name).to eq 'Apple Watch - 42mm'
expect(sims.last.os_name).to eq 'watchOS'
expect(os_names).to eq %w(iOS tvOS watchOS)
end
it 'can find a specific simulator' do
sim = simctl.simulator('iPhone 6s')
expect(sim.name).to eq 'iPhone 6s'
end
it 'can find a specific simulator for a minimum iOS version' do
sim = simctl.simulator('iPhone 6s', '8.1')
expect(sim.name).to eq 'iPhone 6s'
end
it 'will fail if the minimum iOS version cannot be satisfied' do
sim = simctl.simulator('iPhone 6s', '10.0')
expect(sim).to eq nil
end
end
end
| Add Travis sim count as alternative | Add Travis sim count as alternative
| Ruby | mit | neonichu/fourflusher,neonichu/fourflusher | ruby | ## Code Before:
require 'fourflusher'
describe Fourflusher::SimControl do
let(:simctl) { Fourflusher::SimControl.new }
describe 'finding simulators' do
it 'can list all usable simulators' do
sims = simctl.usable_simulators
os_names = sims.map(&:os_name).uniq.sort
expect(sims.count).to eq 15
expect(sims.first.name).to eq 'iPhone 4s'
expect(sims.first.os_name).to eq 'iOS'
expect(sims.last.name).to eq 'Apple Watch - 42mm'
expect(sims.last.os_name).to eq 'watchOS'
expect(os_names).to eq %w(iOS tvOS watchOS)
end
it 'can find a specific simulator' do
sim = simctl.simulator('iPhone 6s')
expect(sim.name).to eq 'iPhone 6s'
end
it 'can find a specific simulator for a minimum iOS version' do
sim = simctl.simulator('iPhone 6s', '8.1')
expect(sim.name).to eq 'iPhone 6s'
end
it 'will fail if the minimum iOS version cannot be satisfied' do
sim = simctl.simulator('iPhone 6s', '10.0')
expect(sim).to eq nil
end
end
end
## Instruction:
Add Travis sim count as alternative
## Code After:
require 'fourflusher'
describe Fourflusher::SimControl do
let(:simctl) { Fourflusher::SimControl.new }
describe 'finding simulators' do
it 'can list all usable simulators' do
sims = simctl.usable_simulators
os_names = sims.map(&:os_name).uniq.sort
# This check is silly, but I am too lazy to come up with sth better
expect(sims.count).to eq (ENV['TRAVIS'] == 'true') ? 73 : 15
expect(sims.first.name).to eq 'iPhone 4s'
expect(sims.first.os_name).to eq 'iOS'
expect(sims.last.name).to eq 'Apple Watch - 42mm'
expect(sims.last.os_name).to eq 'watchOS'
expect(os_names).to eq %w(iOS tvOS watchOS)
end
it 'can find a specific simulator' do
sim = simctl.simulator('iPhone 6s')
expect(sim.name).to eq 'iPhone 6s'
end
it 'can find a specific simulator for a minimum iOS version' do
sim = simctl.simulator('iPhone 6s', '8.1')
expect(sim.name).to eq 'iPhone 6s'
end
it 'will fail if the minimum iOS version cannot be satisfied' do
sim = simctl.simulator('iPhone 6s', '10.0')
expect(sim).to eq nil
end
end
end
| require 'fourflusher'
describe Fourflusher::SimControl do
let(:simctl) { Fourflusher::SimControl.new }
describe 'finding simulators' do
it 'can list all usable simulators' do
sims = simctl.usable_simulators
os_names = sims.map(&:os_name).uniq.sort
- expect(sims.count).to eq 15
+ # This check is silly, but I am too lazy to come up with sth better
+ expect(sims.count).to eq (ENV['TRAVIS'] == 'true') ? 73 : 15
expect(sims.first.name).to eq 'iPhone 4s'
expect(sims.first.os_name).to eq 'iOS'
expect(sims.last.name).to eq 'Apple Watch - 42mm'
expect(sims.last.os_name).to eq 'watchOS'
expect(os_names).to eq %w(iOS tvOS watchOS)
end
it 'can find a specific simulator' do
sim = simctl.simulator('iPhone 6s')
expect(sim.name).to eq 'iPhone 6s'
end
it 'can find a specific simulator for a minimum iOS version' do
sim = simctl.simulator('iPhone 6s', '8.1')
expect(sim.name).to eq 'iPhone 6s'
end
it 'will fail if the minimum iOS version cannot be satisfied' do
sim = simctl.simulator('iPhone 6s', '10.0')
expect(sim).to eq nil
end
end
end | 3 | 0.081081 | 2 | 1 |
920116dc7c38969cee641315190188c96bca8505 | .gitlab-ci.yml | .gitlab-ci.yml | stages:
- setup_env
- build
setup_env_job:
stage: setup_env
script:
- sudo apt-get update -qq
- sudo apt-get install -y -qq gcc g++ build-essential liblua5.1 liblua5.1-0-dev
build_job:
stage: build
script:
- ./premake5_x64 gmake
- cd Build
- make config=release_x64 all
- mv ../Bin/Release/libml_gps.so ../ml_gps.so
- mv ../test/sa_nodes.json ../sa_nodes.json
artifacts:
name: "$CI_BUILD_NAME"
paths:
- ml_gps.so
- sa_nodes.json
| stages:
- setup_env
- build
- deploy
setup_env_job:
stage: setup_env
script:
- sudo apt-get update -qq
- sudo apt-get install -y -qq gcc g++ build-essential liblua5.1 liblua5.1-0-dev
build_job:
stage: build
script:
- ./premake5_x64 gmake
- cd Build
- make config=release_x64 all
- mv ../Bin/Release/libml_gps.so ../ml_gps.so
- mv ../test/sa_nodes.json ../sa_nodes.json
artifacts:
name: "$CI_BUILD_NAME"
paths:
- ml_gps.so
- sa_nodes.json
deploy_job:
stage: deploy
script:
- sudo mkdir -p /builddata
- sudo cp ml_gps.so /builddata/
| Add deploy job (copy ml_gps.so to /builddata/) | Add deploy job (copy ml_gps.so to /builddata/)
| YAML | mit | eXo-MTA/ml_pathfind,eXo-MTA/ml_pathfind | yaml | ## Code Before:
stages:
- setup_env
- build
setup_env_job:
stage: setup_env
script:
- sudo apt-get update -qq
- sudo apt-get install -y -qq gcc g++ build-essential liblua5.1 liblua5.1-0-dev
build_job:
stage: build
script:
- ./premake5_x64 gmake
- cd Build
- make config=release_x64 all
- mv ../Bin/Release/libml_gps.so ../ml_gps.so
- mv ../test/sa_nodes.json ../sa_nodes.json
artifacts:
name: "$CI_BUILD_NAME"
paths:
- ml_gps.so
- sa_nodes.json
## Instruction:
Add deploy job (copy ml_gps.so to /builddata/)
## Code After:
stages:
- setup_env
- build
- deploy
setup_env_job:
stage: setup_env
script:
- sudo apt-get update -qq
- sudo apt-get install -y -qq gcc g++ build-essential liblua5.1 liblua5.1-0-dev
build_job:
stage: build
script:
- ./premake5_x64 gmake
- cd Build
- make config=release_x64 all
- mv ../Bin/Release/libml_gps.so ../ml_gps.so
- mv ../test/sa_nodes.json ../sa_nodes.json
artifacts:
name: "$CI_BUILD_NAME"
paths:
- ml_gps.so
- sa_nodes.json
deploy_job:
stage: deploy
script:
- sudo mkdir -p /builddata
- sudo cp ml_gps.so /builddata/
| stages:
- setup_env
- build
+ - deploy
setup_env_job:
stage: setup_env
script:
- sudo apt-get update -qq
- sudo apt-get install -y -qq gcc g++ build-essential liblua5.1 liblua5.1-0-dev
build_job:
stage: build
script:
- ./premake5_x64 gmake
- cd Build
- make config=release_x64 all
- mv ../Bin/Release/libml_gps.so ../ml_gps.so
- mv ../test/sa_nodes.json ../sa_nodes.json
artifacts:
name: "$CI_BUILD_NAME"
paths:
- ml_gps.so
- sa_nodes.json
+
+ deploy_job:
+ stage: deploy
+ script:
+ - sudo mkdir -p /builddata
+ - sudo cp ml_gps.so /builddata/ | 7 | 0.304348 | 7 | 0 |
2965e3fe7b0f35080056761ad4ff9b13a7c667ea | app/controllers/course/groups_controller.rb | app/controllers/course/groups_controller.rb | class Course::GroupsController < Course::ComponentController
load_and_authorize_resource :group, through: :course, class: Course::Group.name
add_breadcrumb :index, :course_groups_path
def index #:nodoc:
@groups = @groups.includes(group_users: { course_user: :course })
end
def new #:nodoc:
end
def create #:nodoc:
if @group.save
redirect_to edit_course_group_path(current_course, @group),
success: t('.success', name: @group.name)
else
render 'new'
end
end
def edit #:nodoc:
end
def update #:nodoc:
if @group.update_attributes(group_params)
redirect_to course_groups_path(current_course), success: t('.success', name: @group.name)
else
render 'edit'
end
end
def destroy #:nodoc
if @group.destroy
redirect_to course_groups_path(current_course),
success: t('.success', name: @group.name)
else
redirect_to course_groups_path, danger: @group.errors.full_messages.to_sentence
end
end
private
def group_params #:nodoc:
params.require(:group).
permit(:name, course_user_ids: [],
group_users_attributes: [:id, :course_user_id, :role, :_destroy])
end
end
| class Course::GroupsController < Course::ComponentController
load_and_authorize_resource :group, through: :course, class: Course::Group.name
add_breadcrumb :index, :course_groups_path
def index #:nodoc:
@groups = @groups.ordered_by_name.includes(group_users: { course_user: :course })
end
def new #:nodoc:
end
def create #:nodoc:
if @group.save
redirect_to edit_course_group_path(current_course, @group),
success: t('.success', name: @group.name)
else
render 'new'
end
end
def edit #:nodoc:
end
def update #:nodoc:
if @group.update_attributes(group_params)
redirect_to course_groups_path(current_course), success: t('.success', name: @group.name)
else
render 'edit'
end
end
def destroy #:nodoc
if @group.destroy
redirect_to course_groups_path(current_course),
success: t('.success', name: @group.name)
else
redirect_to course_groups_path, danger: @group.errors.full_messages.to_sentence
end
end
private
def group_params #:nodoc:
params.require(:group).
permit(:name, course_user_ids: [],
group_users_attributes: [:id, :course_user_id, :role, :_destroy])
end
end
| Load groups ordered by name | Load groups ordered by name
| Ruby | mit | Coursemology/coursemology2,cysjonathan/coursemology2,Coursemology/coursemology2,Coursemology/coursemology2,Coursemology/coursemology2,Coursemology/coursemology2,Coursemology/coursemology2,Coursemology/coursemology2,cysjonathan/coursemology2,cysjonathan/coursemology2 | ruby | ## Code Before:
class Course::GroupsController < Course::ComponentController
load_and_authorize_resource :group, through: :course, class: Course::Group.name
add_breadcrumb :index, :course_groups_path
def index #:nodoc:
@groups = @groups.includes(group_users: { course_user: :course })
end
def new #:nodoc:
end
def create #:nodoc:
if @group.save
redirect_to edit_course_group_path(current_course, @group),
success: t('.success', name: @group.name)
else
render 'new'
end
end
def edit #:nodoc:
end
def update #:nodoc:
if @group.update_attributes(group_params)
redirect_to course_groups_path(current_course), success: t('.success', name: @group.name)
else
render 'edit'
end
end
def destroy #:nodoc
if @group.destroy
redirect_to course_groups_path(current_course),
success: t('.success', name: @group.name)
else
redirect_to course_groups_path, danger: @group.errors.full_messages.to_sentence
end
end
private
def group_params #:nodoc:
params.require(:group).
permit(:name, course_user_ids: [],
group_users_attributes: [:id, :course_user_id, :role, :_destroy])
end
end
## Instruction:
Load groups ordered by name
## Code After:
class Course::GroupsController < Course::ComponentController
load_and_authorize_resource :group, through: :course, class: Course::Group.name
add_breadcrumb :index, :course_groups_path
def index #:nodoc:
@groups = @groups.ordered_by_name.includes(group_users: { course_user: :course })
end
def new #:nodoc:
end
def create #:nodoc:
if @group.save
redirect_to edit_course_group_path(current_course, @group),
success: t('.success', name: @group.name)
else
render 'new'
end
end
def edit #:nodoc:
end
def update #:nodoc:
if @group.update_attributes(group_params)
redirect_to course_groups_path(current_course), success: t('.success', name: @group.name)
else
render 'edit'
end
end
def destroy #:nodoc
if @group.destroy
redirect_to course_groups_path(current_course),
success: t('.success', name: @group.name)
else
redirect_to course_groups_path, danger: @group.errors.full_messages.to_sentence
end
end
private
def group_params #:nodoc:
params.require(:group).
permit(:name, course_user_ids: [],
group_users_attributes: [:id, :course_user_id, :role, :_destroy])
end
end
| class Course::GroupsController < Course::ComponentController
load_and_authorize_resource :group, through: :course, class: Course::Group.name
add_breadcrumb :index, :course_groups_path
def index #:nodoc:
- @groups = @groups.includes(group_users: { course_user: :course })
+ @groups = @groups.ordered_by_name.includes(group_users: { course_user: :course })
? ++++++++++++++++
end
def new #:nodoc:
end
def create #:nodoc:
if @group.save
redirect_to edit_course_group_path(current_course, @group),
success: t('.success', name: @group.name)
else
render 'new'
end
end
def edit #:nodoc:
end
def update #:nodoc:
if @group.update_attributes(group_params)
redirect_to course_groups_path(current_course), success: t('.success', name: @group.name)
else
render 'edit'
end
end
def destroy #:nodoc
if @group.destroy
redirect_to course_groups_path(current_course),
success: t('.success', name: @group.name)
else
redirect_to course_groups_path, danger: @group.errors.full_messages.to_sentence
end
end
private
def group_params #:nodoc:
params.require(:group).
permit(:name, course_user_ids: [],
group_users_attributes: [:id, :course_user_id, :role, :_destroy])
end
end | 2 | 0.041667 | 1 | 1 |
67fd73f8f035ac0e13a64971d9d54662df46a77f | karm/test/__karmutil.py | karm/test/__karmutil.py | import sys
import os
def dcopid():
'''Get dcop id of karm. Fail if more than one instance running.'''
id = stdin = stdout = None
try:
( stdin, stdout ) = os.popen2( "dcop" )
l = stdout.readline()
while l:
if l.startswith( "karm" ):
if not id: id = l
else: raise "Only one instance of karm may be running."
l = stdout.readline()
if not id:
raise "No karm instance found. Try running dcop at command-line to verify it works."
except:
if stdin: stdin.close()
if stdout: stdout.close()
print sys.exc_info()[0]
sys.exit(1)
stdin.close()
stdout.close()
# strip trailing newline
return id.strip()
def test( goal, actual ):
'''Raise exception if goal != actual.'''
if goal != actual:
path, scriptname = os.path.split( sys.argv[0] )
raise "%s: expected '%s', got '%s'" % ( scriptname, goal, actual )
| import sys
import os
class KarmTestError( Exception ): pass
def dcopid():
'''Get dcop id of karm. Fail if more than one instance running.'''
id = stdin = stdout = None
( stdin, stdout ) = os.popen2( "dcop" )
l = stdout.readline()
while l:
if l.startswith( "karm" ):
if not id: id = l
else: raise KarmTestError( "Only one instance of karm may be running." )
l = stdout.readline()
if not id:
raise KarmTestError( "No karm instance found. Try running dcop at command-line to verify it works." )
stdin.close()
stdout.close()
# strip trailing newline
return id.strip()
def test( goal, actual ):
'''Raise exception if goal != actual.'''
if goal != actual:
path, scriptname = os.path.split( sys.argv[0] )
raise KarmTestError( "%s: expected '%s', got '%s'" % ( scriptname, goal, actual ) )
| Add KarmTestError we can distinguish and print full tracebacks for unexpected errors. Delete exception trapping--let the test scripts do that. | Add KarmTestError we can distinguish and print full tracebacks for unexpected errors. Delete exception trapping--let the test scripts do that.
svn path=/trunk/kdepim/; revision=367066
| Python | lgpl-2.1 | lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi | python | ## Code Before:
import sys
import os
def dcopid():
'''Get dcop id of karm. Fail if more than one instance running.'''
id = stdin = stdout = None
try:
( stdin, stdout ) = os.popen2( "dcop" )
l = stdout.readline()
while l:
if l.startswith( "karm" ):
if not id: id = l
else: raise "Only one instance of karm may be running."
l = stdout.readline()
if not id:
raise "No karm instance found. Try running dcop at command-line to verify it works."
except:
if stdin: stdin.close()
if stdout: stdout.close()
print sys.exc_info()[0]
sys.exit(1)
stdin.close()
stdout.close()
# strip trailing newline
return id.strip()
def test( goal, actual ):
'''Raise exception if goal != actual.'''
if goal != actual:
path, scriptname = os.path.split( sys.argv[0] )
raise "%s: expected '%s', got '%s'" % ( scriptname, goal, actual )
## Instruction:
Add KarmTestError we can distinguish and print full tracebacks for unexpected errors. Delete exception trapping--let the test scripts do that.
svn path=/trunk/kdepim/; revision=367066
## Code After:
import sys
import os
class KarmTestError( Exception ): pass
def dcopid():
'''Get dcop id of karm. Fail if more than one instance running.'''
id = stdin = stdout = None
( stdin, stdout ) = os.popen2( "dcop" )
l = stdout.readline()
while l:
if l.startswith( "karm" ):
if not id: id = l
else: raise KarmTestError( "Only one instance of karm may be running." )
l = stdout.readline()
if not id:
raise KarmTestError( "No karm instance found. Try running dcop at command-line to verify it works." )
stdin.close()
stdout.close()
# strip trailing newline
return id.strip()
def test( goal, actual ):
'''Raise exception if goal != actual.'''
if goal != actual:
path, scriptname = os.path.split( sys.argv[0] )
raise KarmTestError( "%s: expected '%s', got '%s'" % ( scriptname, goal, actual ) )
| import sys
import os
+
+ class KarmTestError( Exception ): pass
def dcopid():
'''Get dcop id of karm. Fail if more than one instance running.'''
id = stdin = stdout = None
- try:
- ( stdin, stdout ) = os.popen2( "dcop" )
? --
+ ( stdin, stdout ) = os.popen2( "dcop" )
+ l = stdout.readline()
+ while l:
+ if l.startswith( "karm" ):
+ if not id: id = l
+ else: raise KarmTestError( "Only one instance of karm may be running." )
l = stdout.readline()
- while l:
- if l.startswith( "karm" ):
- if not id: id = l
- else: raise "Only one instance of karm may be running."
- l = stdout.readline()
- if not id:
? --
+ if not id:
- raise "No karm instance found. Try running dcop at command-line to verify it works."
? --
+ raise KarmTestError( "No karm instance found. Try running dcop at command-line to verify it works." )
? +++++++++++++++ ++
- except:
- if stdin: stdin.close()
- if stdout: stdout.close()
- print sys.exc_info()[0]
- sys.exit(1)
stdin.close()
stdout.close()
# strip trailing newline
return id.strip()
def test( goal, actual ):
'''Raise exception if goal != actual.'''
if goal != actual:
path, scriptname = os.path.split( sys.argv[0] )
- raise "%s: expected '%s', got '%s'" % ( scriptname, goal, actual )
+ raise KarmTestError( "%s: expected '%s', got '%s'" % ( scriptname, goal, actual ) )
? +++++++++++++++ ++
| 26 | 0.8125 | 11 | 15 |
63b13e2e3293f55fd23a820ac3434dc3aaca7279 | style.css | style.css | .height-30px {
height: 30px;
}
.height-100px {
height: 100px;
}
.group-qr-code {
text-align: center;
}
.group-qr-code-caption {
text-align: center;
}
.link-btn {
margin-top: 30px;
}
.zzn-content {
text-align: right;
} | .height-30px {
height: 30px;
}
.height-100px {
height: 100px;
}
.group-qr-code {
text-align: center;
}
.group-qr-code-caption {
text-align: center;
}
.link-btn {
margin-top: 30px;
}
.zzn-content {
text-align: right;
}
/* Overriding bootstrap */
.container {
padding-right: 0px; /*15px in bootstrap.css*/
padding-left: 0px; /*idem*/
margin-right: auto;
margin-left: auto;
}
| Remove left and right whitespace | Remove left and right whitespace
| CSS | mit | xinbenlv/rent.zzn.im,xinbenlv/rent.zzn.im,xinbenlv-just-learning/haoshiyou-dev,xinbenlv/rent.zzn.im,xinbenlv-just-learning/haoshiyou-dev,xinbenlv/rent.zzn.im,xinbenlv/rent.zzn.im | css | ## Code Before:
.height-30px {
height: 30px;
}
.height-100px {
height: 100px;
}
.group-qr-code {
text-align: center;
}
.group-qr-code-caption {
text-align: center;
}
.link-btn {
margin-top: 30px;
}
.zzn-content {
text-align: right;
}
## Instruction:
Remove left and right whitespace
## Code After:
.height-30px {
height: 30px;
}
.height-100px {
height: 100px;
}
.group-qr-code {
text-align: center;
}
.group-qr-code-caption {
text-align: center;
}
.link-btn {
margin-top: 30px;
}
.zzn-content {
text-align: right;
}
/* Overriding bootstrap */
.container {
padding-right: 0px; /*15px in bootstrap.css*/
padding-left: 0px; /*idem*/
margin-right: auto;
margin-left: auto;
}
| .height-30px {
height: 30px;
}
.height-100px {
height: 100px;
}
.group-qr-code {
text-align: center;
}
.group-qr-code-caption {
text-align: center;
}
.link-btn {
margin-top: 30px;
}
.zzn-content {
text-align: right;
}
+
+ /* Overriding bootstrap */
+ .container {
+ padding-right: 0px; /*15px in bootstrap.css*/
+ padding-left: 0px; /*idem*/
+ margin-right: auto;
+ margin-left: auto;
+ } | 8 | 0.333333 | 8 | 0 |
e7aab019a568b4b8ded0055f415ca919c220d593 | src/styles/components/_board.sass | src/styles/components/_board.sass | .board
width: 100vw
margin-top: 50px
.view
+columns(7, $container-width: 1500px, $margin: 20px 10px)
// .view
| .board
width: 100vw
margin-top: 50px
.boardview
+columns(2, $container-width: 90%, $margin: 10px)
+breakpoint(from-phablet)
+columns(3, $container-width: 90%, $margin: 20px 10px)
+breakpoint(from-tablet)
+columns(4, $container-width: 90%, $margin: 20px 10px)
+breakpoint(from-desktop)
+columns(5, $container-width: 90%, $margin: 20px 10px)
+breakpoint(from-desktop-mid)
+columns(6, $container-width: 90%, $margin: 20px 10px)
+breakpoint(from-desktop-lrg)
+columns(8, $container-width: 85%, $margin: 20px 10px)
| Add sass media queries to board | Add sass media queries to board
| Sass | mit | AdamSalma/Lurka,AdamSalma/Lurka | sass | ## Code Before:
.board
width: 100vw
margin-top: 50px
.view
+columns(7, $container-width: 1500px, $margin: 20px 10px)
// .view
## Instruction:
Add sass media queries to board
## Code After:
.board
width: 100vw
margin-top: 50px
.boardview
+columns(2, $container-width: 90%, $margin: 10px)
+breakpoint(from-phablet)
+columns(3, $container-width: 90%, $margin: 20px 10px)
+breakpoint(from-tablet)
+columns(4, $container-width: 90%, $margin: 20px 10px)
+breakpoint(from-desktop)
+columns(5, $container-width: 90%, $margin: 20px 10px)
+breakpoint(from-desktop-mid)
+columns(6, $container-width: 90%, $margin: 20px 10px)
+breakpoint(from-desktop-lrg)
+columns(8, $container-width: 85%, $margin: 20px 10px)
| .board
width: 100vw
margin-top: 50px
- .view
+ .boardview
+ +columns(2, $container-width: 90%, $margin: 10px)
+ +breakpoint(from-phablet)
- +columns(7, $container-width: 1500px, $margin: 20px 10px)
? ^ ^^ ^^^
+ +columns(3, $container-width: 90%, $margin: 20px 10px)
? ++++ ^ ^ ^
- // .view
+ +breakpoint(from-tablet)
+ +columns(4, $container-width: 90%, $margin: 20px 10px)
+ +breakpoint(from-desktop)
+ +columns(5, $container-width: 90%, $margin: 20px 10px)
+ +breakpoint(from-desktop-mid)
+ +columns(6, $container-width: 90%, $margin: 20px 10px)
+ +breakpoint(from-desktop-lrg)
+ +columns(8, $container-width: 85%, $margin: 20px 10px) | 15 | 2.142857 | 12 | 3 |
548d7c5c653608c189b7d5d3143492a42e69c6c9 | imports/client/pages/AboutPage.js | imports/client/pages/AboutPage.js | import React from 'react';
import IntroBand from '../components/About/IntroBand';
import AboutBand from '../components/About/AboutBand';
import ProjectsBand from '../components/About/ProjectsBand';
class AboutPage extends React.Component {
shouldComponentUpdate() {
return false;
}
render() {
return (
<div className="about-page">
<IntroBand />
<AboutBand />
<ProjectsBand />
</div>
);
}
}
export default AboutPage;
| import React from 'react';
import IntroBand from '../components/About/IntroBand';
import AboutBand from '../components/About/AboutBand';
import ProjectsBand from '../components/About/ProjectsBand';
import ContactForm from '../components/Contact/ContactForm';
class AboutPage extends React.Component {
shouldComponentUpdate() {
return false;
}
render() {
return (
<div className="about-page">
<IntroBand />
<AboutBand />
<ProjectsBand />
<ContactForm />
</div>
);
}
}
export default AboutPage;
| Add contact form to about page | Add contact form to about page
| JavaScript | apache-2.0 | evancorl/portfolio,evancorl/skate-scenes,evancorl/skate-scenes,evancorl/portfolio,evancorl/skate-scenes,evancorl/portfolio | javascript | ## Code Before:
import React from 'react';
import IntroBand from '../components/About/IntroBand';
import AboutBand from '../components/About/AboutBand';
import ProjectsBand from '../components/About/ProjectsBand';
class AboutPage extends React.Component {
shouldComponentUpdate() {
return false;
}
render() {
return (
<div className="about-page">
<IntroBand />
<AboutBand />
<ProjectsBand />
</div>
);
}
}
export default AboutPage;
## Instruction:
Add contact form to about page
## Code After:
import React from 'react';
import IntroBand from '../components/About/IntroBand';
import AboutBand from '../components/About/AboutBand';
import ProjectsBand from '../components/About/ProjectsBand';
import ContactForm from '../components/Contact/ContactForm';
class AboutPage extends React.Component {
shouldComponentUpdate() {
return false;
}
render() {
return (
<div className="about-page">
<IntroBand />
<AboutBand />
<ProjectsBand />
<ContactForm />
</div>
);
}
}
export default AboutPage;
| import React from 'react';
import IntroBand from '../components/About/IntroBand';
import AboutBand from '../components/About/AboutBand';
import ProjectsBand from '../components/About/ProjectsBand';
+ import ContactForm from '../components/Contact/ContactForm';
class AboutPage extends React.Component {
shouldComponentUpdate() {
return false;
}
render() {
return (
<div className="about-page">
<IntroBand />
<AboutBand />
<ProjectsBand />
+ <ContactForm />
</div>
);
}
}
export default AboutPage; | 2 | 0.086957 | 2 | 0 |
a7f185c080c663a9678f7624667d368796262791 | spec/moshimoshi_rails_helper_spec.rb | spec/moshimoshi_rails_helper_spec.rb | require 'spec_helper'
describe Rails::MoshimoshiRailsHelper::Helper do
before do
@stub = MoshimoshiRailsHelperStub.new
end
it "should return a greeting" do
email = "kristian@kristianfreeman.com"
@stub.moshimoshi_tag(email).should == "Foo"
end
end
| require 'spec_helper'
describe Rails::MoshimoshiRailsHelper::Helper do
before do
@stub = MoshimoshiRailsHelperStub.new
end
it "should return a greeting" do
email = "foo@bar.org"
@stub.moshimoshi_tag(email).should == "I'm foobar: I was used to test the API for this site and now I have to hang out by myself. Sad day. "
end
end
| Update spec for foobar user | Update spec for foobar user
| Ruby | mit | imkmf/moshimoshi-rails-helper | ruby | ## Code Before:
require 'spec_helper'
describe Rails::MoshimoshiRailsHelper::Helper do
before do
@stub = MoshimoshiRailsHelperStub.new
end
it "should return a greeting" do
email = "kristian@kristianfreeman.com"
@stub.moshimoshi_tag(email).should == "Foo"
end
end
## Instruction:
Update spec for foobar user
## Code After:
require 'spec_helper'
describe Rails::MoshimoshiRailsHelper::Helper do
before do
@stub = MoshimoshiRailsHelperStub.new
end
it "should return a greeting" do
email = "foo@bar.org"
@stub.moshimoshi_tag(email).should == "I'm foobar: I was used to test the API for this site and now I have to hang out by myself. Sad day. "
end
end
| require 'spec_helper'
describe Rails::MoshimoshiRailsHelper::Helper do
before do
@stub = MoshimoshiRailsHelperStub.new
end
it "should return a greeting" do
- email = "kristian@kristianfreeman.com"
- @stub.moshimoshi_tag(email).should == "Foo"
+ email = "foo@bar.org"
+ @stub.moshimoshi_tag(email).should == "I'm foobar: I was used to test the API for this site and now I have to hang out by myself. Sad day. "
end
end | 4 | 0.333333 | 2 | 2 |
bd5b09d798a2c1c4bff84800fc001573713b55e6 | lib/test_wrangler/helper.rb | lib/test_wrangler/helper.rb | module TestWrangler
module Helper
BLANK_SELECTION = HashWithIndifferentAccess.new({cohort: nil, experiment: nil, variant: nil})
def test_wrangler_selection
return @test_wrangler_selection if defined? @test_wrangler_selection
if cookies['test_wrangler'].present?
@test_wrangler_selection = HashWithIndifferentAccess.new(JSON.parse(Rack::Utils.unescape(cookies['test_wrangler']))) rescue BLANK_SELECTION
elsif request.env['test_wrangler'].present?
@test_wrangler_selection = request.env['test_wrangler'].with_indifferent_access
else
@test_wrangler_selection = BLANK_SELECTION
end
end
def complete_experiment
selection = test_wrangler_selection
cookies['test_wrangler'] = {value: nil, expires: Time.now}
selection
end
end
end
| module TestWrangler
module Helper
BLANK_SELECTION = HashWithIndifferentAccess.new({cohort: nil, experiment: nil, variant: nil})
def test_wrangler_selection
return @test_wrangler_selection if defined? @test_wrangler_selection
if cookies['test_wrangler'].present?
@test_wrangler_selection = HashWithIndifferentAccess.new(JSON.parse(Rack::Utils.unescape(cookies['test_wrangler']))) rescue BLANK_SELECTION
elsif request.env['test_wrangler'].present?
@test_wrangler_selection = request.env['test_wrangler'].with_indifferent_access
else
@test_wrangler_selection = BLANK_SELECTION
end
end
def complete_experiment
selection = test_wrangler_selection
cookies['test_wrangler'] = {value: nil, expires: Time.now - 24.hours}
selection
end
end
end
| Set cookie expiry to 1 day in the past to ensure deletion | Set cookie expiry to 1 day in the past to ensure deletion
| Ruby | mit | barkbox/test_wrangler,barkbox/test_wrangler,barkbox/test_wrangler | ruby | ## Code Before:
module TestWrangler
module Helper
BLANK_SELECTION = HashWithIndifferentAccess.new({cohort: nil, experiment: nil, variant: nil})
def test_wrangler_selection
return @test_wrangler_selection if defined? @test_wrangler_selection
if cookies['test_wrangler'].present?
@test_wrangler_selection = HashWithIndifferentAccess.new(JSON.parse(Rack::Utils.unescape(cookies['test_wrangler']))) rescue BLANK_SELECTION
elsif request.env['test_wrangler'].present?
@test_wrangler_selection = request.env['test_wrangler'].with_indifferent_access
else
@test_wrangler_selection = BLANK_SELECTION
end
end
def complete_experiment
selection = test_wrangler_selection
cookies['test_wrangler'] = {value: nil, expires: Time.now}
selection
end
end
end
## Instruction:
Set cookie expiry to 1 day in the past to ensure deletion
## Code After:
module TestWrangler
module Helper
BLANK_SELECTION = HashWithIndifferentAccess.new({cohort: nil, experiment: nil, variant: nil})
def test_wrangler_selection
return @test_wrangler_selection if defined? @test_wrangler_selection
if cookies['test_wrangler'].present?
@test_wrangler_selection = HashWithIndifferentAccess.new(JSON.parse(Rack::Utils.unescape(cookies['test_wrangler']))) rescue BLANK_SELECTION
elsif request.env['test_wrangler'].present?
@test_wrangler_selection = request.env['test_wrangler'].with_indifferent_access
else
@test_wrangler_selection = BLANK_SELECTION
end
end
def complete_experiment
selection = test_wrangler_selection
cookies['test_wrangler'] = {value: nil, expires: Time.now - 24.hours}
selection
end
end
end
| module TestWrangler
module Helper
BLANK_SELECTION = HashWithIndifferentAccess.new({cohort: nil, experiment: nil, variant: nil})
def test_wrangler_selection
return @test_wrangler_selection if defined? @test_wrangler_selection
if cookies['test_wrangler'].present?
@test_wrangler_selection = HashWithIndifferentAccess.new(JSON.parse(Rack::Utils.unescape(cookies['test_wrangler']))) rescue BLANK_SELECTION
elsif request.env['test_wrangler'].present?
@test_wrangler_selection = request.env['test_wrangler'].with_indifferent_access
else
@test_wrangler_selection = BLANK_SELECTION
end
end
def complete_experiment
selection = test_wrangler_selection
- cookies['test_wrangler'] = {value: nil, expires: Time.now}
+ cookies['test_wrangler'] = {value: nil, expires: Time.now - 24.hours}
? +++++++++++
selection
end
end
end | 2 | 0.086957 | 1 | 1 |
e36820617a558787c27d025ea4355b77cb10e280 | pkg/analysis_server/test/integration/analysis/error_test.dart | pkg/analysis_server/test/integration/analysis/error_test.dart | // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
library test.integration.analysis.error;
import 'package:analysis_server/src/protocol.dart';
import 'package:unittest/unittest.dart';
import '../../reflective_tests.dart';
import '../integration_tests.dart';
@ReflectiveTestCase()
class AnalysisErrorIntegrationTest extends AbstractAnalysisServerIntegrationTest
{
test_detect_simple_error() {
String pathname = sourcePath('test.dart');
writeFile(pathname,
'''
main() {
var x // parse error: missing ';'
}''');
standardAnalysisSetup();
return analysisFinished.then((_) {
expect(currentAnalysisErrors[pathname], isList);
List<AnalysisError> errors = currentAnalysisErrors[pathname];
expect(errors, hasLength(1));
expect(errors[0].location.file, equals(pathname));
});
}
}
main() {
runReflectiveTests(AnalysisErrorIntegrationTest);
}
| // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
library test.integration.analysis.error;
import 'package:analysis_server/src/protocol.dart';
import 'package:unittest/unittest.dart';
import '../../reflective_tests.dart';
import '../integration_tests.dart';
@ReflectiveTestCase()
class AnalysisErrorIntegrationTest extends AbstractAnalysisServerIntegrationTest
{
test_detect_simple_error() {
String pathname = sourcePath('test.dart');
writeFile(pathname,
'''
main() {
print(null) // parse error: missing ';'
}''');
standardAnalysisSetup();
return analysisFinished.then((_) {
expect(currentAnalysisErrors[pathname], isList);
List<AnalysisError> errors = currentAnalysisErrors[pathname];
expect(errors, hasLength(1));
expect(errors[0].location.file, equals(pathname));
});
}
}
main() {
runReflectiveTests(AnalysisErrorIntegrationTest);
}
| Fix integration test to avoid new 'Unused local variable' hint. | Fix integration test to avoid new 'Unused local variable' hint.
R=scheglov@google.com
Review URL: https://codereview.chromium.org//700323004
git-svn-id: c93d8a2297af3b929165606efe145742a534bc71@41580 260f80e4-7a28-3924-810f-c04153c831b5
| Dart | bsd-3-clause | dart-archive/dart-sdk,dart-archive/dart-sdk,dartino/dart-sdk,dart-archive/dart-sdk,dart-lang/sdk,dart-lang/sdk,dart-lang/sdk,dart-archive/dart-sdk,dartino/dart-sdk,dartino/dart-sdk,dartino/dart-sdk,dartino/dart-sdk,dartino/dart-sdk,dart-archive/dart-sdk,dart-lang/sdk,dart-archive/dart-sdk,dart-lang/sdk,dartino/dart-sdk,dart-lang/sdk,dart-archive/dart-sdk,dartino/dart-sdk,dart-lang/sdk,dartino/dart-sdk,dart-archive/dart-sdk,dart-lang/sdk,dart-archive/dart-sdk | dart | ## Code Before:
// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
library test.integration.analysis.error;
import 'package:analysis_server/src/protocol.dart';
import 'package:unittest/unittest.dart';
import '../../reflective_tests.dart';
import '../integration_tests.dart';
@ReflectiveTestCase()
class AnalysisErrorIntegrationTest extends AbstractAnalysisServerIntegrationTest
{
test_detect_simple_error() {
String pathname = sourcePath('test.dart');
writeFile(pathname,
'''
main() {
var x // parse error: missing ';'
}''');
standardAnalysisSetup();
return analysisFinished.then((_) {
expect(currentAnalysisErrors[pathname], isList);
List<AnalysisError> errors = currentAnalysisErrors[pathname];
expect(errors, hasLength(1));
expect(errors[0].location.file, equals(pathname));
});
}
}
main() {
runReflectiveTests(AnalysisErrorIntegrationTest);
}
## Instruction:
Fix integration test to avoid new 'Unused local variable' hint.
R=scheglov@google.com
Review URL: https://codereview.chromium.org//700323004
git-svn-id: c93d8a2297af3b929165606efe145742a534bc71@41580 260f80e4-7a28-3924-810f-c04153c831b5
## Code After:
// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
library test.integration.analysis.error;
import 'package:analysis_server/src/protocol.dart';
import 'package:unittest/unittest.dart';
import '../../reflective_tests.dart';
import '../integration_tests.dart';
@ReflectiveTestCase()
class AnalysisErrorIntegrationTest extends AbstractAnalysisServerIntegrationTest
{
test_detect_simple_error() {
String pathname = sourcePath('test.dart');
writeFile(pathname,
'''
main() {
print(null) // parse error: missing ';'
}''');
standardAnalysisSetup();
return analysisFinished.then((_) {
expect(currentAnalysisErrors[pathname], isList);
List<AnalysisError> errors = currentAnalysisErrors[pathname];
expect(errors, hasLength(1));
expect(errors[0].location.file, equals(pathname));
});
}
}
main() {
runReflectiveTests(AnalysisErrorIntegrationTest);
}
| // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
library test.integration.analysis.error;
import 'package:analysis_server/src/protocol.dart';
import 'package:unittest/unittest.dart';
import '../../reflective_tests.dart';
import '../integration_tests.dart';
@ReflectiveTestCase()
class AnalysisErrorIntegrationTest extends AbstractAnalysisServerIntegrationTest
{
test_detect_simple_error() {
String pathname = sourcePath('test.dart');
writeFile(pathname,
'''
main() {
- var x // parse error: missing ';'
? ^^ ^^
+ print(null) // parse error: missing ';'
? ^ ^^^^^^^^^
}''');
standardAnalysisSetup();
return analysisFinished.then((_) {
expect(currentAnalysisErrors[pathname], isList);
List<AnalysisError> errors = currentAnalysisErrors[pathname];
expect(errors, hasLength(1));
expect(errors[0].location.file, equals(pathname));
});
}
}
main() {
runReflectiveTests(AnalysisErrorIntegrationTest);
} | 2 | 0.057143 | 1 | 1 |
47bbc2076d5c19e8a90a609ad6aa5024ed54d9ac | app/scripts/lib/publications/publication.js | app/scripts/lib/publications/publication.js | /**
* Publication that represents a publication to novel sites.
*/
export default class Publication {
/**
* @param {Object} settings - Publication settings.
* @param {String} settings.title - Title of the article.
* @param {String} settings.body - Body of the article.
* @param {String|Date} settings.time - When the article will be published at.
* @param {Object[]} settings.sites
* Site names and settings where the article is published to.
* Keys should be names of sites and values should be settings.
*/
constructor(settings = {}) {
this.title = settings.title || "";
this.body = settings.body || "";
this.time = settings.time ? new Date(settings.time) : null;
this.sites = settings.sites || {};
}
}
| /**
* Publication that represents a publication to novel sites.
*/
export default class Publication {
/**
* @param {Object} settings - Publication settings.
* @param {String} settings.title - Title of the article.
* @param {String} settings.body - Body of the article.
* @param {String|Date} settings.time - When the article will be published at.
* @param {Object[]} settings.sites
* Site names and settings where the article is published to.
* Keys should be names of sites and values should be settings.
*/
constructor(settings = {}) {
this.title = settings.title || "";
this.body = settings.body || "";
this.time = settings.time || null;
this.sites = settings.sites || {};
}
set time(time) {
this._time = time ? new Date(time) : null;
}
get time() {
return this._time;
}
}
| Fix Publication should convert time into Date at setter | Fix Publication should convert time into Date at setter
| JavaScript | mit | io-monad/novelous-extension,io-monad/novelous-extension | javascript | ## Code Before:
/**
* Publication that represents a publication to novel sites.
*/
export default class Publication {
/**
* @param {Object} settings - Publication settings.
* @param {String} settings.title - Title of the article.
* @param {String} settings.body - Body of the article.
* @param {String|Date} settings.time - When the article will be published at.
* @param {Object[]} settings.sites
* Site names and settings where the article is published to.
* Keys should be names of sites and values should be settings.
*/
constructor(settings = {}) {
this.title = settings.title || "";
this.body = settings.body || "";
this.time = settings.time ? new Date(settings.time) : null;
this.sites = settings.sites || {};
}
}
## Instruction:
Fix Publication should convert time into Date at setter
## Code After:
/**
* Publication that represents a publication to novel sites.
*/
export default class Publication {
/**
* @param {Object} settings - Publication settings.
* @param {String} settings.title - Title of the article.
* @param {String} settings.body - Body of the article.
* @param {String|Date} settings.time - When the article will be published at.
* @param {Object[]} settings.sites
* Site names and settings where the article is published to.
* Keys should be names of sites and values should be settings.
*/
constructor(settings = {}) {
this.title = settings.title || "";
this.body = settings.body || "";
this.time = settings.time || null;
this.sites = settings.sites || {};
}
set time(time) {
this._time = time ? new Date(time) : null;
}
get time() {
return this._time;
}
}
| /**
* Publication that represents a publication to novel sites.
*/
export default class Publication {
/**
* @param {Object} settings - Publication settings.
* @param {String} settings.title - Title of the article.
* @param {String} settings.body - Body of the article.
* @param {String|Date} settings.time - When the article will be published at.
* @param {Object[]} settings.sites
* Site names and settings where the article is published to.
* Keys should be names of sites and values should be settings.
*/
constructor(settings = {}) {
this.title = settings.title || "";
this.body = settings.body || "";
- this.time = settings.time ? new Date(settings.time) : null;
+ this.time = settings.time || null;
this.sites = settings.sites || {};
}
+
+ set time(time) {
+ this._time = time ? new Date(time) : null;
+ }
+ get time() {
+ return this._time;
+ }
} | 9 | 0.45 | 8 | 1 |
ba0c74993be4b4d699b69ad572124b2de80dcad4 | src/resources/views/show.blade.php | src/resources/views/show.blade.php | @extends('layouts.app')
@section('page-title')
{!! $t[$type.'_title'] or trans('eliurkis::crud.'.$type.'_title') !!}
@stop
@section('content')
<div id="form-manage" class="row">
@foreach ($fields as $name => $field)
<div class="{{ $formColsClasses[0] }} fieldtype_{{ $field['type'] }} fieldname_{{ $name }}">
<div class="form-group">
<label class="{{ $formColsClasses[1] }} control-label">{{ $field['label'] or $name }}</label>
<div class="{{ $formColsClasses[2] }}">
<p class="form-control-static">{!! $field['value_text'] !!}</p>
</div>
</div>
</div>
@endforeach
</div>
<div class="row">
<div class="col-md-12">
<div class="form-group">
<div class="text-center">
<a href="{{ route($route.'.index') }}" class="btn btn-default">
<i class="fas fa-arrow-left"></i> {{ $t['go_back'] or trans('eliurkis::crud.go_back') }}
</a>
</div>
</div>
</div>
</div>
@stop
| @extends('layouts.app')
@section('page-title')
{!! $t[$type.'_title'] or trans('eliurkis::crud.'.$type.'_title') !!}
@stop
@section('content')
<div id="form-manage" class="row form-horizontal">
@foreach ($fields as $name => $field)
<div class="{{ $formColsClasses[0] }} fieldtype_{{ $field['type'] }} fieldname_{{ $name }}">
<div class="form-group">
<label class="{{ $formColsClasses[1] }} control-label">{{ $field['label'] or $name }}</label>
<div class="{{ $formColsClasses[2] }}">
<p class="form-control-static">{!! $field['value_text'] !!}</p>
</div>
</div>
</div>
@endforeach
</div>
<div class="row">
<div class="col-md-12">
<div class="form-group">
<div class="text-center">
<a href="{{ route($route.'.index') }}" class="btn btn-default">
<i class="fas fa-arrow-left"></i> {{ $t['go_back'] or trans('eliurkis::crud.go_back') }}
</a>
</div>
</div>
</div>
</div>
@stop
| Add form-horizontal class for the view section | Add form-horizontal class for the view section
| PHP | mit | eliurkis/crud,eliurkis/crud | php | ## Code Before:
@extends('layouts.app')
@section('page-title')
{!! $t[$type.'_title'] or trans('eliurkis::crud.'.$type.'_title') !!}
@stop
@section('content')
<div id="form-manage" class="row">
@foreach ($fields as $name => $field)
<div class="{{ $formColsClasses[0] }} fieldtype_{{ $field['type'] }} fieldname_{{ $name }}">
<div class="form-group">
<label class="{{ $formColsClasses[1] }} control-label">{{ $field['label'] or $name }}</label>
<div class="{{ $formColsClasses[2] }}">
<p class="form-control-static">{!! $field['value_text'] !!}</p>
</div>
</div>
</div>
@endforeach
</div>
<div class="row">
<div class="col-md-12">
<div class="form-group">
<div class="text-center">
<a href="{{ route($route.'.index') }}" class="btn btn-default">
<i class="fas fa-arrow-left"></i> {{ $t['go_back'] or trans('eliurkis::crud.go_back') }}
</a>
</div>
</div>
</div>
</div>
@stop
## Instruction:
Add form-horizontal class for the view section
## Code After:
@extends('layouts.app')
@section('page-title')
{!! $t[$type.'_title'] or trans('eliurkis::crud.'.$type.'_title') !!}
@stop
@section('content')
<div id="form-manage" class="row form-horizontal">
@foreach ($fields as $name => $field)
<div class="{{ $formColsClasses[0] }} fieldtype_{{ $field['type'] }} fieldname_{{ $name }}">
<div class="form-group">
<label class="{{ $formColsClasses[1] }} control-label">{{ $field['label'] or $name }}</label>
<div class="{{ $formColsClasses[2] }}">
<p class="form-control-static">{!! $field['value_text'] !!}</p>
</div>
</div>
</div>
@endforeach
</div>
<div class="row">
<div class="col-md-12">
<div class="form-group">
<div class="text-center">
<a href="{{ route($route.'.index') }}" class="btn btn-default">
<i class="fas fa-arrow-left"></i> {{ $t['go_back'] or trans('eliurkis::crud.go_back') }}
</a>
</div>
</div>
</div>
</div>
@stop
| @extends('layouts.app')
@section('page-title')
{!! $t[$type.'_title'] or trans('eliurkis::crud.'.$type.'_title') !!}
@stop
@section('content')
- <div id="form-manage" class="row">
+ <div id="form-manage" class="row form-horizontal">
? ++++++++++++++++
@foreach ($fields as $name => $field)
<div class="{{ $formColsClasses[0] }} fieldtype_{{ $field['type'] }} fieldname_{{ $name }}">
<div class="form-group">
<label class="{{ $formColsClasses[1] }} control-label">{{ $field['label'] or $name }}</label>
<div class="{{ $formColsClasses[2] }}">
<p class="form-control-static">{!! $field['value_text'] !!}</p>
</div>
</div>
</div>
@endforeach
</div>
<div class="row">
<div class="col-md-12">
<div class="form-group">
<div class="text-center">
<a href="{{ route($route.'.index') }}" class="btn btn-default">
<i class="fas fa-arrow-left"></i> {{ $t['go_back'] or trans('eliurkis::crud.go_back') }}
</a>
</div>
</div>
</div>
</div>
@stop | 2 | 0.064516 | 1 | 1 |
a636401e71e5fa15a8b898c9d6dd37d0ea8fdc36 | README.md | README.md | An extension for MIT App Inventor that adds graphing capability (for pie, bar, and line graphs) through Google Charts.
#How To Use
We have created an example App Inventor project for you to import and take a look at the blocks. ChartMakerExample.aia
| An extension for MIT App Inventor that adds graphing capability (for pie, bar, and line graphs) through Google Charts.
# How To Use
We have created an example App Inventor project for you to import and take a look at the blocks. ChartMakerExample.aia



| Update readme with image links | Update readme with image links | Markdown | mit | MillsCS215AppInventorProj/chartmaker | markdown | ## Code Before:
An extension for MIT App Inventor that adds graphing capability (for pie, bar, and line graphs) through Google Charts.
#How To Use
We have created an example App Inventor project for you to import and take a look at the blocks. ChartMakerExample.aia
## Instruction:
Update readme with image links
## Code After:
An extension for MIT App Inventor that adds graphing capability (for pie, bar, and line graphs) through Google Charts.
# How To Use
We have created an example App Inventor project for you to import and take a look at the blocks. ChartMakerExample.aia



| An extension for MIT App Inventor that adds graphing capability (for pie, bar, and line graphs) through Google Charts.
- #How To Use
+ # How To Use
? +
We have created an example App Inventor project for you to import and take a look at the blocks. ChartMakerExample.aia
+ 
+ 
+  | 5 | 1 | 4 | 1 |
2a05c0bd7db5bb6f337ed998fe861ad9f5a3e4cb | source/platforms/_tests/fixtures/bitbucket_server_changes.json | source/platforms/_tests/fixtures/bitbucket_server_changes.json | [
{
"type": "MODIFY",
"path": {
"toString": ".gitignore"
}
},
{
"type": "ADD",
"path": {
"toString": "banana"
}
},
{
"type": "COPY",
"path": {
"toString": "orange"
}
},
{
"type": "MOVE",
"path": {
"toString": ".babelrc"
},
"srcPath": {
"toString": ".babelrc.example"
}
},
{
"type": "DELETE",
"path": {
"toString": "jest.eslint.config.js"
}
}
]
| [
{
"type": "MODIFY",
"path": {
"toString": ".gitignore"
}
},
{
"type": "UNKNOWN"
},
{
"type": "ADD",
"path": {
"toString": "banana"
}
},
{
"type": "COPY",
"path": {
"toString": "orange"
}
},
{
"type": "MOVE",
"path": {
"toString": ".babelrc"
},
"srcPath": {
"toString": ".babelrc.example"
}
},
{
"type": "DELETE",
"path": {
"toString": "jest.eslint.config.js"
}
}
]
| Add UNKNOWN type to the tests | Add UNKNOWN type to the tests
| JSON | mit | danger/danger-js,danger/danger-js,danger/danger-js,danger/danger-js | json | ## Code Before:
[
{
"type": "MODIFY",
"path": {
"toString": ".gitignore"
}
},
{
"type": "ADD",
"path": {
"toString": "banana"
}
},
{
"type": "COPY",
"path": {
"toString": "orange"
}
},
{
"type": "MOVE",
"path": {
"toString": ".babelrc"
},
"srcPath": {
"toString": ".babelrc.example"
}
},
{
"type": "DELETE",
"path": {
"toString": "jest.eslint.config.js"
}
}
]
## Instruction:
Add UNKNOWN type to the tests
## Code After:
[
{
"type": "MODIFY",
"path": {
"toString": ".gitignore"
}
},
{
"type": "UNKNOWN"
},
{
"type": "ADD",
"path": {
"toString": "banana"
}
},
{
"type": "COPY",
"path": {
"toString": "orange"
}
},
{
"type": "MOVE",
"path": {
"toString": ".babelrc"
},
"srcPath": {
"toString": ".babelrc.example"
}
},
{
"type": "DELETE",
"path": {
"toString": "jest.eslint.config.js"
}
}
]
| [
{
"type": "MODIFY",
"path": {
"toString": ".gitignore"
}
+ },
+ {
+ "type": "UNKNOWN"
},
{
"type": "ADD",
"path": {
"toString": "banana"
}
},
{
"type": "COPY",
"path": {
"toString": "orange"
}
},
{
"type": "MOVE",
"path": {
"toString": ".babelrc"
},
"srcPath": {
"toString": ".babelrc.example"
}
},
{
"type": "DELETE",
"path": {
"toString": "jest.eslint.config.js"
}
}
] | 3 | 0.085714 | 3 | 0 |
4dfd6f7f05662d1d94c41d39577e72479d392c9f | data/data/aws/iam/main.tf | data/data/aws/iam/main.tf | locals {
arn = "aws"
}
resource "aws_iam_instance_profile" "worker" {
name = "${var.cluster_name}-worker-profile"
role = "${aws_iam_role.worker_role.name}"
}
resource "aws_iam_role" "worker_role" {
name = "${var.cluster_name}-worker-role"
path = "/"
assume_role_policy = <<EOF
{
"Version": "2012-10-17",
"Statement": [
{
"Action": "sts:AssumeRole",
"Principal": {
"Service": "ec2.amazonaws.com"
},
"Effect": "Allow",
"Sid": ""
}
]
}
EOF
tags = "${var.tags}"
}
resource "aws_iam_role_policy" "worker_policy" {
name = "${var.cluster_name}_worker_policy"
role = "${aws_iam_role.worker_role.id}"
policy = <<EOF
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": "ec2:Describe*",
"Resource": "*"
},
{
"Effect": "Allow",
"Action": "ec2:AttachVolume",
"Resource": "*"
},
{
"Effect": "Allow",
"Action": "ec2:DetachVolume",
"Resource": "*"
},
{
"Action": "elasticloadbalancing:*",
"Resource": "*",
"Effect": "Allow"
},
{
"Action" : [
"s3:GetObject"
],
"Resource": "arn:${local.arn}:s3:::*",
"Effect": "Allow"
}
]
}
EOF
}
| locals {
arn = "aws"
}
resource "aws_iam_instance_profile" "worker" {
name = "${var.cluster_name}-worker-profile"
role = "${aws_iam_role.worker_role.name}"
}
resource "aws_iam_role" "worker_role" {
name = "${var.cluster_name}-worker-role"
path = "/"
assume_role_policy = <<EOF
{
"Version": "2012-10-17",
"Statement": [
{
"Action": "sts:AssumeRole",
"Principal": {
"Service": "ec2.amazonaws.com"
},
"Effect": "Allow",
"Sid": ""
}
]
}
EOF
tags = "${var.tags}"
}
resource "aws_iam_role_policy" "worker_policy" {
name = "${var.cluster_name}_worker_policy"
role = "${aws_iam_role.worker_role.id}"
policy = <<EOF
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": "ec2:Describe*",
"Resource": "*"
},
{
"Action" : [
"s3:GetObject"
],
"Resource": "arn:${local.arn}:s3:::*",
"Effect": "Allow"
}
]
}
EOF
}
| Trim down the worker iam role | data/data/aws/iam: Trim down the worker iam role
The kubelet was suspected to use attach/detach volume and load balancer apis, but
apparently not. We can trim the privileges down to minimum now.
The last big one remaining is DescribeInstances that is stuck because of instance 'tags'.
| HCL | apache-2.0 | derekhiggins/installer,derekhiggins/installer | hcl | ## Code Before:
locals {
arn = "aws"
}
resource "aws_iam_instance_profile" "worker" {
name = "${var.cluster_name}-worker-profile"
role = "${aws_iam_role.worker_role.name}"
}
resource "aws_iam_role" "worker_role" {
name = "${var.cluster_name}-worker-role"
path = "/"
assume_role_policy = <<EOF
{
"Version": "2012-10-17",
"Statement": [
{
"Action": "sts:AssumeRole",
"Principal": {
"Service": "ec2.amazonaws.com"
},
"Effect": "Allow",
"Sid": ""
}
]
}
EOF
tags = "${var.tags}"
}
resource "aws_iam_role_policy" "worker_policy" {
name = "${var.cluster_name}_worker_policy"
role = "${aws_iam_role.worker_role.id}"
policy = <<EOF
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": "ec2:Describe*",
"Resource": "*"
},
{
"Effect": "Allow",
"Action": "ec2:AttachVolume",
"Resource": "*"
},
{
"Effect": "Allow",
"Action": "ec2:DetachVolume",
"Resource": "*"
},
{
"Action": "elasticloadbalancing:*",
"Resource": "*",
"Effect": "Allow"
},
{
"Action" : [
"s3:GetObject"
],
"Resource": "arn:${local.arn}:s3:::*",
"Effect": "Allow"
}
]
}
EOF
}
## Instruction:
data/data/aws/iam: Trim down the worker iam role
The kubelet was suspected to use attach/detach volume and load balancer apis, but
apparently not. We can trim the privileges down to minimum now.
The last big one remaining is DescribeInstances that is stuck because of instance 'tags'.
## Code After:
locals {
arn = "aws"
}
resource "aws_iam_instance_profile" "worker" {
name = "${var.cluster_name}-worker-profile"
role = "${aws_iam_role.worker_role.name}"
}
resource "aws_iam_role" "worker_role" {
name = "${var.cluster_name}-worker-role"
path = "/"
assume_role_policy = <<EOF
{
"Version": "2012-10-17",
"Statement": [
{
"Action": "sts:AssumeRole",
"Principal": {
"Service": "ec2.amazonaws.com"
},
"Effect": "Allow",
"Sid": ""
}
]
}
EOF
tags = "${var.tags}"
}
resource "aws_iam_role_policy" "worker_policy" {
name = "${var.cluster_name}_worker_policy"
role = "${aws_iam_role.worker_role.id}"
policy = <<EOF
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": "ec2:Describe*",
"Resource": "*"
},
{
"Action" : [
"s3:GetObject"
],
"Resource": "arn:${local.arn}:s3:::*",
"Effect": "Allow"
}
]
}
EOF
}
| locals {
arn = "aws"
}
resource "aws_iam_instance_profile" "worker" {
name = "${var.cluster_name}-worker-profile"
role = "${aws_iam_role.worker_role.name}"
}
resource "aws_iam_role" "worker_role" {
name = "${var.cluster_name}-worker-role"
path = "/"
assume_role_policy = <<EOF
{
"Version": "2012-10-17",
"Statement": [
{
"Action": "sts:AssumeRole",
"Principal": {
"Service": "ec2.amazonaws.com"
},
"Effect": "Allow",
"Sid": ""
}
]
}
EOF
tags = "${var.tags}"
}
resource "aws_iam_role_policy" "worker_policy" {
name = "${var.cluster_name}_worker_policy"
role = "${aws_iam_role.worker_role.id}"
policy = <<EOF
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": "ec2:Describe*",
"Resource": "*"
},
{
- "Effect": "Allow",
- "Action": "ec2:AttachVolume",
- "Resource": "*"
- },
- {
- "Effect": "Allow",
- "Action": "ec2:DetachVolume",
- "Resource": "*"
- },
- {
- "Action": "elasticloadbalancing:*",
- "Resource": "*",
- "Effect": "Allow"
- },
- {
"Action" : [
"s3:GetObject"
],
"Resource": "arn:${local.arn}:s3:::*",
"Effect": "Allow"
}
]
}
EOF
} | 15 | 0.208333 | 0 | 15 |
317b8fa05535cbdb05781efd242d81763b624938 | modules/core/client/views/home.client.view.html | modules/core/client/views/home.client.view.html | <section data-ng-controller="HomeController" data-ng-init="homeInit()">
<div class="row">
<div class="col-md-4">
<h2>
<strong>N</strong>ext Actions
</h2>
<ul data-ng-repeat="item in nextActions">
<li data-ng-bind="item.title"></li>
</ul>
</div>
<div class="col-md-4">
<h2>
<strong>P</strong>rojects
</h2>
<ul>
<li>Developm a website</li>
<li>Take over the world</li>
</ul>
</div>
<div class="col-md-4">
<h2>
<strong>W</strong>aiting For
</h2>
<h3>
<dt>Napolean</dt>
</h3>
<ul>
<li>Get comments on strategy</li>
</ul>
<h3>
<dt>Wellington</dt>
</h3>
<ul>
<li>Get comments on boots</li>
</ul>
</div>
</div>
<div class="well">
<h2>GTD Documentation</h2>
<p>
Buy the book!
</p>
</div>
</section>
| <section data-ng-controller="HomeController" data-ng-init="homeInit()">
<div class="row">
<div class="col-md-4">
<h2>
<strong>N</strong>ext Actions
</h2>
<ul >
<li data-ng-repeat="item in nextActions" data-ng-bind="item.title"></li>
</ul>
</div>
<div class="col-md-4">
<h2>
<strong>P</strong>rojects
</h2>
<ul>
<li>Developm a website</li>
<li>Take over the world</li>
</ul>
</div>
<div class="col-md-4">
<h2>
<strong>W</strong>aiting For
</h2>
<h3>
<dt>Napolean</dt>
</h3>
<ul>
<li>Get comments on strategy</li>
</ul>
<h3>
<dt>Wellington</dt>
</h3>
<ul>
<li>Get comments on boots</li>
</ul>
</div>
</div>
<div class="well">
<h2>GTD Documentation</h2>
<p>
Buy the book!
</p>
</div>
</section>
| Set ng-repeat on correct element to get ul displaying nicely | Set ng-repeat on correct element to get ul displaying nicely
| HTML | mit | PDKK/KemoSahbee,PDKK/KemoSahbee,PDKK/KemoSahbee | html | ## Code Before:
<section data-ng-controller="HomeController" data-ng-init="homeInit()">
<div class="row">
<div class="col-md-4">
<h2>
<strong>N</strong>ext Actions
</h2>
<ul data-ng-repeat="item in nextActions">
<li data-ng-bind="item.title"></li>
</ul>
</div>
<div class="col-md-4">
<h2>
<strong>P</strong>rojects
</h2>
<ul>
<li>Developm a website</li>
<li>Take over the world</li>
</ul>
</div>
<div class="col-md-4">
<h2>
<strong>W</strong>aiting For
</h2>
<h3>
<dt>Napolean</dt>
</h3>
<ul>
<li>Get comments on strategy</li>
</ul>
<h3>
<dt>Wellington</dt>
</h3>
<ul>
<li>Get comments on boots</li>
</ul>
</div>
</div>
<div class="well">
<h2>GTD Documentation</h2>
<p>
Buy the book!
</p>
</div>
</section>
## Instruction:
Set ng-repeat on correct element to get ul displaying nicely
## Code After:
<section data-ng-controller="HomeController" data-ng-init="homeInit()">
<div class="row">
<div class="col-md-4">
<h2>
<strong>N</strong>ext Actions
</h2>
<ul >
<li data-ng-repeat="item in nextActions" data-ng-bind="item.title"></li>
</ul>
</div>
<div class="col-md-4">
<h2>
<strong>P</strong>rojects
</h2>
<ul>
<li>Developm a website</li>
<li>Take over the world</li>
</ul>
</div>
<div class="col-md-4">
<h2>
<strong>W</strong>aiting For
</h2>
<h3>
<dt>Napolean</dt>
</h3>
<ul>
<li>Get comments on strategy</li>
</ul>
<h3>
<dt>Wellington</dt>
</h3>
<ul>
<li>Get comments on boots</li>
</ul>
</div>
</div>
<div class="well">
<h2>GTD Documentation</h2>
<p>
Buy the book!
</p>
</div>
</section>
| <section data-ng-controller="HomeController" data-ng-init="homeInit()">
<div class="row">
<div class="col-md-4">
<h2>
<strong>N</strong>ext Actions
</h2>
- <ul data-ng-repeat="item in nextActions">
- <li data-ng-bind="item.title"></li>
+ <ul >
+ <li data-ng-repeat="item in nextActions" data-ng-bind="item.title"></li>
</ul>
</div>
<div class="col-md-4">
<h2>
<strong>P</strong>rojects
</h2>
<ul>
<li>Developm a website</li>
<li>Take over the world</li>
</ul>
</div>
<div class="col-md-4">
<h2>
<strong>W</strong>aiting For
</h2>
<h3>
<dt>Napolean</dt>
</h3>
<ul>
<li>Get comments on strategy</li>
</ul>
<h3>
<dt>Wellington</dt>
</h3>
<ul>
<li>Get comments on boots</li>
</ul>
</div>
</div>
<div class="well">
<h2>GTD Documentation</h2>
<p>
Buy the book!
</p>
</div>
</section> | 4 | 0.086957 | 2 | 2 |
36eb7212606c19fb5c1c8755b083be12c2839ce6 | templates/default/etc_chef_client.rb.erb | templates/default/etc_chef_client.rb.erb | <%= template_header -%>
node_name '<%= node['fqdn'] %>'
chef_server_url '<%= @server_url %>'
client_key '<%= @client_key %>'
<% if @trusted_certs_dir -%>
trusted_certs_dir '<%= @trusted_certs_dir %>'
<% end -%>
<%- if @verify_ssl == 'all' -%>
# Verify all HTTPS connections
ssl_verify_mode :verify_peer
<%- elsif @verify_ssl == 'chef-server' -%>
# Verify only connections to chef-server
verify_api_cert true
<%- end -%>
validation_client_name '<%= @validation_client_name %>'
validation_key '<%= @validation_key %>'
log_level <%= @log_level %>
log_location <%= @use_syslog?'SyslogLogger.new("chef-client")':'STDOUT' %>
file_backup_path '/var/backups/chef'
file_cache_path '/var/cache/chef'
pid_file '/var/run/chef/client.pid'
# configuration for Ohai:
<%- unless @odisable.empty? -%>
<%# Make sure to write symbols into the configuration file %>
<%- plugins = @odisable.map { |p| p.capitalize.to_sym } -%>
ohai.disabled_plugins = <%= plugins %>
<%- end %>
ohai.plugin_path << '<%= @opath %>'
<%= @custom_config -%>
| <%= template_header -%>
<%- nodename = @node_name || node['fqdn'] -%>
<%- if nodename
node_name '<%= nodename %>'
<%- end -%>
chef_server_url '<%= @server_url %>'
client_key '<%= @client_key %>'
<% if @trusted_certs_dir -%>
trusted_certs_dir '<%= @trusted_certs_dir %>'
<% end -%>
<%- if @verify_ssl == 'all' -%>
# Verify all HTTPS connections
ssl_verify_mode :verify_peer
<%- elsif @verify_ssl == 'chef-server' -%>
# Verify only connections to chef-server
verify_api_cert true
<%- end -%>
validation_client_name '<%= @validation_client_name %>'
validation_key '<%= @validation_key %>'
log_level <%= @log_level %>
log_location <%= @use_syslog?'SyslogLogger.new("chef-client")':'STDOUT' %>
file_backup_path '/var/backups/chef'
file_cache_path '/var/cache/chef'
pid_file '/var/run/chef/client.pid'
# configuration for Ohai:
<%- unless @odisable.empty? -%>
<%# Make sure to write symbols into the configuration file %>
<%- plugins = @odisable.map { |p| p.capitalize.to_sym } -%>
ohai.disabled_plugins = <%= plugins %>
<%- end %>
ohai.plugin_path << '<%= @opath %>'
<%= @custom_config -%>
| Make node name configurable and catch empty node['fqdn'] | Make node name configurable and catch empty node['fqdn']
| HTML+ERB | apache-2.0 | GSI-HPC/sys-chef-cookbook,GSI-HPC/sys-chef-cookbook,GSI-HPC/sys-chef-cookbook | html+erb | ## Code Before:
<%= template_header -%>
node_name '<%= node['fqdn'] %>'
chef_server_url '<%= @server_url %>'
client_key '<%= @client_key %>'
<% if @trusted_certs_dir -%>
trusted_certs_dir '<%= @trusted_certs_dir %>'
<% end -%>
<%- if @verify_ssl == 'all' -%>
# Verify all HTTPS connections
ssl_verify_mode :verify_peer
<%- elsif @verify_ssl == 'chef-server' -%>
# Verify only connections to chef-server
verify_api_cert true
<%- end -%>
validation_client_name '<%= @validation_client_name %>'
validation_key '<%= @validation_key %>'
log_level <%= @log_level %>
log_location <%= @use_syslog?'SyslogLogger.new("chef-client")':'STDOUT' %>
file_backup_path '/var/backups/chef'
file_cache_path '/var/cache/chef'
pid_file '/var/run/chef/client.pid'
# configuration for Ohai:
<%- unless @odisable.empty? -%>
<%# Make sure to write symbols into the configuration file %>
<%- plugins = @odisable.map { |p| p.capitalize.to_sym } -%>
ohai.disabled_plugins = <%= plugins %>
<%- end %>
ohai.plugin_path << '<%= @opath %>'
<%= @custom_config -%>
## Instruction:
Make node name configurable and catch empty node['fqdn']
## Code After:
<%= template_header -%>
<%- nodename = @node_name || node['fqdn'] -%>
<%- if nodename
node_name '<%= nodename %>'
<%- end -%>
chef_server_url '<%= @server_url %>'
client_key '<%= @client_key %>'
<% if @trusted_certs_dir -%>
trusted_certs_dir '<%= @trusted_certs_dir %>'
<% end -%>
<%- if @verify_ssl == 'all' -%>
# Verify all HTTPS connections
ssl_verify_mode :verify_peer
<%- elsif @verify_ssl == 'chef-server' -%>
# Verify only connections to chef-server
verify_api_cert true
<%- end -%>
validation_client_name '<%= @validation_client_name %>'
validation_key '<%= @validation_key %>'
log_level <%= @log_level %>
log_location <%= @use_syslog?'SyslogLogger.new("chef-client")':'STDOUT' %>
file_backup_path '/var/backups/chef'
file_cache_path '/var/cache/chef'
pid_file '/var/run/chef/client.pid'
# configuration for Ohai:
<%- unless @odisable.empty? -%>
<%# Make sure to write symbols into the configuration file %>
<%- plugins = @odisable.map { |p| p.capitalize.to_sym } -%>
ohai.disabled_plugins = <%= plugins %>
<%- end %>
ohai.plugin_path << '<%= @opath %>'
<%= @custom_config -%>
| <%= template_header -%>
+ <%- nodename = @node_name || node['fqdn'] -%>
+ <%- if nodename
- node_name '<%= node['fqdn'] %>'
? ----- ^^
+ node_name '<%= nodename %>'
? ^^^
+ <%- end -%>
chef_server_url '<%= @server_url %>'
client_key '<%= @client_key %>'
<% if @trusted_certs_dir -%>
trusted_certs_dir '<%= @trusted_certs_dir %>'
<% end -%>
<%- if @verify_ssl == 'all' -%>
# Verify all HTTPS connections
ssl_verify_mode :verify_peer
<%- elsif @verify_ssl == 'chef-server' -%>
# Verify only connections to chef-server
verify_api_cert true
<%- end -%>
validation_client_name '<%= @validation_client_name %>'
validation_key '<%= @validation_key %>'
log_level <%= @log_level %>
log_location <%= @use_syslog?'SyslogLogger.new("chef-client")':'STDOUT' %>
file_backup_path '/var/backups/chef'
file_cache_path '/var/cache/chef'
pid_file '/var/run/chef/client.pid'
# configuration for Ohai:
<%- unless @odisable.empty? -%>
<%# Make sure to write symbols into the configuration file %>
<%- plugins = @odisable.map { |p| p.capitalize.to_sym } -%>
ohai.disabled_plugins = <%= plugins %>
<%- end %>
ohai.plugin_path << '<%= @opath %>'
<%= @custom_config -%> | 5 | 0.135135 | 4 | 1 |
58b2ef2774f9d663ec097ff015fcee01db641b5c | app/view/PlanList.js | app/view/PlanList.js | Ext.define("DMPlanner.view.PlanList", {
extend : 'Ext.grid.Panel',
alias : 'widget.planlist',
requires : ['Ext.Button', 'Ext.util.*'],
title : 'Plans',
columnLines : true,
store : 'Plans',
cls : 'planlist',
columns : [{
xtype : 'gridcolumn',
flex : 2,
dataIndex : 'name',
text : 'Plans'
}, {
xtype : 'gridcolumn',
flex : 1,
dataIndex : 'code',
text : 'Code'
}],
collapseFirst: false,
tools : [{
type : 'plus',
tooltip : 'Add a New Plan',
itemId: 'addPlan'
}, {
type : 'print',
tooltip : 'Print to PDF'
}, {
type : 'save',
tooltip : 'Save to local file'
}, {
type : 'help',
tooltip : 'Get Help'
}]/*,
tbar : [{
text : 'Add Plan'
}]*/
});
| Ext.define("DMPlanner.view.PlanList", {
extend : 'Ext.grid.Panel',
alias : 'widget.planlist',
requires : ['Ext.Button', 'Ext.util.*', 'Ext.selection.CellModel', 'Ext.grid.plugin.CellEditing'],
title : 'Plans',
columnLines : true,
store : 'Plans',
cls : 'planlist',
selType : 'cellmodel',
plugins : [{
ptype : 'cellediting',
clicksToEdit : 2
}],
columns : [{
xtype : 'gridcolumn',
flex : 2,
dataIndex : 'name',
text : 'Plans',
editor : {
xtype : 'textfield',
allowBlank : false
}
}, {
xtype : 'gridcolumn',
flex : 1,
dataIndex : 'code',
text : 'Code',
editor : {
xtype : 'textfield',
allowBlank : true
}
}],
collapseFirst : false,
tools : [{
type : 'plus',
tooltip : 'Add a New Plan',
itemId : 'addPlan'
}, {
type : 'print',
tooltip : 'Print to PDF'
}, {
type : 'save',
tooltip : 'Save to local file'
}, {
type : 'help',
tooltip : 'Get Help'
}]/*,
tbar : [{
text : 'Add Plan'
}]*/
});
| Allow editing of plan name and code. | Allow editing of plan name and code.
| JavaScript | unlicense | arcticlcc/dmplanner,arcticlcc/dmplanner,arcticlcc/dmplanner | javascript | ## Code Before:
Ext.define("DMPlanner.view.PlanList", {
extend : 'Ext.grid.Panel',
alias : 'widget.planlist',
requires : ['Ext.Button', 'Ext.util.*'],
title : 'Plans',
columnLines : true,
store : 'Plans',
cls : 'planlist',
columns : [{
xtype : 'gridcolumn',
flex : 2,
dataIndex : 'name',
text : 'Plans'
}, {
xtype : 'gridcolumn',
flex : 1,
dataIndex : 'code',
text : 'Code'
}],
collapseFirst: false,
tools : [{
type : 'plus',
tooltip : 'Add a New Plan',
itemId: 'addPlan'
}, {
type : 'print',
tooltip : 'Print to PDF'
}, {
type : 'save',
tooltip : 'Save to local file'
}, {
type : 'help',
tooltip : 'Get Help'
}]/*,
tbar : [{
text : 'Add Plan'
}]*/
});
## Instruction:
Allow editing of plan name and code.
## Code After:
Ext.define("DMPlanner.view.PlanList", {
extend : 'Ext.grid.Panel',
alias : 'widget.planlist',
requires : ['Ext.Button', 'Ext.util.*', 'Ext.selection.CellModel', 'Ext.grid.plugin.CellEditing'],
title : 'Plans',
columnLines : true,
store : 'Plans',
cls : 'planlist',
selType : 'cellmodel',
plugins : [{
ptype : 'cellediting',
clicksToEdit : 2
}],
columns : [{
xtype : 'gridcolumn',
flex : 2,
dataIndex : 'name',
text : 'Plans',
editor : {
xtype : 'textfield',
allowBlank : false
}
}, {
xtype : 'gridcolumn',
flex : 1,
dataIndex : 'code',
text : 'Code',
editor : {
xtype : 'textfield',
allowBlank : true
}
}],
collapseFirst : false,
tools : [{
type : 'plus',
tooltip : 'Add a New Plan',
itemId : 'addPlan'
}, {
type : 'print',
tooltip : 'Print to PDF'
}, {
type : 'save',
tooltip : 'Save to local file'
}, {
type : 'help',
tooltip : 'Get Help'
}]/*,
tbar : [{
text : 'Add Plan'
}]*/
});
| Ext.define("DMPlanner.view.PlanList", {
extend : 'Ext.grid.Panel',
alias : 'widget.planlist',
- requires : ['Ext.Button', 'Ext.util.*'],
+ requires : ['Ext.Button', 'Ext.util.*', 'Ext.selection.CellModel', 'Ext.grid.plugin.CellEditing'],
title : 'Plans',
columnLines : true,
store : 'Plans',
cls : 'planlist',
+ selType : 'cellmodel',
+ plugins : [{
+ ptype : 'cellediting',
+ clicksToEdit : 2
+ }],
columns : [{
xtype : 'gridcolumn',
flex : 2,
dataIndex : 'name',
- text : 'Plans'
+ text : 'Plans',
? +
+ editor : {
+ xtype : 'textfield',
+ allowBlank : false
+ }
}, {
xtype : 'gridcolumn',
flex : 1,
dataIndex : 'code',
- text : 'Code'
+ text : 'Code',
? +
+ editor : {
+ xtype : 'textfield',
+ allowBlank : true
+ }
}],
- collapseFirst: false,
+ collapseFirst : false,
? +
tools : [{
type : 'plus',
tooltip : 'Add a New Plan',
- itemId: 'addPlan'
+ itemId : 'addPlan'
? +
}, {
type : 'print',
tooltip : 'Print to PDF'
}, {
type : 'save',
tooltip : 'Save to local file'
}, {
type : 'help',
tooltip : 'Get Help'
}]/*,
tbar : [{
text : 'Add Plan'
}]*/
}); | 23 | 0.547619 | 18 | 5 |
47da0f80a936649d64c53c522e30ea2386276455 | themes/default/config.js | themes/default/config.js | (function(c) {
/*
* !!! CHANGE THIS !!!
*/
c["general"].rootUrl = '//localhost/resto2/';
/*
* !! DO NOT EDIT UNDER THIS LINE !!
*/
c["general"].serverRootUrl = null;
c["general"].proxyUrl = null;
c["general"].confirmDeletion = false;
c["general"].themePath = "/js/lib/mapshup/theme/default";
c["i18n"].path = "/js/lib/mapshup/i18n";
c["general"].displayContextualMenu = false;
c["general"].displayCoordinates = true;
c["general"].displayScale = false;
c["general"].overviewMap = "none";
c['general'].enableHistory = false;
c["general"].timeLine = {
enable: false
};
c.extend("Navigation", {
position: 'nw',
orientation: 'h'
});
c.remove("layers", "Streets");
c.remove("layers", "Satellite");
c.remove("layers", "Relief");
c.remove("layers", "MapQuest OSM");
c.remove("layers", "OpenStreetMap");
c.add("layers", {
type: "Bing",
title: "Satellite",
key: "AmraZAAcRFVn6Vbxk_TVhhVZNt66x4_4SV_EvlfzvRC9qZ_2y6k1aNsuuoYS0UYy",
bingType: "AerialWithLabels"
});
})(window.M.Config);
| (function(c) {
/*
* !!! CHANGE THIS !!!
*/
c["general"].rootUrl = '//localhost/resto2/';
/*
* !! DO NOT EDIT UNDER THIS LINE !!
*/
c["general"].serverRootUrl = null;
c["general"].proxyUrl = null;
c["general"].confirmDeletion = false;
c["general"].themePath = "/js/lib/mapshup/theme/default";
c["i18n"].path = "/js/lib/mapshup/i18n";
c["general"].displayContextualMenu = false;
c["general"].displayCoordinates = true;
c["general"].displayScale = false;
c["general"].overviewMap = "none";
c['general'].enableHistory = false;
c["general"].timeLine = {
enable: false
};
c.extend("Navigation", {
position: 'nw',
orientation: 'h'
});
c.remove("layers", "Streets");
c.remove("layers", "Satellite");
c.remove("layers", "Relief");
c.remove("layers", "MapQuest OSM");
//c.remove("layers", "OpenStreetMap");
/*
c.add("layers", {
type: "Bing",
title: "Satellite",
key: "AmraZAAcRFVn6Vbxk_TVhhVZNt66x4_4SV_EvlfzvRC9qZ_2y6k1aNsuuoYS0UYy",
bingType: "AerialWithLabels"
});*/
})(window.M.Config);
| Replace Bing maps by OpenStreetMap to avoid licensing issue | [THEIA] Replace Bing maps by OpenStreetMap to avoid licensing issue | JavaScript | apache-2.0 | atospeps/resto,Baresse/resto2,RailwayMan/resto,RailwayMan/resto,Baresse/resto2,atospeps/resto,jjrom/resto,jjrom/resto | javascript | ## Code Before:
(function(c) {
/*
* !!! CHANGE THIS !!!
*/
c["general"].rootUrl = '//localhost/resto2/';
/*
* !! DO NOT EDIT UNDER THIS LINE !!
*/
c["general"].serverRootUrl = null;
c["general"].proxyUrl = null;
c["general"].confirmDeletion = false;
c["general"].themePath = "/js/lib/mapshup/theme/default";
c["i18n"].path = "/js/lib/mapshup/i18n";
c["general"].displayContextualMenu = false;
c["general"].displayCoordinates = true;
c["general"].displayScale = false;
c["general"].overviewMap = "none";
c['general'].enableHistory = false;
c["general"].timeLine = {
enable: false
};
c.extend("Navigation", {
position: 'nw',
orientation: 'h'
});
c.remove("layers", "Streets");
c.remove("layers", "Satellite");
c.remove("layers", "Relief");
c.remove("layers", "MapQuest OSM");
c.remove("layers", "OpenStreetMap");
c.add("layers", {
type: "Bing",
title: "Satellite",
key: "AmraZAAcRFVn6Vbxk_TVhhVZNt66x4_4SV_EvlfzvRC9qZ_2y6k1aNsuuoYS0UYy",
bingType: "AerialWithLabels"
});
})(window.M.Config);
## Instruction:
[THEIA] Replace Bing maps by OpenStreetMap to avoid licensing issue
## Code After:
(function(c) {
/*
* !!! CHANGE THIS !!!
*/
c["general"].rootUrl = '//localhost/resto2/';
/*
* !! DO NOT EDIT UNDER THIS LINE !!
*/
c["general"].serverRootUrl = null;
c["general"].proxyUrl = null;
c["general"].confirmDeletion = false;
c["general"].themePath = "/js/lib/mapshup/theme/default";
c["i18n"].path = "/js/lib/mapshup/i18n";
c["general"].displayContextualMenu = false;
c["general"].displayCoordinates = true;
c["general"].displayScale = false;
c["general"].overviewMap = "none";
c['general'].enableHistory = false;
c["general"].timeLine = {
enable: false
};
c.extend("Navigation", {
position: 'nw',
orientation: 'h'
});
c.remove("layers", "Streets");
c.remove("layers", "Satellite");
c.remove("layers", "Relief");
c.remove("layers", "MapQuest OSM");
//c.remove("layers", "OpenStreetMap");
/*
c.add("layers", {
type: "Bing",
title: "Satellite",
key: "AmraZAAcRFVn6Vbxk_TVhhVZNt66x4_4SV_EvlfzvRC9qZ_2y6k1aNsuuoYS0UYy",
bingType: "AerialWithLabels"
});*/
})(window.M.Config);
| (function(c) {
/*
* !!! CHANGE THIS !!!
*/
c["general"].rootUrl = '//localhost/resto2/';
/*
* !! DO NOT EDIT UNDER THIS LINE !!
*/
c["general"].serverRootUrl = null;
c["general"].proxyUrl = null;
c["general"].confirmDeletion = false;
c["general"].themePath = "/js/lib/mapshup/theme/default";
c["i18n"].path = "/js/lib/mapshup/i18n";
c["general"].displayContextualMenu = false;
c["general"].displayCoordinates = true;
c["general"].displayScale = false;
c["general"].overviewMap = "none";
c['general'].enableHistory = false;
c["general"].timeLine = {
enable: false
};
c.extend("Navigation", {
position: 'nw',
orientation: 'h'
});
c.remove("layers", "Streets");
c.remove("layers", "Satellite");
c.remove("layers", "Relief");
c.remove("layers", "MapQuest OSM");
- c.remove("layers", "OpenStreetMap");
+ //c.remove("layers", "OpenStreetMap");
? ++
+ /*
c.add("layers", {
type: "Bing",
title: "Satellite",
key: "AmraZAAcRFVn6Vbxk_TVhhVZNt66x4_4SV_EvlfzvRC9qZ_2y6k1aNsuuoYS0UYy",
bingType: "AerialWithLabels"
- });
+ });*/
? ++
})(window.M.Config); | 5 | 0.125 | 3 | 2 |
7ec3b887456f286351eba6b66e49538fd729a3cf | commands.go | commands.go | package main
import (
"github.com/timakin/ts/loader"
"github.com/codegangsta/cli"
)
var Commands = []cli.Command{
commandAll,
commandBiz,
commandHack,
}
var commandAll = cli.Command{
Name: "pop",
Usage: "",
Description: `
`,
Action: doAll,
}
var commandBiz = cli.Command{
Name: "biz",
Usage: "",
Description: `
`,
Action: doBiz,
}
var commandHack = cli.Command{
Name: "hack",
Usage: "",
Description: `
`,
Action: doHack,
}
func doAll(c *cli.Context) {
hn := make(chan loader.ResultData)
ph := make(chan loader.ResultData)
re := make(chan loader.ResultData)
go loader.GetHNFeed(hn)
go loader.GetPHFeed(ph)
go loader.GetRedditFeed(re)
hnres := <- hn
phres := <- ph
reres := <- re
var HNData loader.Feed = &hnres
var PHData loader.Feed = &phres
var REData loader.Feed = &reres
HNData.Display()
PHData.Display()
REData.Display()
}
func doBiz(c *cli.Context) {
}
func doHack(c *cli.Context) {
}
| package main
import (
"github.com/timakin/ts/loader"
"github.com/codegangsta/cli"
)
var Commands = []cli.Command{
commandAll,
commandBiz,
commandHack,
}
var commandAll = cli.Command{
Name: "pop",
Usage: "",
Description: `
`,
Action: doAll,
}
var commandBiz = cli.Command{
Name: "biz",
Usage: "",
Description: `
`,
Action: doBiz,
}
var commandHack = cli.Command{
Name: "hack",
Usage: "",
Description: `
`,
Action: doHack,
}
func doAll(c *cli.Context) {
hn := make(chan loader.ResultData)
ph := make(chan loader.ResultData)
re := make(chan loader.ResultData)
go loader.GetHNFeed(hn)
go loader.GetPHFeed(ph)
go loader.GetRedditFeed(re)
hnres := <- hn
phres := <- ph
reres := <- re
var HNData loader.Feed = &hnres
var PHData loader.Feed = &phres
var REData loader.Feed = &reres
HNData.Display()
PHData.Display()
REData.Display()
}
func doBiz(c *cli.Context) {
}
func doHack(c *cli.Context) {
loader.GetHatenaFeed()
}
| Add new GetHatenaFeed func prototype | Add new GetHatenaFeed func prototype
| Go | mit | timakin/ts,timakin/ts | go | ## Code Before:
package main
import (
"github.com/timakin/ts/loader"
"github.com/codegangsta/cli"
)
var Commands = []cli.Command{
commandAll,
commandBiz,
commandHack,
}
var commandAll = cli.Command{
Name: "pop",
Usage: "",
Description: `
`,
Action: doAll,
}
var commandBiz = cli.Command{
Name: "biz",
Usage: "",
Description: `
`,
Action: doBiz,
}
var commandHack = cli.Command{
Name: "hack",
Usage: "",
Description: `
`,
Action: doHack,
}
func doAll(c *cli.Context) {
hn := make(chan loader.ResultData)
ph := make(chan loader.ResultData)
re := make(chan loader.ResultData)
go loader.GetHNFeed(hn)
go loader.GetPHFeed(ph)
go loader.GetRedditFeed(re)
hnres := <- hn
phres := <- ph
reres := <- re
var HNData loader.Feed = &hnres
var PHData loader.Feed = &phres
var REData loader.Feed = &reres
HNData.Display()
PHData.Display()
REData.Display()
}
func doBiz(c *cli.Context) {
}
func doHack(c *cli.Context) {
}
## Instruction:
Add new GetHatenaFeed func prototype
## Code After:
package main
import (
"github.com/timakin/ts/loader"
"github.com/codegangsta/cli"
)
var Commands = []cli.Command{
commandAll,
commandBiz,
commandHack,
}
var commandAll = cli.Command{
Name: "pop",
Usage: "",
Description: `
`,
Action: doAll,
}
var commandBiz = cli.Command{
Name: "biz",
Usage: "",
Description: `
`,
Action: doBiz,
}
var commandHack = cli.Command{
Name: "hack",
Usage: "",
Description: `
`,
Action: doHack,
}
func doAll(c *cli.Context) {
hn := make(chan loader.ResultData)
ph := make(chan loader.ResultData)
re := make(chan loader.ResultData)
go loader.GetHNFeed(hn)
go loader.GetPHFeed(ph)
go loader.GetRedditFeed(re)
hnres := <- hn
phres := <- ph
reres := <- re
var HNData loader.Feed = &hnres
var PHData loader.Feed = &phres
var REData loader.Feed = &reres
HNData.Display()
PHData.Display()
REData.Display()
}
func doBiz(c *cli.Context) {
}
func doHack(c *cli.Context) {
loader.GetHatenaFeed()
}
| package main
import (
"github.com/timakin/ts/loader"
"github.com/codegangsta/cli"
)
var Commands = []cli.Command{
commandAll,
commandBiz,
commandHack,
}
var commandAll = cli.Command{
Name: "pop",
Usage: "",
Description: `
`,
Action: doAll,
}
var commandBiz = cli.Command{
Name: "biz",
Usage: "",
Description: `
`,
Action: doBiz,
}
var commandHack = cli.Command{
Name: "hack",
Usage: "",
Description: `
`,
Action: doHack,
}
func doAll(c *cli.Context) {
hn := make(chan loader.ResultData)
ph := make(chan loader.ResultData)
re := make(chan loader.ResultData)
go loader.GetHNFeed(hn)
go loader.GetPHFeed(ph)
go loader.GetRedditFeed(re)
hnres := <- hn
phres := <- ph
reres := <- re
var HNData loader.Feed = &hnres
var PHData loader.Feed = &phres
var REData loader.Feed = &reres
HNData.Display()
PHData.Display()
REData.Display()
}
func doBiz(c *cli.Context) {
}
func doHack(c *cli.Context) {
+ loader.GetHatenaFeed()
} | 1 | 0.016667 | 1 | 0 |
8c5b43ff28b161deabbc47c8c99d20f50f0c3a75 | os/os.lds | os/os.lds | ENTRY(kinit);
OUTPUT_FORMAT(elf32-i386);
PHDRS {
headers PT_PHDR FILEHDR PHDRS;
code PT_LOAD;
}
SECTIONS {
.text 0x600: ALIGN(0x100) { *(.text) } :code
.rdata : { *(rdata) }
.data : { *(data) }
.bss : { *(bss) }
/DISCARD/ : { *(.eh_frame) }
} | ENTRY(kinit);
OUTPUT_FORMAT(elf32-i386);
PHDRS {
headers PT_PHDR PHDRS;
code PT_LOAD FILEHDR PHDRS;
}
SECTIONS {
.text 0x600: ALIGN(0x100) { *(.text) } :code
.rdata : { *(rdata) }
.data : { *(data) }
.bss : { *(bss) }
/DISCARD/ : { *(.eh_frame) }
} | Fix issue due to LD 20815 | Fix issue due to LD 20815
https://sourceware.org/bugzilla/show_bug.cgi?id=20815
| Linker Script | mit | Sebazzz/sdos | linker-script | ## Code Before:
ENTRY(kinit);
OUTPUT_FORMAT(elf32-i386);
PHDRS {
headers PT_PHDR FILEHDR PHDRS;
code PT_LOAD;
}
SECTIONS {
.text 0x600: ALIGN(0x100) { *(.text) } :code
.rdata : { *(rdata) }
.data : { *(data) }
.bss : { *(bss) }
/DISCARD/ : { *(.eh_frame) }
}
## Instruction:
Fix issue due to LD 20815
https://sourceware.org/bugzilla/show_bug.cgi?id=20815
## Code After:
ENTRY(kinit);
OUTPUT_FORMAT(elf32-i386);
PHDRS {
headers PT_PHDR PHDRS;
code PT_LOAD FILEHDR PHDRS;
}
SECTIONS {
.text 0x600: ALIGN(0x100) { *(.text) } :code
.rdata : { *(rdata) }
.data : { *(data) }
.bss : { *(bss) }
/DISCARD/ : { *(.eh_frame) }
} | ENTRY(kinit);
OUTPUT_FORMAT(elf32-i386);
PHDRS {
- headers PT_PHDR FILEHDR PHDRS;
? --------
+ headers PT_PHDR PHDRS;
- code PT_LOAD;
+ code PT_LOAD FILEHDR PHDRS;
}
SECTIONS {
.text 0x600: ALIGN(0x100) { *(.text) } :code
.rdata : { *(rdata) }
.data : { *(data) }
.bss : { *(bss) }
/DISCARD/ : { *(.eh_frame) }
} | 4 | 0.266667 | 2 | 2 |
71600b62fd10421c5ef85bdc662630a1f578e4eb | helpers.js | helpers.js | var moment = require('moment');
exports.dateFormat = function(datestamp) {
var date = moment(datestamp);
if (date.isBefore(moment(), 'week')) {
return date.format('MMM D, YYYY');
}
else {
return date.fromNow();
}
};
exports.section = function(name, options) {
if(!this._sections) {
this._sections = {};
}
this._sections[name] = options.fn(this);
return null;
}
exports.urlFormat = function(url) {
if (url.lastIndexOf('http://', 0) === 0) {
url = url.substring(7);
if (url.lastIndexOf('www.', 0) === 0) {
url = url.substring(4);
}
}
return url;
}
| var moment = require('moment');
exports.dateFormat = function(datestamp) {
var date = moment(datestamp);
if (date.isBefore(moment(), 'week')) {
return date.format('MMM D, YYYY');
}
else {
return date.fromNow();
}
};
exports.section = function(name, options) {
if(!this._sections) {
this._sections = {};
}
this._sections[name] = options.fn(this);
return null;
}
exports.urlFormat = function(url) {
if(typeof url !== "undefined" && url != null) {
if (url.lastIndexOf('http://', 0) === 0) {
url = url.substring(7);
if (url.lastIndexOf('www.', 0) === 0) {
url = url.substring(4);
}
}
return url;
}
}
| Make sure URL helped doesn't break if a url is undefined | Make sure URL helped doesn't break if a url is undefined
| JavaScript | mit | csblogs/csblogs-web-app,robcrocombe/csblogs,csblogs/csblogs-web-app | javascript | ## Code Before:
var moment = require('moment');
exports.dateFormat = function(datestamp) {
var date = moment(datestamp);
if (date.isBefore(moment(), 'week')) {
return date.format('MMM D, YYYY');
}
else {
return date.fromNow();
}
};
exports.section = function(name, options) {
if(!this._sections) {
this._sections = {};
}
this._sections[name] = options.fn(this);
return null;
}
exports.urlFormat = function(url) {
if (url.lastIndexOf('http://', 0) === 0) {
url = url.substring(7);
if (url.lastIndexOf('www.', 0) === 0) {
url = url.substring(4);
}
}
return url;
}
## Instruction:
Make sure URL helped doesn't break if a url is undefined
## Code After:
var moment = require('moment');
exports.dateFormat = function(datestamp) {
var date = moment(datestamp);
if (date.isBefore(moment(), 'week')) {
return date.format('MMM D, YYYY');
}
else {
return date.fromNow();
}
};
exports.section = function(name, options) {
if(!this._sections) {
this._sections = {};
}
this._sections[name] = options.fn(this);
return null;
}
exports.urlFormat = function(url) {
if(typeof url !== "undefined" && url != null) {
if (url.lastIndexOf('http://', 0) === 0) {
url = url.substring(7);
if (url.lastIndexOf('www.', 0) === 0) {
url = url.substring(4);
}
}
return url;
}
}
| var moment = require('moment');
exports.dateFormat = function(datestamp) {
var date = moment(datestamp);
if (date.isBefore(moment(), 'week')) {
return date.format('MMM D, YYYY');
}
else {
return date.fromNow();
}
};
exports.section = function(name, options) {
if(!this._sections) {
this._sections = {};
}
this._sections[name] = options.fn(this);
return null;
}
exports.urlFormat = function(url) {
+ if(typeof url !== "undefined" && url != null) {
- if (url.lastIndexOf('http://', 0) === 0) {
+ if (url.lastIndexOf('http://', 0) === 0) {
? +
- url = url.substring(7);
+ url = url.substring(7);
? +
- if (url.lastIndexOf('www.', 0) === 0) {
+ if (url.lastIndexOf('www.', 0) === 0) {
? +
- url = url.substring(4);
+ url = url.substring(4);
? +
- }
+ }
? +
- }
+ }
? +
- return url;
+ return url;
? +
+ }
} | 16 | 0.516129 | 9 | 7 |
1b08666005c94a42b8288c525901f0b415cd6a80 | docs/assets/css/main.scss | docs/assets/css/main.scss | //Import dependencies
@import "../scss/_variables.scss";
//Import partials
@import "./_sass/footer.scss";
@import "./_sass/group.scss";
@import "./_sass/header.scss";
@import "./_sass/colors.scss";
@import "./_sass/examples.scss";
@import "./_sass/main.scss";
@import "./_sass/navbar.scss";
@import "./_sass/navigation.scss";
@import "./_sass/search.scss";
| ---
# This ensures Jekyll reads the file to be transformed into CSS later
---
//Import dependencies
@import "../../../scss/_variables.scss";
//Import partials
@import "footer.scss";
@import "group.scss";
@import "header.scss";
@import "colors.scss";
@import "examples.scss";
@import "main.scss";
@import "navbar.scss";
@import "navigation.scss";
@import "search.scss";
| Build automatically with jekyll. Updated partials and dependencies paths | Build automatically with jekyll. Updated partials and dependencies paths
| SCSS | mit | siimple/siimple,jmjuanes/siimple,jmjuanes/siimple,siimple/siimple | scss | ## Code Before:
//Import dependencies
@import "../scss/_variables.scss";
//Import partials
@import "./_sass/footer.scss";
@import "./_sass/group.scss";
@import "./_sass/header.scss";
@import "./_sass/colors.scss";
@import "./_sass/examples.scss";
@import "./_sass/main.scss";
@import "./_sass/navbar.scss";
@import "./_sass/navigation.scss";
@import "./_sass/search.scss";
## Instruction:
Build automatically with jekyll. Updated partials and dependencies paths
## Code After:
---
# This ensures Jekyll reads the file to be transformed into CSS later
---
//Import dependencies
@import "../../../scss/_variables.scss";
//Import partials
@import "footer.scss";
@import "group.scss";
@import "header.scss";
@import "colors.scss";
@import "examples.scss";
@import "main.scss";
@import "navbar.scss";
@import "navigation.scss";
@import "search.scss";
| + ---
+ # This ensures Jekyll reads the file to be transformed into CSS later
+ ---
+
//Import dependencies
- @import "../scss/_variables.scss";
+ @import "../../../scss/_variables.scss";
? ++++++
//Import partials
- @import "./_sass/footer.scss";
? --------
+ @import "footer.scss";
- @import "./_sass/group.scss";
? --------
+ @import "group.scss";
- @import "./_sass/header.scss";
? --------
+ @import "header.scss";
- @import "./_sass/colors.scss";
? --------
+ @import "colors.scss";
- @import "./_sass/examples.scss";
? --------
+ @import "examples.scss";
- @import "./_sass/main.scss";
? --------
+ @import "main.scss";
- @import "./_sass/navbar.scss";
? --------
+ @import "navbar.scss";
- @import "./_sass/navigation.scss";
? --------
+ @import "navigation.scss";
- @import "./_sass/search.scss";
? --------
+ @import "search.scss";
| 24 | 1.714286 | 14 | 10 |
81942914697231b02aee5acfb33f4288245e5529 | Sources/App/main.swift | Sources/App/main.swift | // Server
import Vapor
// Droplet class handles GET/POST (HTTP Verbs) and routes
let drop = Droplet()
// Closure - single parameter for http request
drop.get { request in
// return (an object that converts to response)
return try JSON(node: [
"message": "Hello, Vapor!"
])
}
// route '/hello'
drop.get("hello") { request in
return try JSON(node: [
"message": "Hello, Again!"
])
}
// route '/hello/there'
drop.get("hello", "there") { request in
return try JSON(node: [
"message": "Hello, there!"
])
}
// Parameter based Route
// route '/apples/#'
drop.get("apples", Int.self) { request, apples in
return try JSON(node: [
"message": "Pluck one out, pass it around, \(apples-1) number of apples on the wall..."
])
}
// Post request (use data dictionary to receive data
drop.post("post") { request in
guard let name = request.data["name"]?.string else {
throw Abort.badRequest
}
return try JSON(node: [
"message": "Hello, \(name)!"
])
}
// Run Server
drop.run()
| // Server
import Vapor
// Droplet class handles GET/POST (HTTP Verbs) and routes
let drop = Droplet()
// Closure - single parameter for http request
drop.get { request in
// return (an object that converts to response)
return try JSON(node: [
"message": "Hello, Vapor!"
])
}
// Template route for hello.leaf
drop.get("template") { request in
return try drop.view.make("hello")
}
// route '/hello'
drop.get("hello") { request in
return try JSON(node: [
"message": "Hello, Again!"
])
}
// route '/hello/there'
drop.get("hello", "there") { request in
return try JSON(node: [
"message": "Hello, there!"
])
}
// Parameter based Route
// route '/apples/#'
drop.get("apples", Int.self) { request, apples in
return try JSON(node: [
"message": "Pluck one out, pass it around, \(apples-1) number of apples on the wall..."
])
}
// Post request (use data dictionary to receive data
drop.post("post") { request in
guard let name = request.data["name"]?.string else {
throw Abort.badRequest
}
return try JSON(node: [
"message": "Hello, \(name)!"
])
}
// Run Server
drop.run()
| Set a template route for hello.leaf β "/template" | Set a template route for hello.leaf β "/template"
| Swift | mit | arshinx/Server-Side-Swift | swift | ## Code Before:
// Server
import Vapor
// Droplet class handles GET/POST (HTTP Verbs) and routes
let drop = Droplet()
// Closure - single parameter for http request
drop.get { request in
// return (an object that converts to response)
return try JSON(node: [
"message": "Hello, Vapor!"
])
}
// route '/hello'
drop.get("hello") { request in
return try JSON(node: [
"message": "Hello, Again!"
])
}
// route '/hello/there'
drop.get("hello", "there") { request in
return try JSON(node: [
"message": "Hello, there!"
])
}
// Parameter based Route
// route '/apples/#'
drop.get("apples", Int.self) { request, apples in
return try JSON(node: [
"message": "Pluck one out, pass it around, \(apples-1) number of apples on the wall..."
])
}
// Post request (use data dictionary to receive data
drop.post("post") { request in
guard let name = request.data["name"]?.string else {
throw Abort.badRequest
}
return try JSON(node: [
"message": "Hello, \(name)!"
])
}
// Run Server
drop.run()
## Instruction:
Set a template route for hello.leaf β "/template"
## Code After:
// Server
import Vapor
// Droplet class handles GET/POST (HTTP Verbs) and routes
let drop = Droplet()
// Closure - single parameter for http request
drop.get { request in
// return (an object that converts to response)
return try JSON(node: [
"message": "Hello, Vapor!"
])
}
// Template route for hello.leaf
drop.get("template") { request in
return try drop.view.make("hello")
}
// route '/hello'
drop.get("hello") { request in
return try JSON(node: [
"message": "Hello, Again!"
])
}
// route '/hello/there'
drop.get("hello", "there") { request in
return try JSON(node: [
"message": "Hello, there!"
])
}
// Parameter based Route
// route '/apples/#'
drop.get("apples", Int.self) { request, apples in
return try JSON(node: [
"message": "Pluck one out, pass it around, \(apples-1) number of apples on the wall..."
])
}
// Post request (use data dictionary to receive data
drop.post("post") { request in
guard let name = request.data["name"]?.string else {
throw Abort.badRequest
}
return try JSON(node: [
"message": "Hello, \(name)!"
])
}
// Run Server
drop.run()
| // Server
import Vapor
// Droplet class handles GET/POST (HTTP Verbs) and routes
let drop = Droplet()
// Closure - single parameter for http request
drop.get { request in
// return (an object that converts to response)
return try JSON(node: [
"message": "Hello, Vapor!"
])
+ }
+
+ // Template route for hello.leaf
+ drop.get("template") { request in
+ return try drop.view.make("hello")
}
// route '/hello'
drop.get("hello") { request in
return try JSON(node: [
"message": "Hello, Again!"
])
}
// route '/hello/there'
drop.get("hello", "there") { request in
return try JSON(node: [
"message": "Hello, there!"
])
}
// Parameter based Route
// route '/apples/#'
drop.get("apples", Int.self) { request, apples in
return try JSON(node: [
"message": "Pluck one out, pass it around, \(apples-1) number of apples on the wall..."
])
}
// Post request (use data dictionary to receive data
drop.post("post") { request in
guard let name = request.data["name"]?.string else {
throw Abort.badRequest
}
return try JSON(node: [
"message": "Hello, \(name)!"
])
}
// Run Server
drop.run() | 5 | 0.092593 | 5 | 0 |
5a84249b7e96d9d2f82ee1b27a33b7978d63b16e | src/urls.py | src/urls.py |
try:
from django.conf.urls import patterns, include, url
except ImportError: # pragma: no cover
# for Django version less than 1.4
from django.conf.urls.defaults import patterns, include, url
from django.contrib import admin
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
import wirecloud.platform.urls
admin.autodiscover()
urlpatterns = patterns('',
# Showcase
(r'^showcase/', include('wirecloud.platform.widget.showcase_urls')),
# Catalogue
(r'^catalogue', include('wirecloud.catalogue.urls')),
# Proxy
(r'^proxy', include('wirecloud.proxy.urls')),
# Login/logout
url(r'^login/?$', 'django.contrib.auth.views.login', name="login"),
url(r'^logout/?$', 'wirecloud.commons.authentication.logout', name="logout"),
url(r'^admin/logout/?$', 'wirecloud.commons.authentication.logout'),
# Admin interface
(r'^admin/', include(admin.site.urls)),
)
urlpatterns += wirecloud.platform.urls.urlpatterns
urlpatterns += staticfiles_urlpatterns()
handler404 = "django.views.defaults.page_not_found"
handler500 = "wirecloud.commons.views.server_error"
|
from django.conf.urls import patterns, include, url
from django.contrib import admin
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
import wirecloud.platform.urls
admin.autodiscover()
urlpatterns = patterns('',
# Showcase
(r'^showcase/', include('wirecloud.platform.widget.showcase_urls')),
# Catalogue
(r'^catalogue', include('wirecloud.catalogue.urls')),
# Proxy
(r'^proxy', include('wirecloud.proxy.urls')),
# Login/logout
url(r'^login/?$', 'django.contrib.auth.views.login', name="login"),
url(r'^logout/?$', 'wirecloud.commons.authentication.logout', name="logout"),
url(r'^admin/logout/?$', 'wirecloud.commons.authentication.logout'),
# Admin interface
(r'^admin/', include(admin.site.urls)),
)
urlpatterns += wirecloud.platform.urls.urlpatterns
urlpatterns += staticfiles_urlpatterns()
handler404 = "django.views.defaults.page_not_found"
handler500 = "wirecloud.commons.views.server_error"
| Remove django < 1.4 code | Remove django < 1.4 code
| Python | agpl-3.0 | rockneurotiko/wirecloud,jpajuelo/wirecloud,jpajuelo/wirecloud,rockneurotiko/wirecloud,rockneurotiko/wirecloud,jpajuelo/wirecloud,jpajuelo/wirecloud,rockneurotiko/wirecloud | python | ## Code Before:
try:
from django.conf.urls import patterns, include, url
except ImportError: # pragma: no cover
# for Django version less than 1.4
from django.conf.urls.defaults import patterns, include, url
from django.contrib import admin
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
import wirecloud.platform.urls
admin.autodiscover()
urlpatterns = patterns('',
# Showcase
(r'^showcase/', include('wirecloud.platform.widget.showcase_urls')),
# Catalogue
(r'^catalogue', include('wirecloud.catalogue.urls')),
# Proxy
(r'^proxy', include('wirecloud.proxy.urls')),
# Login/logout
url(r'^login/?$', 'django.contrib.auth.views.login', name="login"),
url(r'^logout/?$', 'wirecloud.commons.authentication.logout', name="logout"),
url(r'^admin/logout/?$', 'wirecloud.commons.authentication.logout'),
# Admin interface
(r'^admin/', include(admin.site.urls)),
)
urlpatterns += wirecloud.platform.urls.urlpatterns
urlpatterns += staticfiles_urlpatterns()
handler404 = "django.views.defaults.page_not_found"
handler500 = "wirecloud.commons.views.server_error"
## Instruction:
Remove django < 1.4 code
## Code After:
from django.conf.urls import patterns, include, url
from django.contrib import admin
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
import wirecloud.platform.urls
admin.autodiscover()
urlpatterns = patterns('',
# Showcase
(r'^showcase/', include('wirecloud.platform.widget.showcase_urls')),
# Catalogue
(r'^catalogue', include('wirecloud.catalogue.urls')),
# Proxy
(r'^proxy', include('wirecloud.proxy.urls')),
# Login/logout
url(r'^login/?$', 'django.contrib.auth.views.login', name="login"),
url(r'^logout/?$', 'wirecloud.commons.authentication.logout', name="logout"),
url(r'^admin/logout/?$', 'wirecloud.commons.authentication.logout'),
# Admin interface
(r'^admin/', include(admin.site.urls)),
)
urlpatterns += wirecloud.platform.urls.urlpatterns
urlpatterns += staticfiles_urlpatterns()
handler404 = "django.views.defaults.page_not_found"
handler500 = "wirecloud.commons.views.server_error"
|
- try:
- from django.conf.urls import patterns, include, url
? ----
+ from django.conf.urls import patterns, include, url
- except ImportError: # pragma: no cover
- # for Django version less than 1.4
- from django.conf.urls.defaults import patterns, include, url
from django.contrib import admin
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
import wirecloud.platform.urls
admin.autodiscover()
urlpatterns = patterns('',
# Showcase
(r'^showcase/', include('wirecloud.platform.widget.showcase_urls')),
# Catalogue
(r'^catalogue', include('wirecloud.catalogue.urls')),
# Proxy
(r'^proxy', include('wirecloud.proxy.urls')),
# Login/logout
url(r'^login/?$', 'django.contrib.auth.views.login', name="login"),
url(r'^logout/?$', 'wirecloud.commons.authentication.logout', name="logout"),
url(r'^admin/logout/?$', 'wirecloud.commons.authentication.logout'),
# Admin interface
(r'^admin/', include(admin.site.urls)),
)
urlpatterns += wirecloud.platform.urls.urlpatterns
urlpatterns += staticfiles_urlpatterns()
handler404 = "django.views.defaults.page_not_found"
handler500 = "wirecloud.commons.views.server_error" | 6 | 0.157895 | 1 | 5 |
28e51aed252145ae2eb6764eb6aa594dd9380acb | templates/items.html | templates/items.html | {% extends "base.html" %}
{% block content %}
<div class="row">
<div class="col-sm-6 col-md-4">
<div class="thumbnail" style="width:200px">
<img src="{{ url_for('static', filename='images/noimage.png') }}" alt="..." width="140px">
<div class="caption">
<strong>Thumbnail label</strong>
<p>Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.</p>
<p><a href="#" class="btn btn-primary" role="button">Button</a> <a href="#" class="btn btn-default" role="button">Button</a></p>
</div>
</div>
</div>
</div>
<script type="text/javascript" charset="utf-8">
</script>
{% endblock %}
<!--
<div class="row">
<div class="col-sm-6 col-md-4">
<div class="thumbnail" style="width:200px">
<img src="{{ url_for('static', filename='images/noimage.png') }}" alt="..." width="140px">
<div class="caption">
<strong>Thumbnail label</strong>
<p>Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.</p>
<p><a href="#" class="btn btn-primary" role="button">Button</a> <a href="#" class="btn btn-default" role="button">Button</a></p>
</div>
</div>
</div>
</div>
<script type="text/javascript" charset="utf-8">
</script>
-->
| {% extends "base.html" %}
{% block content %}
<div class="panel panel-info">
<div class="panel-heading">{{item.name}}</div>
<div class="panel-body">
<div class="media">
<div class="media-left media-top">
{%- if item.image_path and item.image_path|length > 0 -%}
<img class="media-object" src="{{ url_for('static', filename=item.image_path) }}" width="140">
{%- else -%}
<img class="media-object" src="{{ url_for('static', filename='images/noimage.png') }}" width="140">
{%- endif -%}
<br>
</div>
<div class="media-body">
<p>{{item.description}}</p>
</div>
<div class="panel-footer">
<button type="button" class="btn btn-danger">
<span class="glyphicon glyphicon-trash" aria-hidden="true"></span> Delete
</button>
<button type="button" class="btn btn-primary">
<span class="glyphicon glyphicon-pencil" aria-hidden="true"></span> Edit
</button>
</div>
</div>
</div>
</div>
{% endblock %} | Format to display each item | feat: Format to display each item
| HTML | mit | aristoteles-nunez/Item-Catalog,aristoteles-nunez/Item-Catalog,aristoteles-nunez/Item-Catalog | html | ## Code Before:
{% extends "base.html" %}
{% block content %}
<div class="row">
<div class="col-sm-6 col-md-4">
<div class="thumbnail" style="width:200px">
<img src="{{ url_for('static', filename='images/noimage.png') }}" alt="..." width="140px">
<div class="caption">
<strong>Thumbnail label</strong>
<p>Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.</p>
<p><a href="#" class="btn btn-primary" role="button">Button</a> <a href="#" class="btn btn-default" role="button">Button</a></p>
</div>
</div>
</div>
</div>
<script type="text/javascript" charset="utf-8">
</script>
{% endblock %}
<!--
<div class="row">
<div class="col-sm-6 col-md-4">
<div class="thumbnail" style="width:200px">
<img src="{{ url_for('static', filename='images/noimage.png') }}" alt="..." width="140px">
<div class="caption">
<strong>Thumbnail label</strong>
<p>Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.</p>
<p><a href="#" class="btn btn-primary" role="button">Button</a> <a href="#" class="btn btn-default" role="button">Button</a></p>
</div>
</div>
</div>
</div>
<script type="text/javascript" charset="utf-8">
</script>
-->
## Instruction:
feat: Format to display each item
## Code After:
{% extends "base.html" %}
{% block content %}
<div class="panel panel-info">
<div class="panel-heading">{{item.name}}</div>
<div class="panel-body">
<div class="media">
<div class="media-left media-top">
{%- if item.image_path and item.image_path|length > 0 -%}
<img class="media-object" src="{{ url_for('static', filename=item.image_path) }}" width="140">
{%- else -%}
<img class="media-object" src="{{ url_for('static', filename='images/noimage.png') }}" width="140">
{%- endif -%}
<br>
</div>
<div class="media-body">
<p>{{item.description}}</p>
</div>
<div class="panel-footer">
<button type="button" class="btn btn-danger">
<span class="glyphicon glyphicon-trash" aria-hidden="true"></span> Delete
</button>
<button type="button" class="btn btn-primary">
<span class="glyphicon glyphicon-pencil" aria-hidden="true"></span> Edit
</button>
</div>
</div>
</div>
</div>
{% endblock %} | {% extends "base.html" %}
{% block content %}
- <div class="row">
- <div class="col-sm-6 col-md-4">
- <div class="thumbnail" style="width:200px">
+ <div class="panel panel-info">
+ <div class="panel-heading">{{item.name}}</div>
+ <div class="panel-body">
+ <div class="media">
+ <div class="media-left media-top">
+ {%- if item.image_path and item.image_path|length > 0 -%}
+ <img class="media-object" src="{{ url_for('static', filename=item.image_path) }}" width="140">
+ {%- else -%}
- <img src="{{ url_for('static', filename='images/noimage.png') }}" alt="..." width="140px">
? ---------- --
+ <img class="media-object" src="{{ url_for('static', filename='images/noimage.png') }}" width="140">
? ++++++++++ +++++++++++++++++++++
- <div class="caption">
- <strong>Thumbnail label</strong>
- <p>Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.</p>
- <p><a href="#" class="btn btn-primary" role="button">Button</a> <a href="#" class="btn btn-default" role="button">Button</a></p>
+ {%- endif -%}
+ <br>
+ </div>
+ <div class="media-body">
+ <p>{{item.description}}</p>
+ </div>
+ <div class="panel-footer">
+ <button type="button" class="btn btn-danger">
+ <span class="glyphicon glyphicon-trash" aria-hidden="true"></span> Delete
+ </button>
+ <button type="button" class="btn btn-primary">
+ <span class="glyphicon glyphicon-pencil" aria-hidden="true"></span> Edit
+ </button>
+
+
+ </div>
- </div>
+ </div>
? ++
</div>
- </div>
+
</div>
- <script type="text/javascript" charset="utf-8">
- </script>
{% endblock %}
-
-
-
- <!--
- <div class="row">
- <div class="col-sm-6 col-md-4">
- <div class="thumbnail" style="width:200px">
- <img src="{{ url_for('static', filename='images/noimage.png') }}" alt="..." width="140px">
- <div class="caption">
- <strong>Thumbnail label</strong>
- <p>Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.</p>
- <p><a href="#" class="btn btn-primary" role="button">Button</a> <a href="#" class="btn btn-default" role="button">Button</a></p>
- </div>
- </div>
- </div>
- </div>
- <script type="text/javascript" charset="utf-8">
- </script>
- --> | 58 | 1.487179 | 27 | 31 |
cc4994b19207a871d9e39f9e3be063f523faf815 | cookbooks/sys_dns/recipes/do_set_public.rb | cookbooks/sys_dns/recipes/do_set_public.rb |
sys_dns "default" do
id node['sys_dns']['id']
address node['cloud']['public_ips'][0]
action :set_public
end |
if ! node.has_key?('cloud')
public_ip=`curl -s http://icanhazip.com/`.strip
log "Detected public IP: #{public_ip}"
else
public_ip = node['cloud']['public_ips'][0]
end
sys_dns "default" do
id node['sys_dns']['id']
address public_ip
action :set_public
end | Add support for icanhazip.com when no cloud attribute is available. | Add support for icanhazip.com when no cloud attribute is available.
| Ruby | mit | Promoboxx/cookbooks_public,Promoboxx/cookbooks_public,Promoboxx/cookbooks_public | ruby | ## Code Before:
sys_dns "default" do
id node['sys_dns']['id']
address node['cloud']['public_ips'][0]
action :set_public
end
## Instruction:
Add support for icanhazip.com when no cloud attribute is available.
## Code After:
if ! node.has_key?('cloud')
public_ip=`curl -s http://icanhazip.com/`.strip
log "Detected public IP: #{public_ip}"
else
public_ip = node['cloud']['public_ips'][0]
end
sys_dns "default" do
id node['sys_dns']['id']
address public_ip
action :set_public
end | +
+ if ! node.has_key?('cloud')
+ public_ip=`curl -s http://icanhazip.com/`.strip
+ log "Detected public IP: #{public_ip}"
+ else
+ public_ip = node['cloud']['public_ips'][0]
+ end
sys_dns "default" do
id node['sys_dns']['id']
- address node['cloud']['public_ips'][0]
+ address public_ip
action :set_public
end | 9 | 1.5 | 8 | 1 |
e1aa51a468662a54a17020404f3e46e237e375ae | src_trunk/resources/realism-system/c_running.lua | src_trunk/resources/realism-system/c_running.lua | local run = 0
local down = 0
addEventHandler( "onClientPreRender", getRootElement(),
function( slice )
if getControlState( "sprint" ) or down > 0 then
run = run + slice
if run >= 40000 then
if isPedOnGround( getLocalPlayer( ) ) then
exports.global:applyAnimation(getLocalPlayer(), "FAT", "idle_tired", 5000, true, false, true)
run = 19000
else
toggleControl( 'sprint', false )
setTimer( toggleControl, 5000, 1, 'sprint', true )
end
end
if not getControlState( "sprint" ) then
down = math.max( 0, down - slice )
else
down = 500
end
else
if run > 0 then
run = math.max( 0, run - math.ceil( slice / 3 ) )
end
end
end
) | local run = 0
local down = 0
addEventHandler( "onClientPreRender", getRootElement(),
function( slice )
if getControlState( "sprint" ) or down > 0 then
run = run + slice
if run >= 40000 then
if isPedOnGround( getLocalPlayer( ) ) then
exports.global:applyAnimation(getLocalPlayer(), "FAT", "idle_tired", 5000, true, false, true)
run = 19000
else
toggleControl( 'sprint', false )
setTimer( toggleControl, 5000, 1, 'sprint', true )
end
local health = getElementHealth(getLocalPlayer())
setElementHealth(getLocalPlayer(), health-5)
end
if not getControlState( "sprint" ) then
down = math.max( 0, down - slice )
else
down = 500
end
else
if run > 0 then
run = math.max( 0, run - math.ceil( slice / 3 ) )
end
end
end
) | Make charachters health decrease very slightly everytime they bend over out of breath from running. | 0001430: Make charachters health decrease very slightly everytime they bend over out of breath from running.
git-svn-id: 8769cb08482c9977c94b72b8e184ec7d2197f4f7@1973 64450a49-1f69-0410-a0a2-f5ebb52c4f5b
| Lua | bsd-3-clause | valhallaGaming/uno,valhallaGaming/uno,valhallaGaming/uno | lua | ## Code Before:
local run = 0
local down = 0
addEventHandler( "onClientPreRender", getRootElement(),
function( slice )
if getControlState( "sprint" ) or down > 0 then
run = run + slice
if run >= 40000 then
if isPedOnGround( getLocalPlayer( ) ) then
exports.global:applyAnimation(getLocalPlayer(), "FAT", "idle_tired", 5000, true, false, true)
run = 19000
else
toggleControl( 'sprint', false )
setTimer( toggleControl, 5000, 1, 'sprint', true )
end
end
if not getControlState( "sprint" ) then
down = math.max( 0, down - slice )
else
down = 500
end
else
if run > 0 then
run = math.max( 0, run - math.ceil( slice / 3 ) )
end
end
end
)
## Instruction:
0001430: Make charachters health decrease very slightly everytime they bend over out of breath from running.
git-svn-id: 8769cb08482c9977c94b72b8e184ec7d2197f4f7@1973 64450a49-1f69-0410-a0a2-f5ebb52c4f5b
## Code After:
local run = 0
local down = 0
addEventHandler( "onClientPreRender", getRootElement(),
function( slice )
if getControlState( "sprint" ) or down > 0 then
run = run + slice
if run >= 40000 then
if isPedOnGround( getLocalPlayer( ) ) then
exports.global:applyAnimation(getLocalPlayer(), "FAT", "idle_tired", 5000, true, false, true)
run = 19000
else
toggleControl( 'sprint', false )
setTimer( toggleControl, 5000, 1, 'sprint', true )
end
local health = getElementHealth(getLocalPlayer())
setElementHealth(getLocalPlayer(), health-5)
end
if not getControlState( "sprint" ) then
down = math.max( 0, down - slice )
else
down = 500
end
else
if run > 0 then
run = math.max( 0, run - math.ceil( slice / 3 ) )
end
end
end
) | local run = 0
local down = 0
addEventHandler( "onClientPreRender", getRootElement(),
function( slice )
if getControlState( "sprint" ) or down > 0 then
run = run + slice
if run >= 40000 then
if isPedOnGround( getLocalPlayer( ) ) then
exports.global:applyAnimation(getLocalPlayer(), "FAT", "idle_tired", 5000, true, false, true)
run = 19000
else
toggleControl( 'sprint', false )
setTimer( toggleControl, 5000, 1, 'sprint', true )
end
+
+ local health = getElementHealth(getLocalPlayer())
+ setElementHealth(getLocalPlayer(), health-5)
end
if not getControlState( "sprint" ) then
down = math.max( 0, down - slice )
else
down = 500
end
else
if run > 0 then
run = math.max( 0, run - math.ceil( slice / 3 ) )
end
end
end
) | 3 | 0.107143 | 3 | 0 |
219815075110c2feeeed7373351114988ef8c730 | docker-compose.yml | docker-compose.yml | app:
build: .
links:
- elasticsearch:elasticsearch
elasticsearch:
image: elasticsearch:5.1.2
ports:
- "9200:9200"
- "9300:9300"
kibana:
image: kibana:5.1.2
ports:
- "5601:5601"
links:
- elasticsearch:elasticsearch
| app:
build: .
volumes:
- ./docker/volume:/watcher
links:
- elasticsearch:elasticsearch
elasticsearch:
image: elasticsearch:5.1.2
ports:
- "9200:9200"
- "9300:9300"
kibana:
image: kibana:5.1.2
ports:
- "5601:5601"
links:
- elasticsearch:elasticsearch
| Add a volume into docker container to hold the watch.json file | Add a volume into docker container to hold the watch.json file
| YAML | mit | jeancsil/flight-spy,jeancsil/flight-spy,jeancsil/flight-spy | yaml | ## Code Before:
app:
build: .
links:
- elasticsearch:elasticsearch
elasticsearch:
image: elasticsearch:5.1.2
ports:
- "9200:9200"
- "9300:9300"
kibana:
image: kibana:5.1.2
ports:
- "5601:5601"
links:
- elasticsearch:elasticsearch
## Instruction:
Add a volume into docker container to hold the watch.json file
## Code After:
app:
build: .
volumes:
- ./docker/volume:/watcher
links:
- elasticsearch:elasticsearch
elasticsearch:
image: elasticsearch:5.1.2
ports:
- "9200:9200"
- "9300:9300"
kibana:
image: kibana:5.1.2
ports:
- "5601:5601"
links:
- elasticsearch:elasticsearch
| app:
build: .
+ volumes:
+ - ./docker/volume:/watcher
links:
- elasticsearch:elasticsearch
elasticsearch:
image: elasticsearch:5.1.2
ports:
- "9200:9200"
- "9300:9300"
kibana:
image: kibana:5.1.2
ports:
- "5601:5601"
links:
- elasticsearch:elasticsearch | 2 | 0.117647 | 2 | 0 |
892b14ffd2d4ce788461dbc61b4480a15585206b | lib/react/jsx/template.rb | lib/react/jsx/template.rb | module React
module JSX
class Template < Tilt::Template
self.default_mime_type = 'application/javascript'
def prepare
end
def evaluate(scopre, locals, &block)
@output ||= JSX::transform(data)
end
end
end
end
| require 'tilt'
module React
module JSX
class Template < Tilt::Template
self.default_mime_type = 'application/javascript'
def prepare
end
def evaluate(scopre, locals, &block)
@output ||= JSX::transform(data)
end
end
end
end
| Fix uninitialized constant React::JSX::Tilt in 3.2.x | Fix uninitialized constant React::JSX::Tilt in 3.2.x
| Ruby | apache-2.0 | ximus/react-rails,Bunlong/react-rails,digideskio/react-rails,PritiKumr/react-rails,masarakki/react-rails,Heyzap/react-rails,Bunlong/react-rails,eins78/react-rails,mipearson/webpack-react-rails,ashrestha91/react-rails,tingi/react-rails,ximus/react-rails,eins78/react-rails,a2ikm/react-rails,vipulnsward/react-rails,LytayTOUCH/react-rails,dv/react-rails,mikesea/react-rails,CarLingo/react-rails,Heyzap/react-rails,rubixware/react-rails,smd686s/react-rails,gbanis/react-rails,agileurbanite/react-rails,suzan2go/react-rails,reactjs/react-rails,zhangsoledad/react-rails,goodreads/react-rails,rubixware/react-rails,suzan2go/react-rails,avifoxi/react-rails,ipmobiletech/react-rails,ipmobiletech/react-rails,tingi/react-rails,dexcodeinc/react-rails,aratak/react-rails,yakovenkodenis/react-rails,zires/react-rails,masarakki/react-rails,digideskio/react-rails,gbanis/react-rails,mezine/react-rails,mipearson/webpack-react-rails,michaelachrisco/react-rails,justin808/react-rails,dexcodeinc/react-rails,reacuna/react-rails,glittershark/react-rails,ximus/react-rails,a2ikm/react-rails,mezine/react-rails,reactjs/react-rails,ashrestha91/react-rails,CarLingo/react-rails,towry/react-rails,agileurbanite/react-rails,rubixware/react-rails,PritiKumr/react-rails,pthrasher/react-rails,dv/react-rails,ashrestha91/react-rails,reactjs/react-rails,PritiKumr/react-rails,yakovenkodenis/react-rails,gbanis/react-rails,catprintlabs/react-rails,samwgoldman/react-rails,catprintlabs/react-rails,reactjs/react-rails,reacuna/react-rails,smd686s/react-rails,aratak/react-rails,a2ikm/react-rails,yakovenkodenis/react-rails,justin808/react-rails,goodreads/react-rails,producthunt/react-rails,garbles/react-rails,mxaly/react-rails,michaelachrisco/react-rails,mholubowski/react-rails,appslingr/react-lite-rails,mikesea/react-rails,mholubowski/react-rails,LeeChSien/react-rails,michaelachrisco/react-rails,stevestmartin/react-rails,ipmobiletech/react-rails,pthrasher/react-rails,masarakki/react-rails,pthrasher/react-rails,smd686s/react-rails,producthunt/react-rails,tingi/react-rails,reacuna/react-rails,mezine/react-rails,LeeChSien/react-rails,zires/react-rails,stevestmartin/react-rails,glittershark/react-rails,stevestmartin/react-rails,towry/react-rails,Bunlong/react-rails,zires/react-rails,eins78/react-rails,samwgoldman/react-rails,CarLingo/react-rails,mxaly/react-rails,Heyzap/react-rails,digideskio/react-rails,mipearson/webpack-react-rails,LeeChSien/react-rails,mholubowski/react-rails,garbles/react-rails,samwgoldman/react-rails,zhangsoledad/react-rails,producthunt/react-rails,Widdershin/react-rails,aratak/react-rails,mxaly/react-rails,suzan2go/react-rails,LytayTOUCH/react-rails,justin808/react-rails,agileurbanite/react-rails,vipulnsward/react-rails,avifoxi/react-rails,catprintlabs/react-rails,dexcodeinc/react-rails,Widdershin/react-rails,towry/react-rails,avifoxi/react-rails,vipulnsward/react-rails,mikesea/react-rails,appslingr/react-lite-rails,goodreads/react-rails,Widdershin/react-rails,appslingr/react-lite-rails,zhangsoledad/react-rails,LytayTOUCH/react-rails,dv/react-rails | ruby | ## Code Before:
module React
module JSX
class Template < Tilt::Template
self.default_mime_type = 'application/javascript'
def prepare
end
def evaluate(scopre, locals, &block)
@output ||= JSX::transform(data)
end
end
end
end
## Instruction:
Fix uninitialized constant React::JSX::Tilt in 3.2.x
## Code After:
require 'tilt'
module React
module JSX
class Template < Tilt::Template
self.default_mime_type = 'application/javascript'
def prepare
end
def evaluate(scopre, locals, &block)
@output ||= JSX::transform(data)
end
end
end
end
| + require 'tilt'
+
module React
module JSX
class Template < Tilt::Template
self.default_mime_type = 'application/javascript'
def prepare
end
def evaluate(scopre, locals, &block)
@output ||= JSX::transform(data)
end
end
end
end | 2 | 0.133333 | 2 | 0 |
dad0a01b51fa42e6baa311c23322a45b39cccce9 | web_tests/worker.js | web_tests/worker.js | importScripts('../dist/yatern.js');
addEventListener('message', function (e) {
var data = e.data;
//console.log(e.data.code);
var t1 = (new Date).getTime();
var gObject = YAtern.analyze(e.data.code);
var t2 = (new Date).getTime();
console.log("Time spent: " + (t2 - t1));
var message = {};
var typeNames = '';
var propNames = '';
var types = gObject.getProp('x').types;
for (var i = 0; i < types.length; i++) {
typeNames += types[i].name + '\n';
if (types[i].props) {
propNames += Object.getOwnPropertyNames(types[i].props) + '\n';
}
}
message.typeNames = typeNames;
message.propNames = propNames;
postMessage(message);
});
| importScripts('../dist/yatern.js');
addEventListener('message', function (e) {
var t1 = (new Date).getTime();
var gObject = YAtern.analyze(e.data.code);
var t2 = (new Date).getTime();
console.log("Time spent: " + (t2 - t1));
var message = {};
var typeNames = '';
var propNames = '';
var types = gObject.getProp('x').types;
types.forEach(function (type) {
typeNames += type.name + ', ';
if (type.props) {
type.props.forEach(function (value, key) {
propNames += key + ', ';
});
}
});
message.typeNames = typeNames;
message.propNames = propNames;
postMessage(message);
});
| Adjust web_tests for Map and Set data structure. | [TASK] Adjust web_tests for Map and Set data structure.
| JavaScript | apache-2.0 | webida/calcium,happibum/yatern,webida/yatern,happibum/calcium,happibum/yatern,webida/calcium,happibum/calcium,webida/yatern | javascript | ## Code Before:
importScripts('../dist/yatern.js');
addEventListener('message', function (e) {
var data = e.data;
//console.log(e.data.code);
var t1 = (new Date).getTime();
var gObject = YAtern.analyze(e.data.code);
var t2 = (new Date).getTime();
console.log("Time spent: " + (t2 - t1));
var message = {};
var typeNames = '';
var propNames = '';
var types = gObject.getProp('x').types;
for (var i = 0; i < types.length; i++) {
typeNames += types[i].name + '\n';
if (types[i].props) {
propNames += Object.getOwnPropertyNames(types[i].props) + '\n';
}
}
message.typeNames = typeNames;
message.propNames = propNames;
postMessage(message);
});
## Instruction:
[TASK] Adjust web_tests for Map and Set data structure.
## Code After:
importScripts('../dist/yatern.js');
addEventListener('message', function (e) {
var t1 = (new Date).getTime();
var gObject = YAtern.analyze(e.data.code);
var t2 = (new Date).getTime();
console.log("Time spent: " + (t2 - t1));
var message = {};
var typeNames = '';
var propNames = '';
var types = gObject.getProp('x').types;
types.forEach(function (type) {
typeNames += type.name + ', ';
if (type.props) {
type.props.forEach(function (value, key) {
propNames += key + ', ';
});
}
});
message.typeNames = typeNames;
message.propNames = propNames;
postMessage(message);
});
| importScripts('../dist/yatern.js');
addEventListener('message', function (e) {
- var data = e.data;
- //console.log(e.data.code);
var t1 = (new Date).getTime();
var gObject = YAtern.analyze(e.data.code);
var t2 = (new Date).getTime();
console.log("Time spent: " + (t2 - t1));
var message = {};
var typeNames = '';
var propNames = '';
var types = gObject.getProp('x').types;
- for (var i = 0; i < types.length; i++) {
+
+ types.forEach(function (type) {
- typeNames += types[i].name + '\n';
? ---- ^^
+ typeNames += type.name + ', ';
? ^^
- if (types[i].props) {
? ----
+ if (type.props) {
- propNames += Object.getOwnPropertyNames(types[i].props) + '\n';
+ type.props.forEach(function (value, key) {
+ propNames += key + ', ';
+ });
}
- }
+ });
? ++
message.typeNames = typeNames;
message.propNames = propNames;
postMessage(message);
}); | 15 | 0.555556 | 8 | 7 |
fb0f1f54746dbc905f839bed53bc5f3ab0f29282 | app/models/task.coffee | app/models/task.coffee | Spine = require('spine')
class window.Task extends Spine.Model
# Set model properties
@configure 'Task',
'name',
'date',
'notes',
'completed',
'priority',
'list'
@extend @Local
@active: (list) =>
@select (task) ->
!task.completed and (if list then (task.list is list) else yes)
@completed: (list) =>
@select (task) ->
task.completed and (task.list is list if list)
@list: (listId) =>
return [] unless listId
if listId is "all" then return @byPriority()
@byPriority().filter (task) ->
task.list is listId
@byPriority: ->
@all().sort (a, b) ->
diff = a.priority - b.priority
if diff is 0
# If the priorities are the same
# then sort by name
b.name.localeCompare(a.name)
else diff
@filter: (query) ->
return all() unless query
query = query.toLowerCase()
@select (item) ->
item.name?.toLowerCase().indexOf(query) > -1
@tag: (tag) ->
return [] unless tag
tag = tag.toLowerCase()
@select (item) ->
item.name?.toLowerCase().indexOf('#'+tag) > -1
module.exports = Task
| Spine = require('spine')
class window.Task extends Spine.Model
# Set model properties
@configure 'Task',
'name',
'date',
'notes',
'completed',
'priority',
'list'
@extend @Local
@active: (list) =>
@select (task) ->
!task.completed and (if list then (task.list is list) else yes)
@completed: (list) =>
@select (task) ->
task.completed and (task.list is list if list)
@list: (listId) =>
return [] unless listId
if listId is "all" then return @byPriority()
@byPriority().filter (task) ->
task.list is listId
@byPriority: ->
@all().sort (a, b) ->
diff = a.priority - b.priority
if diff is 0
# If the priorities are the same
# then sort by name
b.name.localeCompare(a.name)
else diff
@filter: (query) ->
return all() unless query
query = query.toLowerCase().split(" ")
results = []
@select (item) ->
matches = yes
for word in query
regex = new RegExp(word, "i")
if not item.name?.match(regex) then matches = no
results.push(item) unless matches is no
return results
@tag: (tag) ->
return [] unless tag
tag = tag.toLowerCase()
@select (item) ->
item.name?.toLowerCase().indexOf('#'+tag) > -1
module.exports = Task
| Make search better by ignoring word order | Make search better by ignoring word order
| CoffeeScript | unknown | nitrotasks/nitro,nitrotasks/nitro,CaffeinatedCode/nitro | coffeescript | ## Code Before:
Spine = require('spine')
class window.Task extends Spine.Model
# Set model properties
@configure 'Task',
'name',
'date',
'notes',
'completed',
'priority',
'list'
@extend @Local
@active: (list) =>
@select (task) ->
!task.completed and (if list then (task.list is list) else yes)
@completed: (list) =>
@select (task) ->
task.completed and (task.list is list if list)
@list: (listId) =>
return [] unless listId
if listId is "all" then return @byPriority()
@byPriority().filter (task) ->
task.list is listId
@byPriority: ->
@all().sort (a, b) ->
diff = a.priority - b.priority
if diff is 0
# If the priorities are the same
# then sort by name
b.name.localeCompare(a.name)
else diff
@filter: (query) ->
return all() unless query
query = query.toLowerCase()
@select (item) ->
item.name?.toLowerCase().indexOf(query) > -1
@tag: (tag) ->
return [] unless tag
tag = tag.toLowerCase()
@select (item) ->
item.name?.toLowerCase().indexOf('#'+tag) > -1
module.exports = Task
## Instruction:
Make search better by ignoring word order
## Code After:
Spine = require('spine')
class window.Task extends Spine.Model
# Set model properties
@configure 'Task',
'name',
'date',
'notes',
'completed',
'priority',
'list'
@extend @Local
@active: (list) =>
@select (task) ->
!task.completed and (if list then (task.list is list) else yes)
@completed: (list) =>
@select (task) ->
task.completed and (task.list is list if list)
@list: (listId) =>
return [] unless listId
if listId is "all" then return @byPriority()
@byPriority().filter (task) ->
task.list is listId
@byPriority: ->
@all().sort (a, b) ->
diff = a.priority - b.priority
if diff is 0
# If the priorities are the same
# then sort by name
b.name.localeCompare(a.name)
else diff
@filter: (query) ->
return all() unless query
query = query.toLowerCase().split(" ")
results = []
@select (item) ->
matches = yes
for word in query
regex = new RegExp(word, "i")
if not item.name?.match(regex) then matches = no
results.push(item) unless matches is no
return results
@tag: (tag) ->
return [] unless tag
tag = tag.toLowerCase()
@select (item) ->
item.name?.toLowerCase().indexOf('#'+tag) > -1
module.exports = Task
| Spine = require('spine')
class window.Task extends Spine.Model
# Set model properties
@configure 'Task',
'name',
'date',
'notes',
'completed',
'priority',
'list'
@extend @Local
@active: (list) =>
@select (task) ->
!task.completed and (if list then (task.list is list) else yes)
@completed: (list) =>
@select (task) ->
task.completed and (task.list is list if list)
@list: (listId) =>
return [] unless listId
if listId is "all" then return @byPriority()
@byPriority().filter (task) ->
task.list is listId
@byPriority: ->
@all().sort (a, b) ->
diff = a.priority - b.priority
if diff is 0
# If the priorities are the same
# then sort by name
b.name.localeCompare(a.name)
else diff
@filter: (query) ->
return all() unless query
- query = query.toLowerCase()
+ query = query.toLowerCase().split(" ")
? +++++++++++
+ results = []
@select (item) ->
- item.name?.toLowerCase().indexOf(query) > -1
+ matches = yes
+ for word in query
+ regex = new RegExp(word, "i")
+ if not item.name?.match(regex) then matches = no
+ results.push(item) unless matches is no
+ return results
@tag: (tag) ->
return [] unless tag
tag = tag.toLowerCase()
@select (item) ->
item.name?.toLowerCase().indexOf('#'+tag) > -1
module.exports = Task | 10 | 0.196078 | 8 | 2 |
0e6dc0e9c4e7f423f01bb0ec338a3ca1fe76572c | packages/benchmarks/react-inline-styles/package.json | packages/benchmarks/react-inline-styles/package.json | {
"name": "table-react-inline-styles-big-table",
"version": "1.0.0",
"private": true,
"scripts": {
"start": "devServer --package react-styles",
"build": "devBuild --package react-styles"
},
"license": "MIT",
"dependencies": {
"benchmarks-utils": "1.0.0"
},
"devDependencies": {
"dev-tasks": "1.0.0"
},
"benchmarks": {
"name": "react (with inline-styles)",
"link": "https://github.com/facebook/react",
"useInlineStyles": true
}
}
| {
"name": "table-react-inline-styles-big-table",
"version": "1.0.0",
"private": true,
"scripts": {
"start": "devServer --package react-inline-styles",
"build": "devBuild --package react-inline-styles"
},
"license": "MIT",
"dependencies": {
"benchmarks-utils": "1.0.0"
},
"devDependencies": {
"dev-tasks": "1.0.0"
},
"benchmarks": {
"name": "react (with inline-styles)",
"link": "https://github.com/facebook/react",
"useInlineStyles": true
}
}
| Fix npm scripts with new name | Fix npm scripts with new name
| JSON | apache-2.0 | A-gambit/CSS-IN-JS-Benchmarks,A-gambit/CSS-IN-JS-Benchmarks | json | ## Code Before:
{
"name": "table-react-inline-styles-big-table",
"version": "1.0.0",
"private": true,
"scripts": {
"start": "devServer --package react-styles",
"build": "devBuild --package react-styles"
},
"license": "MIT",
"dependencies": {
"benchmarks-utils": "1.0.0"
},
"devDependencies": {
"dev-tasks": "1.0.0"
},
"benchmarks": {
"name": "react (with inline-styles)",
"link": "https://github.com/facebook/react",
"useInlineStyles": true
}
}
## Instruction:
Fix npm scripts with new name
## Code After:
{
"name": "table-react-inline-styles-big-table",
"version": "1.0.0",
"private": true,
"scripts": {
"start": "devServer --package react-inline-styles",
"build": "devBuild --package react-inline-styles"
},
"license": "MIT",
"dependencies": {
"benchmarks-utils": "1.0.0"
},
"devDependencies": {
"dev-tasks": "1.0.0"
},
"benchmarks": {
"name": "react (with inline-styles)",
"link": "https://github.com/facebook/react",
"useInlineStyles": true
}
}
| {
"name": "table-react-inline-styles-big-table",
"version": "1.0.0",
"private": true,
"scripts": {
- "start": "devServer --package react-styles",
+ "start": "devServer --package react-inline-styles",
? +++++++
- "build": "devBuild --package react-styles"
+ "build": "devBuild --package react-inline-styles"
? +++++++
},
"license": "MIT",
"dependencies": {
"benchmarks-utils": "1.0.0"
},
"devDependencies": {
"dev-tasks": "1.0.0"
},
"benchmarks": {
"name": "react (with inline-styles)",
"link": "https://github.com/facebook/react",
"useInlineStyles": true
}
} | 4 | 0.190476 | 2 | 2 |
b11399713d004a95da035ffceed9a1db8b837d11 | diffs/__init__.py | diffs/__init__.py | from __future__ import absolute_import, unicode_literals
__version__ = '0.1.6'
default_app_config = 'diffs.apps.DiffLogConfig'
klasses_to_connect = []
def register(cls):
"""
Decorator function that registers a class to record diffs.
@diffs.register
class ExampleModel(models.Model):
...
"""
from django.apps import apps as django_apps
from dirtyfields import DirtyFieldsMixin
from .models import DiffModelManager, DiffModelDescriptor
from .signals import connect
# Hack to add dirtyfieldsmixin automatically
if DirtyFieldsMixin not in cls.__bases__:
cls.__bases__ = (DirtyFieldsMixin,) + cls.__bases__
cls.add_to_class('diffs', DiffModelDescriptor(DiffModelManager()))
if not django_apps.ready:
klasses_to_connect.append(cls)
else:
connect(cls)
return cls
def get_connection():
"""Helper method to get redis connection configured by settings"""
import redis
import fakeredis
from .settings import diffs_settings
if not diffs_settings['test_mode']:
return redis.Redis(**diffs_settings['redis'])
else:
return fakeredis.FakeRedis()
| from __future__ import absolute_import, unicode_literals
__version__ = '0.1.7'
default_app_config = 'diffs.apps.DiffLogConfig'
klasses_to_connect = []
def register(cls):
"""
Decorator function that registers a class to record diffs.
@diffs.register
class ExampleModel(models.Model):
...
"""
from django.apps import apps as django_apps
from dirtyfields import DirtyFieldsMixin
from .models import DiffModelManager, DiffModelDescriptor
from .signals import connect
# check if class implemented get_dirty_fields else hack in dirtyfields
if not hasattr(cls, 'get_dirty_fields') and DirtyFieldsMixin not in cls.__bases__:
cls.__bases__ = (DirtyFieldsMixin,) + cls.__bases__
cls.add_to_class('diffs', DiffModelDescriptor(DiffModelManager()))
if not django_apps.ready:
klasses_to_connect.append(cls)
else:
connect(cls)
return cls
def get_connection():
"""Helper method to get redis connection configured by settings"""
import redis
import fakeredis
from .settings import diffs_settings
if not diffs_settings['test_mode']:
return redis.Redis(**diffs_settings['redis'])
else:
return fakeredis.FakeRedis()
| Update decorator to optionally include DirtyFieldsMixin | Update decorator to optionally include DirtyFieldsMixin
Update logic so the class is skipped if it hasattr get_dirty_fields
* Release 0.1.7
| Python | mit | linuxlewis/django-diffs | python | ## Code Before:
from __future__ import absolute_import, unicode_literals
__version__ = '0.1.6'
default_app_config = 'diffs.apps.DiffLogConfig'
klasses_to_connect = []
def register(cls):
"""
Decorator function that registers a class to record diffs.
@diffs.register
class ExampleModel(models.Model):
...
"""
from django.apps import apps as django_apps
from dirtyfields import DirtyFieldsMixin
from .models import DiffModelManager, DiffModelDescriptor
from .signals import connect
# Hack to add dirtyfieldsmixin automatically
if DirtyFieldsMixin not in cls.__bases__:
cls.__bases__ = (DirtyFieldsMixin,) + cls.__bases__
cls.add_to_class('diffs', DiffModelDescriptor(DiffModelManager()))
if not django_apps.ready:
klasses_to_connect.append(cls)
else:
connect(cls)
return cls
def get_connection():
"""Helper method to get redis connection configured by settings"""
import redis
import fakeredis
from .settings import diffs_settings
if not diffs_settings['test_mode']:
return redis.Redis(**diffs_settings['redis'])
else:
return fakeredis.FakeRedis()
## Instruction:
Update decorator to optionally include DirtyFieldsMixin
Update logic so the class is skipped if it hasattr get_dirty_fields
* Release 0.1.7
## Code After:
from __future__ import absolute_import, unicode_literals
__version__ = '0.1.7'
default_app_config = 'diffs.apps.DiffLogConfig'
klasses_to_connect = []
def register(cls):
"""
Decorator function that registers a class to record diffs.
@diffs.register
class ExampleModel(models.Model):
...
"""
from django.apps import apps as django_apps
from dirtyfields import DirtyFieldsMixin
from .models import DiffModelManager, DiffModelDescriptor
from .signals import connect
# check if class implemented get_dirty_fields else hack in dirtyfields
if not hasattr(cls, 'get_dirty_fields') and DirtyFieldsMixin not in cls.__bases__:
cls.__bases__ = (DirtyFieldsMixin,) + cls.__bases__
cls.add_to_class('diffs', DiffModelDescriptor(DiffModelManager()))
if not django_apps.ready:
klasses_to_connect.append(cls)
else:
connect(cls)
return cls
def get_connection():
"""Helper method to get redis connection configured by settings"""
import redis
import fakeredis
from .settings import diffs_settings
if not diffs_settings['test_mode']:
return redis.Redis(**diffs_settings['redis'])
else:
return fakeredis.FakeRedis()
| from __future__ import absolute_import, unicode_literals
- __version__ = '0.1.6'
? ^
+ __version__ = '0.1.7'
? ^
default_app_config = 'diffs.apps.DiffLogConfig'
klasses_to_connect = []
def register(cls):
"""
Decorator function that registers a class to record diffs.
@diffs.register
class ExampleModel(models.Model):
...
"""
from django.apps import apps as django_apps
from dirtyfields import DirtyFieldsMixin
from .models import DiffModelManager, DiffModelDescriptor
from .signals import connect
- # Hack to add dirtyfieldsmixin automatically
- if DirtyFieldsMixin not in cls.__bases__:
+ # check if class implemented get_dirty_fields else hack in dirtyfields
+ if not hasattr(cls, 'get_dirty_fields') and DirtyFieldsMixin not in cls.__bases__:
cls.__bases__ = (DirtyFieldsMixin,) + cls.__bases__
cls.add_to_class('diffs', DiffModelDescriptor(DiffModelManager()))
if not django_apps.ready:
klasses_to_connect.append(cls)
else:
connect(cls)
return cls
def get_connection():
"""Helper method to get redis connection configured by settings"""
import redis
import fakeredis
from .settings import diffs_settings
if not diffs_settings['test_mode']:
return redis.Redis(**diffs_settings['redis'])
else:
return fakeredis.FakeRedis() | 6 | 0.133333 | 3 | 3 |
80bf41dc233bbd862de4d79df71cfd3af56ab514 | run_redirect_regression_tests.sh | run_redirect_regression_tests.sh |
set -x
source sites.sh
echo DEPLOY_TO=$DEPLOY_TO
prove -l tests/integration/config_rules/ \
tests/integration/regression/ \
tools/test-log.pl
for site in ${REDIRECTED_SITES[@]}; do
prove -l tests/unit/sources/${site}_valid_lines.t
prove -l tests/redirects/$site/
done |
set -x
source sites.sh
echo DEPLOY_TO=$DEPLOY_TO
prove -l tests/integration/config_rules/ \
tests/integration/regression/ \
tools/test-log.pl \
tests/redirects/businesslink_piplinks.t
for site in ${REDIRECTED_SITES[@]}; do
prove -l tests/unit/sources/${site}_valid_lines.t
prove -l tests/redirects/${site}.t
done | Update shell script to run tests not in folders. | Update shell script to run tests not in folders.
Businesslink piplinks separate as they are not a site per se.
| Shell | mit | alphagov/transition-config,alphagov/transition-config | shell | ## Code Before:
set -x
source sites.sh
echo DEPLOY_TO=$DEPLOY_TO
prove -l tests/integration/config_rules/ \
tests/integration/regression/ \
tools/test-log.pl
for site in ${REDIRECTED_SITES[@]}; do
prove -l tests/unit/sources/${site}_valid_lines.t
prove -l tests/redirects/$site/
done
## Instruction:
Update shell script to run tests not in folders.
Businesslink piplinks separate as they are not a site per se.
## Code After:
set -x
source sites.sh
echo DEPLOY_TO=$DEPLOY_TO
prove -l tests/integration/config_rules/ \
tests/integration/regression/ \
tools/test-log.pl \
tests/redirects/businesslink_piplinks.t
for site in ${REDIRECTED_SITES[@]}; do
prove -l tests/unit/sources/${site}_valid_lines.t
prove -l tests/redirects/${site}.t
done |
set -x
source sites.sh
echo DEPLOY_TO=$DEPLOY_TO
prove -l tests/integration/config_rules/ \
tests/integration/regression/ \
- tools/test-log.pl
? ^^^^
+ tools/test-log.pl \
? ^ +++++++
+ tests/redirects/businesslink_piplinks.t
for site in ${REDIRECTED_SITES[@]}; do
prove -l tests/unit/sources/${site}_valid_lines.t
- prove -l tests/redirects/$site/
? ^
+ prove -l tests/redirects/${site}.t
? + ^^^
done | 5 | 0.294118 | 3 | 2 |
66863c541b4ff0cd70c851dad4dd6a38a8156964 | C++/API/Treehopper/CMakeLists.txt | C++/API/Treehopper/CMakeLists.txt | cmake_minimum_required(VERSION 3.7)
project(Treehopper)
add_definitions(-DTREEHOPPER_EXPORTS)
set(CMAKE_CXX_STANDARD 11)
set(PROJECT_SOURCE_DIR src/)
file(GLOB COMMON_SRC ${PROJECT_SOURCE_DIR}/*.cpp)
if(WIN32)
set(TARGET_BUILD_PLATFORM win)
endif(WIN32)
if(UNIX)
set(TARGET_BUILD_PLATFORM linux)
endif(UNIX)
if(APPLE)
set(TARGET_BUILD_PLATFORM mac)
endif(APPLE)
file(GLOB PLATFORM_SRC ${PROJECT_SOURCE_DIR}/${TARGET_BUILD_PLATFORM}/*.cpp)
set(SOURCE_FILES ${COMMON_SRC} ${PLATFORM_SRC})
include_directories(inc)
add_library(Treehopper SHARED ${SOURCE_FILES})
if(WIN32)
target_link_libraries(Treehopper winusb setupapi)
endif(WIN32)
if(UNIX)
target_link_libraries(Treehopper usb-1.0 pthread)
endif(UNIX)
if(APPLE)
endif(APPLE) | cmake_minimum_required(VERSION 3.7)
project(Treehopper)
add_definitions(-DTREEHOPPER_EXPORTS)
set(CMAKE_CXX_STANDARD 11)
set(PROJECT_SOURCE_DIR src/)
file(GLOB COMMON_SRC ${PROJECT_SOURCE_DIR}/*.cpp)
if(WIN32)
set(TARGET_BUILD_PLATFORM win)
endif(WIN32)
if(UNIX)
set(TARGET_BUILD_PLATFORM linux)
endif(UNIX)
if(APPLE)
set(TARGET_BUILD_PLATFORM mac)
endif(APPLE)
file(GLOB PLATFORM_SRC ${PROJECT_SOURCE_DIR}/${TARGET_BUILD_PLATFORM}/*.cpp)
set(SOURCE_FILES ${COMMON_SRC} ${PLATFORM_SRC})
include_directories(inc)
add_library(Treehopper SHARED ${SOURCE_FILES})
if(APPLE)
find_library(CORE_FOUNDATION CoreFoundation)
find_library(IOKIT IOKit)
target_link_libraries(Treehopper pthread ${CORE_FOUNDATION} ${IOKIT})
elseif(UNIX)
target_link_libraries(Treehopper usb-1.0 pthread)
elseif(WIN32)
target_link_libraries(Treehopper winusb setupapi)
endif(APPLE) | Fix APPLE == UNIX bug | Fix APPLE == UNIX bug
| Text | mit | treehopper-electronics/treehopper-sdk,treehopper-electronics/treehopper-sdk,treehopper-electronics/treehopper-sdk,treehopper-electronics/treehopper-sdk,treehopper-electronics/treehopper-sdk,treehopper-electronics/treehopper-sdk | text | ## Code Before:
cmake_minimum_required(VERSION 3.7)
project(Treehopper)
add_definitions(-DTREEHOPPER_EXPORTS)
set(CMAKE_CXX_STANDARD 11)
set(PROJECT_SOURCE_DIR src/)
file(GLOB COMMON_SRC ${PROJECT_SOURCE_DIR}/*.cpp)
if(WIN32)
set(TARGET_BUILD_PLATFORM win)
endif(WIN32)
if(UNIX)
set(TARGET_BUILD_PLATFORM linux)
endif(UNIX)
if(APPLE)
set(TARGET_BUILD_PLATFORM mac)
endif(APPLE)
file(GLOB PLATFORM_SRC ${PROJECT_SOURCE_DIR}/${TARGET_BUILD_PLATFORM}/*.cpp)
set(SOURCE_FILES ${COMMON_SRC} ${PLATFORM_SRC})
include_directories(inc)
add_library(Treehopper SHARED ${SOURCE_FILES})
if(WIN32)
target_link_libraries(Treehopper winusb setupapi)
endif(WIN32)
if(UNIX)
target_link_libraries(Treehopper usb-1.0 pthread)
endif(UNIX)
if(APPLE)
endif(APPLE)
## Instruction:
Fix APPLE == UNIX bug
## Code After:
cmake_minimum_required(VERSION 3.7)
project(Treehopper)
add_definitions(-DTREEHOPPER_EXPORTS)
set(CMAKE_CXX_STANDARD 11)
set(PROJECT_SOURCE_DIR src/)
file(GLOB COMMON_SRC ${PROJECT_SOURCE_DIR}/*.cpp)
if(WIN32)
set(TARGET_BUILD_PLATFORM win)
endif(WIN32)
if(UNIX)
set(TARGET_BUILD_PLATFORM linux)
endif(UNIX)
if(APPLE)
set(TARGET_BUILD_PLATFORM mac)
endif(APPLE)
file(GLOB PLATFORM_SRC ${PROJECT_SOURCE_DIR}/${TARGET_BUILD_PLATFORM}/*.cpp)
set(SOURCE_FILES ${COMMON_SRC} ${PLATFORM_SRC})
include_directories(inc)
add_library(Treehopper SHARED ${SOURCE_FILES})
if(APPLE)
find_library(CORE_FOUNDATION CoreFoundation)
find_library(IOKIT IOKit)
target_link_libraries(Treehopper pthread ${CORE_FOUNDATION} ${IOKIT})
elseif(UNIX)
target_link_libraries(Treehopper usb-1.0 pthread)
elseif(WIN32)
target_link_libraries(Treehopper winusb setupapi)
endif(APPLE) | cmake_minimum_required(VERSION 3.7)
project(Treehopper)
add_definitions(-DTREEHOPPER_EXPORTS)
set(CMAKE_CXX_STANDARD 11)
set(PROJECT_SOURCE_DIR src/)
file(GLOB COMMON_SRC ${PROJECT_SOURCE_DIR}/*.cpp)
if(WIN32)
set(TARGET_BUILD_PLATFORM win)
endif(WIN32)
if(UNIX)
set(TARGET_BUILD_PLATFORM linux)
endif(UNIX)
if(APPLE)
set(TARGET_BUILD_PLATFORM mac)
endif(APPLE)
file(GLOB PLATFORM_SRC ${PROJECT_SOURCE_DIR}/${TARGET_BUILD_PLATFORM}/*.cpp)
set(SOURCE_FILES ${COMMON_SRC} ${PLATFORM_SRC})
include_directories(inc)
add_library(Treehopper SHARED ${SOURCE_FILES})
+ if(APPLE)
+ find_library(CORE_FOUNDATION CoreFoundation)
+ find_library(IOKIT IOKit)
+ target_link_libraries(Treehopper pthread ${CORE_FOUNDATION} ${IOKIT})
+ elseif(UNIX)
+ target_link_libraries(Treehopper usb-1.0 pthread)
- if(WIN32)
+ elseif(WIN32)
? ++++
target_link_libraries(Treehopper winusb setupapi)
- endif(WIN32)
-
- if(UNIX)
-
- target_link_libraries(Treehopper usb-1.0 pthread)
- endif(UNIX)
-
- if(APPLE)
-
endif(APPLE) | 17 | 0.404762 | 7 | 10 |
211c1c9443c9204468c329cbb975622442fb1d45 | spec/spec_helper.rb | spec/spec_helper.rb | require 'rack'
require 'rack/exception_notifier'
require 'rack/mock'
Mail.defaults do
delivery_method :test
end
RSpec.configure do |config|
config.treat_symbols_as_metadata_keys_with_true_values = true
config.order = 'random'
end
class TestError < StandardError
end
| require 'rack'
require 'rack/exception_notifier'
require 'rack/mock'
Mail.defaults do
delivery_method :test
end
RSpec.configure do |config|
config.order = 'random'
end
class TestError < StandardError
end
| Remove option deprecated in rspec 3 | Remove option deprecated in rspec 3
| Ruby | mit | jtdowney/rack-exception_notifier | ruby | ## Code Before:
require 'rack'
require 'rack/exception_notifier'
require 'rack/mock'
Mail.defaults do
delivery_method :test
end
RSpec.configure do |config|
config.treat_symbols_as_metadata_keys_with_true_values = true
config.order = 'random'
end
class TestError < StandardError
end
## Instruction:
Remove option deprecated in rspec 3
## Code After:
require 'rack'
require 'rack/exception_notifier'
require 'rack/mock'
Mail.defaults do
delivery_method :test
end
RSpec.configure do |config|
config.order = 'random'
end
class TestError < StandardError
end
| require 'rack'
require 'rack/exception_notifier'
require 'rack/mock'
Mail.defaults do
delivery_method :test
end
RSpec.configure do |config|
- config.treat_symbols_as_metadata_keys_with_true_values = true
config.order = 'random'
end
class TestError < StandardError
end | 1 | 0.066667 | 0 | 1 |
92d718cfc361fc2ec2de278b397a4e65bbf1d43a | pages/home/Banner.scss | pages/home/Banner.scss | @import '../../components/variables.scss';
.banner {
/* fallbacks */
background: #2f77d0;
background-image: linear-gradient(to bottom right, #52bfbf, #2f77d0);
}
.banner-icon-bg {
@include container-width;
background-image: url('../../static/images/top-bg.png');
background-repeat: no-repeat;
background-position: -17px 47px;
background-size: 214px 327px;
@include desktop {
background-position: 37px 75px, 0% 0%;
}
}
| @import '../../components/variables.scss';
.banner {
/* fallback */
background: #00a5cd;
background-image: linear-gradient(to bottom right, #03c2bf, #0076cb);
}
.banner-icon-bg {
@include container-width;
background-image: url('../../static/images/top-bg.png');
background-repeat: no-repeat;
background-position: -17px 47px;
background-size: 214px 327px;
@include desktop {
background-position: 37px 75px, 0% 0%;
}
}
| Adjust landing page banner gradient color | Adjust landing page banner gradient color
refs #392
| SCSS | mit | ben181231/skygear-doc,ben181231/skygear-doc,ben181231/skygear-doc | scss | ## Code Before:
@import '../../components/variables.scss';
.banner {
/* fallbacks */
background: #2f77d0;
background-image: linear-gradient(to bottom right, #52bfbf, #2f77d0);
}
.banner-icon-bg {
@include container-width;
background-image: url('../../static/images/top-bg.png');
background-repeat: no-repeat;
background-position: -17px 47px;
background-size: 214px 327px;
@include desktop {
background-position: 37px 75px, 0% 0%;
}
}
## Instruction:
Adjust landing page banner gradient color
refs #392
## Code After:
@import '../../components/variables.scss';
.banner {
/* fallback */
background: #00a5cd;
background-image: linear-gradient(to bottom right, #03c2bf, #0076cb);
}
.banner-icon-bg {
@include container-width;
background-image: url('../../static/images/top-bg.png');
background-repeat: no-repeat;
background-position: -17px 47px;
background-size: 214px 327px;
@include desktop {
background-position: 37px 75px, 0% 0%;
}
}
| @import '../../components/variables.scss';
.banner {
- /* fallbacks */
? -
+ /* fallback */
- background: #2f77d0;
? ^^^^ -
+ background: #00a5cd;
? ^^^^^
- background-image: linear-gradient(to bottom right, #52bfbf, #2f77d0);
? ^ -- ^^ ^^^
+ background-image: linear-gradient(to bottom right, #03c2bf, #0076cb);
? ^^^ ^^ ^^^
}
.banner-icon-bg {
@include container-width;
background-image: url('../../static/images/top-bg.png');
background-repeat: no-repeat;
background-position: -17px 47px;
background-size: 214px 327px;
@include desktop {
background-position: 37px 75px, 0% 0%;
}
} | 6 | 0.285714 | 3 | 3 |
468fd4a0051b63ecd0a2f3e36a51079c1ccb0238 | src/components/TagTemplateDetails/index.jsx | src/components/TagTemplateDetails/index.jsx | import React from 'react'
import Post from '../Post'
class TagTemplateDetails extends React.Component {
render() {
const { i18n } = this.props
const posts = this.props.data.allMarkdownRemark.edges
const items = posts
.filter(post => {
const postLang = post.node.fields.slug.startsWith('/fr/') ? 'fr' : 'en'
return postLang === i18n.lang
})
.map(post => <Post data={post} key={post.node.fields.slug} i18n={i18n} />)
const tagTitle = this.props.pageContext.tag
const title = {
en: `All Posts tagged as "${tagTitle}" `,
fr: `Tous les articles portant le tag "${tagTitle}"`,
}[i18n.lang]
return (
<div className="content">
<div className="content__inner">
<div className="page">
<h1 className="page__title">{title}</h1>
<div className="page__body">{items}</div>
</div>
</div>
</div>
)
}
}
export default TagTemplateDetails
| import React from 'react'
import Post from '../Post'
class TagTemplateDetails extends React.Component {
render() {
const { i18n } = this.props
const posts = this.props.data.allMarkdownRemark.edges
const items = posts
.filter(post => {
const postLang = post.node.fields.slug.startsWith('/fr/') ? 'fr' : 'en'
return postLang === i18n.lang
})
.map(post => <Post data={post} key={post.node.fields.slug} i18n={i18n} />)
const tagTitle = this.props.pageContext.tag
const title = {
en: `All posts tagged as "${tagTitle}"`,
fr: `Tous les articles taguΓ©s "${tagTitle}"`,
}[i18n.lang]
return (
<div className="content">
<div className="content__inner">
<div className="page">
<h1 className="page__title">{title}</h1>
<div className="page__body">{items}</div>
</div>
</div>
</div>
)
}
}
export default TagTemplateDetails
| Fix text for tag template page | Fix text for tag template page
| JSX | mit | nicoespeon/nicoespeon.github.io,nicoespeon/nicoespeon.github.io | jsx | ## Code Before:
import React from 'react'
import Post from '../Post'
class TagTemplateDetails extends React.Component {
render() {
const { i18n } = this.props
const posts = this.props.data.allMarkdownRemark.edges
const items = posts
.filter(post => {
const postLang = post.node.fields.slug.startsWith('/fr/') ? 'fr' : 'en'
return postLang === i18n.lang
})
.map(post => <Post data={post} key={post.node.fields.slug} i18n={i18n} />)
const tagTitle = this.props.pageContext.tag
const title = {
en: `All Posts tagged as "${tagTitle}" `,
fr: `Tous les articles portant le tag "${tagTitle}"`,
}[i18n.lang]
return (
<div className="content">
<div className="content__inner">
<div className="page">
<h1 className="page__title">{title}</h1>
<div className="page__body">{items}</div>
</div>
</div>
</div>
)
}
}
export default TagTemplateDetails
## Instruction:
Fix text for tag template page
## Code After:
import React from 'react'
import Post from '../Post'
class TagTemplateDetails extends React.Component {
render() {
const { i18n } = this.props
const posts = this.props.data.allMarkdownRemark.edges
const items = posts
.filter(post => {
const postLang = post.node.fields.slug.startsWith('/fr/') ? 'fr' : 'en'
return postLang === i18n.lang
})
.map(post => <Post data={post} key={post.node.fields.slug} i18n={i18n} />)
const tagTitle = this.props.pageContext.tag
const title = {
en: `All posts tagged as "${tagTitle}"`,
fr: `Tous les articles taguΓ©s "${tagTitle}"`,
}[i18n.lang]
return (
<div className="content">
<div className="content__inner">
<div className="page">
<h1 className="page__title">{title}</h1>
<div className="page__body">{items}</div>
</div>
</div>
</div>
)
}
}
export default TagTemplateDetails
| import React from 'react'
import Post from '../Post'
class TagTemplateDetails extends React.Component {
render() {
const { i18n } = this.props
const posts = this.props.data.allMarkdownRemark.edges
const items = posts
.filter(post => {
const postLang = post.node.fields.slug.startsWith('/fr/') ? 'fr' : 'en'
return postLang === i18n.lang
})
.map(post => <Post data={post} key={post.node.fields.slug} i18n={i18n} />)
const tagTitle = this.props.pageContext.tag
const title = {
- en: `All Posts tagged as "${tagTitle}" `,
? ^ -
+ en: `All posts tagged as "${tagTitle}"`,
? ^
- fr: `Tous les articles portant le tag "${tagTitle}"`,
? -----------
+ fr: `Tous les articles taguΓ©s "${tagTitle}"`,
? +++
}[i18n.lang]
return (
<div className="content">
<div className="content__inner">
<div className="page">
<h1 className="page__title">{title}</h1>
<div className="page__body">{items}</div>
</div>
</div>
</div>
)
}
}
export default TagTemplateDetails | 4 | 0.114286 | 2 | 2 |
d69706748c82e619ba9f3c9609f3068e71753c66 | spec/unit/downtime_spec.rb | spec/unit/downtime_spec.rb | require 'spec_helper'
class DowntimeTest < ActiveSupport::TestCase
# test "the truth" do
# assert true
# end
end
| require 'spec_helper'
describe Downtime do
before :each do
load "#{Rails.root}/db/seeds.rb"
end
it "should process downtimes" do
end
end
| Add stub for downtime unit tests | Add stub for downtime unit tests
| Ruby | mit | sensu/sensu-admin,sensu/sensu-admin,sensu/sensu-admin | ruby | ## Code Before:
require 'spec_helper'
class DowntimeTest < ActiveSupport::TestCase
# test "the truth" do
# assert true
# end
end
## Instruction:
Add stub for downtime unit tests
## Code After:
require 'spec_helper'
describe Downtime do
before :each do
load "#{Rails.root}/db/seeds.rb"
end
it "should process downtimes" do
end
end
| require 'spec_helper'
- class DowntimeTest < ActiveSupport::TestCase
- # test "the truth" do
- # assert true
+ describe Downtime do
+
+ before :each do
+ load "#{Rails.root}/db/seeds.rb"
- # end
? --
+ end
+
+ it "should process downtimes" do
+ end
+
end | 13 | 1.857143 | 9 | 4 |
c85fc1f336d08aec9dd15e2d9c22dc3132b9c8d9 | script/ansible/vars.yml | script/ansible/vars.yml | ---
# Home directory.
home: "{{ lookup('env', 'HOME') }}"
# Variables for things that are common across OS families, like Ruby gems.
ruby_version: 2.2.0
ruby_gems:
- pry
- bundler
- httparty
python_packages:
- virtualenv
- virtualenvwrapper
- supernova
- requests
- flake8
# Home directory for virtualenvs
venv_home: "{{ home }}/.venv"
# If this has changed: verify the new script version, and modify.
rust_installer_sha256: f567f0f18329472d837201205ff372ebeff142cf024597e97f04076293a91b8b
nvm_version: 0.23.3
node_version: 0.10.36
golang_version: 1.4.1
| ---
# Home directory.
home: "{{ lookup('env', 'HOME') }}"
# Variables for things that are common across OS families, like Ruby gems.
ruby_version: 2.2.0
ruby_gems:
- pry
- bundler
- httparty
python_packages:
- virtualenv
- virtualenvwrapper
- supernova
- requests
- flake8
- cookiecutter
# Home directory for virtualenvs
venv_home: "{{ home }}/.venv"
# If this has changed: verify the new script version, and modify.
rust_installer_sha256: f567f0f18329472d837201205ff372ebeff142cf024597e97f04076293a91b8b
nvm_version: 0.23.3
node_version: 0.10.36
golang_version: 1.4.1
| Install Cookiecutter for starting Python projects. | Install Cookiecutter for starting Python projects.
| YAML | mit | smashwilson/dotfiles,smashwilson/dotfiles | yaml | ## Code Before:
---
# Home directory.
home: "{{ lookup('env', 'HOME') }}"
# Variables for things that are common across OS families, like Ruby gems.
ruby_version: 2.2.0
ruby_gems:
- pry
- bundler
- httparty
python_packages:
- virtualenv
- virtualenvwrapper
- supernova
- requests
- flake8
# Home directory for virtualenvs
venv_home: "{{ home }}/.venv"
# If this has changed: verify the new script version, and modify.
rust_installer_sha256: f567f0f18329472d837201205ff372ebeff142cf024597e97f04076293a91b8b
nvm_version: 0.23.3
node_version: 0.10.36
golang_version: 1.4.1
## Instruction:
Install Cookiecutter for starting Python projects.
## Code After:
---
# Home directory.
home: "{{ lookup('env', 'HOME') }}"
# Variables for things that are common across OS families, like Ruby gems.
ruby_version: 2.2.0
ruby_gems:
- pry
- bundler
- httparty
python_packages:
- virtualenv
- virtualenvwrapper
- supernova
- requests
- flake8
- cookiecutter
# Home directory for virtualenvs
venv_home: "{{ home }}/.venv"
# If this has changed: verify the new script version, and modify.
rust_installer_sha256: f567f0f18329472d837201205ff372ebeff142cf024597e97f04076293a91b8b
nvm_version: 0.23.3
node_version: 0.10.36
golang_version: 1.4.1
| ---
# Home directory.
home: "{{ lookup('env', 'HOME') }}"
# Variables for things that are common across OS families, like Ruby gems.
ruby_version: 2.2.0
ruby_gems:
- pry
- bundler
- httparty
python_packages:
- virtualenv
- virtualenvwrapper
- supernova
- requests
- flake8
+ - cookiecutter
# Home directory for virtualenvs
venv_home: "{{ home }}/.venv"
# If this has changed: verify the new script version, and modify.
rust_installer_sha256: f567f0f18329472d837201205ff372ebeff142cf024597e97f04076293a91b8b
nvm_version: 0.23.3
node_version: 0.10.36
golang_version: 1.4.1 | 1 | 0.032258 | 1 | 0 |
3a912b0c8114504aef8cab2ca44c2f7355fe3bc9 | config/locales/en.yml | config/locales/en.yml | en:
errors:
messages:
date_format: "is invalid"
email_format: "is invalid"
money_format: "is invalid"
money_format_has_cents: "must not include cents"
slug_format: "is invalid, only lowercase letters and numbers allowed"
url_format: "is invalid"
| en:
errors:
messages:
date_format: "is invalid"
email_format: "is invalid"
money_format: "is invalid"
money_format_has_cents: "must not include cents"
phone_number_format: "is invalid"
slug_format: "is invalid, only lowercase letters and numbers allowed"
url_format: "is invalid"
| Add phone number error message | Add phone number error message | YAML | mit | gshaw/common_validators,gshaw/common_validators | yaml | ## Code Before:
en:
errors:
messages:
date_format: "is invalid"
email_format: "is invalid"
money_format: "is invalid"
money_format_has_cents: "must not include cents"
slug_format: "is invalid, only lowercase letters and numbers allowed"
url_format: "is invalid"
## Instruction:
Add phone number error message
## Code After:
en:
errors:
messages:
date_format: "is invalid"
email_format: "is invalid"
money_format: "is invalid"
money_format_has_cents: "must not include cents"
phone_number_format: "is invalid"
slug_format: "is invalid, only lowercase letters and numbers allowed"
url_format: "is invalid"
| en:
errors:
messages:
date_format: "is invalid"
email_format: "is invalid"
money_format: "is invalid"
money_format_has_cents: "must not include cents"
+ phone_number_format: "is invalid"
slug_format: "is invalid, only lowercase letters and numbers allowed"
url_format: "is invalid" | 1 | 0.111111 | 1 | 0 |
e7a20ed4ab60b256d9875553365e7c0c9dd28856 | lib/themes/dosomething/paraneue_dosomething/scss/content/_taxonomy.scss | lib/themes/dosomething/paraneue_dosomething/scss/content/_taxonomy.scss | .taxonomy-term {
.container__title,
.sources {
@include compacted();
}
.container__body,
.additional-text {
p,
ul,
ol {
@include compacted();
}
}
.container__body {
.-columned {
p,
ul,
ol {
width: auto;
}
}
}
.sources {
ul {
width: auto;
}
p {
display: inline;
}
}
//@TODO: move into Neue by way of button update.
.gallery.-mosaic + .btn {
color: $med-gray;
display: table;
margin: 0 auto 18px;
&:focus {
box-shadow: none;
}
}
}
| .taxonomy-term {
.container__title,
.sources {
@include compacted();
}
.container__body,
.additional-text {
p,
ul,
ol {
@include compacted();
}
}
.container__body {
.-columned {
p,
ul,
ol {
width: auto;
}
}
}
.sources {
ul {
width: auto;
}
p {
display: inline;
}
}
}
| Update to remove styles now placed in Neue. | Update to remove styles now placed in Neue.
| SCSS | mit | sergii-tkachenko/phoenix,angaither/dosomething,deadlybutter/phoenix,sbsmith86/dosomething,jonuy/dosomething,sergii-tkachenko/phoenix,chloealee/dosomething,jonuy/dosomething,DoSomething/dosomething,angaither/dosomething,DoSomething/phoenix,sbsmith86/dosomething,DoSomething/dosomething,deadlybutter/phoenix,mshmsh5000/dosomething-1,jonuy/dosomething,mshmsh5000/dosomething-1,chloealee/dosomething,angaither/dosomething,sergii-tkachenko/phoenix,angaither/dosomething,jonuy/dosomething,jonuy/dosomething,chloealee/dosomething,angaither/dosomething,chloealee/dosomething,chloealee/dosomething,sbsmith86/dosomething,mshmsh5000/dosomething-1,DoSomething/dosomething,sergii-tkachenko/phoenix,deadlybutter/phoenix,deadlybutter/phoenix,deadlybutter/phoenix,DoSomething/dosomething,DoSomething/phoenix,sbsmith86/dosomething,DoSomething/phoenix,jonuy/dosomething,DoSomething/phoenix,DoSomething/dosomething,mshmsh5000/dosomething-1,chloealee/dosomething,DoSomething/dosomething,sbsmith86/dosomething,mshmsh5000/dosomething-1,DoSomething/phoenix,sbsmith86/dosomething,angaither/dosomething,sergii-tkachenko/phoenix | scss | ## Code Before:
.taxonomy-term {
.container__title,
.sources {
@include compacted();
}
.container__body,
.additional-text {
p,
ul,
ol {
@include compacted();
}
}
.container__body {
.-columned {
p,
ul,
ol {
width: auto;
}
}
}
.sources {
ul {
width: auto;
}
p {
display: inline;
}
}
//@TODO: move into Neue by way of button update.
.gallery.-mosaic + .btn {
color: $med-gray;
display: table;
margin: 0 auto 18px;
&:focus {
box-shadow: none;
}
}
}
## Instruction:
Update to remove styles now placed in Neue.
## Code After:
.taxonomy-term {
.container__title,
.sources {
@include compacted();
}
.container__body,
.additional-text {
p,
ul,
ol {
@include compacted();
}
}
.container__body {
.-columned {
p,
ul,
ol {
width: auto;
}
}
}
.sources {
ul {
width: auto;
}
p {
display: inline;
}
}
}
| .taxonomy-term {
.container__title,
.sources {
@include compacted();
}
.container__body,
.additional-text {
p,
ul,
ol {
@include compacted();
}
}
.container__body {
.-columned {
p,
ul,
ol {
width: auto;
}
}
}
.sources {
ul {
width: auto;
}
p {
display: inline;
}
}
-
- //@TODO: move into Neue by way of button update.
- .gallery.-mosaic + .btn {
- color: $med-gray;
- display: table;
- margin: 0 auto 18px;
-
- &:focus {
- box-shadow: none;
- }
- }
} | 11 | 0.23913 | 0 | 11 |
021cf78cbb22abbf073b32e5ce006d975e6a8ff5 | src/core/recovery.js | src/core/recovery.js | var zoomextent = require('../lib/zoomextent'),
qs = require('../lib/querystring');
module.exports = function(context) {
d3.select(window).on('unload', onunload);
context.dispatch.on('change', onchange);
var query = qs.stringQs(location.hash.split('#')[1] || '');
if (location.hash !== '#new' && !query.id && !query.data) {
var rec = context.storage.get('recover');
if (rec && confirm('recover your map from the last time you edited?')) {
context.data.set(rec);
zoomextent(context);
} else {
context.storage.remove('recover');
}
}
function onunload() {
if (context.data.get('type') === 'local' && context.data.hasFeatures()) {
context.storage.set('recover', context.data.all());
} else {
context.storage.remove('recover');
}
}
function onchange() {
if (context.data.get('type') !== 'local') {
context.storage.remove('recover');
}
}
};
| var zoomextent = require('../lib/zoomextent'),
qs = require('../lib/querystring');
module.exports = function(context) {
d3.select(window).on('unload', onunload);
context.dispatch.on('change', onchange);
var query = qs.stringQs(location.hash.split('#')[1] || '');
if (location.hash !== '#new' && !query.id && !query.data) {
var rec = context.storage.get('recover');
if (rec && confirm('recover your map from the last time you edited?')) {
context.data.set(rec);
zoomextent(context);
} else {
context.storage.remove('recover');
}
}
function onunload() {
if (context.data.get('type') === 'local' && context.data.hasFeatures()) {
try {
context.storage.set('recover', context.data.all());
} catch(e) {
// QuotaStorageExceeded
}
} else {
context.storage.remove('recover');
}
}
function onchange() {
if (context.data.get('type') !== 'local') {
context.storage.remove('recover');
}
}
};
| Handle quota storage exceeded error | Handle quota storage exceeded error
| JavaScript | isc | mobixio/geojson.io,moravianlibrary/geojson.io,entylop/geojson.io,entylop/geojson.io,mapbox/geojson.io,mobixio/geojson.io,Carlowahlen/geojsoniocw,dakotabenjamin/geojson.io,Loufylouf/geojson.io,Carlowahlen/geojsoniocw,datadesk/geojson.io,mapbox/geojson.io,snkashis/geojson.io,SpaceKnow/geojson.io,bmcbride/geojson.io,entylop/geojson.io,s-a-r-id/geojson.io,urasoe/geojson.io,dakotabenjamin/geojson.io,psotres/geojson.io,atlregional/otp.io,Loufylouf/geojson.io,dakotabenjamin/geojson.io,atlregional/otp.io,s-a-r-id/geojson.io,urasoe/geojson.io,s-a-r-id/geojson.io,mobixio/geojson.io,urasoe/geojson.io,psotres/geojson.io,Loufylouf/geojson.io,Carlowahlen/geojsoniocw,bmcbride/geojson.io,psotres/geojson.io,moravianlibrary/geojson.io,bmcbride/geojson.io,moravianlibrary/geojson.io | javascript | ## Code Before:
var zoomextent = require('../lib/zoomextent'),
qs = require('../lib/querystring');
module.exports = function(context) {
d3.select(window).on('unload', onunload);
context.dispatch.on('change', onchange);
var query = qs.stringQs(location.hash.split('#')[1] || '');
if (location.hash !== '#new' && !query.id && !query.data) {
var rec = context.storage.get('recover');
if (rec && confirm('recover your map from the last time you edited?')) {
context.data.set(rec);
zoomextent(context);
} else {
context.storage.remove('recover');
}
}
function onunload() {
if (context.data.get('type') === 'local' && context.data.hasFeatures()) {
context.storage.set('recover', context.data.all());
} else {
context.storage.remove('recover');
}
}
function onchange() {
if (context.data.get('type') !== 'local') {
context.storage.remove('recover');
}
}
};
## Instruction:
Handle quota storage exceeded error
## Code After:
var zoomextent = require('../lib/zoomextent'),
qs = require('../lib/querystring');
module.exports = function(context) {
d3.select(window).on('unload', onunload);
context.dispatch.on('change', onchange);
var query = qs.stringQs(location.hash.split('#')[1] || '');
if (location.hash !== '#new' && !query.id && !query.data) {
var rec = context.storage.get('recover');
if (rec && confirm('recover your map from the last time you edited?')) {
context.data.set(rec);
zoomextent(context);
} else {
context.storage.remove('recover');
}
}
function onunload() {
if (context.data.get('type') === 'local' && context.data.hasFeatures()) {
try {
context.storage.set('recover', context.data.all());
} catch(e) {
// QuotaStorageExceeded
}
} else {
context.storage.remove('recover');
}
}
function onchange() {
if (context.data.get('type') !== 'local') {
context.storage.remove('recover');
}
}
};
| var zoomextent = require('../lib/zoomextent'),
qs = require('../lib/querystring');
module.exports = function(context) {
d3.select(window).on('unload', onunload);
context.dispatch.on('change', onchange);
var query = qs.stringQs(location.hash.split('#')[1] || '');
if (location.hash !== '#new' && !query.id && !query.data) {
var rec = context.storage.get('recover');
if (rec && confirm('recover your map from the last time you edited?')) {
context.data.set(rec);
zoomextent(context);
} else {
context.storage.remove('recover');
}
}
function onunload() {
if (context.data.get('type') === 'local' && context.data.hasFeatures()) {
+ try {
- context.storage.set('recover', context.data.all());
+ context.storage.set('recover', context.data.all());
? ++++
+ } catch(e) {
+ // QuotaStorageExceeded
+ }
} else {
context.storage.remove('recover');
}
}
function onchange() {
if (context.data.get('type') !== 'local') {
context.storage.remove('recover');
}
}
}; | 6 | 0.176471 | 5 | 1 |
17bc64e531fd666c13a39adfde837b75ed9a3bac | Cargo.toml | Cargo.toml | [package]
name = "hamlet"
version = "0.2.0"
authors = [
"Wim Looman <wim@nemo157.com>",
"critiqjo <john.ch.fr@gmail.com>"
]
description = "Html token definitions for stream processing"
readme = "README.md"
repository = "https://github.com/Nemo157/hamlet"
keywords = ["html", "hamlet"]
license = "MIT/Apache-2.0"
[dependencies]
| [package]
name = "hamlet"
version = "0.2.0"
authors = [
"Wim Looman <wim@nemo157.com>",
"critiqjo <john.ch.fr@gmail.com>"
]
description = "Html token definitions for stream processing"
readme = "README.md"
homepage = "https://nemo157.com/hamlet"
repository = "https://github.com/Nemo157/hamlet"
documentation = "https://nemo157.com/hamlet/docs/0.2.0/hamlet"
keywords = ["html", "hamlet"]
license = "MIT/Apache-2.0"
[dependencies]
| Add in links to the crate metadata | Add in links to the crate metadata
| TOML | apache-2.0 | Nemo157/hamlet,Nemo157/hamlet | toml | ## Code Before:
[package]
name = "hamlet"
version = "0.2.0"
authors = [
"Wim Looman <wim@nemo157.com>",
"critiqjo <john.ch.fr@gmail.com>"
]
description = "Html token definitions for stream processing"
readme = "README.md"
repository = "https://github.com/Nemo157/hamlet"
keywords = ["html", "hamlet"]
license = "MIT/Apache-2.0"
[dependencies]
## Instruction:
Add in links to the crate metadata
## Code After:
[package]
name = "hamlet"
version = "0.2.0"
authors = [
"Wim Looman <wim@nemo157.com>",
"critiqjo <john.ch.fr@gmail.com>"
]
description = "Html token definitions for stream processing"
readme = "README.md"
homepage = "https://nemo157.com/hamlet"
repository = "https://github.com/Nemo157/hamlet"
documentation = "https://nemo157.com/hamlet/docs/0.2.0/hamlet"
keywords = ["html", "hamlet"]
license = "MIT/Apache-2.0"
[dependencies]
| [package]
name = "hamlet"
version = "0.2.0"
authors = [
"Wim Looman <wim@nemo157.com>",
"critiqjo <john.ch.fr@gmail.com>"
]
description = "Html token definitions for stream processing"
readme = "README.md"
+ homepage = "https://nemo157.com/hamlet"
repository = "https://github.com/Nemo157/hamlet"
+ documentation = "https://nemo157.com/hamlet/docs/0.2.0/hamlet"
+
keywords = ["html", "hamlet"]
license = "MIT/Apache-2.0"
[dependencies] | 3 | 0.1875 | 3 | 0 |
c3610d27aeee1fe8e26be6b02471a64cb9fda78e | .travis.yml | .travis.yml | language: node_js
node_js:
- 'stable'
- '0.12'
before_install: npm install -g gulp && npm install -g bower && cd front-end
install: bower install && gulp --cordova "prepare"
before_script: cd front-end
script: gulp build
| language: node_js
node_js:
- 'stable'
- '0.12'
before_install:
- npm install -g gulp
- npm install -g bower
- cd front-end
- npm install gulp
install:
- bower install
- gulp --cordova "prepare"
before_script:
- cd front-end
script:
- gulp build
| Add local gulp installation to Travis CI and reformat script to be more readable. | Add local gulp installation to Travis CI and reformat script to be more readable.
| YAML | mit | aelawson/snowranger,aelawson/bypath,aelawson/snowranger,codeforboston/snowranger,codeforboston/snowranger,codeforboston/snowranger,aelawson/snowranger,irstacks/snowranger-1,aelawson/snowranger,codeforboston/snowranger,aelawson/bypath,codeforboston/bypath,irstacks/snowranger-1,irstacks/snowranger-1,codeforboston/bypath,aelawson/bypath,codeforboston/snowranger,codeforboston/bypath,irstacks/snowranger-1,aelawson/bypath,codeforboston/bypath,codeforboston/bypath | yaml | ## Code Before:
language: node_js
node_js:
- 'stable'
- '0.12'
before_install: npm install -g gulp && npm install -g bower && cd front-end
install: bower install && gulp --cordova "prepare"
before_script: cd front-end
script: gulp build
## Instruction:
Add local gulp installation to Travis CI and reformat script to be more readable.
## Code After:
language: node_js
node_js:
- 'stable'
- '0.12'
before_install:
- npm install -g gulp
- npm install -g bower
- cd front-end
- npm install gulp
install:
- bower install
- gulp --cordova "prepare"
before_script:
- cd front-end
script:
- gulp build
| language: node_js
node_js:
- 'stable'
- '0.12'
- before_install: npm install -g gulp && npm install -g bower && cd front-end
- install: bower install && gulp --cordova "prepare"
- before_script: cd front-end
- script: gulp build
+ before_install:
+ - npm install -g gulp
+ - npm install -g bower
+ - cd front-end
+ - npm install gulp
+ install:
+ - bower install
+ - gulp --cordova "prepare"
+ before_script:
+ - cd front-end
+ script:
+ - gulp build | 16 | 2 | 12 | 4 |
96d3b46ecf7a04fa8adfb775362053dd969cce49 | genoome/dev_frontend_deploy.sh | genoome/dev_frontend_deploy.sh |
VENVPATH=/home/ubuntu/.pyenv/versions/dev_venv;
PYPATH=$VENVPATH/bin/python;
GULPPATH=$VENVPATH/bin/gulp;
source $VENVPATH/bin/activate;
cd /opt/dev_genoome/genoome/genoome/ && sudo git checkout -- . && \
git pull origin dev && \
../node_modules/.bin/bower install --cwd ../. && \
$GULPPATH --gulpfile ../gulpfile.js --cwd ../ dist:css dist:js && \
$PYPATH ./manage.py collectstatic --noinput --settings=genoome.settings.development && \
sudo touch /etc/uwsgi/vassals/dev_genoome.ini && \
sudo chown -R ubuntu:www-data /opt/dev_genoome/genoome/genoome/assets/;
echo 'Success';
|
VENVPATH=/home/ubuntu/.pyenv/versions/dev_venv;
PYPATH=$VENVPATH/bin/python;
GULPPATH=$VENVPATH/bin/gulp;
source $VENVPATH/bin/activate;
cd /opt/dev_genoome/genoome/genoome/ && sudo git checkout -- . && \
git pull origin dev && \
cd ../ &7 \
../node_modules/.bin/bower install && \
cd - && \
$GULPPATH --gulpfile ../gulpfile.js --cwd ../ dist:css dist:js && \
$PYPATH ./manage.py collectstatic --noinput --settings=genoome.settings.development && \
sudo touch /etc/uwsgi/vassals/dev_genoome.ini && \
sudo chown -R ubuntu:www-data /opt/dev_genoome/genoome/genoome/assets/;
echo 'Success';
| Fix bower cwd issue solution is UGLY FIXMEEEE | Fix bower cwd issue solution is UGLY FIXMEEEE
| Shell | mit | jiivan/genoomy,jiivan/genoomy,jiivan/genoomy,jiivan/genoomy | shell | ## Code Before:
VENVPATH=/home/ubuntu/.pyenv/versions/dev_venv;
PYPATH=$VENVPATH/bin/python;
GULPPATH=$VENVPATH/bin/gulp;
source $VENVPATH/bin/activate;
cd /opt/dev_genoome/genoome/genoome/ && sudo git checkout -- . && \
git pull origin dev && \
../node_modules/.bin/bower install --cwd ../. && \
$GULPPATH --gulpfile ../gulpfile.js --cwd ../ dist:css dist:js && \
$PYPATH ./manage.py collectstatic --noinput --settings=genoome.settings.development && \
sudo touch /etc/uwsgi/vassals/dev_genoome.ini && \
sudo chown -R ubuntu:www-data /opt/dev_genoome/genoome/genoome/assets/;
echo 'Success';
## Instruction:
Fix bower cwd issue solution is UGLY FIXMEEEE
## Code After:
VENVPATH=/home/ubuntu/.pyenv/versions/dev_venv;
PYPATH=$VENVPATH/bin/python;
GULPPATH=$VENVPATH/bin/gulp;
source $VENVPATH/bin/activate;
cd /opt/dev_genoome/genoome/genoome/ && sudo git checkout -- . && \
git pull origin dev && \
cd ../ &7 \
../node_modules/.bin/bower install && \
cd - && \
$GULPPATH --gulpfile ../gulpfile.js --cwd ../ dist:css dist:js && \
$PYPATH ./manage.py collectstatic --noinput --settings=genoome.settings.development && \
sudo touch /etc/uwsgi/vassals/dev_genoome.ini && \
sudo chown -R ubuntu:www-data /opt/dev_genoome/genoome/genoome/assets/;
echo 'Success';
|
VENVPATH=/home/ubuntu/.pyenv/versions/dev_venv;
PYPATH=$VENVPATH/bin/python;
GULPPATH=$VENVPATH/bin/gulp;
source $VENVPATH/bin/activate;
cd /opt/dev_genoome/genoome/genoome/ && sudo git checkout -- . && \
git pull origin dev && \
+ cd ../ &7 \
- ../node_modules/.bin/bower install --cwd ../. && \
? -----------
+ ../node_modules/.bin/bower install && \
+ cd - && \
$GULPPATH --gulpfile ../gulpfile.js --cwd ../ dist:css dist:js && \
$PYPATH ./manage.py collectstatic --noinput --settings=genoome.settings.development && \
sudo touch /etc/uwsgi/vassals/dev_genoome.ini && \
sudo chown -R ubuntu:www-data /opt/dev_genoome/genoome/genoome/assets/;
echo 'Success'; | 4 | 0.266667 | 3 | 1 |
f4346c3ddc796942a2aeb47d38e5212077061c62 | CHANGELOG.md | CHANGELOG.md | Change Log
==========
Version 0.4 *(2014-01-28)*
----------------------------
* API break: @Screen(layout=R.layout.foo) > @Layout(R.layout.foo), and Screens > Layouts.
Support for view class literals is gone. They break theming and the fix isn't worth the bother.
Version 0.3 *(2014-01-21)*
----------------------------
* New: Backstack#fromUpChain(Object), allows backstack to be created from
a HasParent screen.
Version 0.2 *(2013-11-12)*
----------------------------
Initial release.
| Change Log
==========
Version 0.5 *(2014-04-15)*
----------------------------
* Keep original screen on stack if found by resetTo.
Version 0.4 *(2014-01-28)*
----------------------------
* API break: @Screen(layout=R.layout.foo) > @Layout(R.layout.foo), and Screens > Layouts.
Support for view class literals is gone. They break theming and the fix isn't worth the bother.
Version 0.3 *(2014-01-21)*
----------------------------
* New: Backstack#fromUpChain(Object), allows backstack to be created from
a HasParent screen.
Version 0.2 *(2013-11-12)*
----------------------------
Initial release.
| Update change log for 0.5 | Update change log for 0.5
| Markdown | apache-2.0 | square/flow,leasual/flow,kaoree/flow,pyricau/flow,superboonie/flow,square/flow,kidaa/flow,Zhuinden/flowless,sdelaysam/flow,venkatesh3007/flow,lynnmatrix/flow,xfumihiro/flow,mlevytskiy/flow,sdelaysam/flow | markdown | ## Code Before:
Change Log
==========
Version 0.4 *(2014-01-28)*
----------------------------
* API break: @Screen(layout=R.layout.foo) > @Layout(R.layout.foo), and Screens > Layouts.
Support for view class literals is gone. They break theming and the fix isn't worth the bother.
Version 0.3 *(2014-01-21)*
----------------------------
* New: Backstack#fromUpChain(Object), allows backstack to be created from
a HasParent screen.
Version 0.2 *(2013-11-12)*
----------------------------
Initial release.
## Instruction:
Update change log for 0.5
## Code After:
Change Log
==========
Version 0.5 *(2014-04-15)*
----------------------------
* Keep original screen on stack if found by resetTo.
Version 0.4 *(2014-01-28)*
----------------------------
* API break: @Screen(layout=R.layout.foo) > @Layout(R.layout.foo), and Screens > Layouts.
Support for view class literals is gone. They break theming and the fix isn't worth the bother.
Version 0.3 *(2014-01-21)*
----------------------------
* New: Backstack#fromUpChain(Object), allows backstack to be created from
a HasParent screen.
Version 0.2 *(2013-11-12)*
----------------------------
Initial release.
| Change Log
==========
+
+ Version 0.5 *(2014-04-15)*
+ ----------------------------
+ * Keep original screen on stack if found by resetTo.
Version 0.4 *(2014-01-28)*
----------------------------
* API break: @Screen(layout=R.layout.foo) > @Layout(R.layout.foo), and Screens > Layouts.
Support for view class literals is gone. They break theming and the fix isn't worth the bother.
Version 0.3 *(2014-01-21)*
----------------------------
* New: Backstack#fromUpChain(Object), allows backstack to be created from
a HasParent screen.
Version 0.2 *(2013-11-12)*
----------------------------
Initial release. | 4 | 0.235294 | 4 | 0 |
d71f85fbec5e80e4582a0d22c472a56e1965a9ae | app/controllers/home_controller.rb | app/controllers/home_controller.rb | class HomeController < ApplicationController
def index
end
def sfdata
@geojson = HTTParty.get("https://data.sfgov.org/resource/qg52-sqku?$$app_token=Tfqfz8OmwAEF8YU3FYwmm2xaD")
render json: {geojson: @geojson}
end
end
| class HomeController < ApplicationController
def index
end
def sfdata
@geojson = HTTParty.get("https://data.sfgov.org/resource/qg52-sqku?$$app_token=Tfqfz8OmwAEF8YU3FYwmm2xaD")
render json: @geojson
end
end
| Change format of object sent from sever to frontend | Change format of object sent from sever to frontend
| Ruby | mit | joshuacroff/mapbox_sandbox,joshuacroff/mapbox_sandbox,joshuacroff/mapbox_sandbox | ruby | ## Code Before:
class HomeController < ApplicationController
def index
end
def sfdata
@geojson = HTTParty.get("https://data.sfgov.org/resource/qg52-sqku?$$app_token=Tfqfz8OmwAEF8YU3FYwmm2xaD")
render json: {geojson: @geojson}
end
end
## Instruction:
Change format of object sent from sever to frontend
## Code After:
class HomeController < ApplicationController
def index
end
def sfdata
@geojson = HTTParty.get("https://data.sfgov.org/resource/qg52-sqku?$$app_token=Tfqfz8OmwAEF8YU3FYwmm2xaD")
render json: @geojson
end
end
| class HomeController < ApplicationController
def index
end
def sfdata
@geojson = HTTParty.get("https://data.sfgov.org/resource/qg52-sqku?$$app_token=Tfqfz8OmwAEF8YU3FYwmm2xaD")
- render json: {geojson: @geojson}
? ---------- -
+ render json: @geojson
end
end | 2 | 0.153846 | 1 | 1 |
e75eae3ef5876c82a11869eca39ec1e618c010de | public/js/views/window-view.js | public/js/views/window-view.js | 'use strict';
var Backbone = require( 'backbone' );
var WindowView = Backbone.View.extend({
el: 'body',
// Auto-wrapping of links with navigate method
events: {
'click a': 'navigate'
},
navigate: function( evt ) {
var $el = this.$( evt.target );
if ( ! $el.is( 'a' ) ) {
$el = $el.closest( 'a' );
}
var targetUrl = $el.attr( 'href' );
// Don't hijack any off-site links
if ( /http/.test( targetUrl ) ) {
return;
}
evt.preventDefault();
require( '../router' ).nav( targetUrl );
}
});
module.exports = new WindowView();
| 'use strict';
var router = require( '../router' );
var BaseView = require( './new-base-view' );
var WindowView = BaseView.extend({
// Auto-wrapping of links with navigate method
events: {
'click a': 'navigate'
},
navigate: function( evt ) {
var $el = this.$( evt.target );
if ( ! $el.is( 'a' ) ) {
$el = $el.closest( 'a' );
}
var targetUrl = $el.attr( 'href' );
// Don't hijack any off-site links
if ( /http/.test( targetUrl ) ) {
return;
}
evt.preventDefault();
router.nav( targetUrl );
}
});
module.exports = new WindowView({
el: document.body
});
| Convert WindowView to an ampersand-view | Convert WindowView to an ampersand-view
Uses the new base view to mix in jQuery functionality in the manner of
traditional backbone views
| JavaScript | mit | kadamwhite/mbtawesome | javascript | ## Code Before:
'use strict';
var Backbone = require( 'backbone' );
var WindowView = Backbone.View.extend({
el: 'body',
// Auto-wrapping of links with navigate method
events: {
'click a': 'navigate'
},
navigate: function( evt ) {
var $el = this.$( evt.target );
if ( ! $el.is( 'a' ) ) {
$el = $el.closest( 'a' );
}
var targetUrl = $el.attr( 'href' );
// Don't hijack any off-site links
if ( /http/.test( targetUrl ) ) {
return;
}
evt.preventDefault();
require( '../router' ).nav( targetUrl );
}
});
module.exports = new WindowView();
## Instruction:
Convert WindowView to an ampersand-view
Uses the new base view to mix in jQuery functionality in the manner of
traditional backbone views
## Code After:
'use strict';
var router = require( '../router' );
var BaseView = require( './new-base-view' );
var WindowView = BaseView.extend({
// Auto-wrapping of links with navigate method
events: {
'click a': 'navigate'
},
navigate: function( evt ) {
var $el = this.$( evt.target );
if ( ! $el.is( 'a' ) ) {
$el = $el.closest( 'a' );
}
var targetUrl = $el.attr( 'href' );
// Don't hijack any off-site links
if ( /http/.test( targetUrl ) ) {
return;
}
evt.preventDefault();
router.nav( targetUrl );
}
});
module.exports = new WindowView({
el: document.body
});
| 'use strict';
- var Backbone = require( 'backbone' );
+ var router = require( '../router' );
+ var BaseView = require( './new-base-view' );
- var WindowView = Backbone.View.extend({
? ^^^^^ -
+ var WindowView = BaseView.extend({
? ^
- el: 'body',
// Auto-wrapping of links with navigate method
events: {
'click a': 'navigate'
},
navigate: function( evt ) {
var $el = this.$( evt.target );
if ( ! $el.is( 'a' ) ) {
$el = $el.closest( 'a' );
}
var targetUrl = $el.attr( 'href' );
// Don't hijack any off-site links
if ( /http/.test( targetUrl ) ) {
return;
}
evt.preventDefault();
- require( '../router' ).nav( targetUrl );
? ------------- ---
+ router.nav( targetUrl );
}
});
- module.exports = new WindowView();
? ^^
+ module.exports = new WindowView({
? ^
+ el: document.body
+ }); | 12 | 0.375 | 7 | 5 |
fddd1e2f9c7edc4b4c4759235f039f143bcdfbb9 | src/main/java/leetcode/Problem121.java | src/main/java/leetcode/Problem121.java | package leetcode;
/**
* https://leetcode.com/problems/best-time-to-buy-and-sell-stock/
*/
public class Problem121 {
public int maxProfit(int[] prices) {
return 0;
}
public static void main(String[] args) {
Problem121 prob = new Problem121();
System.out.println(prob.maxProfit(new int[]{1, 2, 4, 2, 1, 3}));
}
}
| package leetcode;
/**
* https://leetcode.com/problems/best-time-to-buy-and-sell-stock/
*/
public class Problem121 {
public int maxProfit(int[] prices) {
int[] max = new int[prices.length];
int m = -1;
for (int i = prices.length-1; i != 0; i--) {
max[i] = Math.max(m, prices[i]);
m = max[i];
}
int profit = 0;
for (int i = 0; i < prices.length-1; i++) {
int buy = prices[i];
int sell = max[i+1];
profit = Math.max(profit, sell-buy);
}
return profit;
}
public static void main(String[] args) {
Problem121 prob = new Problem121();
System.out.println(prob.maxProfit(new int[]{1, 2, 4, 2, 1, 3}));
System.out.println(prob.maxProfit(new int[]{3, 2, 6, 5, 0, 3}));
}
}
| Update problem 121 (not verified) | Update problem 121 (not verified)
| Java | mit | fredyw/leetcode,fredyw/leetcode,fredyw/leetcode,fredyw/leetcode | java | ## Code Before:
package leetcode;
/**
* https://leetcode.com/problems/best-time-to-buy-and-sell-stock/
*/
public class Problem121 {
public int maxProfit(int[] prices) {
return 0;
}
public static void main(String[] args) {
Problem121 prob = new Problem121();
System.out.println(prob.maxProfit(new int[]{1, 2, 4, 2, 1, 3}));
}
}
## Instruction:
Update problem 121 (not verified)
## Code After:
package leetcode;
/**
* https://leetcode.com/problems/best-time-to-buy-and-sell-stock/
*/
public class Problem121 {
public int maxProfit(int[] prices) {
int[] max = new int[prices.length];
int m = -1;
for (int i = prices.length-1; i != 0; i--) {
max[i] = Math.max(m, prices[i]);
m = max[i];
}
int profit = 0;
for (int i = 0; i < prices.length-1; i++) {
int buy = prices[i];
int sell = max[i+1];
profit = Math.max(profit, sell-buy);
}
return profit;
}
public static void main(String[] args) {
Problem121 prob = new Problem121();
System.out.println(prob.maxProfit(new int[]{1, 2, 4, 2, 1, 3}));
System.out.println(prob.maxProfit(new int[]{3, 2, 6, 5, 0, 3}));
}
}
| package leetcode;
/**
* https://leetcode.com/problems/best-time-to-buy-and-sell-stock/
*/
public class Problem121 {
public int maxProfit(int[] prices) {
+ int[] max = new int[prices.length];
+ int m = -1;
+ for (int i = prices.length-1; i != 0; i--) {
+ max[i] = Math.max(m, prices[i]);
+ m = max[i];
+ }
+ int profit = 0;
+ for (int i = 0; i < prices.length-1; i++) {
+ int buy = prices[i];
+ int sell = max[i+1];
+ profit = Math.max(profit, sell-buy);
+ }
- return 0;
? ^
+ return profit;
? ^^^^^^
}
public static void main(String[] args) {
Problem121 prob = new Problem121();
System.out.println(prob.maxProfit(new int[]{1, 2, 4, 2, 1, 3}));
+ System.out.println(prob.maxProfit(new int[]{3, 2, 6, 5, 0, 3}));
}
} | 15 | 1 | 14 | 1 |
50c1cb494e29e148c5b07375803f75cd98cc014c | sw/fixtures/initial_data.json | sw/fixtures/initial_data.json | [
{
"pk": 1,
"model": "featureflipper.feature",
"fields": {
"enabled": false,
"name": "team_groupings",
"description": "List teams in smaller conceptual groupings"
}
},
{
"pk": 2,
"model": "featureflipper.feature",
"fields": {
"enabled": false,
"name": "breadcrumbs",
"description": "Navigational breadcrumbs"
}
}
] | [
{
"pk": 1,
"model": "featureflipper.feature",
"fields": {
"enabled": false,
"name": "team_groupings",
"description": "List teams in smaller conceptual groupings"
}
},
{
"pk": 2,
"model": "featureflipper.feature",
"fields": {
"enabled": false,
"name": "breadcrumbs",
"description": "When enabled, show breadcrumbs, a navigational tool to show position in the site map. When disabled, do not show breadcrumbs, but instead show a page title in a header tag."
}
},
{
"pk": 3,
"model": "featureflipper.feature",
"fields" : {
"enabled": false,
"name": "cms_content",
"description": "When enabled, show content management system pages. When disabled, show a note indicating that the site is not ready to unveil to the public."
}
}
] | Change breadcrumbs description; add CMS content feature. | Change breadcrumbs description; add CMS content feature. | JSON | apache-2.0 | snswa/swsites,snswa/swsites,snswa/swsites | json | ## Code Before:
[
{
"pk": 1,
"model": "featureflipper.feature",
"fields": {
"enabled": false,
"name": "team_groupings",
"description": "List teams in smaller conceptual groupings"
}
},
{
"pk": 2,
"model": "featureflipper.feature",
"fields": {
"enabled": false,
"name": "breadcrumbs",
"description": "Navigational breadcrumbs"
}
}
]
## Instruction:
Change breadcrumbs description; add CMS content feature.
## Code After:
[
{
"pk": 1,
"model": "featureflipper.feature",
"fields": {
"enabled": false,
"name": "team_groupings",
"description": "List teams in smaller conceptual groupings"
}
},
{
"pk": 2,
"model": "featureflipper.feature",
"fields": {
"enabled": false,
"name": "breadcrumbs",
"description": "When enabled, show breadcrumbs, a navigational tool to show position in the site map. When disabled, do not show breadcrumbs, but instead show a page title in a header tag."
}
},
{
"pk": 3,
"model": "featureflipper.feature",
"fields" : {
"enabled": false,
"name": "cms_content",
"description": "When enabled, show content management system pages. When disabled, show a note indicating that the site is not ready to unveil to the public."
}
}
] | [
{
"pk": 1,
"model": "featureflipper.feature",
"fields": {
"enabled": false,
"name": "team_groupings",
"description": "List teams in smaller conceptual groupings"
}
},
{
"pk": 2,
"model": "featureflipper.feature",
"fields": {
"enabled": false,
"name": "breadcrumbs",
- "description": "Navigational breadcrumbs"
+ "description": "When enabled, show breadcrumbs, a navigational tool to show position in the site map. When disabled, do not show breadcrumbs, but instead show a page title in a header tag."
+ }
+ },
+ {
+ "pk": 3,
+ "model": "featureflipper.feature",
+ "fields" : {
+ "enabled": false,
+ "name": "cms_content",
+ "description": "When enabled, show content management system pages. When disabled, show a note indicating that the site is not ready to unveil to the public."
}
}
] | 11 | 0.55 | 10 | 1 |
afa170f2cfa7e84e99559d0f1b3ceafec9c75de0 | test/Driver/unknown-arg.c | test/Driver/unknown-arg.c | // RUN: not %clang_cc1 %s -cake-is-lie -%0 -%d 2> %t.log
// RUN: FileCheck %s -input-file=%t.log
// CHECK: unknown argument
// CHECK: unknown argument
// CHECK: unknown argument
| // RUN: not %clang_cc1 %s -cake-is-lie -%0 -%d 2> %t.log
// RUN: FileCheck %s -input-file=%t.log
// CHECK: unknown argument
// CHECK: unknown argument
// CHECK: unknown argument
// RUN: %clang -S %s -o %t.s -funknown-to-clang-option -Wunknown-to-clang-option -munknown-to-clang-optio
// IGNORED: warning: argument unused during compilation: '-funknown-to-clang-option'
// IGNORED: warning: argument unused during compilation: '-munknown-to-clang-option'
// IGNORED: warning: unknown warning option '-Wunknown-to-clang-option'
| Add tests on how clang currently handles some unknown options. | Add tests on how clang currently handles some unknown options.
This is not to say this is the desired behavior, but it makes sure we notice
if it changes.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@191242 91177308-0d34-0410-b5e6-96231b3b80d8
| C | apache-2.0 | apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang | c | ## Code Before:
// RUN: not %clang_cc1 %s -cake-is-lie -%0 -%d 2> %t.log
// RUN: FileCheck %s -input-file=%t.log
// CHECK: unknown argument
// CHECK: unknown argument
// CHECK: unknown argument
## Instruction:
Add tests on how clang currently handles some unknown options.
This is not to say this is the desired behavior, but it makes sure we notice
if it changes.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@191242 91177308-0d34-0410-b5e6-96231b3b80d8
## Code After:
// RUN: not %clang_cc1 %s -cake-is-lie -%0 -%d 2> %t.log
// RUN: FileCheck %s -input-file=%t.log
// CHECK: unknown argument
// CHECK: unknown argument
// CHECK: unknown argument
// RUN: %clang -S %s -o %t.s -funknown-to-clang-option -Wunknown-to-clang-option -munknown-to-clang-optio
// IGNORED: warning: argument unused during compilation: '-funknown-to-clang-option'
// IGNORED: warning: argument unused during compilation: '-munknown-to-clang-option'
// IGNORED: warning: unknown warning option '-Wunknown-to-clang-option'
| // RUN: not %clang_cc1 %s -cake-is-lie -%0 -%d 2> %t.log
// RUN: FileCheck %s -input-file=%t.log
// CHECK: unknown argument
// CHECK: unknown argument
// CHECK: unknown argument
+
+
+ // RUN: %clang -S %s -o %t.s -funknown-to-clang-option -Wunknown-to-clang-option -munknown-to-clang-optio
+
+ // IGNORED: warning: argument unused during compilation: '-funknown-to-clang-option'
+ // IGNORED: warning: argument unused during compilation: '-munknown-to-clang-option'
+ // IGNORED: warning: unknown warning option '-Wunknown-to-clang-option' | 7 | 1.166667 | 7 | 0 |
368e715d82973e4676a551486b65359962b3ef48 | site/layouts/partials/head.html | site/layouts/partials/head.html | <!doctype html>
<html>
<head>
<title>{{ .Site.Title }}</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="shortcut icon" href="/fcc.png">
<link href="https://fonts.googleapis.com/css?family=Montserrat" rel="stylesheet">
<link rel="stylesheet" href="/css/main.css"/>
{{ template "_internal/opengraph.html" . }}
{{ template "_internal/google_news.html" . }}
{{ template "_internal/schema.html" . }}
{{ template "_internal/twitter_cards.html" . }}
<!-- Google Analytics -->
{{ template "_internal/google_analytics.html" . }}
</head>
<body>
| <!doctype html>
<html>
<head>
<title>{{ .Site.Title }}</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="shortcut icon" href="/fcc.png">
<link href="https://fonts.googleapis.com/css?family=Inconsolata" rel="stylesheet">
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.5.2/animate.min.css">
<link rel="stylesheet" href="/css/main.css"/>
{{ template "_internal/opengraph.html" . }}
{{ template "_internal/google_news.html" . }}
{{ template "_internal/schema.html" . }}
{{ template "_internal/twitter_cards.html" . }}
<!-- Google Analytics -->
{{ template "_internal/google_analytics.html" . }}
<script
src="https://code.jquery.com/jquery-3.1.1.min.js"
integrity="sha256-hVVnYaiADRTO2PzUGmuLJr8BLUSjGIZsDYGmIJLv2b8="
crossorigin="anonymous">
</script>
</head>
<body>
| Add new font, font-awesome, animate css and jquery | Add new font, font-awesome, animate css and jquery
| HTML | mit | FreeCodeCampMontevideo/fccmontevideo.com,FreeCodeCampMontevideo/fccmontevideo.com | html | ## Code Before:
<!doctype html>
<html>
<head>
<title>{{ .Site.Title }}</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="shortcut icon" href="/fcc.png">
<link href="https://fonts.googleapis.com/css?family=Montserrat" rel="stylesheet">
<link rel="stylesheet" href="/css/main.css"/>
{{ template "_internal/opengraph.html" . }}
{{ template "_internal/google_news.html" . }}
{{ template "_internal/schema.html" . }}
{{ template "_internal/twitter_cards.html" . }}
<!-- Google Analytics -->
{{ template "_internal/google_analytics.html" . }}
</head>
<body>
## Instruction:
Add new font, font-awesome, animate css and jquery
## Code After:
<!doctype html>
<html>
<head>
<title>{{ .Site.Title }}</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="shortcut icon" href="/fcc.png">
<link href="https://fonts.googleapis.com/css?family=Inconsolata" rel="stylesheet">
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.5.2/animate.min.css">
<link rel="stylesheet" href="/css/main.css"/>
{{ template "_internal/opengraph.html" . }}
{{ template "_internal/google_news.html" . }}
{{ template "_internal/schema.html" . }}
{{ template "_internal/twitter_cards.html" . }}
<!-- Google Analytics -->
{{ template "_internal/google_analytics.html" . }}
<script
src="https://code.jquery.com/jquery-3.1.1.min.js"
integrity="sha256-hVVnYaiADRTO2PzUGmuLJr8BLUSjGIZsDYGmIJLv2b8="
crossorigin="anonymous">
</script>
</head>
<body>
| <!doctype html>
<html>
<head>
<title>{{ .Site.Title }}</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="shortcut icon" href="/fcc.png">
- <link href="https://fonts.googleapis.com/css?family=Montserrat" rel="stylesheet">
? ^ - ^^^
+ <link href="https://fonts.googleapis.com/css?family=Inconsolata" rel="stylesheet">
? ^^^ ^^ +
+ <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.5.2/animate.min.css">
<link rel="stylesheet" href="/css/main.css"/>
{{ template "_internal/opengraph.html" . }}
{{ template "_internal/google_news.html" . }}
{{ template "_internal/schema.html" . }}
{{ template "_internal/twitter_cards.html" . }}
<!-- Google Analytics -->
{{ template "_internal/google_analytics.html" . }}
+
+ <script
+ src="https://code.jquery.com/jquery-3.1.1.min.js"
+ integrity="sha256-hVVnYaiADRTO2PzUGmuLJr8BLUSjGIZsDYGmIJLv2b8="
+ crossorigin="anonymous">
+ </script>
</head>
<body> | 10 | 0.5 | 9 | 1 |
111f5eeeae6ac9aa9a9d9d4ff52fa1983234e2dd | templates/emails/onboarding.noUpdates.hbs | templates/emails/onboarding.noUpdates.hbs | Subject: Give an update to your community!
{{> header}}
<h1>Hey {{collective.name}} π</h1>
<p>I noticed that you haven't published any update yet.</p>
<p>At Open Collective we believe that communication is key for a project to succeed. Share regularly updates about your progress, your activities but also the difficulties that you are facing. Your community wants to know how things are going. Don't leave them in the dark. Go ahead and <a href="https://opencollective.com/{{collective.slug}}/updates/new">publish an update</a>.</p>
<p>Let us know if you need any help setting things up, we are here to help your collective succeed.</p>
<p>Feel free to schedule a call (<a href="http://calendly.com/piamancini/call">calendly.com/piamancini/call</a>), email me or <a href="https://slack.opencollective.com">join us on our Slack</a>. We would love to know your story.</p>
<p>Best,</p>
<p>PΓa, and the Open Collective Team</p>
{{> footer}}
| Subject: Keep your community in the know.
{{> header}}
<h1>Hey {{collective.name}} π</h1>
<p>I noticed that you haven't published any update yet.</p>
<p>At Open Collective we believe that engaging your community is the key to make your collective sustainable. Share regularly updates about your progress, your activities but also the difficulties that you are facing. Your community wants to know how things are going. Don't leave them in the dark. Go ahead and <a href="https://opencollective.com/{{collective.slug}}/updates/new">publish an update</a>.</p>
<p> Check out our documentation on <a href="https://docs.opencollective.com/help/collectives/communication">Updates and Communication</a>. Let us know if you need any help setting things up. We are here to help your collective succeed.</p>
<p>Best,</p>
<p>PΓa, and the Open Collective Team</p>
{{> footer}}
| Update Onboarding if no updates - Day21 | Update Onboarding if no updates - Day21
Please move to day 21 if no updates | Handlebars | mit | OpenCollective/opencollective-api,OpenCollective/opencollective-api,OpenCollective/opencollective-api | handlebars | ## Code Before:
Subject: Give an update to your community!
{{> header}}
<h1>Hey {{collective.name}} π</h1>
<p>I noticed that you haven't published any update yet.</p>
<p>At Open Collective we believe that communication is key for a project to succeed. Share regularly updates about your progress, your activities but also the difficulties that you are facing. Your community wants to know how things are going. Don't leave them in the dark. Go ahead and <a href="https://opencollective.com/{{collective.slug}}/updates/new">publish an update</a>.</p>
<p>Let us know if you need any help setting things up, we are here to help your collective succeed.</p>
<p>Feel free to schedule a call (<a href="http://calendly.com/piamancini/call">calendly.com/piamancini/call</a>), email me or <a href="https://slack.opencollective.com">join us on our Slack</a>. We would love to know your story.</p>
<p>Best,</p>
<p>PΓa, and the Open Collective Team</p>
{{> footer}}
## Instruction:
Update Onboarding if no updates - Day21
Please move to day 21 if no updates
## Code After:
Subject: Keep your community in the know.
{{> header}}
<h1>Hey {{collective.name}} π</h1>
<p>I noticed that you haven't published any update yet.</p>
<p>At Open Collective we believe that engaging your community is the key to make your collective sustainable. Share regularly updates about your progress, your activities but also the difficulties that you are facing. Your community wants to know how things are going. Don't leave them in the dark. Go ahead and <a href="https://opencollective.com/{{collective.slug}}/updates/new">publish an update</a>.</p>
<p> Check out our documentation on <a href="https://docs.opencollective.com/help/collectives/communication">Updates and Communication</a>. Let us know if you need any help setting things up. We are here to help your collective succeed.</p>
<p>Best,</p>
<p>PΓa, and the Open Collective Team</p>
{{> footer}}
| - Subject: Give an update to your community!
+ Subject: Keep your community in the know.
{{> header}}
<h1>Hey {{collective.name}} π</h1>
- <p>I noticed that you haven't published any update yet.</p>
+ <p>I noticed that you haven't published any update yet.</p>
? +
- <p>At Open Collective we believe that communication is key for a project to succeed. Share regularly updates about your progress, your activities but also the difficulties that you are facing. Your community wants to know how things are going. Don't leave them in the dark. Go ahead and <a href="https://opencollective.com/{{collective.slug}}/updates/new">publish an update</a>.</p>
? ^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^
+ <p>At Open Collective we believe that engaging your community is the key to make your collective sustainable. Share regularly updates about your progress, your activities but also the difficulties that you are facing. Your community wants to know how things are going. Don't leave them in the dark. Go ahead and <a href="https://opencollective.com/{{collective.slug}}/updates/new">publish an update</a>.</p>
? ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ <p> Check out our documentation on <a href="https://docs.opencollective.com/help/collectives/communication">Updates and Communication</a>. Let us know if you need any help setting things up. We are here to help your collective succeed.</p>
- <p>Let us know if you need any help setting things up, we are here to help your collective succeed.</p>
-
- <p>Feel free to schedule a call (<a href="http://calendly.com/piamancini/call">calendly.com/piamancini/call</a>), email me or <a href="https://slack.opencollective.com">join us on our Slack</a>. We would love to know your story.</p>
<p>Best,</p>
<p>PΓa, and the Open Collective Team</p>
{{> footer}} | 10 | 0.526316 | 4 | 6 |
e05ea934335eac29c0b2f164eab600008546324c | recurring_contract/migrations/1.2/post-migration.py | recurring_contract/migrations/1.2/post-migration.py | import sys
def migrate(cr, version):
reload(sys)
sys.setdefaultencoding('UTF8')
if not version:
return
delay_dict = {'annual': 12, 'biannual': 6, 'fourmonthly': 4,
'quarterly': 3, 'bimonthly': 2, 'monthly': 1}
cr.execute(
'''
SELECT id, advance_billing FROM recurring_contract_group
'''
)
contract_groups = cr.fetchall()
for contract_group in contract_groups:
delay = delay_dict[contract_group[1]] or 1
cr.execute(
'''
UPDATE recurring_contract_group
SET recurring_value = {0}, advance_billing_months = {0}
WHERE id = {1}
'''.format(delay, contract_group[0])
)
| import sys
def migrate(cr, version):
reload(sys)
sys.setdefaultencoding('UTF8')
if not version:
return
delay_dict = {'annual': 12, 'biannual': 6, 'fourmonthly': 4,
'quarterly': 3, 'bimonthly': 2, 'monthly': 1}
cr.execute(
'''
SELECT id, advance_billing FROM recurring_contract_group
'''
)
contract_groups = cr.fetchall()
for contract_group in contract_groups:
delay = delay_dict[contract_group[1]] or 1
cr.execute(
'''
UPDATE recurring_contract_group
SET advance_billing_months = {0}
WHERE id = {1}
'''.format(delay, contract_group[0])
)
| Remove wrong migration of contracts. | Remove wrong migration of contracts.
| Python | agpl-3.0 | CompassionCH/compassion-accounting,ndtran/compassion-accounting,ndtran/compassion-accounting,ecino/compassion-accounting,ecino/compassion-accounting,CompassionCH/compassion-accounting,ndtran/compassion-accounting | python | ## Code Before:
import sys
def migrate(cr, version):
reload(sys)
sys.setdefaultencoding('UTF8')
if not version:
return
delay_dict = {'annual': 12, 'biannual': 6, 'fourmonthly': 4,
'quarterly': 3, 'bimonthly': 2, 'monthly': 1}
cr.execute(
'''
SELECT id, advance_billing FROM recurring_contract_group
'''
)
contract_groups = cr.fetchall()
for contract_group in contract_groups:
delay = delay_dict[contract_group[1]] or 1
cr.execute(
'''
UPDATE recurring_contract_group
SET recurring_value = {0}, advance_billing_months = {0}
WHERE id = {1}
'''.format(delay, contract_group[0])
)
## Instruction:
Remove wrong migration of contracts.
## Code After:
import sys
def migrate(cr, version):
reload(sys)
sys.setdefaultencoding('UTF8')
if not version:
return
delay_dict = {'annual': 12, 'biannual': 6, 'fourmonthly': 4,
'quarterly': 3, 'bimonthly': 2, 'monthly': 1}
cr.execute(
'''
SELECT id, advance_billing FROM recurring_contract_group
'''
)
contract_groups = cr.fetchall()
for contract_group in contract_groups:
delay = delay_dict[contract_group[1]] or 1
cr.execute(
'''
UPDATE recurring_contract_group
SET advance_billing_months = {0}
WHERE id = {1}
'''.format(delay, contract_group[0])
)
| import sys
def migrate(cr, version):
reload(sys)
sys.setdefaultencoding('UTF8')
if not version:
return
delay_dict = {'annual': 12, 'biannual': 6, 'fourmonthly': 4,
'quarterly': 3, 'bimonthly': 2, 'monthly': 1}
cr.execute(
'''
SELECT id, advance_billing FROM recurring_contract_group
'''
)
contract_groups = cr.fetchall()
for contract_group in contract_groups:
delay = delay_dict[contract_group[1]] or 1
cr.execute(
'''
UPDATE recurring_contract_group
- SET recurring_value = {0}, advance_billing_months = {0}
? -----------------------
+ SET advance_billing_months = {0}
WHERE id = {1}
'''.format(delay, contract_group[0])
) | 2 | 0.068966 | 1 | 1 |
c59b1a1740e7a01b833d496f34909b569964b529 | xsel.sh | xsel.sh |
case `uname -s` in
Darwin)
cap="pbcopy"
;;
*)
test -n "$DISPLAY" && type xsel && cap="xsel -b"
;;
esac
tac | while read line
do
echo -- $line | cut -d^ -f1
output=`echo $line | cut -d^ -f2`
test -n "$cap" && echo $output | eval $cap || echo $output
echo ' Press ENTER to continue...'
read enter </dev/tty
done
|
case `uname -s` in
Darwin)
cap="pbcopy"
;;
*)
test -n "$DISPLAY" && type xsel && cap="xsel -b"
;;
esac
tac | while read line
do
echo -- $line | cut -d^ -f1
output=`echo $line | cut -d^ -f2`
test -n "$cap" && echo $output | tr -d '\n' | eval $cap || echo $output
echo ' Press ENTER to continue...'
read enter </dev/tty
done
| Truncate newline from the copied string | Truncate newline from the copied string
| Shell | apache-2.0 | jsarenik/spf-tools,Vhex/spf-tools,ninjada/spf-tools | shell | ## Code Before:
case `uname -s` in
Darwin)
cap="pbcopy"
;;
*)
test -n "$DISPLAY" && type xsel && cap="xsel -b"
;;
esac
tac | while read line
do
echo -- $line | cut -d^ -f1
output=`echo $line | cut -d^ -f2`
test -n "$cap" && echo $output | eval $cap || echo $output
echo ' Press ENTER to continue...'
read enter </dev/tty
done
## Instruction:
Truncate newline from the copied string
## Code After:
case `uname -s` in
Darwin)
cap="pbcopy"
;;
*)
test -n "$DISPLAY" && type xsel && cap="xsel -b"
;;
esac
tac | while read line
do
echo -- $line | cut -d^ -f1
output=`echo $line | cut -d^ -f2`
test -n "$cap" && echo $output | tr -d '\n' | eval $cap || echo $output
echo ' Press ENTER to continue...'
read enter </dev/tty
done
|
case `uname -s` in
Darwin)
cap="pbcopy"
;;
*)
test -n "$DISPLAY" && type xsel && cap="xsel -b"
;;
esac
tac | while read line
do
echo -- $line | cut -d^ -f1
output=`echo $line | cut -d^ -f2`
- test -n "$cap" && echo $output | eval $cap || echo $output
+ test -n "$cap" && echo $output | tr -d '\n' | eval $cap || echo $output
? +++++++++++++
echo ' Press ENTER to continue...'
read enter </dev/tty
done | 2 | 0.111111 | 1 | 1 |
75bd60f2dc77018fc047ab2c09c9af73fa74e631 | src/graphql_clj/validator/transformations/inline_types.clj | src/graphql_clj/validator/transformations/inline_types.clj | (ns graphql-clj.validator.transformations.inline-types
"Inline field and parent field types for execution phase"
(:require [graphql-clj.visitor :as v]
[graphql-clj.spec :as spec]
[clojure.spec :as s]
[graphql-clj.box :as box]))
(defn- of-kind [{:keys [kind required inner-type]} s]
(if (:type-name inner-type)
(let [base (spec/get-type-node (spec/named-spec s [(:type-name inner-type)]) s)]
(select-keys base [:kind :required]))
{:kind kind :required required :of-kind (of-kind inner-type s)}))
(defn- parent-type [{:keys [spec]}]
(if-let [base-spec (s/get-spec spec)]
(if (keyword? base-spec) base-spec spec)
spec))
(def whitelisted-keys
#{:v/parentk :node-type :selection-set :type-name :field-name :name :args-fn :kind :of-kind :required :parent-type-name})
(declare inline-types)
(v/defnodevisitor inline-types :post :field
[{:keys [field-name parent-type-name spec v/path v/parent] :as n} {:keys [resolver] :as s}]
{:node (cond-> (select-keys n whitelisted-keys)
parent-type-name (assoc :parent-type-name (box/box->val parent-type-name))
resolver (assoc :resolver-fn (resolver parent-type-name field-name)))})
(def rules [inline-types])
| (ns graphql-clj.validator.transformations.inline-types
"Inline field and parent field types for execution phase"
(:require [graphql-clj.visitor :as v]
[graphql-clj.box :as box]))
(def whitelisted-keys
#{:v/parentk :node-type :selection-set :type-name :field-name :name :args-fn :kind :of-kind :required :parent-type-name})
(declare inline-types)
(v/defnodevisitor inline-types :post :field
[{:keys [field-name parent-type-name spec v/path v/parent] :as n} {:keys [resolver] :as s}]
{:node (cond-> (select-keys n whitelisted-keys)
parent-type-name (assoc :parent-type-name (box/box->val parent-type-name))
resolver (assoc :resolver-fn (resolver parent-type-name field-name)))})
(def rules [inline-types])
| Remove unused functions from inline types | Remove unused functions from inline types
| Clojure | epl-1.0 | tendant/graphql-clj | clojure | ## Code Before:
(ns graphql-clj.validator.transformations.inline-types
"Inline field and parent field types for execution phase"
(:require [graphql-clj.visitor :as v]
[graphql-clj.spec :as spec]
[clojure.spec :as s]
[graphql-clj.box :as box]))
(defn- of-kind [{:keys [kind required inner-type]} s]
(if (:type-name inner-type)
(let [base (spec/get-type-node (spec/named-spec s [(:type-name inner-type)]) s)]
(select-keys base [:kind :required]))
{:kind kind :required required :of-kind (of-kind inner-type s)}))
(defn- parent-type [{:keys [spec]}]
(if-let [base-spec (s/get-spec spec)]
(if (keyword? base-spec) base-spec spec)
spec))
(def whitelisted-keys
#{:v/parentk :node-type :selection-set :type-name :field-name :name :args-fn :kind :of-kind :required :parent-type-name})
(declare inline-types)
(v/defnodevisitor inline-types :post :field
[{:keys [field-name parent-type-name spec v/path v/parent] :as n} {:keys [resolver] :as s}]
{:node (cond-> (select-keys n whitelisted-keys)
parent-type-name (assoc :parent-type-name (box/box->val parent-type-name))
resolver (assoc :resolver-fn (resolver parent-type-name field-name)))})
(def rules [inline-types])
## Instruction:
Remove unused functions from inline types
## Code After:
(ns graphql-clj.validator.transformations.inline-types
"Inline field and parent field types for execution phase"
(:require [graphql-clj.visitor :as v]
[graphql-clj.box :as box]))
(def whitelisted-keys
#{:v/parentk :node-type :selection-set :type-name :field-name :name :args-fn :kind :of-kind :required :parent-type-name})
(declare inline-types)
(v/defnodevisitor inline-types :post :field
[{:keys [field-name parent-type-name spec v/path v/parent] :as n} {:keys [resolver] :as s}]
{:node (cond-> (select-keys n whitelisted-keys)
parent-type-name (assoc :parent-type-name (box/box->val parent-type-name))
resolver (assoc :resolver-fn (resolver parent-type-name field-name)))})
(def rules [inline-types])
| (ns graphql-clj.validator.transformations.inline-types
"Inline field and parent field types for execution phase"
(:require [graphql-clj.visitor :as v]
- [graphql-clj.spec :as spec]
- [clojure.spec :as s]
[graphql-clj.box :as box]))
-
- (defn- of-kind [{:keys [kind required inner-type]} s]
- (if (:type-name inner-type)
- (let [base (spec/get-type-node (spec/named-spec s [(:type-name inner-type)]) s)]
- (select-keys base [:kind :required]))
- {:kind kind :required required :of-kind (of-kind inner-type s)}))
-
- (defn- parent-type [{:keys [spec]}]
- (if-let [base-spec (s/get-spec spec)]
- (if (keyword? base-spec) base-spec spec)
- spec))
(def whitelisted-keys
#{:v/parentk :node-type :selection-set :type-name :field-name :name :args-fn :kind :of-kind :required :parent-type-name})
(declare inline-types)
(v/defnodevisitor inline-types :post :field
[{:keys [field-name parent-type-name spec v/path v/parent] :as n} {:keys [resolver] :as s}]
{:node (cond-> (select-keys n whitelisted-keys)
parent-type-name (assoc :parent-type-name (box/box->val parent-type-name))
resolver (assoc :resolver-fn (resolver parent-type-name field-name)))})
(def rules [inline-types]) | 13 | 0.448276 | 0 | 13 |
9c3e2db094d06ddc4a7dc3c8a9de899140e4ff7d | packages/core/src/store.ts | packages/core/src/store.ts | import { Store } from 'redux';
import { JsonSchema } from './models/jsonSchema';
import { UISchemaElement } from './models/uischema';
export interface JsonFormsStore extends Store<any> {
}
export interface JsonFormsState {
jsonforms: {
common: {
data: any;
schema?: JsonSchema;
uischema?: UISchemaElement;
};
renderers?: any[];
fields?: any[];
// allow additional state for JSONForms
[x: string]: any;
};
}
export interface JsonFormsInitialState {
data: any;
schema?: JsonSchema;
uischema?: UISchemaElement;
// allow additional state
[x: string]: any;
}
| import { Store } from 'redux';
import { JsonSchema } from './models/jsonSchema';
import { UISchemaElement } from './models/uischema';
import { ValidationState } from './reducers/validation';
export interface JsonFormsStore extends Store<any> {
}
export interface JsonFormsState {
jsonforms: {
common: {
data: any;
schema?: JsonSchema;
uischema?: UISchemaElement;
};
validation?: ValidationState,
renderers?: any[];
fields?: any[];
// allow additional state for JSONForms
[x: string]: any;
};
}
export interface JsonFormsInitialState {
data: any;
schema?: JsonSchema;
uischema?: UISchemaElement;
// allow additional state
[x: string]: any;
}
| Add validationState to JsonFormsState type | Add validationState to JsonFormsState type
| TypeScript | mit | qb-project/jsonforms,qb-project/jsonforms,qb-project/jsonforms | typescript | ## Code Before:
import { Store } from 'redux';
import { JsonSchema } from './models/jsonSchema';
import { UISchemaElement } from './models/uischema';
export interface JsonFormsStore extends Store<any> {
}
export interface JsonFormsState {
jsonforms: {
common: {
data: any;
schema?: JsonSchema;
uischema?: UISchemaElement;
};
renderers?: any[];
fields?: any[];
// allow additional state for JSONForms
[x: string]: any;
};
}
export interface JsonFormsInitialState {
data: any;
schema?: JsonSchema;
uischema?: UISchemaElement;
// allow additional state
[x: string]: any;
}
## Instruction:
Add validationState to JsonFormsState type
## Code After:
import { Store } from 'redux';
import { JsonSchema } from './models/jsonSchema';
import { UISchemaElement } from './models/uischema';
import { ValidationState } from './reducers/validation';
export interface JsonFormsStore extends Store<any> {
}
export interface JsonFormsState {
jsonforms: {
common: {
data: any;
schema?: JsonSchema;
uischema?: UISchemaElement;
};
validation?: ValidationState,
renderers?: any[];
fields?: any[];
// allow additional state for JSONForms
[x: string]: any;
};
}
export interface JsonFormsInitialState {
data: any;
schema?: JsonSchema;
uischema?: UISchemaElement;
// allow additional state
[x: string]: any;
}
| import { Store } from 'redux';
import { JsonSchema } from './models/jsonSchema';
import { UISchemaElement } from './models/uischema';
+ import { ValidationState } from './reducers/validation';
export interface JsonFormsStore extends Store<any> {
}
export interface JsonFormsState {
jsonforms: {
common: {
data: any;
schema?: JsonSchema;
uischema?: UISchemaElement;
};
+ validation?: ValidationState,
renderers?: any[];
fields?: any[];
// allow additional state for JSONForms
[x: string]: any;
};
}
export interface JsonFormsInitialState {
data: any;
schema?: JsonSchema;
uischema?: UISchemaElement;
// allow additional state
[x: string]: any;
} | 2 | 0.074074 | 2 | 0 |
6b64839432cf0b9d296df5a704001519f820035f | api/server.js | api/server.js | 'use strict'
var express = require('express'),
app = express(),
config = require('./libs/config'),
router = require('./routes'),
SerialPort = require('serialport').SerialPort,
serialPort = new SerialPort(config.serial.path, {
baudrate: config.serial.buadRate
}, false),
cards = require('./routes/cards'),
door = require('./libs/door'),
bodyParser = require('body-parser');
app.use(bodyParser.json())
app.get('/', function(req, res){
res.send({
active: true,
timestamp: new Date().getTime()
})
})
app.use('/api/v1', router)
// Server Listener
app.listen(config.app.port, config.app.host, function(e) {
console.log('Listening on http://%s:%s', config.app.host, config.app.port)
door.setup(function() {
serialPort.open(function (error) {
if ( error ) {
console.log('failed to open: '+ error);
} else {
serialPort.on('data', function(data) {
cards.isUIDAllowed(data, function(err, test) {
if (err) throw err;
door.open();
});
});
}
});
});
})
| 'use strict'
var express = require('express'),
app = express(),
config = require('./libs/config'),
router = require('./routes'),
SerialPort = require('serialport').SerialPort,
serialPort = new SerialPort(config.serial.path, {
baudrate: config.serial.buadRate
}, false),
cards = require('./routes/cards'),
door = require('./libs/door'),
bodyParser = require('body-parser');
app.use(bodyParser.json())
app.get('/', function(req, res){
res.send({
active: true,
timestamp: new Date().getTime()
})
})
app.use('/api/v1', router)
// Server Listener
app.listen(config.app.port, config.app.host, function(e) {
console.log('Listening on http://%s:%s', config.app.host, config.app.port)
if(process.env.PROD) {
door.setup(function() {
serialPort.open(function (error) {
if ( error ) {
console.log('failed to open: '+ error);
} else {
serialPort.on('data', function(data) {
cards.isUIDAllowed(data, function(err, test) {
if (err) throw err;
door.open();
});
});
}
});
});
}
})
| Allow to work in DEV or PROD | Allow to work in DEV or PROD
* If using Rpi, add PROD=true environment to enable Serial and GPIO
* PROD=TRUE nodemon server.js
| JavaScript | unlicense | familab/accessController,familab/accessController | javascript | ## Code Before:
'use strict'
var express = require('express'),
app = express(),
config = require('./libs/config'),
router = require('./routes'),
SerialPort = require('serialport').SerialPort,
serialPort = new SerialPort(config.serial.path, {
baudrate: config.serial.buadRate
}, false),
cards = require('./routes/cards'),
door = require('./libs/door'),
bodyParser = require('body-parser');
app.use(bodyParser.json())
app.get('/', function(req, res){
res.send({
active: true,
timestamp: new Date().getTime()
})
})
app.use('/api/v1', router)
// Server Listener
app.listen(config.app.port, config.app.host, function(e) {
console.log('Listening on http://%s:%s', config.app.host, config.app.port)
door.setup(function() {
serialPort.open(function (error) {
if ( error ) {
console.log('failed to open: '+ error);
} else {
serialPort.on('data', function(data) {
cards.isUIDAllowed(data, function(err, test) {
if (err) throw err;
door.open();
});
});
}
});
});
})
## Instruction:
Allow to work in DEV or PROD
* If using Rpi, add PROD=true environment to enable Serial and GPIO
* PROD=TRUE nodemon server.js
## Code After:
'use strict'
var express = require('express'),
app = express(),
config = require('./libs/config'),
router = require('./routes'),
SerialPort = require('serialport').SerialPort,
serialPort = new SerialPort(config.serial.path, {
baudrate: config.serial.buadRate
}, false),
cards = require('./routes/cards'),
door = require('./libs/door'),
bodyParser = require('body-parser');
app.use(bodyParser.json())
app.get('/', function(req, res){
res.send({
active: true,
timestamp: new Date().getTime()
})
})
app.use('/api/v1', router)
// Server Listener
app.listen(config.app.port, config.app.host, function(e) {
console.log('Listening on http://%s:%s', config.app.host, config.app.port)
if(process.env.PROD) {
door.setup(function() {
serialPort.open(function (error) {
if ( error ) {
console.log('failed to open: '+ error);
} else {
serialPort.on('data', function(data) {
cards.isUIDAllowed(data, function(err, test) {
if (err) throw err;
door.open();
});
});
}
});
});
}
})
| 'use strict'
var express = require('express'),
app = express(),
config = require('./libs/config'),
router = require('./routes'),
SerialPort = require('serialport').SerialPort,
serialPort = new SerialPort(config.serial.path, {
baudrate: config.serial.buadRate
}, false),
cards = require('./routes/cards'),
door = require('./libs/door'),
bodyParser = require('body-parser');
app.use(bodyParser.json())
app.get('/', function(req, res){
res.send({
active: true,
timestamp: new Date().getTime()
})
})
app.use('/api/v1', router)
// Server Listener
app.listen(config.app.port, config.app.host, function(e) {
console.log('Listening on http://%s:%s', config.app.host, config.app.port)
+ if(process.env.PROD) {
- door.setup(function() {
+ door.setup(function() {
? ++
- serialPort.open(function (error) {
+ serialPort.open(function (error) {
? ++
- if ( error ) {
+ if ( error ) {
? ++
- console.log('failed to open: '+ error);
+ console.log('failed to open: '+ error);
? ++
- } else {
+ } else {
? ++
- serialPort.on('data', function(data) {
+ serialPort.on('data', function(data) {
? ++
- cards.isUIDAllowed(data, function(err, test) {
+ cards.isUIDAllowed(data, function(err, test) {
? ++
- if (err) throw err;
+ if (err) throw err;
? ++
- door.open();
+ door.open();
? ++
+ });
});
- });
? --
+ }
- }
+ });
? ++
});
- });
? --
+ }
}) | 26 | 0.619048 | 14 | 12 |
f2ab04ec2eb870e661223fd397d7c5a23935a233 | src/apps/employees/schema/types.py | src/apps/employees/schema/types.py | import graphene
from graphene_django.types import DjangoObjectType, ObjectType
from graphene_django_extras import (
DjangoFilterPaginateListField, LimitOffsetGraphqlPagination
)
from apps.employees import models
class EmployeeType(DjangoObjectType):
class Meta:
model = models.Employee
filter_fields = {
'first_name': ['icontains', 'istartswith'],
'last_name': ['icontains', 'istartswith'],
'position': ['exact'],
'id': ['exact']
}
interfaces = (graphene.relay.Node,)
class PositionType(DjangoObjectType):
"""
Position graphQL type.
Implemented total_employees and employees objects.
"""
employees = DjangoFilterPaginateListField(
EmployeeType,
pagination=LimitOffsetGraphqlPagination()
)
total_employees = graphene.Int()
def resolve_total_employees(self, info):
return self.employees.count()
def resolve_employees(self, info):
return self.employees.all()
class Meta:
model = models.Position
filter_fields = {
'name': ['exact', 'icontains', 'istartswith'],
'id': ['exact']
}
interfaces = (graphene.relay.Node,)
class SpecializationType(DjangoObjectType):
class Meta:
model = models.Specialization
filter_fields = {
'name': ['exact', 'icontains', 'istartswith'],
'id': ['exact'],
}
interfaces = (graphene.relay.Node,)
| import graphene
from graphene_django.types import DjangoObjectType, ObjectType
from graphene_django_extras import (
DjangoFilterPaginateListField, LimitOffsetGraphqlPagination
)
from apps.employees import models
class EmployeeType(DjangoObjectType):
class Meta:
model = models.Employee
filter_fields = {
'first_name': ['icontains', 'istartswith'],
'last_name': ['icontains', 'istartswith'],
'position': ['exact'],
'id': ['exact']
}
class PositionType(DjangoObjectType):
"""
Position graphQL type.
Implemented total_employees and employees objects.
"""
employees = DjangoFilterPaginateListField(
EmployeeType,
pagination=LimitOffsetGraphqlPagination()
)
total_employees = graphene.Int()
def resolve_total_employees(self, info):
return self.employees.count()
def resolve_employees(self, info):
return self.employees.all()
class Meta:
model = models.Position
filter_fields = {
'name': ['exact', 'icontains', 'istartswith'],
'id': ['exact']
}
class SpecializationType(DjangoObjectType):
class Meta:
model = models.Specialization
filter_fields = {
'name': ['exact', 'icontains', 'istartswith'],
'id': ['exact'],
}
| Remove Node interfaces (use origin id for objects) | Remove Node interfaces (use origin id for objects)
| Python | mit | wis-software/office-manager | python | ## Code Before:
import graphene
from graphene_django.types import DjangoObjectType, ObjectType
from graphene_django_extras import (
DjangoFilterPaginateListField, LimitOffsetGraphqlPagination
)
from apps.employees import models
class EmployeeType(DjangoObjectType):
class Meta:
model = models.Employee
filter_fields = {
'first_name': ['icontains', 'istartswith'],
'last_name': ['icontains', 'istartswith'],
'position': ['exact'],
'id': ['exact']
}
interfaces = (graphene.relay.Node,)
class PositionType(DjangoObjectType):
"""
Position graphQL type.
Implemented total_employees and employees objects.
"""
employees = DjangoFilterPaginateListField(
EmployeeType,
pagination=LimitOffsetGraphqlPagination()
)
total_employees = graphene.Int()
def resolve_total_employees(self, info):
return self.employees.count()
def resolve_employees(self, info):
return self.employees.all()
class Meta:
model = models.Position
filter_fields = {
'name': ['exact', 'icontains', 'istartswith'],
'id': ['exact']
}
interfaces = (graphene.relay.Node,)
class SpecializationType(DjangoObjectType):
class Meta:
model = models.Specialization
filter_fields = {
'name': ['exact', 'icontains', 'istartswith'],
'id': ['exact'],
}
interfaces = (graphene.relay.Node,)
## Instruction:
Remove Node interfaces (use origin id for objects)
## Code After:
import graphene
from graphene_django.types import DjangoObjectType, ObjectType
from graphene_django_extras import (
DjangoFilterPaginateListField, LimitOffsetGraphqlPagination
)
from apps.employees import models
class EmployeeType(DjangoObjectType):
class Meta:
model = models.Employee
filter_fields = {
'first_name': ['icontains', 'istartswith'],
'last_name': ['icontains', 'istartswith'],
'position': ['exact'],
'id': ['exact']
}
class PositionType(DjangoObjectType):
"""
Position graphQL type.
Implemented total_employees and employees objects.
"""
employees = DjangoFilterPaginateListField(
EmployeeType,
pagination=LimitOffsetGraphqlPagination()
)
total_employees = graphene.Int()
def resolve_total_employees(self, info):
return self.employees.count()
def resolve_employees(self, info):
return self.employees.all()
class Meta:
model = models.Position
filter_fields = {
'name': ['exact', 'icontains', 'istartswith'],
'id': ['exact']
}
class SpecializationType(DjangoObjectType):
class Meta:
model = models.Specialization
filter_fields = {
'name': ['exact', 'icontains', 'istartswith'],
'id': ['exact'],
}
| import graphene
from graphene_django.types import DjangoObjectType, ObjectType
from graphene_django_extras import (
DjangoFilterPaginateListField, LimitOffsetGraphqlPagination
)
from apps.employees import models
class EmployeeType(DjangoObjectType):
class Meta:
model = models.Employee
filter_fields = {
'first_name': ['icontains', 'istartswith'],
'last_name': ['icontains', 'istartswith'],
'position': ['exact'],
'id': ['exact']
}
- interfaces = (graphene.relay.Node,)
class PositionType(DjangoObjectType):
"""
Position graphQL type.
Implemented total_employees and employees objects.
"""
employees = DjangoFilterPaginateListField(
EmployeeType,
pagination=LimitOffsetGraphqlPagination()
)
total_employees = graphene.Int()
def resolve_total_employees(self, info):
return self.employees.count()
def resolve_employees(self, info):
return self.employees.all()
class Meta:
model = models.Position
filter_fields = {
'name': ['exact', 'icontains', 'istartswith'],
'id': ['exact']
}
- interfaces = (graphene.relay.Node,)
class SpecializationType(DjangoObjectType):
class Meta:
model = models.Specialization
filter_fields = {
'name': ['exact', 'icontains', 'istartswith'],
'id': ['exact'],
}
- interfaces = (graphene.relay.Node,) | 3 | 0.052632 | 0 | 3 |
b4d43bfbcc03b93826c194fb98a52b411dc6304b | turbustat/tests/test_wrapper.py | turbustat/tests/test_wrapper.py |
from ..statistics import stats_wrapper
from ._testing_data import \
dataset1, dataset2
def test_wrapper():
run_wrapper = stats_wrapper(dataset1, dataset2)
|
import pytest
import numpy as np
from ..statistics import stats_wrapper, statistics_list
from ._testing_data import \
dataset1, dataset2
spacers = np.arange(2, len(statistics_list) + 1, 2)
# Split these into smaller tests to avoid timeout errors on Travis
@pytest.mark.parametrize(('stats'),
[statistics_list[i - 2:i] for i in
spacers])
def test_wrapper(stats):
stats_wrapper(dataset1, dataset2,
statistics=stats)
| Split wrapper tests into smaller chunks | Split wrapper tests into smaller chunks
| Python | mit | Astroua/TurbuStat,e-koch/TurbuStat | python | ## Code Before:
from ..statistics import stats_wrapper
from ._testing_data import \
dataset1, dataset2
def test_wrapper():
run_wrapper = stats_wrapper(dataset1, dataset2)
## Instruction:
Split wrapper tests into smaller chunks
## Code After:
import pytest
import numpy as np
from ..statistics import stats_wrapper, statistics_list
from ._testing_data import \
dataset1, dataset2
spacers = np.arange(2, len(statistics_list) + 1, 2)
# Split these into smaller tests to avoid timeout errors on Travis
@pytest.mark.parametrize(('stats'),
[statistics_list[i - 2:i] for i in
spacers])
def test_wrapper(stats):
stats_wrapper(dataset1, dataset2,
statistics=stats)
|
+ import pytest
+ import numpy as np
+
- from ..statistics import stats_wrapper
+ from ..statistics import stats_wrapper, statistics_list
? +++++++++++++++++
from ._testing_data import \
dataset1, dataset2
+ spacers = np.arange(2, len(statistics_list) + 1, 2)
- def test_wrapper():
+ # Split these into smaller tests to avoid timeout errors on Travis
+ @pytest.mark.parametrize(('stats'),
+ [statistics_list[i - 2:i] for i in
+ spacers])
+ def test_wrapper(stats):
+
- run_wrapper = stats_wrapper(dataset1, dataset2)
? -------------- ^
+ stats_wrapper(dataset1, dataset2,
? ^
+ statistics=stats) | 16 | 1.777778 | 13 | 3 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.