commit
stringlengths 40
40
| old_file
stringlengths 4
237
| new_file
stringlengths 4
237
| old_contents
stringlengths 1
4.24k
| new_contents
stringlengths 5
4.84k
| subject
stringlengths 15
778
| message
stringlengths 16
6.86k
| lang
stringlengths 1
30
| license
stringclasses 13
values | repos
stringlengths 5
116k
| config
stringlengths 1
30
| content
stringlengths 105
8.72k
|
---|---|---|---|---|---|---|---|---|---|---|---|
2ffd0f3003e3426fcd9b80fe5571bd17206fa2aa
|
conf/default-config.yaml
|
conf/default-config.yaml
|
logger: |
* GLOBAL:
FORMAT = "%datetime{%Y-%d-%M %H:%m:%s,%g} [%logger] %level %msg"
ENABLED = true
TO_FILE = true
TO_STANDARD_OUTPUT = false
MILLISECONDS_WIDTH = 3
PERFORMANCE_TRACKING = true
MAX_LOG_FILE_SIZE = 2097152 ## 2MB - Comment starts with two hashes (##)
LOG_FLUSH_THRESHOLD = 100 ## Flush after every 100 logs
* VERBOSE:
FORMAT = "%datetime{%Y-%d-%M %H:%m:%s,%g} [%logger] %level%vlevel %msg"
|
version: 1
logger: |
* GLOBAL:
FORMAT = "%datetime{%Y-%d-%M %H:%m:%s,%g} [%logger] %level %msg"
ENABLED = true
TO_FILE = true
TO_STANDARD_OUTPUT = false
MILLISECONDS_WIDTH = 3
PERFORMANCE_TRACKING = true
MAX_LOG_FILE_SIZE = 2097152 ## 2MB - Comment starts with two hashes (##)
LOG_FLUSH_THRESHOLD = 100 ## Flush after every 100 logs
* VERBOSE:
FORMAT = "%datetime{%Y-%d-%M %H:%m:%s,%g} [%logger] %level%vlevel %msg"
|
Add versioning to the configuration file
|
[TASK] Add versioning to the configuration file
Related: CLI-117
|
YAML
|
bsd-3-clause
|
VirgilSecurity/virgil-cli
|
yaml
|
## Code Before:
logger: |
* GLOBAL:
FORMAT = "%datetime{%Y-%d-%M %H:%m:%s,%g} [%logger] %level %msg"
ENABLED = true
TO_FILE = true
TO_STANDARD_OUTPUT = false
MILLISECONDS_WIDTH = 3
PERFORMANCE_TRACKING = true
MAX_LOG_FILE_SIZE = 2097152 ## 2MB - Comment starts with two hashes (##)
LOG_FLUSH_THRESHOLD = 100 ## Flush after every 100 logs
* VERBOSE:
FORMAT = "%datetime{%Y-%d-%M %H:%m:%s,%g} [%logger] %level%vlevel %msg"
## Instruction:
[TASK] Add versioning to the configuration file
Related: CLI-117
## Code After:
version: 1
logger: |
* GLOBAL:
FORMAT = "%datetime{%Y-%d-%M %H:%m:%s,%g} [%logger] %level %msg"
ENABLED = true
TO_FILE = true
TO_STANDARD_OUTPUT = false
MILLISECONDS_WIDTH = 3
PERFORMANCE_TRACKING = true
MAX_LOG_FILE_SIZE = 2097152 ## 2MB - Comment starts with two hashes (##)
LOG_FLUSH_THRESHOLD = 100 ## Flush after every 100 logs
* VERBOSE:
FORMAT = "%datetime{%Y-%d-%M %H:%m:%s,%g} [%logger] %level%vlevel %msg"
|
195acac2339891f2e9e0f41e7e28858b90218217
|
README.md
|
README.md
|
This repository tracks the code that runs the endpoint of an Onionimbus cluster.
Its name refers to a node in a network. *This is not a Node-JS project.*
A node has two main purposes:
1. Listen to instructions provided by the hub.
2. Proxy the requests provided by users to the Hidden Service.
### Requirements
* Latest nginx (1.6.2 / 1.7.5 as of this writing)
* Latest PostgreSQL (9.3.5 as of this writing)
* Latest PHP (5.6.3 as of this writing)
* `php5-fpm` for nginx
* `php5-pgsql` for postgresql
* `php5-cli` for most of the actual functionality
* `php5-mcrypt`
* `php5-json` or `php5-common` depending on your distro
* Latest OpenSSL (if you don't update this, my heart won't bleed for you)
|
This repository tracks the code that runs the endpoint of an Onionimbus cluster.
Its name refers to a node in a network. *This is not a Node-JS project.*
A node has two main purposes:
1. Listen to instructions provided by the hub.
2. Proxy the requests provided by users to the Hidden Service.
### Requirements
* Latest nginx (1.6.2 / 1.7.5 as of this writing)
* Latest PostgreSQL (9.3.5 as of this writing)
* Latest PHP (5.6.3 as of this writing)
* `php5-fpm` for nginx
* `php5-pgsql` for postgresql
* `php5-cli` for most of the actual functionality
* `php5-mcrypt`
* `php5-json` or `php5-common` depending on your distro
* Latest OpenSSL (if you don't update this, my heart won't bleed for you)
See also: [https://github.com/darkitecht/onionimbus_hub](The Hub)
|
Add link to the hub
|
Add link to the hub
|
Markdown
|
unlicense
|
darkitecht/onionimbus_node,darkitecht/onionimbus_node
|
markdown
|
## Code Before:
This repository tracks the code that runs the endpoint of an Onionimbus cluster.
Its name refers to a node in a network. *This is not a Node-JS project.*
A node has two main purposes:
1. Listen to instructions provided by the hub.
2. Proxy the requests provided by users to the Hidden Service.
### Requirements
* Latest nginx (1.6.2 / 1.7.5 as of this writing)
* Latest PostgreSQL (9.3.5 as of this writing)
* Latest PHP (5.6.3 as of this writing)
* `php5-fpm` for nginx
* `php5-pgsql` for postgresql
* `php5-cli` for most of the actual functionality
* `php5-mcrypt`
* `php5-json` or `php5-common` depending on your distro
* Latest OpenSSL (if you don't update this, my heart won't bleed for you)
## Instruction:
Add link to the hub
## Code After:
This repository tracks the code that runs the endpoint of an Onionimbus cluster.
Its name refers to a node in a network. *This is not a Node-JS project.*
A node has two main purposes:
1. Listen to instructions provided by the hub.
2. Proxy the requests provided by users to the Hidden Service.
### Requirements
* Latest nginx (1.6.2 / 1.7.5 as of this writing)
* Latest PostgreSQL (9.3.5 as of this writing)
* Latest PHP (5.6.3 as of this writing)
* `php5-fpm` for nginx
* `php5-pgsql` for postgresql
* `php5-cli` for most of the actual functionality
* `php5-mcrypt`
* `php5-json` or `php5-common` depending on your distro
* Latest OpenSSL (if you don't update this, my heart won't bleed for you)
See also: [https://github.com/darkitecht/onionimbus_hub](The Hub)
|
e60e8c81309dc8af171ab459e20d07365d7d5425
|
lib_test/mkiso.sh
|
lib_test/mkiso.sh
|
if type "mkisofs" > /dev/null; then
mkdir test_iso
echo "hello, world!" > test_iso/hello.txt
mkisofs -o test.iso -R test_iso
else
curl http://www.recoil.org/~jon/ocaml-iso9660-test.iso -o test.iso
fi
|
if type "mkisofs" > /dev/null; then
mkdir test_iso
echo "hello, world!" > test_iso/hello.txt
echo "old file" > test_iso/old.txt
touch -t 197001010001 test_iso/old.txt
mkisofs -o test.iso -R test_iso
else
curl http://www.recoil.org/~jon/ocaml-iso9660-test.iso -o test.iso
fi
|
Add a file to the test iso with an old timestamp
|
Add a file to the test iso with an old timestamp
Signed-off-by: Jon Ludlam <[email protected]>
|
Shell
|
isc
|
jonludlam/ocaml-iso-filesystem
|
shell
|
## Code Before:
if type "mkisofs" > /dev/null; then
mkdir test_iso
echo "hello, world!" > test_iso/hello.txt
mkisofs -o test.iso -R test_iso
else
curl http://www.recoil.org/~jon/ocaml-iso9660-test.iso -o test.iso
fi
## Instruction:
Add a file to the test iso with an old timestamp
Signed-off-by: Jon Ludlam <[email protected]>
## Code After:
if type "mkisofs" > /dev/null; then
mkdir test_iso
echo "hello, world!" > test_iso/hello.txt
echo "old file" > test_iso/old.txt
touch -t 197001010001 test_iso/old.txt
mkisofs -o test.iso -R test_iso
else
curl http://www.recoil.org/~jon/ocaml-iso9660-test.iso -o test.iso
fi
|
13069f6c41879bfd0d8d07c39f1112fa02658441
|
gxa/src/main/java/uk/ac/ebi/atlas/experimentpage/baseline/coexpression/CoexpressedGenesController.java
|
gxa/src/main/java/uk/ac/ebi/atlas/experimentpage/baseline/coexpression/CoexpressedGenesController.java
|
package uk.ac.ebi.atlas.experimentpage.baseline.coexpression;
import com.google.gson.Gson;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import javax.inject.Inject;
import java.util.Set;
@Controller
@RequestMapping
public class CoexpressedGenesController {
Gson gson = new Gson();
CoexpressedGenesDao coexpressedGenesDao;
@Inject
public CoexpressedGenesController(JdbcTemplate jdbcTemplate){
this.coexpressedGenesDao = new CoexpressedGenesDao(jdbcTemplate);
}
@RequestMapping(value ={"/json/experiments/coexpression"}, method = RequestMethod.GET, produces = "application/json;charset=UTF-8")
@ResponseBody
public String fetchCoexpressedGenes(@RequestParam(value = "experiment", required = true) String experiment,
@RequestParam(value = "identifier", required = true) String identifier) {
return gson.toJson(coexpressedGenesDao.coexpressedGenesFor(experiment, identifier), Set.class);
}
}
|
package uk.ac.ebi.atlas.experimentpage.baseline.coexpression;
import com.google.gson.Gson;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import uk.ac.ebi.atlas.controllers.JsonExceptionHandlingController;
import javax.inject.Inject;
import java.util.Set;
@Controller
@RequestMapping
public class CoexpressedGenesController extends JsonExceptionHandlingController {
private final Gson gson = new Gson();
private final CoexpressedGenesDao coexpressedGenesDao;
@Inject
public CoexpressedGenesController(JdbcTemplate jdbcTemplate){
this.coexpressedGenesDao = new CoexpressedGenesDao(jdbcTemplate);
}
@RequestMapping(value ={"/json/experiments/coexpression"},
method = RequestMethod.GET, produces = "application/json;charset=UTF-8")
@ResponseBody
public String fetchCoexpressedGenes(@RequestParam(value = "experiment") String experiment,
@RequestParam(value = "identifier") String identifier) {
return gson.toJson(coexpressedGenesDao.coexpressedGenesFor(experiment, identifier), Set.class);
}
}
|
Replace wildcard import with single imports
|
Replace wildcard import with single imports
|
Java
|
apache-2.0
|
gxa/atlas,gxa/atlas,gxa/atlas,gxa/atlas,gxa/atlas
|
java
|
## Code Before:
package uk.ac.ebi.atlas.experimentpage.baseline.coexpression;
import com.google.gson.Gson;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import javax.inject.Inject;
import java.util.Set;
@Controller
@RequestMapping
public class CoexpressedGenesController {
Gson gson = new Gson();
CoexpressedGenesDao coexpressedGenesDao;
@Inject
public CoexpressedGenesController(JdbcTemplate jdbcTemplate){
this.coexpressedGenesDao = new CoexpressedGenesDao(jdbcTemplate);
}
@RequestMapping(value ={"/json/experiments/coexpression"}, method = RequestMethod.GET, produces = "application/json;charset=UTF-8")
@ResponseBody
public String fetchCoexpressedGenes(@RequestParam(value = "experiment", required = true) String experiment,
@RequestParam(value = "identifier", required = true) String identifier) {
return gson.toJson(coexpressedGenesDao.coexpressedGenesFor(experiment, identifier), Set.class);
}
}
## Instruction:
Replace wildcard import with single imports
## Code After:
package uk.ac.ebi.atlas.experimentpage.baseline.coexpression;
import com.google.gson.Gson;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import uk.ac.ebi.atlas.controllers.JsonExceptionHandlingController;
import javax.inject.Inject;
import java.util.Set;
@Controller
@RequestMapping
public class CoexpressedGenesController extends JsonExceptionHandlingController {
private final Gson gson = new Gson();
private final CoexpressedGenesDao coexpressedGenesDao;
@Inject
public CoexpressedGenesController(JdbcTemplate jdbcTemplate){
this.coexpressedGenesDao = new CoexpressedGenesDao(jdbcTemplate);
}
@RequestMapping(value ={"/json/experiments/coexpression"},
method = RequestMethod.GET, produces = "application/json;charset=UTF-8")
@ResponseBody
public String fetchCoexpressedGenes(@RequestParam(value = "experiment") String experiment,
@RequestParam(value = "identifier") String identifier) {
return gson.toJson(coexpressedGenesDao.coexpressedGenesFor(experiment, identifier), Set.class);
}
}
|
607b6d653e06204c73999c5cb34c0a61ff051e59
|
src/Week.css
|
src/Week.css
|
:local(.component) {
display: flex;
flex-direction: column;
max-height: 100%;
width: 100%;
border-bottom: 1px solid #ccc;
}
:local(.days),
:local(.header) {
display: flex;
align-items: flex-start;
}
:local(.daysWrapper) {
position: relative;
border-top: 1px solid #ccc;
overflow: auto;
-webkit-overflow-scrolling: touch;
}
:local(.header) {
padding-left: 30px;
flex-shrink: 0;
}
:local(.lines) {
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
}
:local(.hour) {
border-bottom: 1px solid #dadfea;
pointer-events: none;
}
:local(.halfHour) {
height: 50%;
border-bottom: 1px dashed #dadfea;
pointer-events: none;
}
|
:local(.component) {
display: flex;
flex-direction: column;
max-height: 100%;
width: 100%;
border-bottom: 1px solid #ccc;
}
:local(.days),
:local(.header) {
display: flex;
align-items: flex-start;
}
:local(.daysWrapper) {
position: relative;
border-top: 1px solid #ccc;
overflow: auto;
flex: 1 1 auto;
-webkit-overflow-scrolling: touch;
}
:local(.header) {
padding-left: 30px;
flex-shrink: 0;
}
:local(.lines) {
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
}
:local(.hour) {
border-bottom: 1px solid #dadfea;
pointer-events: none;
}
:local(.halfHour) {
height: 50%;
border-bottom: 1px dashed #dadfea;
pointer-events: none;
}
|
Fix scrolling of days in iOS Safari
|
Fix scrolling of days in iOS Safari
Scrolling of the main screen was broken in iOS Safari. Switching
approach to make use of flex-grow, shrink and flex-basis worked better.
http://stackoverflow.com/questions/39705876/css-scroll-issue-with-flexbox-and-max-height
|
CSS
|
mit
|
trotzig/react-available-times,trotzig/react-available-times
|
css
|
## Code Before:
:local(.component) {
display: flex;
flex-direction: column;
max-height: 100%;
width: 100%;
border-bottom: 1px solid #ccc;
}
:local(.days),
:local(.header) {
display: flex;
align-items: flex-start;
}
:local(.daysWrapper) {
position: relative;
border-top: 1px solid #ccc;
overflow: auto;
-webkit-overflow-scrolling: touch;
}
:local(.header) {
padding-left: 30px;
flex-shrink: 0;
}
:local(.lines) {
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
}
:local(.hour) {
border-bottom: 1px solid #dadfea;
pointer-events: none;
}
:local(.halfHour) {
height: 50%;
border-bottom: 1px dashed #dadfea;
pointer-events: none;
}
## Instruction:
Fix scrolling of days in iOS Safari
Scrolling of the main screen was broken in iOS Safari. Switching
approach to make use of flex-grow, shrink and flex-basis worked better.
http://stackoverflow.com/questions/39705876/css-scroll-issue-with-flexbox-and-max-height
## Code After:
:local(.component) {
display: flex;
flex-direction: column;
max-height: 100%;
width: 100%;
border-bottom: 1px solid #ccc;
}
:local(.days),
:local(.header) {
display: flex;
align-items: flex-start;
}
:local(.daysWrapper) {
position: relative;
border-top: 1px solid #ccc;
overflow: auto;
flex: 1 1 auto;
-webkit-overflow-scrolling: touch;
}
:local(.header) {
padding-left: 30px;
flex-shrink: 0;
}
:local(.lines) {
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
}
:local(.hour) {
border-bottom: 1px solid #dadfea;
pointer-events: none;
}
:local(.halfHour) {
height: 50%;
border-bottom: 1px dashed #dadfea;
pointer-events: none;
}
|
656552e1d434b6a64e6497135c3b28d6c05642ed
|
Sources/Focus.swift
|
Sources/Focus.swift
|
struct Focus {
static var failureHandler: ((_ message: String, _ file: StaticString, _ line: UInt) -> (Void))?
static var successHandler: ((_ file: StaticString, _ line: UInt) -> (Void))?
}
func expect<Item>(_ item: Item) -> Expect<Item> {
return Expect(item: item)
}
|
public struct Focus {
public static var failureHandler: ((_ message: String, _ file: StaticString, _ line: UInt) -> (Void))?
public static var successHandler: ((_ file: StaticString, _ line: UInt) -> (Void))?
}
public func expect<Item>(_ item: Item) -> Expect<Item> {
return Expect(item: item)
}
|
Make Expect and To public
|
Make Expect and To public
|
Swift
|
mit
|
ObserveSocial/Focus
|
swift
|
## Code Before:
struct Focus {
static var failureHandler: ((_ message: String, _ file: StaticString, _ line: UInt) -> (Void))?
static var successHandler: ((_ file: StaticString, _ line: UInt) -> (Void))?
}
func expect<Item>(_ item: Item) -> Expect<Item> {
return Expect(item: item)
}
## Instruction:
Make Expect and To public
## Code After:
public struct Focus {
public static var failureHandler: ((_ message: String, _ file: StaticString, _ line: UInt) -> (Void))?
public static var successHandler: ((_ file: StaticString, _ line: UInt) -> (Void))?
}
public func expect<Item>(_ item: Item) -> Expect<Item> {
return Expect(item: item)
}
|
d569c69ea1a361ada0e09f2c58bd611b686d82e9
|
modules/dcc_chat.h
|
modules/dcc_chat.h
|
class dccChat : public Module {
public:
void onDCCReceive(std::string dccid, std::string message);
};
class dccSender : public Module {
public:
void dccSend(std::string dccid, std::string message);
};
|
class dccChat : public Module {
public:
virtual void onDCCReceive(std::string dccid, std::string message);
};
class dccSender : public Module {
public:
virtual void dccSend(std::string dccid, std::string message);
virtual bool hookDCCMessage(std::string modName, std::string hookMsg);
};
|
Fix those functions not being virtual.
|
Fix those functions not being virtual.
|
C
|
mit
|
ElementalAlchemist/RoBoBo,ElementalAlchemist/RoBoBo
|
c
|
## Code Before:
class dccChat : public Module {
public:
void onDCCReceive(std::string dccid, std::string message);
};
class dccSender : public Module {
public:
void dccSend(std::string dccid, std::string message);
};
## Instruction:
Fix those functions not being virtual.
## Code After:
class dccChat : public Module {
public:
virtual void onDCCReceive(std::string dccid, std::string message);
};
class dccSender : public Module {
public:
virtual void dccSend(std::string dccid, std::string message);
virtual bool hookDCCMessage(std::string modName, std::string hookMsg);
};
|
475af038dafe0f5b036784e9fb718c3d3e0ffd5e
|
Pod/Classes/StringInChain.swift
|
Pod/Classes/StringInChain.swift
|
//
// StringInChain.swift
// StringInChain
//
// Created by Lukasz Solniczek on 22.06.2015.
// Copyright (c) 2015 Lukasz Solniczek. All rights reserved.
//
import Foundation
public class StringInChain {
var stringToMach: String?
var baseText: NSString
public var attrString: NSMutableAttributedString
init(string: String) {
self.baseText = string
self.attrString = NSMutableAttributedString(string: string)
}
init(string: String, stringToMach: String) {
self.baseText = string
self.stringToMach = stringToMach
self.attrString = NSMutableAttributedString(string: string)
}
public func match(text: String) -> StringInChain {
stringToMach = text
return self
}
func setRange() -> NSRange {
if let stringToMach = stringToMach as String? {
return baseText.rangeOfString(stringToMach)
} else {
return baseText.rangeOfString(baseText as String)
}
}
}
|
//
// StringInChain.swift
// StringInChain
//
// Created by Lukasz Solniczek on 22.06.2015.
// Copyright (c) 2015 Lukasz Solniczek. All rights reserved.
//
import Foundation
public class StringInChain {
var stringToMach: String?
var baseText: NSString
public var attrString: NSMutableAttributedString
init(string: String) {
self.baseText = string
self.attrString = NSMutableAttributedString(string: string)
}
init(string: String, stringToMach: String) {
self.baseText = string
self.stringToMach = stringToMach
self.attrString = NSMutableAttributedString(string: string)
}
public func match(text: String) -> StringInChain {
stringToMach = text
return self
}
func setRange() -> NSRange {
if let stringToMach = stringToMach as String? {
return baseText.rangeOfString(stringToMach)
}
return baseText.rangeOfString(baseText as String)
}
}
|
Remove redundant flow of control ;)
|
Remove redundant flow of control ;)
|
Swift
|
mit
|
carabina/string-in-chain,carabina/string-in-chain,carabina/string-in-chain,lsolniczek/string-in-chain,carabina/string-in-chain,lsolniczek/string-in-chain,lsolniczek/string-in-chain
|
swift
|
## Code Before:
//
// StringInChain.swift
// StringInChain
//
// Created by Lukasz Solniczek on 22.06.2015.
// Copyright (c) 2015 Lukasz Solniczek. All rights reserved.
//
import Foundation
public class StringInChain {
var stringToMach: String?
var baseText: NSString
public var attrString: NSMutableAttributedString
init(string: String) {
self.baseText = string
self.attrString = NSMutableAttributedString(string: string)
}
init(string: String, stringToMach: String) {
self.baseText = string
self.stringToMach = stringToMach
self.attrString = NSMutableAttributedString(string: string)
}
public func match(text: String) -> StringInChain {
stringToMach = text
return self
}
func setRange() -> NSRange {
if let stringToMach = stringToMach as String? {
return baseText.rangeOfString(stringToMach)
} else {
return baseText.rangeOfString(baseText as String)
}
}
}
## Instruction:
Remove redundant flow of control ;)
## Code After:
//
// StringInChain.swift
// StringInChain
//
// Created by Lukasz Solniczek on 22.06.2015.
// Copyright (c) 2015 Lukasz Solniczek. All rights reserved.
//
import Foundation
public class StringInChain {
var stringToMach: String?
var baseText: NSString
public var attrString: NSMutableAttributedString
init(string: String) {
self.baseText = string
self.attrString = NSMutableAttributedString(string: string)
}
init(string: String, stringToMach: String) {
self.baseText = string
self.stringToMach = stringToMach
self.attrString = NSMutableAttributedString(string: string)
}
public func match(text: String) -> StringInChain {
stringToMach = text
return self
}
func setRange() -> NSRange {
if let stringToMach = stringToMach as String? {
return baseText.rangeOfString(stringToMach)
}
return baseText.rangeOfString(baseText as String)
}
}
|
4b6bb7b7d258a9f130b7d10f390f44dec855cc19
|
admin/src/gui/NewScoville.py
|
admin/src/gui/NewScoville.py
|
import pygtk
pygtk.require("2.0")
import gtk
builder = gtk.Builder()
builder.add_from_file(os.path[0]+"/src/gui/NewScoville.ui")
class NewScovilleWindow(object):
def __init__(self):
pass
|
import pygtk
pygtk.require("2.0")
import gtk
builder = gtk.Builder()
builder.add_from_file(os.path[0]+"/src/gui/NewScoville.ui")
class NewScovilleWindow(object):
pass
|
Revert "added constructor (testcommit for new git interface)"
|
Revert "added constructor (testcommit for new git interface)"
This reverts commit d5c0252b75e97103d61c3203e2a8d04a061c8a2f.
|
Python
|
agpl-3.0
|
skarphed/skarphed,skarphed/skarphed
|
python
|
## Code Before:
import pygtk
pygtk.require("2.0")
import gtk
builder = gtk.Builder()
builder.add_from_file(os.path[0]+"/src/gui/NewScoville.ui")
class NewScovilleWindow(object):
def __init__(self):
pass
## Instruction:
Revert "added constructor (testcommit for new git interface)"
This reverts commit d5c0252b75e97103d61c3203e2a8d04a061c8a2f.
## Code After:
import pygtk
pygtk.require("2.0")
import gtk
builder = gtk.Builder()
builder.add_from_file(os.path[0]+"/src/gui/NewScoville.ui")
class NewScovilleWindow(object):
pass
|
0165ba27355a4ea2125abf4875a212257bf2567e
|
lib/flux_mixin.js
|
lib/flux_mixin.js
|
module.exports = function(React) {
return {
propTypes: {
flux: React.PropTypes.object.isRequired
},
childContextTypes: {
flux: React.PropTypes.object
},
getChildContext: function() {
return {
flux: this.props.flux
};
}
};
};
|
var FluxMixin = function(React) {
return {
propTypes: {
flux: React.PropTypes.object.isRequired
},
childContextTypes: {
flux: React.PropTypes.object
},
getChildContext: function() {
return {
flux: this.props.flux
};
}
};
};
FluxMixin.componentWillMount = function() {
throw new Error("Fluxbox.FluxMixin is a function that takes React as a " +
"parameter and returns the mixin, e.g.: mixins[Fluxbox.FluxMixin(React)]");
};
module.exports = FluxMixin;
|
Throw if Fluxbox.FluxMixin used as a mixin instead of a function
|
Throw if Fluxbox.FluxMixin used as a mixin instead of a function
|
JavaScript
|
mit
|
hoanglamhuynh/fluxxor,STRML/fluxxor,alcedo/fluxxor,davesag/fluxxor,nagyistoce/fluxxor,BinaryMuse/fluxxor,VincentHoang/fluxxor,davesag/fluxxor,chimpinano/fluxxor,davesag/fluxxor,dantman/fluxxor,nagyistoce/fluxxor,andrewslater/fluxxor,webcoding/fluxxor,chimpinano/fluxxor,SqREL/fluxxor,dantman/fluxxor,hoanglamhuynh/fluxxor,thomasboyt/fluxxor,VincentHoang/fluxxor,STRML/fluxxor,vsakaria/fluxxor,chimpinano/fluxxor,hoanglamhuynh/fluxxor,dantman/fluxxor,nagyistoce/fluxxor,demiazz/fluxxor
|
javascript
|
## Code Before:
module.exports = function(React) {
return {
propTypes: {
flux: React.PropTypes.object.isRequired
},
childContextTypes: {
flux: React.PropTypes.object
},
getChildContext: function() {
return {
flux: this.props.flux
};
}
};
};
## Instruction:
Throw if Fluxbox.FluxMixin used as a mixin instead of a function
## Code After:
var FluxMixin = function(React) {
return {
propTypes: {
flux: React.PropTypes.object.isRequired
},
childContextTypes: {
flux: React.PropTypes.object
},
getChildContext: function() {
return {
flux: this.props.flux
};
}
};
};
FluxMixin.componentWillMount = function() {
throw new Error("Fluxbox.FluxMixin is a function that takes React as a " +
"parameter and returns the mixin, e.g.: mixins[Fluxbox.FluxMixin(React)]");
};
module.exports = FluxMixin;
|
7e257420baec4f1a1e03f876a06766bf6b0d4064
|
.travis.yml
|
.travis.yml
|
sudo: false
dist: xenial
language: php
services:
- mysql
php:
- 7.3
- 7.2
- 7.1
env:
- SYMFONY_VERSION=4.3.*
- SYMFONY_VERSION=4.2.*
- SYMFONY_VERSION=4.1.*
- SYMFONY_VERSION=4.0.*
- SYMFONY_VERSION=3.4.*
matrix:
fast_finish: true
before_script:
- echo 'memory_limit=-1' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
- mysql -e "CREATE DATABASE symfony; GRANT ALL ON symfony.* TO 'aimeos'@'127.0.0.1' IDENTIFIED BY 'aimeos'"
- mysql -e "set global wait_timeout=600"
- rm composer.lock # Prevent dependency problems
- COMPOSER_MEMORY_LIMIT=-1 travis_retry composer require "symfony/symfony:${SYMFONY_VERSION}"
script:
- vendor/bin/phpunit --coverage-clover coverage.xml
after_success:
- php vendor/bin/coveralls
|
sudo: false
dist: xenial
language: php
services:
- mysql
php:
- 7.3
- 7.2
- 7.1
env:
- SYMFONY_VERSION=5.0.*
- SYMFONY_VERSION=4.4.*
- SYMFONY_VERSION=3.4.*
matrix:
fast_finish: true
before_script:
- echo 'memory_limit=-1' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
- mysql -e "CREATE DATABASE symfony; GRANT ALL ON symfony.* TO 'aimeos'@'127.0.0.1' IDENTIFIED BY 'aimeos'"
- mysql -e "set global wait_timeout=600"
- rm composer.lock # Prevent dependency problems
- COMPOSER_MEMORY_LIMIT=-1 travis_retry composer require "symfony/symfony:${SYMFONY_VERSION}"
script:
- vendor/bin/phpunit --coverage-clover coverage.xml
after_success:
- php vendor/bin/coveralls
|
Test Symfony 5.0 and LTS versions
|
Test Symfony 5.0 and LTS versions
|
YAML
|
mit
|
aimeos/aimeos-symfony2,aimeos/aimeos-symfony,aimeos/aimeos-symfony2,aimeos/aimeos-symfony2
|
yaml
|
## Code Before:
sudo: false
dist: xenial
language: php
services:
- mysql
php:
- 7.3
- 7.2
- 7.1
env:
- SYMFONY_VERSION=4.3.*
- SYMFONY_VERSION=4.2.*
- SYMFONY_VERSION=4.1.*
- SYMFONY_VERSION=4.0.*
- SYMFONY_VERSION=3.4.*
matrix:
fast_finish: true
before_script:
- echo 'memory_limit=-1' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
- mysql -e "CREATE DATABASE symfony; GRANT ALL ON symfony.* TO 'aimeos'@'127.0.0.1' IDENTIFIED BY 'aimeos'"
- mysql -e "set global wait_timeout=600"
- rm composer.lock # Prevent dependency problems
- COMPOSER_MEMORY_LIMIT=-1 travis_retry composer require "symfony/symfony:${SYMFONY_VERSION}"
script:
- vendor/bin/phpunit --coverage-clover coverage.xml
after_success:
- php vendor/bin/coveralls
## Instruction:
Test Symfony 5.0 and LTS versions
## Code After:
sudo: false
dist: xenial
language: php
services:
- mysql
php:
- 7.3
- 7.2
- 7.1
env:
- SYMFONY_VERSION=5.0.*
- SYMFONY_VERSION=4.4.*
- SYMFONY_VERSION=3.4.*
matrix:
fast_finish: true
before_script:
- echo 'memory_limit=-1' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
- mysql -e "CREATE DATABASE symfony; GRANT ALL ON symfony.* TO 'aimeos'@'127.0.0.1' IDENTIFIED BY 'aimeos'"
- mysql -e "set global wait_timeout=600"
- rm composer.lock # Prevent dependency problems
- COMPOSER_MEMORY_LIMIT=-1 travis_retry composer require "symfony/symfony:${SYMFONY_VERSION}"
script:
- vendor/bin/phpunit --coverage-clover coverage.xml
after_success:
- php vendor/bin/coveralls
|
6d663d1d0172b716e0dccc1f617b5a09b2905b67
|
script/upload-windows-pdb.py
|
script/upload-windows-pdb.py
|
import os
import glob
from lib.util import execute, rm_rf, safe_mkdir, s3put, s3_config
SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
SYMBOLS_DIR = 'dist\\symbols'
PDB_LIST = [
'out\\Release\\atom.exe.pdb',
'vendor\\brightray\\vendor\\download\\libchromiumcontent\\Release\\chromiumcontent.dll.pdb',
]
def main():
os.chdir(SOURCE_ROOT)
rm_rf(SYMBOLS_DIR)
safe_mkdir(SYMBOLS_DIR)
for pdb in PDB_LIST:
run_symstore(pdb, SYMBOLS_DIR, 'AtomShell')
bucket, access_key, secret_key = s3_config()
files = glob.glob(SYMBOLS_DIR + '/*.pdb/*/*.pdb')
upload_symbols(bucket, access_key, secret_key, files)
def run_symstore(pdb, dest, product):
execute(['symstore', 'add', '/r', '/f', pdb, '/s', dest, '/t', product])
def upload_symbols(bucket, access_key, secret_key, files):
s3put(bucket, access_key, secret_key, SYMBOLS_DIR, 'atom-shell/symbols', files)
if __name__ == '__main__':
import sys
sys.exit(main())
|
import os
import glob
from lib.util import execute, rm_rf, safe_mkdir, s3put, s3_config
SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
SYMBOLS_DIR = 'dist\\symbols'
PDB_LIST = [
'out\\Release\\atom.exe.pdb',
'vendor\\brightray\\vendor\\download\\libchromiumcontent\\Release\\chromiumcontent.dll.pdb',
]
def main():
os.chdir(SOURCE_ROOT)
rm_rf(SYMBOLS_DIR)
safe_mkdir(SYMBOLS_DIR)
for pdb in PDB_LIST:
run_symstore(pdb, SYMBOLS_DIR, 'AtomShell')
bucket, access_key, secret_key = s3_config()
files = glob.glob(SYMBOLS_DIR + '/*.pdb/*/*.pdb')
files = [f.lower() for f in files]
upload_symbols(bucket, access_key, secret_key, files)
def run_symstore(pdb, dest, product):
execute(['symstore', 'add', '/r', '/f', pdb, '/s', dest, '/t', product])
def upload_symbols(bucket, access_key, secret_key, files):
s3put(bucket, access_key, secret_key, SYMBOLS_DIR, 'atom-shell/symbols', files)
if __name__ == '__main__':
import sys
sys.exit(main())
|
Use lowercase for symbol paths
|
Use lowercase for symbol paths
|
Python
|
mit
|
wolfflow/electron,shockone/electron,ianscrivener/electron,oiledCode/electron,christian-bromann/electron,fffej/electron,darwin/electron,digideskio/electron,jannishuebl/electron,darwin/electron,lrlna/electron,faizalpribadi/electron,lzpfmh/electron,rsvip/electron,mubassirhayat/electron,bwiggs/electron,jiaz/electron,gstack/infinium-shell,bobwol/electron,meowlab/electron,egoist/electron,simongregory/electron,vHanda/electron,felixrieseberg/electron,nekuz0r/electron,wolfflow/electron,rreimann/electron,fritx/electron,destan/electron,vaginessa/electron,michaelchiche/electron,stevemao/electron,John-Lin/electron,JussMee15/electron,jlhbaseball15/electron,rhencke/electron,stevemao/electron,brave/electron,fomojola/electron,thompsonemerson/electron,gamedevsam/electron,shiftkey/electron,Neron-X5/electron,fritx/electron,bruce/electron,voidbridge/electron,BionicClick/electron,lzpfmh/electron,howmuchcomputer/electron,RIAEvangelist/electron,Gerhut/electron,howmuchcomputer/electron,tinydew4/electron,maxogden/atom-shell,seanchas116/electron,joaomoreno/atom-shell,destan/electron,mattdesl/electron,iftekeriba/electron,brave/muon,the-ress/electron,bright-sparks/electron,christian-bromann/electron,rprichard/electron,darwin/electron,jonatasfreitasv/electron,adamjgray/electron,ankitaggarwal011/electron,wan-qy/electron,medixdev/electron,rsvip/electron,bbondy/electron,nagyistoce/electron-atom-shell,medixdev/electron,mhkeller/electron,eriser/electron,deed02392/electron,rhencke/electron,seanchas116/electron,dkfiresky/electron,jsutcodes/electron,pombredanne/electron,astoilkov/electron,MaxGraey/electron,deepak1556/atom-shell,simonfork/electron,gbn972/electron,greyhwndz/electron,edulan/electron,roadev/electron,robinvandernoord/electron,kazupon/electron,rajatsingla28/electron,howmuchcomputer/electron,meowlab/electron,tomashanacek/electron,chriskdon/electron,evgenyzinoviev/electron,joneit/electron,gabriel/electron,jiaz/electron,arturts/electron,greyhwndz/electron,edulan/electron,micalan/electron,kazupon/electron,d-salas/electron,eric-seekas/electron,thompsonemerson/electron,RobertJGabriel/electron,vaginessa/electron,electron/electron,iftekeriba/electron,natgolov/electron,xfstudio/electron,ervinb/electron,xfstudio/electron,xiruibing/electron,arturts/electron,renaesop/electron,roadev/electron,fffej/electron,thomsonreuters/electron,coderhaoxin/electron,twolfson/electron,evgenyzinoviev/electron,RobertJGabriel/electron,fomojola/electron,jsutcodes/electron,nagyistoce/electron-atom-shell,leftstick/electron,noikiy/electron,BionicClick/electron,LadyNaggaga/electron,gstack/infinium-shell,yalexx/electron,webmechanicx/electron,rajatsingla28/electron,greyhwndz/electron,webmechanicx/electron,carsonmcdonald/electron,bwiggs/electron,vaginessa/electron,jtburke/electron,beni55/electron,eriser/electron,JesselJohn/electron,jtburke/electron,jaanus/electron,Andrey-Pavlov/electron,robinvandernoord/electron,kokdemo/electron,tincan24/electron,miniak/electron,rajatsingla28/electron,noikiy/electron,nicobot/electron,setzer777/electron,gabriel/electron,zhakui/electron,jonatasfreitasv/electron,synaptek/electron,subblue/electron,kokdemo/electron,Evercoder/electron,aecca/electron,neutrous/electron,ianscrivener/electron,stevekinney/electron,adcentury/electron,Floato/electron,deepak1556/atom-shell,bbondy/electron,nicobot/electron,bitemyapp/electron,jacksondc/electron,jannishuebl/electron,mhkeller/electron,anko/electron,RIAEvangelist/electron,SufianHassan/electron,eric-seekas/electron,mattotodd/electron,LadyNaggaga/electron,shaundunne/electron,vHanda/electron,pombredanne/electron,chrisswk/electron,DivyaKMenon/electron,stevekinney/electron,nicholasess/electron,Evercoder/electron,bright-sparks/electron,GoooIce/electron,zhakui/electron,trankmichael/electron,yan-foto/electron,jjz/electron,kikong/electron,gabrielPeart/electron,renaesop/electron,leolujuyi/electron,eric-seekas/electron,farmisen/electron,sircharleswatson/electron,tinydew4/electron,natgolov/electron,kikong/electron,pirafrank/electron,carsonmcdonald/electron,jjz/electron,fffej/electron,adamjgray/electron,leethomas/electron,leolujuyi/electron,chriskdon/electron,meowlab/electron,Evercoder/electron,maxogden/atom-shell,yan-foto/electron,jlord/electron,stevekinney/electron,jiaz/electron,cos2004/electron,pandoraui/electron,GoooIce/electron,thingsinjars/electron,shockone/electron,electron/electron,digideskio/electron,sky7sea/electron,farmisen/electron,bpasero/electron,gbn972/electron,nekuz0r/electron,kenmozi/electron,voidbridge/electron,aaron-goshine/electron,aliib/electron,faizalpribadi/electron,beni55/electron,adamjgray/electron,wan-qy/electron,neutrous/electron,the-ress/electron,shockone/electron,shockone/electron,pandoraui/electron,bbondy/electron,miniak/electron,shockone/electron,bitemyapp/electron,systembugtj/electron,neutrous/electron,yalexx/electron,tylergibson/electron,gabriel/electron,felixrieseberg/electron,egoist/electron,shaundunne/electron,Rokt33r/electron,gamedevsam/electron,mhkeller/electron,preco21/electron,soulteary/electron,robinvandernoord/electron,DivyaKMenon/electron,gabrielPeart/electron,bright-sparks/electron,mrwizard82d1/electron,yan-foto/electron,renaesop/electron,the-ress/electron,subblue/electron,tinydew4/electron,bwiggs/electron,chrisswk/electron,jhen0409/electron,lzpfmh/electron,brave/muon,trankmichael/electron,RobertJGabriel/electron,renaesop/electron,roadev/electron,tonyganch/electron,baiwyc119/electron,stevemao/electron,jonatasfreitasv/electron,mubassirhayat/electron,arturts/electron,pandoraui/electron,nekuz0r/electron,vipulroxx/electron,jhen0409/electron,jhen0409/electron,xiruibing/electron,adcentury/electron,fomojola/electron,coderhaoxin/electron,joneit/electron,dahal/electron,nicobot/electron,bwiggs/electron,aaron-goshine/electron,howmuchcomputer/electron,bpasero/electron,cos2004/electron,deed02392/electron,fireball-x/atom-shell,dahal/electron,jtburke/electron,tomashanacek/electron,bobwol/electron,farmisen/electron,evgenyzinoviev/electron,Zagorakiss/electron,greyhwndz/electron,shaundunne/electron,Faiz7412/electron,howmuchcomputer/electron,RIAEvangelist/electron,takashi/electron,davazp/electron,jsutcodes/electron,bobwol/electron,aaron-goshine/electron,aaron-goshine/electron,mirrh/electron,michaelchiche/electron,BionicClick/electron,baiwyc119/electron,arturts/electron,medixdev/electron,matiasinsaurralde/electron,bpasero/electron,MaxWhere/electron,shennushi/electron,aliib/electron,natgolov/electron,kcrt/electron,jiaz/electron,adcentury/electron,xiruibing/electron,chriskdon/electron,Ivshti/electron,mrwizard82d1/electron,jjz/electron,leftstick/electron,twolfson/electron,brave/muon,micalan/electron,jaanus/electron,nekuz0r/electron,micalan/electron,tincan24/electron,shockone/electron,fabien-d/electron,twolfson/electron,kcrt/electron,trankmichael/electron,LadyNaggaga/electron,LadyNaggaga/electron,Zagorakiss/electron,egoist/electron,hokein/atom-shell,JesselJohn/electron,ianscrivener/electron,voidbridge/electron,davazp/electron,saronwei/electron,MaxWhere/electron,rreimann/electron,maxogden/atom-shell,shennushi/electron,tincan24/electron,jsutcodes/electron,takashi/electron,adamjgray/electron,vHanda/electron,sshiting/electron,LadyNaggaga/electron,zhakui/electron,MaxGraey/electron,ianscrivener/electron,GoooIce/electron,jsutcodes/electron,jaanus/electron,chriskdon/electron,Gerhut/electron,wolfflow/electron,MaxWhere/electron,John-Lin/electron,deed02392/electron,mrwizard82d1/electron,abhishekgahlot/electron,etiktin/electron,brave/electron,thingsinjars/electron,mjaniszew/electron,rreimann/electron,John-Lin/electron,kenmozi/electron,arturts/electron,cos2004/electron,d-salas/electron,BionicClick/electron,biblerule/UMCTelnetHub,jonatasfreitasv/electron,Neron-X5/electron,Evercoder/electron,kikong/electron,thompsonemerson/electron,jonatasfreitasv/electron,jannishuebl/electron,shennushi/electron,eric-seekas/electron,bwiggs/electron,dkfiresky/electron,jlord/electron,Neron-X5/electron,icattlecoder/electron,Zagorakiss/electron,tincan24/electron,joneit/electron,kostia/electron,pombredanne/electron,Rokt33r/electron,matiasinsaurralde/electron,jlhbaseball15/electron,dahal/electron,systembugtj/electron,tinydew4/electron,gstack/infinium-shell,bruce/electron,BionicClick/electron,gamedevsam/electron,bpasero/electron,bitemyapp/electron,micalan/electron,dongjoon-hyun/electron,twolfson/electron,aecca/electron,timruffles/electron,subblue/electron,nekuz0r/electron,minggo/electron,jtburke/electron,rsvip/electron,zhakui/electron,bbondy/electron,preco21/electron,brenca/electron,vaginessa/electron,leolujuyi/electron,cqqccqc/electron,jannishuebl/electron,jlord/electron,jcblw/electron,zhakui/electron,rhencke/electron,meowlab/electron,MaxGraey/electron,trigrass2/electron,thompsonemerson/electron,RIAEvangelist/electron,Andrey-Pavlov/electron,mattdesl/electron,bpasero/electron,soulteary/electron,shiftkey/electron,rreimann/electron,jlhbaseball15/electron,benweissmann/electron,trigrass2/electron,chrisswk/electron,tonyganch/electron,LadyNaggaga/electron,meowlab/electron,roadev/electron,tomashanacek/electron,pombredanne/electron,seanchas116/electron,rprichard/electron,thingsinjars/electron,Rokt33r/electron,MaxGraey/electron,takashi/electron,jtburke/electron,cqqccqc/electron,Jonekee/electron,Jacobichou/electron,sky7sea/electron,wan-qy/electron,voidbridge/electron,maxogden/atom-shell,dkfiresky/electron,DivyaKMenon/electron,simongregory/electron,Jacobichou/electron,lrlna/electron,sshiting/electron,gerhardberger/electron,yalexx/electron,gerhardberger/electron,coderhaoxin/electron,vipulroxx/electron,Ivshti/electron,micalan/electron,trigrass2/electron,evgenyzinoviev/electron,leethomas/electron,astoilkov/electron,cqqccqc/electron,systembugtj/electron,Floato/electron,gerhardberger/electron,tylergibson/electron,cqqccqc/electron,synaptek/electron,tincan24/electron,rreimann/electron,iftekeriba/electron,preco21/electron,gbn972/electron,mjaniszew/electron,joaomoreno/atom-shell,gabriel/electron,vipulroxx/electron,kazupon/electron,Zagorakiss/electron,gamedevsam/electron,tincan24/electron,mubassirhayat/electron,electron/electron,deed02392/electron,bwiggs/electron,carsonmcdonald/electron,systembugtj/electron,ervinb/electron,posix4e/electron,synaptek/electron,aecca/electron,Jacobichou/electron,preco21/electron,yalexx/electron,bruce/electron,etiktin/electron,Andrey-Pavlov/electron,sshiting/electron,felixrieseberg/electron,rprichard/electron,fabien-d/electron,GoooIce/electron,adamjgray/electron,maxogden/atom-shell,vaginessa/electron,wan-qy/electron,nicholasess/electron,dkfiresky/electron,fabien-d/electron,beni55/electron,takashi/electron,deed02392/electron,stevekinney/electron,gabriel/electron,michaelchiche/electron,saronwei/electron,mjaniszew/electron,voidbridge/electron,Faiz7412/electron,carsonmcdonald/electron,Faiz7412/electron,baiwyc119/electron,posix4e/electron,adamjgray/electron,vipulroxx/electron,the-ress/electron,anko/electron,etiktin/electron,seanchas116/electron,MaxWhere/electron,aichingm/electron,RIAEvangelist/electron,Jacobichou/electron,jaanus/electron,nicobot/electron,xfstudio/electron,hokein/atom-shell,coderhaoxin/electron,neutrous/electron,SufianHassan/electron,Rokt33r/electron,RobertJGabriel/electron,tylergibson/electron,lzpfmh/electron,ankitaggarwal011/electron,joaomoreno/atom-shell,medixdev/electron,Floato/electron,mjaniszew/electron,jonatasfreitasv/electron,gamedevsam/electron,stevekinney/electron,gerhardberger/electron,jcblw/electron,timruffles/electron,shiftkey/electron,noikiy/electron,yalexx/electron,cqqccqc/electron,Gerhut/electron,tonyganch/electron,IonicaBizauKitchen/electron,joaomoreno/atom-shell,ervinb/electron,bitemyapp/electron,noikiy/electron,yan-foto/electron,smczk/electron,ankitaggarwal011/electron,trankmichael/electron,stevekinney/electron,Gerhut/electron,mirrh/electron,John-Lin/electron,mirrh/electron,xfstudio/electron,pandoraui/electron,sircharleswatson/electron,mattotodd/electron,JussMee15/electron,gabrielPeart/electron,natgolov/electron,tomashanacek/electron,cos2004/electron,abhishekgahlot/electron,hokein/atom-shell,astoilkov/electron,jannishuebl/electron,baiwyc119/electron,webmechanicx/electron,baiwyc119/electron,setzer777/electron,jacksondc/electron,farmisen/electron,posix4e/electron,soulteary/electron,natgolov/electron,anko/electron,the-ress/electron,nagyistoce/electron-atom-shell,joneit/electron,ianscrivener/electron,eric-seekas/electron,ervinb/electron,fabien-d/electron,aichingm/electron,bbondy/electron,michaelchiche/electron,Gerhut/electron,mhkeller/electron,preco21/electron,vaginessa/electron,dkfiresky/electron,simonfork/electron,setzer777/electron,systembugtj/electron,thomsonreuters/electron,d-salas/electron,trigrass2/electron,xiruibing/electron,kostia/electron,felixrieseberg/electron,cos2004/electron,tinydew4/electron,biblerule/UMCTelnetHub,minggo/electron,Zagorakiss/electron,carsonmcdonald/electron,stevemao/electron,JesselJohn/electron,timruffles/electron,synaptek/electron,jlhbaseball15/electron,Jonekee/electron,bruce/electron,fomojola/electron,eric-seekas/electron,fireball-x/atom-shell,greyhwndz/electron,jacksondc/electron,matiasinsaurralde/electron,saronwei/electron,kazupon/electron,rajatsingla28/electron,brenca/electron,dongjoon-hyun/electron,IonicaBizauKitchen/electron,arusakov/electron,nekuz0r/electron,kazupon/electron,thomsonreuters/electron,mattdesl/electron,simonfork/electron,smczk/electron,nicholasess/electron,Neron-X5/electron,eriser/electron,GoooIce/electron,bright-sparks/electron,faizalpribadi/electron,bitemyapp/electron,mjaniszew/electron,eriser/electron,soulteary/electron,synaptek/electron,gabrielPeart/electron,simonfork/electron,mirrh/electron,mhkeller/electron,nicholasess/electron,fritx/electron,howmuchcomputer/electron,tonyganch/electron,posix4e/electron,kenmozi/electron,xfstudio/electron,JussMee15/electron,Jonekee/electron,aecca/electron,sircharleswatson/electron,icattlecoder/electron,jiaz/electron,renaesop/electron,rreimann/electron,Andrey-Pavlov/electron,thomsonreuters/electron,rhencke/electron,simongregory/electron,RobertJGabriel/electron,simonfork/electron,Andrey-Pavlov/electron,nagyistoce/electron-atom-shell,wan-qy/electron,pombredanne/electron,thingsinjars/electron,evgenyzinoviev/electron,lrlna/electron,setzer777/electron,benweissmann/electron,robinvandernoord/electron,aliib/electron,Andrey-Pavlov/electron,darwin/electron,shiftkey/electron,twolfson/electron,benweissmann/electron,shiftkey/electron,DivyaKMenon/electron,smczk/electron,wan-qy/electron,egoist/electron,pirafrank/electron,jcblw/electron,tinydew4/electron,leethomas/electron,evgenyzinoviev/electron,Jonekee/electron,jjz/electron,vipulroxx/electron,chrisswk/electron,minggo/electron,miniak/electron,RobertJGabriel/electron,fabien-d/electron,biblerule/UMCTelnetHub,kikong/electron,neutrous/electron,mirrh/electron,JussMee15/electron,dongjoon-hyun/electron,seanchas116/electron,minggo/electron,wolfflow/electron,aliib/electron,xiruibing/electron,jcblw/electron,adcentury/electron,rsvip/electron,oiledCode/electron,MaxWhere/electron,Neron-X5/electron,rajatsingla28/electron,faizalpribadi/electron,digideskio/electron,xiruibing/electron,DivyaKMenon/electron,Rokt33r/electron,bright-sparks/electron,GoooIce/electron,Neron-X5/electron,electron/electron,brave/electron,deed02392/electron,vHanda/electron,destan/electron,DivyaKMenon/electron,jlhbaseball15/electron,sky7sea/electron,fffej/electron,oiledCode/electron,jiaz/electron,jlord/electron,brave/muon,kostia/electron,bruce/electron,setzer777/electron,mjaniszew/electron,sircharleswatson/electron,saronwei/electron,zhakui/electron,deepak1556/atom-shell,dahal/electron,ervinb/electron,John-Lin/electron,chrisswk/electron,jjz/electron,jacksondc/electron,d-salas/electron,destan/electron,soulteary/electron,Ivshti/electron,nicholasess/electron,baiwyc119/electron,edulan/electron,natgolov/electron,posix4e/electron,leftstick/electron,bright-sparks/electron,farmisen/electron,beni55/electron,jjz/electron,yalexx/electron,Jacobichou/electron,fffej/electron,leethomas/electron,gbn972/electron,matiasinsaurralde/electron,Ivshti/electron,bobwol/electron,Floato/electron,IonicaBizauKitchen/electron,stevemao/electron,fireball-x/atom-shell,pirafrank/electron,SufianHassan/electron,etiktin/electron,JesselJohn/electron,vHanda/electron,icattlecoder/electron,gamedevsam/electron,stevemao/electron,biblerule/UMCTelnetHub,destan/electron,shaundunne/electron,anko/electron,shennushi/electron,fritx/electron,kostia/electron,faizalpribadi/electron,anko/electron,meowlab/electron,biblerule/UMCTelnetHub,seanchas116/electron,jacksondc/electron,leolujuyi/electron,robinvandernoord/electron,MaxWhere/electron,IonicaBizauKitchen/electron,shennushi/electron,simongregory/electron,Faiz7412/electron,rhencke/electron,miniak/electron,mrwizard82d1/electron,kokdemo/electron,michaelchiche/electron,faizalpribadi/electron,greyhwndz/electron,electron/electron,mattotodd/electron,fomojola/electron,arusakov/electron,arusakov/electron,JesselJohn/electron,nicobot/electron,bpasero/electron,kokdemo/electron,SufianHassan/electron,jlord/electron,roadev/electron,christian-bromann/electron,sky7sea/electron,IonicaBizauKitchen/electron,trigrass2/electron,adcentury/electron,adcentury/electron,minggo/electron,rajatsingla28/electron,bitemyapp/electron,sshiting/electron,thomsonreuters/electron,iftekeriba/electron,mattdesl/electron,gerhardberger/electron,the-ress/electron,ankitaggarwal011/electron,rprichard/electron,SufianHassan/electron,Zagorakiss/electron,leolujuyi/electron,benweissmann/electron,Ivshti/electron,thompsonemerson/electron,wolfflow/electron,gerhardberger/electron,hokein/atom-shell,fffej/electron,BionicClick/electron,coderhaoxin/electron,chriskdon/electron,destan/electron,abhishekgahlot/electron,lrlna/electron,smczk/electron,kenmozi/electron,micalan/electron,kcrt/electron,kcrt/electron,trankmichael/electron,simongregory/electron,pirafrank/electron,jcblw/electron,medixdev/electron,aliib/electron,digideskio/electron,kcrt/electron,oiledCode/electron,pombredanne/electron,jaanus/electron,aaron-goshine/electron,christian-bromann/electron,jlhbaseball15/electron,icattlecoder/electron,jannishuebl/electron,abhishekgahlot/electron,gabrielPeart/electron,bobwol/electron,davazp/electron,mrwizard82d1/electron,joneit/electron,miniak/electron,brenca/electron,darwin/electron,icattlecoder/electron,brave/electron,sky7sea/electron,smczk/electron,synaptek/electron,eriser/electron,Evercoder/electron,abhishekgahlot/electron,shennushi/electron,davazp/electron,tonyganch/electron,shiftkey/electron,RIAEvangelist/electron,coderhaoxin/electron,fritx/electron,aecca/electron,MaxGraey/electron,kostia/electron,lrlna/electron,tomashanacek/electron,oiledCode/electron,jaanus/electron,lzpfmh/electron,gabrielPeart/electron,yan-foto/electron,dongjoon-hyun/electron,medixdev/electron,arturts/electron,felixrieseberg/electron,nagyistoce/electron-atom-shell,beni55/electron,jacksondc/electron,kenmozi/electron,miniak/electron,tylergibson/electron,kikong/electron,gbn972/electron,fritx/electron,Jonekee/electron,felixrieseberg/electron,simonfork/electron,thingsinjars/electron,smczk/electron,deepak1556/atom-shell,kokdemo/electron,dongjoon-hyun/electron,neutrous/electron,davazp/electron,Jacobichou/electron,d-salas/electron,matiasinsaurralde/electron,systembugtj/electron,JesselJohn/electron,mrwizard82d1/electron,Gerhut/electron,dongjoon-hyun/electron,IonicaBizauKitchen/electron,lrlna/electron,brenca/electron,biblerule/UMCTelnetHub,saronwei/electron,dahal/electron,rsvip/electron,iftekeriba/electron,trankmichael/electron,benweissmann/electron,michaelchiche/electron,bruce/electron,setzer777/electron,SufianHassan/electron,etiktin/electron,the-ress/electron,mattdesl/electron,electron/electron,noikiy/electron,lzpfmh/electron,Faiz7412/electron,brave/electron,Jonekee/electron,gerhardberger/electron,mattotodd/electron,fomojola/electron,cqqccqc/electron,mattdesl/electron,arusakov/electron,deepak1556/atom-shell,xfstudio/electron,kcrt/electron,soulteary/electron,farmisen/electron,brenca/electron,robinvandernoord/electron,fireball-x/atom-shell,gstack/infinium-shell,mirrh/electron,ankitaggarwal011/electron,roadev/electron,christian-bromann/electron,bpasero/electron,egoist/electron,egoist/electron,timruffles/electron,tomashanacek/electron,webmechanicx/electron,gbn972/electron,subblue/electron,bbondy/electron,joneit/electron,icattlecoder/electron,jcblw/electron,tylergibson/electron,aaron-goshine/electron,webmechanicx/electron,sshiting/electron,anko/electron,thomsonreuters/electron,gstack/infinium-shell,d-salas/electron,brenca/electron,Floato/electron,aecca/electron,pandoraui/electron,thompsonemerson/electron,iftekeriba/electron,mubassirhayat/electron,subblue/electron,simongregory/electron,tonyganch/electron,leethomas/electron,leftstick/electron,sshiting/electron,takashi/electron,noikiy/electron,joaomoreno/atom-shell,thingsinjars/electron,pirafrank/electron,JussMee15/electron,vHanda/electron,JussMee15/electron,yan-foto/electron,kokdemo/electron,jhen0409/electron,arusakov/electron,christian-bromann/electron,edulan/electron,ianscrivener/electron,mhkeller/electron,tylergibson/electron,pandoraui/electron,arusakov/electron,beni55/electron,shaundunne/electron,dkfiresky/electron,carsonmcdonald/electron,bobwol/electron,renaesop/electron,timruffles/electron,Floato/electron,ankitaggarwal011/electron,wolfflow/electron,oiledCode/electron,aichingm/electron,posix4e/electron,twolfson/electron,kenmozi/electron,mattotodd/electron,etiktin/electron,jtburke/electron,sky7sea/electron,davazp/electron,chriskdon/electron,leolujuyi/electron,eriser/electron,nicobot/electron,brave/muon,Rokt33r/electron,leftstick/electron,brave/electron,digideskio/electron,edulan/electron,mattotodd/electron,gabriel/electron,webmechanicx/electron,kostia/electron,dahal/electron,joaomoreno/atom-shell,edulan/electron,benweissmann/electron,pirafrank/electron,mubassirhayat/electron,aliib/electron,sircharleswatson/electron,vipulroxx/electron,rhencke/electron,aichingm/electron,shaundunne/electron,jhen0409/electron,Evercoder/electron,John-Lin/electron,astoilkov/electron,brave/muon,cos2004/electron,abhishekgahlot/electron,preco21/electron,digideskio/electron,matiasinsaurralde/electron,trigrass2/electron,nicholasess/electron,astoilkov/electron,jhen0409/electron,hokein/atom-shell,leethomas/electron,minggo/electron,fireball-x/atom-shell,astoilkov/electron,leftstick/electron,voidbridge/electron,jsutcodes/electron,subblue/electron,kazupon/electron,aichingm/electron,sircharleswatson/electron,ervinb/electron,takashi/electron,saronwei/electron,electron/electron,aichingm/electron
|
python
|
## Code Before:
import os
import glob
from lib.util import execute, rm_rf, safe_mkdir, s3put, s3_config
SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
SYMBOLS_DIR = 'dist\\symbols'
PDB_LIST = [
'out\\Release\\atom.exe.pdb',
'vendor\\brightray\\vendor\\download\\libchromiumcontent\\Release\\chromiumcontent.dll.pdb',
]
def main():
os.chdir(SOURCE_ROOT)
rm_rf(SYMBOLS_DIR)
safe_mkdir(SYMBOLS_DIR)
for pdb in PDB_LIST:
run_symstore(pdb, SYMBOLS_DIR, 'AtomShell')
bucket, access_key, secret_key = s3_config()
files = glob.glob(SYMBOLS_DIR + '/*.pdb/*/*.pdb')
upload_symbols(bucket, access_key, secret_key, files)
def run_symstore(pdb, dest, product):
execute(['symstore', 'add', '/r', '/f', pdb, '/s', dest, '/t', product])
def upload_symbols(bucket, access_key, secret_key, files):
s3put(bucket, access_key, secret_key, SYMBOLS_DIR, 'atom-shell/symbols', files)
if __name__ == '__main__':
import sys
sys.exit(main())
## Instruction:
Use lowercase for symbol paths
## Code After:
import os
import glob
from lib.util import execute, rm_rf, safe_mkdir, s3put, s3_config
SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
SYMBOLS_DIR = 'dist\\symbols'
PDB_LIST = [
'out\\Release\\atom.exe.pdb',
'vendor\\brightray\\vendor\\download\\libchromiumcontent\\Release\\chromiumcontent.dll.pdb',
]
def main():
os.chdir(SOURCE_ROOT)
rm_rf(SYMBOLS_DIR)
safe_mkdir(SYMBOLS_DIR)
for pdb in PDB_LIST:
run_symstore(pdb, SYMBOLS_DIR, 'AtomShell')
bucket, access_key, secret_key = s3_config()
files = glob.glob(SYMBOLS_DIR + '/*.pdb/*/*.pdb')
files = [f.lower() for f in files]
upload_symbols(bucket, access_key, secret_key, files)
def run_symstore(pdb, dest, product):
execute(['symstore', 'add', '/r', '/f', pdb, '/s', dest, '/t', product])
def upload_symbols(bucket, access_key, secret_key, files):
s3put(bucket, access_key, secret_key, SYMBOLS_DIR, 'atom-shell/symbols', files)
if __name__ == '__main__':
import sys
sys.exit(main())
|
ed5d15cca2c9e6869c665b66d7a8545aa78b82dc
|
errors.js
|
errors.js
|
'use strict';
var util = require('util');
/**
* Generic Primus error.
*
* @constructor
* @param {String} message The reason for the error
* @param {EventEmitter} logger Optional EventEmitter to emit a `log` event on.
* @api public
*/
function PrimusError(message, logger) {
Error.call(this);
Error.captureStackTrace(this, this.constructor);
this.message = message;
this.name = this.constructor.name;
if (logger) {
logger.emit('log', 'error', this);
}
}
util.inherits(PrimusError, Error);
/**
* There was an error while parsing incoming or outgoing data.
*
* @param {String} message The reason for the error.
* @param {Spark} spark The spark that caused the error.
* @api public
*/
function ParserError(message, spark) {
Error.call(this);
Error.captureStackTrace(this, this.constructor);
this.message = message;
this.name = this.constructor.name;
if (spark) {
if (spark.listeners('error').length) spark.emit('error', this);
spark.primus.emit('log', 'error', this);
}
}
util.inherits(ParserError, Error);
//
// Expose our custom events.
//
exports.PrimusError = PrimusError;
exports.ParserError = ParserError;
|
'use strict';
var util = require('util');
/**
* Generic Primus error.
*
* @constructor
* @param {String} message The reason for the error
* @param {EventEmitter} logger Optional EventEmitter to emit a `log` event on.
* @api public
*/
function PrimusError(message, logger) {
Error.captureStackTrace(this, this.constructor);
this.message = message;
this.name = this.constructor.name;
if (logger) {
logger.emit('log', 'error', this);
}
}
util.inherits(PrimusError, Error);
/**
* There was an error while parsing incoming or outgoing data.
*
* @param {String} message The reason for the error.
* @param {Spark} spark The spark that caused the error.
* @api public
*/
function ParserError(message, spark) {
Error.captureStackTrace(this, this.constructor);
this.message = message;
this.name = this.constructor.name;
if (spark) {
if (spark.listeners('error').length) spark.emit('error', this);
spark.primus.emit('log', 'error', this);
}
}
util.inherits(ParserError, Error);
//
// Expose our custom events.
//
exports.PrimusError = PrimusError;
exports.ParserError = ParserError;
|
Remove useless calls to `Error` constructor
|
[minor] Remove useless calls to `Error` constructor
|
JavaScript
|
mit
|
primus/primus,primus/primus,STRML/primus,STRML/primus,primus/primus,STRML/primus
|
javascript
|
## Code Before:
'use strict';
var util = require('util');
/**
* Generic Primus error.
*
* @constructor
* @param {String} message The reason for the error
* @param {EventEmitter} logger Optional EventEmitter to emit a `log` event on.
* @api public
*/
function PrimusError(message, logger) {
Error.call(this);
Error.captureStackTrace(this, this.constructor);
this.message = message;
this.name = this.constructor.name;
if (logger) {
logger.emit('log', 'error', this);
}
}
util.inherits(PrimusError, Error);
/**
* There was an error while parsing incoming or outgoing data.
*
* @param {String} message The reason for the error.
* @param {Spark} spark The spark that caused the error.
* @api public
*/
function ParserError(message, spark) {
Error.call(this);
Error.captureStackTrace(this, this.constructor);
this.message = message;
this.name = this.constructor.name;
if (spark) {
if (spark.listeners('error').length) spark.emit('error', this);
spark.primus.emit('log', 'error', this);
}
}
util.inherits(ParserError, Error);
//
// Expose our custom events.
//
exports.PrimusError = PrimusError;
exports.ParserError = ParserError;
## Instruction:
[minor] Remove useless calls to `Error` constructor
## Code After:
'use strict';
var util = require('util');
/**
* Generic Primus error.
*
* @constructor
* @param {String} message The reason for the error
* @param {EventEmitter} logger Optional EventEmitter to emit a `log` event on.
* @api public
*/
function PrimusError(message, logger) {
Error.captureStackTrace(this, this.constructor);
this.message = message;
this.name = this.constructor.name;
if (logger) {
logger.emit('log', 'error', this);
}
}
util.inherits(PrimusError, Error);
/**
* There was an error while parsing incoming or outgoing data.
*
* @param {String} message The reason for the error.
* @param {Spark} spark The spark that caused the error.
* @api public
*/
function ParserError(message, spark) {
Error.captureStackTrace(this, this.constructor);
this.message = message;
this.name = this.constructor.name;
if (spark) {
if (spark.listeners('error').length) spark.emit('error', this);
spark.primus.emit('log', 'error', this);
}
}
util.inherits(ParserError, Error);
//
// Expose our custom events.
//
exports.PrimusError = PrimusError;
exports.ParserError = ParserError;
|
e0181d13dd3e42ee3bbda2aa270848e06f50fe4e
|
app/js/controllers/data-controller.js
|
app/js/controllers/data-controller.js
|
'use strict';
module.exports = function(app) {
app.controller('dataController',
[ '$scope', 'HttpService', '$http', '$cookies',
function($scope, HttpService, $http, $cookies) {
$http.defaults.headers.common.jwt = $cookies.jwt;
$scope.selectedDomain = false;
var domainService = new HttpService('domains');
$scope.getDomains = function(){
domainService.get()
.success(function(domains){
$scope.domains = domains;
});
};
$scope.getDomains(); // run on view load
var visitService = new HttpService('visits');
$scope.getVisits = function(domain_id){
$scope.selectedDomain = domain_id;
visitService.get(domain_id.toString())
.success(function(visits){
$scope.visits = visits;
});
};
} ]);
};
|
'use strict';
module.exports = function(app) {
app.controller('dataController',
[ '$scope', 'HttpService', '$http', '$cookies',
function($scope, HttpService, $http, $cookies) {
$http.defaults.headers.common.jwt = $cookies.jwt;
$scope.selectedDomain = false;
var domainService = new HttpService('domains');
$scope.getDomains = function(){
domainService.get()
.success(function(domains){
$scope.domains = domains;
});
};
$scope.getDomains(); // run on view load
var visitService = new HttpService('visits');
$scope.getVisits = function(domain_id){
$scope.selectedDomain = domain_id;
visitService.get(domain_id.toString())
.success(function(visits){
$scope.visits = visits;
});
};
/**
* Add domains
*/
$scope.addDomain = function() {
domainService.post($scope.newDomain, {});
$scope.newDomain = '';
};
} ]);
};
|
Add function for adding domains
|
Add function for adding domains
|
JavaScript
|
mit
|
Sextant-WDB/sextant-ng
|
javascript
|
## Code Before:
'use strict';
module.exports = function(app) {
app.controller('dataController',
[ '$scope', 'HttpService', '$http', '$cookies',
function($scope, HttpService, $http, $cookies) {
$http.defaults.headers.common.jwt = $cookies.jwt;
$scope.selectedDomain = false;
var domainService = new HttpService('domains');
$scope.getDomains = function(){
domainService.get()
.success(function(domains){
$scope.domains = domains;
});
};
$scope.getDomains(); // run on view load
var visitService = new HttpService('visits');
$scope.getVisits = function(domain_id){
$scope.selectedDomain = domain_id;
visitService.get(domain_id.toString())
.success(function(visits){
$scope.visits = visits;
});
};
} ]);
};
## Instruction:
Add function for adding domains
## Code After:
'use strict';
module.exports = function(app) {
app.controller('dataController',
[ '$scope', 'HttpService', '$http', '$cookies',
function($scope, HttpService, $http, $cookies) {
$http.defaults.headers.common.jwt = $cookies.jwt;
$scope.selectedDomain = false;
var domainService = new HttpService('domains');
$scope.getDomains = function(){
domainService.get()
.success(function(domains){
$scope.domains = domains;
});
};
$scope.getDomains(); // run on view load
var visitService = new HttpService('visits');
$scope.getVisits = function(domain_id){
$scope.selectedDomain = domain_id;
visitService.get(domain_id.toString())
.success(function(visits){
$scope.visits = visits;
});
};
/**
* Add domains
*/
$scope.addDomain = function() {
domainService.post($scope.newDomain, {});
$scope.newDomain = '';
};
} ]);
};
|
b5c50a2eb1a9cfc957a7a60f7387f8ee71999f8a
|
config/private_pub.yml
|
config/private_pub.yml
|
development:
server: "http://54.191.23.117:9292/faye"
secret_token: "04e13fcc7f1c88f81608101e49220698241472f1a5578a485b818cb328d237c2"
signature_expiration: 3600 # one hour
test:
server: "http://54.191.23.117:9292/faye"
secret_token: "secret"
production:
server: "https://hippopathchat.herokuapp.com/faye"
secret_token: "04e13fcc7f1c88f81608101e49220698241472f1a5578a485b818cb328d237c2"
signature_expiration: 3600 # one hour
|
development:
server: "http://54.191.23.117:9292/faye"
secret_token: "04e13fcc7f1c88f81608101e49220698241472f1a5578a485b818cb328d237c2"
signature_expiration: 3600 # one hour
test:
server: "http://54.191.23.117:9292/faye"
secret_token: "secret"
production:
server: "http://54.191.23.117:9292/faye"
secret_token: "04e13fcc7f1c88f81608101e49220698241472f1a5578a485b818cb328d237c2"
signature_expiration: 3600 # one hour
|
Revert "change production faye source"
|
Revert "change production faye source"
This reverts commit 3ae61cc8a5dd6a3b989a8d30e523ae2233074d1f.
|
YAML
|
apache-2.0
|
jchai002/HippoPath,jchai002/HippoPath,jchai002/HippoPath
|
yaml
|
## Code Before:
development:
server: "http://54.191.23.117:9292/faye"
secret_token: "04e13fcc7f1c88f81608101e49220698241472f1a5578a485b818cb328d237c2"
signature_expiration: 3600 # one hour
test:
server: "http://54.191.23.117:9292/faye"
secret_token: "secret"
production:
server: "https://hippopathchat.herokuapp.com/faye"
secret_token: "04e13fcc7f1c88f81608101e49220698241472f1a5578a485b818cb328d237c2"
signature_expiration: 3600 # one hour
## Instruction:
Revert "change production faye source"
This reverts commit 3ae61cc8a5dd6a3b989a8d30e523ae2233074d1f.
## Code After:
development:
server: "http://54.191.23.117:9292/faye"
secret_token: "04e13fcc7f1c88f81608101e49220698241472f1a5578a485b818cb328d237c2"
signature_expiration: 3600 # one hour
test:
server: "http://54.191.23.117:9292/faye"
secret_token: "secret"
production:
server: "http://54.191.23.117:9292/faye"
secret_token: "04e13fcc7f1c88f81608101e49220698241472f1a5578a485b818cb328d237c2"
signature_expiration: 3600 # one hour
|
327428de0267de773a850daa9d376891fe02308f
|
splitword.py
|
splitword.py
|
def split_word(word):
if len(word) < 2:
raise Exception(
"You obviously need at least two letters to split a word")
split_indexes = list(range(1, len(word)))
for i in split_indexes:
first_part = word[:i]
second_part = word[i:]
yield (first_part, second_part)
|
def split_word(word):
split_indexes = list(range(0, len(word)))
for i in split_indexes:
first_part = word[:i]
second_part = word[i:]
yield (first_part, second_part)
|
Allow splitting to zero-length parts
|
Allow splitting to zero-length parts
|
Python
|
unlicense
|
andyn/kapunaattori
|
python
|
## Code Before:
def split_word(word):
if len(word) < 2:
raise Exception(
"You obviously need at least two letters to split a word")
split_indexes = list(range(1, len(word)))
for i in split_indexes:
first_part = word[:i]
second_part = word[i:]
yield (first_part, second_part)
## Instruction:
Allow splitting to zero-length parts
## Code After:
def split_word(word):
split_indexes = list(range(0, len(word)))
for i in split_indexes:
first_part = word[:i]
second_part = word[i:]
yield (first_part, second_part)
|
03a9e6f2b08c3038fa5ab0c60600178df8ab0b4b
|
.travis.yml
|
.travis.yml
|
language: python
python: 3.5
env:
matrix:
- TOXENV=py26
- TOXENV=py27
- TOXENV=py33
- TOXENV=py34
- TOXENV=py35
- TOXENV=pypy
- TOXENV=pypy3
- TOXENV=flake8
script:
- make test
install:
- travis_retry pip install tox
|
language: python
python: 3.5
env:
matrix:
- TOXENV=py26
- TOXENV=py27
- TOXENV=py33
- TOXENV=py34
- TOXENV=py35
- TOXENV=pypy
- TOXENV=flake8
script:
- make test
install:
- travis_retry pip install tox
|
Remove pypy3 to fix tests
|
Remove pypy3 to fix tests
pip no longer works with py3 < 3.3 and pypy3 provides python 3.2.
|
YAML
|
mit
|
ghickman/django-cache-url
|
yaml
|
## Code Before:
language: python
python: 3.5
env:
matrix:
- TOXENV=py26
- TOXENV=py27
- TOXENV=py33
- TOXENV=py34
- TOXENV=py35
- TOXENV=pypy
- TOXENV=pypy3
- TOXENV=flake8
script:
- make test
install:
- travis_retry pip install tox
## Instruction:
Remove pypy3 to fix tests
pip no longer works with py3 < 3.3 and pypy3 provides python 3.2.
## Code After:
language: python
python: 3.5
env:
matrix:
- TOXENV=py26
- TOXENV=py27
- TOXENV=py33
- TOXENV=py34
- TOXENV=py35
- TOXENV=pypy
- TOXENV=flake8
script:
- make test
install:
- travis_retry pip install tox
|
7d1111136e63627c1f003d5b1352b29732e0345a
|
README.md
|
README.md
|
rosetta-p67-wegbl
=================
Tiny WebGl animation of the Rosetta spacecraft and the P67 comet
# Usage
The shortest path, assuming you have [grunt](http://gruntjs.com) installed is
typing
`grunt`
and pointing your browser to
`http://localhost:9000/dist/index.html`
This should compile the `rosetta_mission.coffee` file and install all the necessary vendor libraries, etc
# Credits
The models and textures were taken - possibly abusively, I need to clear this
up - from the **amazing** [Where is Rosetta](sci.esa.int/where_is_rosetta/) website, developed by [Science Office](http://www.scienceoffice.org/en/projectos/rosetta/)
Do head over to the website, it's mind-blowing and you'll get a feel for just how complex the whole Rosetta mission really is.
|
rosetta-p67-wegbl
=================
Tiny WebGl animation of the Rosetta spacecraft and the P67 comet
# Usage
The shortest path, assuming you have [grunt](http://gruntjs.com) installed is
typing
`grunt`
and pointing your browser to
`http://localhost:9000/dist/index.html`
This should compile the `rosetta_mission.coffee` file and install all the necessary vendor libraries, etc
# Credits
The models and textures were taken - possibly abusively, I need to clear this
up - from the **amazing** [Where is Rosetta](sci.esa.int/where_is_rosetta/) website, developed by [Science Office](http://www.scienceoffice.org/en/projectos/rosetta/)
Do head over to the website, it's mind-blowing and you'll get a feel for just how complex the whole Rosetta mission really is.
# More
I wrote a sort of intro to ThreeJs post [here](http://ragingnexus.com/blog/2014/11/23/basic-three-js-intro/)
|
Add blog post reference to Readme
|
Add blog post reference to Readme
|
Markdown
|
mit
|
dramalho/rosetta-p67-wegbl
|
markdown
|
## Code Before:
rosetta-p67-wegbl
=================
Tiny WebGl animation of the Rosetta spacecraft and the P67 comet
# Usage
The shortest path, assuming you have [grunt](http://gruntjs.com) installed is
typing
`grunt`
and pointing your browser to
`http://localhost:9000/dist/index.html`
This should compile the `rosetta_mission.coffee` file and install all the necessary vendor libraries, etc
# Credits
The models and textures were taken - possibly abusively, I need to clear this
up - from the **amazing** [Where is Rosetta](sci.esa.int/where_is_rosetta/) website, developed by [Science Office](http://www.scienceoffice.org/en/projectos/rosetta/)
Do head over to the website, it's mind-blowing and you'll get a feel for just how complex the whole Rosetta mission really is.
## Instruction:
Add blog post reference to Readme
## Code After:
rosetta-p67-wegbl
=================
Tiny WebGl animation of the Rosetta spacecraft and the P67 comet
# Usage
The shortest path, assuming you have [grunt](http://gruntjs.com) installed is
typing
`grunt`
and pointing your browser to
`http://localhost:9000/dist/index.html`
This should compile the `rosetta_mission.coffee` file and install all the necessary vendor libraries, etc
# Credits
The models and textures were taken - possibly abusively, I need to clear this
up - from the **amazing** [Where is Rosetta](sci.esa.int/where_is_rosetta/) website, developed by [Science Office](http://www.scienceoffice.org/en/projectos/rosetta/)
Do head over to the website, it's mind-blowing and you'll get a feel for just how complex the whole Rosetta mission really is.
# More
I wrote a sort of intro to ThreeJs post [here](http://ragingnexus.com/blog/2014/11/23/basic-three-js-intro/)
|
e3e3a9f409baa75c879a60034fc2b589f3337249
|
scripts/create-docker-compose-env.ps1
|
scripts/create-docker-compose-env.ps1
|
<#
.DESCRIPTION
Create a docker compose .env file
#>
$scriptPath = Split-Path -parent $PSCommandPath
$envFilePath = Resolve-Path "$scriptPath\..\.env"
$getEnvCommand = Resolve-Path "$scriptPath\..\lib\killrvideo-docker-common\get-environment.ps1"
# Base environment variables to be written
$dockerEnv = @("COMPOSE_PROJECT_NAME=killrvideoweb", "COMPOSE_FILE=.\lib\killrvideo-docker-common\docker-compose.yaml")
# Get the docker environment using the common script and add to array
& "$getEnvCommand" |% { $dockerEnv += $_ }
# We have to use .NET to do this so it gets written as UTF-8 without the BOM
$Utf8NoBom = New-Object System.Text.UTF8Encoding($false)
[System.IO.File]::WriteAllLines($envFilePath, $dockerEnv, $Utf8NoBom)
Write-Host "Environment file written to $envFilePath"
|
<#
.DESCRIPTION
Create a docker compose .env file
#>
$scriptPath = Split-Path -parent $PSCommandPath
$envFilePath = "$scriptPath\..\.env"
$getEnvCommand = Resolve-Path "$scriptPath\..\lib\killrvideo-docker-common\get-environment.ps1"
# Base environment variables to be written
$dockerEnv = @("COMPOSE_PROJECT_NAME=killrvideoweb", "COMPOSE_FILE=.\lib\killrvideo-docker-common\docker-compose.yaml")
# Get the docker environment using the common script and add to array
& "$getEnvCommand" |% { $dockerEnv += $_ }
# We have to use .NET to do this so it gets written as UTF-8 without the BOM
$Utf8NoBom = New-Object System.Text.UTF8Encoding($false)
[System.IO.File]::WriteAllLines($envFilePath, $dockerEnv, $Utf8NoBom)
$envFilePath = Resolve-Path $envFilePath
Write-Host "Environment file written to $envFilePath"
|
Handle environment not being present initially in script
|
Handle environment not being present initially in script
|
PowerShell
|
apache-2.0
|
KillrVideo/killrvideo-web,KillrVideo/killrvideo-web,KillrVideo/killrvideo-web
|
powershell
|
## Code Before:
<#
.DESCRIPTION
Create a docker compose .env file
#>
$scriptPath = Split-Path -parent $PSCommandPath
$envFilePath = Resolve-Path "$scriptPath\..\.env"
$getEnvCommand = Resolve-Path "$scriptPath\..\lib\killrvideo-docker-common\get-environment.ps1"
# Base environment variables to be written
$dockerEnv = @("COMPOSE_PROJECT_NAME=killrvideoweb", "COMPOSE_FILE=.\lib\killrvideo-docker-common\docker-compose.yaml")
# Get the docker environment using the common script and add to array
& "$getEnvCommand" |% { $dockerEnv += $_ }
# We have to use .NET to do this so it gets written as UTF-8 without the BOM
$Utf8NoBom = New-Object System.Text.UTF8Encoding($false)
[System.IO.File]::WriteAllLines($envFilePath, $dockerEnv, $Utf8NoBom)
Write-Host "Environment file written to $envFilePath"
## Instruction:
Handle environment not being present initially in script
## Code After:
<#
.DESCRIPTION
Create a docker compose .env file
#>
$scriptPath = Split-Path -parent $PSCommandPath
$envFilePath = "$scriptPath\..\.env"
$getEnvCommand = Resolve-Path "$scriptPath\..\lib\killrvideo-docker-common\get-environment.ps1"
# Base environment variables to be written
$dockerEnv = @("COMPOSE_PROJECT_NAME=killrvideoweb", "COMPOSE_FILE=.\lib\killrvideo-docker-common\docker-compose.yaml")
# Get the docker environment using the common script and add to array
& "$getEnvCommand" |% { $dockerEnv += $_ }
# We have to use .NET to do this so it gets written as UTF-8 without the BOM
$Utf8NoBom = New-Object System.Text.UTF8Encoding($false)
[System.IO.File]::WriteAllLines($envFilePath, $dockerEnv, $Utf8NoBom)
$envFilePath = Resolve-Path $envFilePath
Write-Host "Environment file written to $envFilePath"
|
490db713beee28b626237aab95fd70ead87a6ac5
|
src/index.js
|
src/index.js
|
import Component from './class/Component';
import render from './core/render';
import renderToString from './core/renderToString';
import unmountComponentAtNode from './core/unmountComponentAtNode';
import FragmentValueTypes from './enum/fragmentValueTypes';
import TemplateTypes from './enum/templateTypes';
import createFragment from './core/createFragment';
import createTemplate from './core/createTemplate';
import clearDomElement from './core/clearDomElement';
import createRef from './core/createRef';
import registerAttributes from './template/registerAttributeHandlers';
import { registerSetupHooks } from './events/hooks/createListenerArguments';
import { registerEventHooks } from './events/hooks/listenerSetup';
module.exports = {
Component,
render,
renderToString,
createFragment,
createTemplate,
unmountComponentAtNode,
FragmentValueTypes,
TemplateTypes,
clearDomElement,
createRef,
/**
* 3rd party
*/
registerAttributes,
registerSetupHooks,
registerEventHooks
};
|
export { default as Component } from './class/Component';
export { default as render } from './core/render';
export { default as renderToString } from './core/renderToString';
export { default as unmountComponentAtNode } from './core/unmountComponentAtNode';
export { default as FragmentValueTypes } from './enum/fragmentValueTypes';
export { default as TemplateTypes } from './enum/templateTypes';
export { default as createFragment } from './core/createFragment';
export { default as createTemplate } from './core/createTemplate';
export { default as clearDomElement } from './core/clearDomElement';
export { default as createRef } from './core/createRef';
export { default as registerAttributes } from './template/registerAttributeHandlers';
export { registerSetupHooks } from './events/hooks/createListenerArguments';
export { registerEventHooks } from './events/hooks/listenerSetup';
|
Use ES6 export instead of CJS
|
Use ES6 export instead of CJS
|
JavaScript
|
mit
|
trueadm/inferno,infernojs/inferno,trueadm/inferno,infernojs/inferno
|
javascript
|
## Code Before:
import Component from './class/Component';
import render from './core/render';
import renderToString from './core/renderToString';
import unmountComponentAtNode from './core/unmountComponentAtNode';
import FragmentValueTypes from './enum/fragmentValueTypes';
import TemplateTypes from './enum/templateTypes';
import createFragment from './core/createFragment';
import createTemplate from './core/createTemplate';
import clearDomElement from './core/clearDomElement';
import createRef from './core/createRef';
import registerAttributes from './template/registerAttributeHandlers';
import { registerSetupHooks } from './events/hooks/createListenerArguments';
import { registerEventHooks } from './events/hooks/listenerSetup';
module.exports = {
Component,
render,
renderToString,
createFragment,
createTemplate,
unmountComponentAtNode,
FragmentValueTypes,
TemplateTypes,
clearDomElement,
createRef,
/**
* 3rd party
*/
registerAttributes,
registerSetupHooks,
registerEventHooks
};
## Instruction:
Use ES6 export instead of CJS
## Code After:
export { default as Component } from './class/Component';
export { default as render } from './core/render';
export { default as renderToString } from './core/renderToString';
export { default as unmountComponentAtNode } from './core/unmountComponentAtNode';
export { default as FragmentValueTypes } from './enum/fragmentValueTypes';
export { default as TemplateTypes } from './enum/templateTypes';
export { default as createFragment } from './core/createFragment';
export { default as createTemplate } from './core/createTemplate';
export { default as clearDomElement } from './core/clearDomElement';
export { default as createRef } from './core/createRef';
export { default as registerAttributes } from './template/registerAttributeHandlers';
export { registerSetupHooks } from './events/hooks/createListenerArguments';
export { registerEventHooks } from './events/hooks/listenerSetup';
|
3fd2f9e72f477c27c4976c13e44d5fa6adb781bf
|
.travis.yml
|
.travis.yml
|
language: ruby
rvm:
- 1.8.7
- 1.9.3
- 2.0.0
- 2.1.1
- 2.2.4
- 2.3.0
before_install:
- gem update bundler
script:
- bundle exec rake spec
sudo: false
cache: bundler
notifications:
slack:
secure: X1umGErES0zd+LXX1EqZZxrPZv2YOzbCNxiLLiSGmJLlZAEtlSkMPyr+M00Lrs2DFhn4blwKPm+5YCBvU7f9F4K5GthSl0qZYNpNX/lGNn6EGeBnzJ8rFVgwXPUv1rvrJq0NjeSGni3yAK69K/uX6QohGojAI3iI28/EbJ+uYQM=
|
language: ruby
rvm:
- 1.8.7
- 1.9.3
- 2.0.0
- 2.1.1
- 2.2.4
- 2.3.6
- 2.4.3
- 2.5.0
before_install:
- gem update bundler
script:
- bundle exec rake spec
sudo: false
cache: bundler
notifications:
slack:
secure: X1umGErES0zd+LXX1EqZZxrPZv2YOzbCNxiLLiSGmJLlZAEtlSkMPyr+M00Lrs2DFhn4blwKPm+5YCBvU7f9F4K5GthSl0qZYNpNX/lGNn6EGeBnzJ8rFVgwXPUv1rvrJq0NjeSGni3yAK69K/uX6QohGojAI3iI28/EbJ+uYQM=
|
Add more Ruby versions to the build matrix.
|
Add more Ruby versions to the build matrix.
|
YAML
|
mit
|
minimum2scp/serverspec,serverspec/serverspec,mizzy/serverspec
|
yaml
|
## Code Before:
language: ruby
rvm:
- 1.8.7
- 1.9.3
- 2.0.0
- 2.1.1
- 2.2.4
- 2.3.0
before_install:
- gem update bundler
script:
- bundle exec rake spec
sudo: false
cache: bundler
notifications:
slack:
secure: X1umGErES0zd+LXX1EqZZxrPZv2YOzbCNxiLLiSGmJLlZAEtlSkMPyr+M00Lrs2DFhn4blwKPm+5YCBvU7f9F4K5GthSl0qZYNpNX/lGNn6EGeBnzJ8rFVgwXPUv1rvrJq0NjeSGni3yAK69K/uX6QohGojAI3iI28/EbJ+uYQM=
## Instruction:
Add more Ruby versions to the build matrix.
## Code After:
language: ruby
rvm:
- 1.8.7
- 1.9.3
- 2.0.0
- 2.1.1
- 2.2.4
- 2.3.6
- 2.4.3
- 2.5.0
before_install:
- gem update bundler
script:
- bundle exec rake spec
sudo: false
cache: bundler
notifications:
slack:
secure: X1umGErES0zd+LXX1EqZZxrPZv2YOzbCNxiLLiSGmJLlZAEtlSkMPyr+M00Lrs2DFhn4blwKPm+5YCBvU7f9F4K5GthSl0qZYNpNX/lGNn6EGeBnzJ8rFVgwXPUv1rvrJq0NjeSGni3yAK69K/uX6QohGojAI3iI28/EbJ+uYQM=
|
bb400919494f2805e6a4d6087602a47866d362d4
|
pages/article.js
|
pages/article.js
|
import React from 'react'
import { connect } from 'react-redux';
import { compose } from 'redux';
import Link from 'next/link';
import app from '../components/App';
import { load } from '../redux/articleDetail';
export default compose(
app((dispatch, {query: {id}}) => dispatch(load(id))),
connect(({articleDetail}) => ({
isLoading: articleDetail.getIn(['state', 'isLoading']),
article: articleDetail.get('data'),
})),
)(function Index({
isLoading = false,
article = null
}) {
if(isLoading && article === null) {
return <div>Loading...</div>
}
return (
<div>
<Link href="/"><a>Back to list</a></Link>
<pre>{JSON.stringify(article.toJS(), null, ' ')}</pre>
</div>
);
})
|
import React from 'react'
import { connect } from 'react-redux';
import { compose } from 'redux';
import Link from 'next/link';
import app from '../components/App';
import { load } from '../redux/articleDetail';
export default compose(
app((dispatch, {query: {id}}) => dispatch(load(id))),
connect(({articleDetail}) => ({
isLoading: articleDetail.getIn(['state', 'isLoading']),
article: articleDetail.get('data'),
})),
)(function Index({
isLoading = false,
article = null
}) {
if(isLoading && article === null) {
return <div>Loading...</div>
}
return (
<div>
<pre>{JSON.stringify(article.toJS(), null, ' ')}</pre>
</div>
);
})
|
Remove “back to list” link because it is not accurately “back to list”
|
Remove “back to list” link because it is not accurately “back to list”
|
JavaScript
|
mit
|
cofacts/rumors-site,cofacts/rumors-site
|
javascript
|
## Code Before:
import React from 'react'
import { connect } from 'react-redux';
import { compose } from 'redux';
import Link from 'next/link';
import app from '../components/App';
import { load } from '../redux/articleDetail';
export default compose(
app((dispatch, {query: {id}}) => dispatch(load(id))),
connect(({articleDetail}) => ({
isLoading: articleDetail.getIn(['state', 'isLoading']),
article: articleDetail.get('data'),
})),
)(function Index({
isLoading = false,
article = null
}) {
if(isLoading && article === null) {
return <div>Loading...</div>
}
return (
<div>
<Link href="/"><a>Back to list</a></Link>
<pre>{JSON.stringify(article.toJS(), null, ' ')}</pre>
</div>
);
})
## Instruction:
Remove “back to list” link because it is not accurately “back to list”
## Code After:
import React from 'react'
import { connect } from 'react-redux';
import { compose } from 'redux';
import Link from 'next/link';
import app from '../components/App';
import { load } from '../redux/articleDetail';
export default compose(
app((dispatch, {query: {id}}) => dispatch(load(id))),
connect(({articleDetail}) => ({
isLoading: articleDetail.getIn(['state', 'isLoading']),
article: articleDetail.get('data'),
})),
)(function Index({
isLoading = false,
article = null
}) {
if(isLoading && article === null) {
return <div>Loading...</div>
}
return (
<div>
<pre>{JSON.stringify(article.toJS(), null, ' ')}</pre>
</div>
);
})
|
285dfb98e05ed26245332f29b20c1f3d47a559fa
|
ReleaseVersion.xml
|
ReleaseVersion.xml
|
<Project>
<!--
- Single place to put the release version number. This is imported
- in both testing/* and src/*. We may eventually want to have
- divergent versions, but for the moment this keeps things simpler.
-->
<PropertyGroup>
<Version>2.10.0</Version>
</PropertyGroup>
</Project>
|
<Project>
<!--
- Single place to put the release version number. This is imported
- in both testing/* and src/*. We may eventually want to have
- divergent versions, but for the moment this keeps things simpler.
-->
<PropertyGroup>
<Version>3.0.0-alpha00</Version>
</PropertyGroup>
</Project>
|
Update GAX version (other than for common protos)
|
Update GAX version (other than for common protos)
This is the start of the "next major version" work described here:
https://googleapis.github.io/google-cloud-dotnet/docs/major-version.html
|
XML
|
bsd-3-clause
|
googleapis/gax-dotnet,jskeet/gax-dotnet,jskeet/gax-dotnet,googleapis/gax-dotnet
|
xml
|
## Code Before:
<Project>
<!--
- Single place to put the release version number. This is imported
- in both testing/* and src/*. We may eventually want to have
- divergent versions, but for the moment this keeps things simpler.
-->
<PropertyGroup>
<Version>2.10.0</Version>
</PropertyGroup>
</Project>
## Instruction:
Update GAX version (other than for common protos)
This is the start of the "next major version" work described here:
https://googleapis.github.io/google-cloud-dotnet/docs/major-version.html
## Code After:
<Project>
<!--
- Single place to put the release version number. This is imported
- in both testing/* and src/*. We may eventually want to have
- divergent versions, but for the moment this keeps things simpler.
-->
<PropertyGroup>
<Version>3.0.0-alpha00</Version>
</PropertyGroup>
</Project>
|
8ce567d767e0c33413e9cf46b9abbe8aa1bdfbd8
|
bench/pact-suite/embarrassing/build.sh
|
bench/pact-suite/embarrassing/build.sh
|
INST=$HOME/ExM/inst
LB=$INST/lb
CUTILS=$INST/c-utils
mpicc -std=c99 -O2 -L $LB/lib -L $CUTILS/lib -I $LB/include -I $CUTILS/include -o embarrassing embarrassing.c -ladlb -lexmcutils -Wl,-rpath,$LB/lib,-rpath,$CUTILS/lib
|
set -e
INST=$HOME/ExM/inst
TURBINE=$INST/turbine
LB=$INST/lb
CUTILS=$INST/c-utils
source $TURBINE/scripts/turbine-build-config.sh
CC=mpicc
CFLAGS="-std=c99 -O2 ${TURBINE_INCLUDES}"
LDFLAGS="${TURBINE_LIBS} ${TURBINE_RPATH}"
MKSTATIC=$TURBINE/scripts/mkstatic/mkstatic.tcl
${CC} ${CFLAGS} embarrassing.c ${LDFLAGS} -o embarrassing
${MKSTATIC} embarrassing_lognorm.manifest -c embarrassing_lognorm_tcl.c
${CC} ${CFLAGS} embarrassing_lognorm_tcl.c ${LDFLAGS} -o embarrassing_lognorm_tcl
echo "OK."
|
Build script for embarrassing benchmark
|
Build script for embarrassing benchmark
git-svn-id: 0c5512015aa96f7d3f5c3ad598bd98edc52008b1@11944 dc4e9af1-7f46-4ead-bba6-71afc04862de
|
Shell
|
apache-2.0
|
blue42u/swift-t,JohnPJenkins/swift-t,swift-lang/swift-t,blue42u/swift-t,blue42u/swift-t,swift-lang/swift-t,JohnPJenkins/swift-t,blue42u/swift-t,blue42u/swift-t,basheersubei/swift-t,basheersubei/swift-t,swift-lang/swift-t,basheersubei/swift-t,swift-lang/swift-t,swift-lang/swift-t,blue42u/swift-t,basheersubei/swift-t,JohnPJenkins/swift-t,JohnPJenkins/swift-t,swift-lang/swift-t,basheersubei/swift-t,blue42u/swift-t,basheersubei/swift-t,swift-lang/swift-t,JohnPJenkins/swift-t,JohnPJenkins/swift-t,JohnPJenkins/swift-t,basheersubei/swift-t
|
shell
|
## Code Before:
INST=$HOME/ExM/inst
LB=$INST/lb
CUTILS=$INST/c-utils
mpicc -std=c99 -O2 -L $LB/lib -L $CUTILS/lib -I $LB/include -I $CUTILS/include -o embarrassing embarrassing.c -ladlb -lexmcutils -Wl,-rpath,$LB/lib,-rpath,$CUTILS/lib
## Instruction:
Build script for embarrassing benchmark
git-svn-id: 0c5512015aa96f7d3f5c3ad598bd98edc52008b1@11944 dc4e9af1-7f46-4ead-bba6-71afc04862de
## Code After:
set -e
INST=$HOME/ExM/inst
TURBINE=$INST/turbine
LB=$INST/lb
CUTILS=$INST/c-utils
source $TURBINE/scripts/turbine-build-config.sh
CC=mpicc
CFLAGS="-std=c99 -O2 ${TURBINE_INCLUDES}"
LDFLAGS="${TURBINE_LIBS} ${TURBINE_RPATH}"
MKSTATIC=$TURBINE/scripts/mkstatic/mkstatic.tcl
${CC} ${CFLAGS} embarrassing.c ${LDFLAGS} -o embarrassing
${MKSTATIC} embarrassing_lognorm.manifest -c embarrassing_lognorm_tcl.c
${CC} ${CFLAGS} embarrassing_lognorm_tcl.c ${LDFLAGS} -o embarrassing_lognorm_tcl
echo "OK."
|
48f3a1c5e14dfbca97462736d3567d4bc7ba8b46
|
src/circleci/init.clj
|
src/circleci/init.clj
|
(ns circleci.init
;; (:require circleci.swank)
(:require circleci.db)
(:require circleci.db.migrations)
(:require circleci.web)
(:require circleci.repl)
(:require circleci.logging)
(:require circleci.backend.nodes
circleci.backend.project.rails
circleci.backend.project.circleci))
(def init*
(delay
(try
(circleci.logging/init)
;; (circleci.swank/init)
(circleci.db/init)
(circleci.db.migrations/init)
(circleci.web/init)
(circleci.repl/init)
true
(catch Exception e
(println "caught exception on startup:")
(.printStackTrace e)
(println "exiting")
(System/exit 1)))))
(defn init
"Start everything up. idempotent."
[]
@init*)
(defn -main []
(init))
|
(ns circleci.init
;; (:require circleci.swank)
(:require circleci.db)
(:require circleci.db.migrations)
(:require circleci.web)
(:require circleci.repl)
(:require circleci.logging)
;; (:require circleci.backend.nodes
;; circleci.backend.project.rails
;; circleci.backend.project.circleci)
)
(def init*
(delay
(try
(circleci.logging/init)
;; (circleci.swank/init)
(circleci.db/init)
(circleci.db.migrations/init)
(circleci.web/init)
(circleci.repl/init)
true
(catch Exception e
(println "caught exception on startup:")
(.printStackTrace e)
(println "exiting")
(System/exit 1)))))
(defn init
"Start everything up. idempotent."
[]
@init*)
(defn -main []
(init))
|
Comment out the backend code, to allow heroku to start
|
Comment out the backend code, to allow heroku to start
|
Clojure
|
epl-1.0
|
prathamesh-sonpatki/frontend,circleci/frontend,RayRutjes/frontend,circleci/frontend,prathamesh-sonpatki/frontend,RayRutjes/frontend,circleci/frontend
|
clojure
|
## Code Before:
(ns circleci.init
;; (:require circleci.swank)
(:require circleci.db)
(:require circleci.db.migrations)
(:require circleci.web)
(:require circleci.repl)
(:require circleci.logging)
(:require circleci.backend.nodes
circleci.backend.project.rails
circleci.backend.project.circleci))
(def init*
(delay
(try
(circleci.logging/init)
;; (circleci.swank/init)
(circleci.db/init)
(circleci.db.migrations/init)
(circleci.web/init)
(circleci.repl/init)
true
(catch Exception e
(println "caught exception on startup:")
(.printStackTrace e)
(println "exiting")
(System/exit 1)))))
(defn init
"Start everything up. idempotent."
[]
@init*)
(defn -main []
(init))
## Instruction:
Comment out the backend code, to allow heroku to start
## Code After:
(ns circleci.init
;; (:require circleci.swank)
(:require circleci.db)
(:require circleci.db.migrations)
(:require circleci.web)
(:require circleci.repl)
(:require circleci.logging)
;; (:require circleci.backend.nodes
;; circleci.backend.project.rails
;; circleci.backend.project.circleci)
)
(def init*
(delay
(try
(circleci.logging/init)
;; (circleci.swank/init)
(circleci.db/init)
(circleci.db.migrations/init)
(circleci.web/init)
(circleci.repl/init)
true
(catch Exception e
(println "caught exception on startup:")
(.printStackTrace e)
(println "exiting")
(System/exit 1)))))
(defn init
"Start everything up. idempotent."
[]
@init*)
(defn -main []
(init))
|
b16dfa38b3fdf6443eab90fe7f328435aa9163ac
|
src/javascript/binary/websocket_pages/user/account/settings/iphistory/iphistory.init.js
|
src/javascript/binary/websocket_pages/user/account/settings/iphistory/iphistory.init.js
|
var IPHistory = (function() {
'use strict';
var no_messages_error = "Your account has no Login/Logout activity.";
function updateTable(batch) {
IPHistoryUI.updateTable(batch);
if (batch.length) {
return;
}
$('#login-history-table tbody')
.append($('<tr/>', {class: 'flex-tr'})
.append($('<td/>', {colspan: 6})
.append($('<p/>', {
class: 'notice-msg center-text',
text: text.localize(no_messages_error)
})
)
)
);
}
function handler(response) {
if (response.error && response.error.message) {
document.getElementById('err').textContent = response.error.message;
return;
}
updateTable(response.login_history);
}
// localize, title, create tables
// register the callback on IPHistoryQueue
function init() {
var titleElement = document.getElementById('login_history-title').firstElementChild;
titleElement.textContent = text.localize(titleElement.textContent);
IPHistoryUI.createEmptyTable().appendTo('#login_history-ws-container');
IPHistoryQueue.register(handler);
IPHistoryQueue.fetchNext({limit: 50});
}
function clean() {
$('#login_history-ws-container .error-msg').text('');
IPHistoryUI.clearTableContent();
IPHistoryQueue.clear();
}
return {
init: init,
clean: clean,
};
})();
|
var IPHistory = (function() {
'use strict';
var no_messages_error = "Your account has no Login/Logout activity.";
function updateTable(batch) {
IPHistoryUI.updateTable(batch);
if (batch.length) {
return;
}
$('#login-history-table tbody')
.append($('<tr/>', {class: 'flex-tr'})
.append($('<td/>', {colspan: 6})
.append($('<p/>', {
class: 'notice-msg center-text',
text: text.localize(no_messages_error)
})
)
)
);
}
function handler(response) {
if (response.error && response.error.message) {
$('#err').text(response.error.message);
return;
}
updateTable(response.login_history);
}
// localize, title, create tables
// register the callback on IPHistoryQueue
function init() {
var $title = $('#login_history-title').children().first();
$title.text(text.localize($title.text()));
IPHistoryUI.createEmptyTable().appendTo('#login_history-ws-container');
IPHistoryQueue.register(handler);
IPHistoryQueue.fetchNext({limit: 50});
}
function clean() {
$('#login_history-ws-container .error-msg').text('');
IPHistoryUI.clearTableContent();
IPHistoryQueue.clear();
}
return {
init: init,
clean: clean,
};
})();
|
Use jQuery for misc. UI code
|
Use jQuery for misc. UI code
|
JavaScript
|
apache-2.0
|
teo-binary/binary-static,4p00rv/binary-static,negar-binary/binary-static,binary-com/binary-static,ashkanx/binary-static,fayland/binary-static,ashkanx/binary-static,fayland/binary-static,raunakkathuria/binary-static,teo-binary/binary-static,fayland/binary-static,fayland/binary-static,raunakkathuria/binary-static,kellybinary/binary-static,binary-com/binary-static,teo-binary/binary-static,negar-binary/binary-static,kellybinary/binary-static,binary-com/binary-static,binary-static-deployed/binary-static,binary-static-deployed/binary-static,teo-binary/binary-static,4p00rv/binary-static,binary-static-deployed/binary-static,raunakkathuria/binary-static,negar-binary/binary-static,4p00rv/binary-static,kellybinary/binary-static,ashkanx/binary-static
|
javascript
|
## Code Before:
var IPHistory = (function() {
'use strict';
var no_messages_error = "Your account has no Login/Logout activity.";
function updateTable(batch) {
IPHistoryUI.updateTable(batch);
if (batch.length) {
return;
}
$('#login-history-table tbody')
.append($('<tr/>', {class: 'flex-tr'})
.append($('<td/>', {colspan: 6})
.append($('<p/>', {
class: 'notice-msg center-text',
text: text.localize(no_messages_error)
})
)
)
);
}
function handler(response) {
if (response.error && response.error.message) {
document.getElementById('err').textContent = response.error.message;
return;
}
updateTable(response.login_history);
}
// localize, title, create tables
// register the callback on IPHistoryQueue
function init() {
var titleElement = document.getElementById('login_history-title').firstElementChild;
titleElement.textContent = text.localize(titleElement.textContent);
IPHistoryUI.createEmptyTable().appendTo('#login_history-ws-container');
IPHistoryQueue.register(handler);
IPHistoryQueue.fetchNext({limit: 50});
}
function clean() {
$('#login_history-ws-container .error-msg').text('');
IPHistoryUI.clearTableContent();
IPHistoryQueue.clear();
}
return {
init: init,
clean: clean,
};
})();
## Instruction:
Use jQuery for misc. UI code
## Code After:
var IPHistory = (function() {
'use strict';
var no_messages_error = "Your account has no Login/Logout activity.";
function updateTable(batch) {
IPHistoryUI.updateTable(batch);
if (batch.length) {
return;
}
$('#login-history-table tbody')
.append($('<tr/>', {class: 'flex-tr'})
.append($('<td/>', {colspan: 6})
.append($('<p/>', {
class: 'notice-msg center-text',
text: text.localize(no_messages_error)
})
)
)
);
}
function handler(response) {
if (response.error && response.error.message) {
$('#err').text(response.error.message);
return;
}
updateTable(response.login_history);
}
// localize, title, create tables
// register the callback on IPHistoryQueue
function init() {
var $title = $('#login_history-title').children().first();
$title.text(text.localize($title.text()));
IPHistoryUI.createEmptyTable().appendTo('#login_history-ws-container');
IPHistoryQueue.register(handler);
IPHistoryQueue.fetchNext({limit: 50});
}
function clean() {
$('#login_history-ws-container .error-msg').text('');
IPHistoryUI.clearTableContent();
IPHistoryQueue.clear();
}
return {
init: init,
clean: clean,
};
})();
|
532c201053ae271544270035423f690b4774794a
|
swimlane/core/fields/usergroup.py
|
swimlane/core/fields/usergroup.py
|
from .base import MultiSelectField
from swimlane.core.resources.usergroup import UserGroup
class UserGroupField(MultiSelectField):
"""Manages getting/setting users from record User/Group fields"""
field_type = 'Core.Models.Fields.UserGroupField, Core'
supported_types = [UserGroup]
def cast_to_python(self, value):
"""Convert JSON definition to UserGroup object"""
# v2.x does not provide a distinction between users and groups at the field selection level, can only return
# UserGroup instances instead of specific User or Group instances
if value is not None:
value = UserGroup(self.record._swimlane, value)
return value
def cast_to_swimlane(self, value):
"""Dump UserGroup back to JSON representation"""
if value is not None:
value = value.get_usergroup_selection()
return value
|
from .base import MultiSelectField
from swimlane.core.resources.usergroup import UserGroup
class UserGroupField(MultiSelectField):
"""Manages getting/setting users from record User/Group fields"""
field_type = 'Core.Models.Fields.UserGroupField, Core'
supported_types = [UserGroup]
def set_swimlane(self, value):
"""Workaround for reports returning an empty usergroup field as a single element list with no id/name"""
if value == [{"$type": "Core.Models.Utilities.UserGroupSelection, Core"}]:
value = []
return super(UserGroupField, self).set_swimlane(value)
def cast_to_python(self, value):
"""Convert JSON definition to UserGroup object"""
# v2.x does not provide a distinction between users and groups at the field selection level, can only return
# UserGroup instances instead of specific User or Group instances
if value is not None:
value = UserGroup(self.record._swimlane, value)
return value
def cast_to_swimlane(self, value):
"""Dump UserGroup back to JSON representation"""
if value is not None:
value = value.get_usergroup_selection()
return value
|
Fix multiselect user/group field when retrieving results from a report
|
Fix multiselect user/group field when retrieving results from a report
|
Python
|
mit
|
Swimlane/sw-python-client
|
python
|
## Code Before:
from .base import MultiSelectField
from swimlane.core.resources.usergroup import UserGroup
class UserGroupField(MultiSelectField):
"""Manages getting/setting users from record User/Group fields"""
field_type = 'Core.Models.Fields.UserGroupField, Core'
supported_types = [UserGroup]
def cast_to_python(self, value):
"""Convert JSON definition to UserGroup object"""
# v2.x does not provide a distinction between users and groups at the field selection level, can only return
# UserGroup instances instead of specific User or Group instances
if value is not None:
value = UserGroup(self.record._swimlane, value)
return value
def cast_to_swimlane(self, value):
"""Dump UserGroup back to JSON representation"""
if value is not None:
value = value.get_usergroup_selection()
return value
## Instruction:
Fix multiselect user/group field when retrieving results from a report
## Code After:
from .base import MultiSelectField
from swimlane.core.resources.usergroup import UserGroup
class UserGroupField(MultiSelectField):
"""Manages getting/setting users from record User/Group fields"""
field_type = 'Core.Models.Fields.UserGroupField, Core'
supported_types = [UserGroup]
def set_swimlane(self, value):
"""Workaround for reports returning an empty usergroup field as a single element list with no id/name"""
if value == [{"$type": "Core.Models.Utilities.UserGroupSelection, Core"}]:
value = []
return super(UserGroupField, self).set_swimlane(value)
def cast_to_python(self, value):
"""Convert JSON definition to UserGroup object"""
# v2.x does not provide a distinction between users and groups at the field selection level, can only return
# UserGroup instances instead of specific User or Group instances
if value is not None:
value = UserGroup(self.record._swimlane, value)
return value
def cast_to_swimlane(self, value):
"""Dump UserGroup back to JSON representation"""
if value is not None:
value = value.get_usergroup_selection()
return value
|
ec0171ade989977341cf5d0431bb7f2565e3ead9
|
client/stylesheets/master.styl
|
client/stylesheets/master.styl
|
html, body, #game
width: 100%
height: 100%
overflow: hidden
#game
background: #111
#interface
position: fixed
top: 0
width: 100%
height: 100%
.toggle-states
position: absolute
top: 0
width: 100%
height: 100px
text-align: right
padding: 10px
.reticle
position: absolute
width: 30px
height: @width
left: 50%
top: 50%
-webkit-transform: translate3d(-50%, -50%, 0)
transform: translate3d(-50%, -50%, 0)
border: 2px solid #ddd
border-radius: 999px
opacity: 0
-webkit-transition: opacity .3s ease
transition: opacity .3s ease
&.active
opacity: 1
|
@import 'nib'
html, body, #game
width: 100%
height: 100%
overflow: hidden
#game
background: #111
#interface
position: fixed
top: 0
width: 100%
height: 100%
.toggle-states
position: absolute
top: 0
width: 100%
height: 100px
text-align: right
padding: 10px
.reticle
position: absolute
width: 30px
height: @width
left: 50%
top: 50%
transform: translate3d(-50%, -50%, 0)
border: 2px solid #ddd
border-radius: 999px
opacity: 0
transition: opacity .3s ease
&.active
opacity: 1
|
Add nib for css autoprefixing.
|
Add nib for css autoprefixing.
|
Stylus
|
mit
|
tvararu/NEBUL4
|
stylus
|
## Code Before:
html, body, #game
width: 100%
height: 100%
overflow: hidden
#game
background: #111
#interface
position: fixed
top: 0
width: 100%
height: 100%
.toggle-states
position: absolute
top: 0
width: 100%
height: 100px
text-align: right
padding: 10px
.reticle
position: absolute
width: 30px
height: @width
left: 50%
top: 50%
-webkit-transform: translate3d(-50%, -50%, 0)
transform: translate3d(-50%, -50%, 0)
border: 2px solid #ddd
border-radius: 999px
opacity: 0
-webkit-transition: opacity .3s ease
transition: opacity .3s ease
&.active
opacity: 1
## Instruction:
Add nib for css autoprefixing.
## Code After:
@import 'nib'
html, body, #game
width: 100%
height: 100%
overflow: hidden
#game
background: #111
#interface
position: fixed
top: 0
width: 100%
height: 100%
.toggle-states
position: absolute
top: 0
width: 100%
height: 100px
text-align: right
padding: 10px
.reticle
position: absolute
width: 30px
height: @width
left: 50%
top: 50%
transform: translate3d(-50%, -50%, 0)
border: 2px solid #ddd
border-radius: 999px
opacity: 0
transition: opacity .3s ease
&.active
opacity: 1
|
09fbd8a3d89f278bf8b16fb7ac182b0b0e9086a3
|
appium_tests/search_poem_spec.rb
|
appium_tests/search_poem_spec.rb
|
require_relative 'spec_helper'
describe '歌を検索するテスト' do
it 'アプリのタイトルが正しく表示される' do
current_screen_is TOP_TITLE
end
describe '検索窓に文字を入力すると、歌を絞り込むことができる' do
it '歌選択画面を開く' do
goto_select_poem_screen
current_screen_is '歌を選ぶ'
end
it '検索窓に「秋」を入力すると、1番, 5番, 22番…という順に歌が選ばれていて、2番は選ばれない。' do
fill_search_window_with_text '秋'
cell_names = get_filtered_cell_names
expect(cell_names.first).to eq '001'
expect(cell_names[1]).to eq '005'
expect(cell_names[2]).to eq '022'
expect(cell_names.include? '002').to be false
end
end
end
|
require_relative 'spec_helper'
describe '歌を検索するテスト' do
it 'アプリのタイトルが正しく表示される' do
current_screen_is TOP_TITLE
end
=begin
describe '検索窓に文字を入力すると、歌を絞り込むことができる' do
it '歌選択画面を開く' do
goto_select_poem_screen
current_screen_is '歌を選ぶ'
end
it '検索窓に「秋」を入力すると、1番, 5番, 22番…という順に歌が選ばれていて、2番は選ばれない。' do
fill_search_window_with_text '秋'
cell_names = get_filtered_cell_names
expect(cell_names.first).to eq '001'
expect(cell_names[1]).to eq '005'
expect(cell_names[2]).to eq '022'
expect(cell_names.include? '002').to be false
end
end
=end
describe 'iOS 13で検索窓の載せた歌選択画面が落ちるようになったので、検索機能を無効にする' do
it '歌選択画面を開く' do
goto_select_poem_screen
current_screen_is '歌を選ぶ'
end
it '検索窓が表示されない' do
expect(find_elements(:accessibility_id, 'search_text_field')).to be_empty
end
end
end
|
Disable poem search on PoemPickerScreen: modify Appium test so
|
Disable poem search on PoemPickerScreen: modify Appium test so
|
Ruby
|
mit
|
satoyos/Shuffle100,satoyos/Shuffle100
|
ruby
|
## Code Before:
require_relative 'spec_helper'
describe '歌を検索するテスト' do
it 'アプリのタイトルが正しく表示される' do
current_screen_is TOP_TITLE
end
describe '検索窓に文字を入力すると、歌を絞り込むことができる' do
it '歌選択画面を開く' do
goto_select_poem_screen
current_screen_is '歌を選ぶ'
end
it '検索窓に「秋」を入力すると、1番, 5番, 22番…という順に歌が選ばれていて、2番は選ばれない。' do
fill_search_window_with_text '秋'
cell_names = get_filtered_cell_names
expect(cell_names.first).to eq '001'
expect(cell_names[1]).to eq '005'
expect(cell_names[2]).to eq '022'
expect(cell_names.include? '002').to be false
end
end
end
## Instruction:
Disable poem search on PoemPickerScreen: modify Appium test so
## Code After:
require_relative 'spec_helper'
describe '歌を検索するテスト' do
it 'アプリのタイトルが正しく表示される' do
current_screen_is TOP_TITLE
end
=begin
describe '検索窓に文字を入力すると、歌を絞り込むことができる' do
it '歌選択画面を開く' do
goto_select_poem_screen
current_screen_is '歌を選ぶ'
end
it '検索窓に「秋」を入力すると、1番, 5番, 22番…という順に歌が選ばれていて、2番は選ばれない。' do
fill_search_window_with_text '秋'
cell_names = get_filtered_cell_names
expect(cell_names.first).to eq '001'
expect(cell_names[1]).to eq '005'
expect(cell_names[2]).to eq '022'
expect(cell_names.include? '002').to be false
end
end
=end
describe 'iOS 13で検索窓の載せた歌選択画面が落ちるようになったので、検索機能を無効にする' do
it '歌選択画面を開く' do
goto_select_poem_screen
current_screen_is '歌を選ぶ'
end
it '検索窓が表示されない' do
expect(find_elements(:accessibility_id, 'search_text_field')).to be_empty
end
end
end
|
8ff4fb8901e4ee614a20cb5fe1744c9ab3122fce
|
models/country.php
|
models/country.php
|
<?php
class Country extends ActiveRecordBase {
public $name;
public $id;
public $shortname;
public static function findByName( $name ) {
$res = db_select_one( "countries", array( 'id' ), compact( "name" ) );
if ( $res == false ) {
throw new ModelNotFoundException();
}
return new Country( $res[ 'id' ] );
}
public function __construct( $id = false ) {
if ( $id ) {
$row = db_select_one( "countries", array( 'name', 'shortname' ), compact( "id" ) );
$this->name = $row[ 'name' ];
$this->id = $id;
$this->shortname = $row[ 'shortname' ];
}
}
public static function findAll() {
return db_select( 'countries' );
}
public static function onList( $country ) {
$countries = Country::findAll();
foreach ( $countries as $valid ) {
if ( $valid[ 'name' ] === $country ) {
return true;
}
}
return false;
}
}
?>
|
<?php
class Country extends ActiveRecordBase {
public $name;
public $id;
public $shortname;
public static function findByName( $name ) {
$res = db_select_one( "countries", array( 'id' ), compact( "name" ) );
if ( $res == false ) {
throw new ModelNotFoundException();
}
return new Country( $res[ 'id' ] );
}
public static function findAll() {
return db_select( 'countries' );
}
public function __construct( $id = false ) {
if ( $id ) {
$row = db_select_one( "countries", array( 'name', 'shortname' ), compact( "id" ) );
$this->name = $row[ 'name' ];
$this->id = $id;
$this->shortname = $row[ 'shortname' ];
}
}
?>
|
Remove useless function and move static methods on top
|
Remove useless function and move static methods on top
|
PHP
|
mit
|
VitSalis/endofcodes,dionyziz/endofcodes,VitSalis/endofcodes,dionyziz/endofcodes,VitSalis/endofcodes,dionyziz/endofcodes,VitSalis/endofcodes
|
php
|
## Code Before:
<?php
class Country extends ActiveRecordBase {
public $name;
public $id;
public $shortname;
public static function findByName( $name ) {
$res = db_select_one( "countries", array( 'id' ), compact( "name" ) );
if ( $res == false ) {
throw new ModelNotFoundException();
}
return new Country( $res[ 'id' ] );
}
public function __construct( $id = false ) {
if ( $id ) {
$row = db_select_one( "countries", array( 'name', 'shortname' ), compact( "id" ) );
$this->name = $row[ 'name' ];
$this->id = $id;
$this->shortname = $row[ 'shortname' ];
}
}
public static function findAll() {
return db_select( 'countries' );
}
public static function onList( $country ) {
$countries = Country::findAll();
foreach ( $countries as $valid ) {
if ( $valid[ 'name' ] === $country ) {
return true;
}
}
return false;
}
}
?>
## Instruction:
Remove useless function and move static methods on top
## Code After:
<?php
class Country extends ActiveRecordBase {
public $name;
public $id;
public $shortname;
public static function findByName( $name ) {
$res = db_select_one( "countries", array( 'id' ), compact( "name" ) );
if ( $res == false ) {
throw new ModelNotFoundException();
}
return new Country( $res[ 'id' ] );
}
public static function findAll() {
return db_select( 'countries' );
}
public function __construct( $id = false ) {
if ( $id ) {
$row = db_select_one( "countries", array( 'name', 'shortname' ), compact( "id" ) );
$this->name = $row[ 'name' ];
$this->id = $id;
$this->shortname = $row[ 'shortname' ];
}
}
?>
|
855d9ea2de705ce57a16053d64f0d2e7b6bcde8c
|
open_humans/templates/about.html
|
open_humans/templates/about.html
|
{% extends 'base.html' %}
{% block main %}
<p>Open Humans is a project of <a
href="http://www.personalgenomes.org">PersonalGenomes.org</a> – a 501(c)(3)
nonprofit – and is funded by Knight Foundation and the Robert Wood Johnson
Foundation. Other groundbreaking initiatives from PersonalGenomes.org include
the <a href="http://www.personalgenomes.org/pgp">Personal Genome Project</a>
and the <a href="http://getconference.org">GET conference</a>.</p>
{% endblock %}
|
{% extends 'base.html' %}
{% block main %}
<h1>About Us</h1>
<p>Open Humans is a project of <a
href="http://www.personalgenomes.org">PersonalGenomes.org</a> – a 501(c)(3)
nonprofit – and is funded by Knight Foundation and the Robert Wood Johnson
Foundation. Other groundbreaking initiatives from PersonalGenomes.org include
the <a href="http://www.personalgenomes.org/pgp">Personal Genome Project</a>
and the <a href="http://getconference.org">GET conference</a>.</p>
{% endblock %}
|
Add heading to About Us
|
Add heading to About Us
|
HTML
|
mit
|
OpenHumans/open-humans,PersonalGenomesOrg/open-humans,OpenHumans/open-humans,OpenHumans/open-humans,PersonalGenomesOrg/open-humans,OpenHumans/open-humans,PersonalGenomesOrg/open-humans,PersonalGenomesOrg/open-humans
|
html
|
## Code Before:
{% extends 'base.html' %}
{% block main %}
<p>Open Humans is a project of <a
href="http://www.personalgenomes.org">PersonalGenomes.org</a> – a 501(c)(3)
nonprofit – and is funded by Knight Foundation and the Robert Wood Johnson
Foundation. Other groundbreaking initiatives from PersonalGenomes.org include
the <a href="http://www.personalgenomes.org/pgp">Personal Genome Project</a>
and the <a href="http://getconference.org">GET conference</a>.</p>
{% endblock %}
## Instruction:
Add heading to About Us
## Code After:
{% extends 'base.html' %}
{% block main %}
<h1>About Us</h1>
<p>Open Humans is a project of <a
href="http://www.personalgenomes.org">PersonalGenomes.org</a> – a 501(c)(3)
nonprofit – and is funded by Knight Foundation and the Robert Wood Johnson
Foundation. Other groundbreaking initiatives from PersonalGenomes.org include
the <a href="http://www.personalgenomes.org/pgp">Personal Genome Project</a>
and the <a href="http://getconference.org">GET conference</a>.</p>
{% endblock %}
|
bed44416fea5f39ba9345e8893a66ae4e0888771
|
MMCollapsibleLabel.podspec
|
MMCollapsibleLabel.podspec
|
Pod::Spec.new do |s|
s.name = 'MMCollapsibleLabel'
s.version = '0.1.0'
s.summary = 'A collapsible UILabel.'
s.description = <<-DESC
A highly customizable UILabel which is collapsible like an accordion with a Show / Hide button.
DESC
s.homepage = 'https://github.com/manicmaniac/MMCollapsibleLabel'
s.license = { :type => 'MIT', :file => 'LICENSE' }
s.author = { 'Ryosuke Ito' => '[email protected]' }
s.screenshot = 'https://media.giphy.com/media/3oriOcw7Dx16LgUkq4/source.gif'
s.source = { :git => 'https://github.com/manicmaniac/MMCollapsibleLabel.git', :tag => s.version.to_s }
s.ios.deployment_target = '7.0'
s.source_files = 'MMCollapsibleLabel/Classes/**/*'
s.resource_bundles = {
'MMCollapsibleLabel' => ['MMCollapsibleLabel/Assets/MMCollapsibleLabel.xib']
}
end
|
Pod::Spec.new do |s|
s.name = 'MMCollapsibleLabel'
s.version = '0.1.0'
s.summary = 'A collapsible UILabel.'
s.description = <<-DESC
A highly customizable UILabel which is collapsible like an accordion with a Show / Hide button.
DESC
s.homepage = 'https://github.com/manicmaniac/MMCollapsibleLabel'
s.license = { :type => 'MIT', :file => 'LICENSE' }
s.author = { 'Ryosuke Ito' => '[email protected]' }
s.screenshot = 'https://media.giphy.com/media/3oriOcw7Dx16LgUkq4/source.gif'
s.source = { :git => 'https://github.com/manicmaniac/MMCollapsibleLabel.git', :tag => s.version.to_s }
s.deprecated = true
s.ios.deployment_target = '7.0'
s.source_files = 'MMCollapsibleLabel/Classes/**/*'
s.resource_bundles = {
'MMCollapsibleLabel' => ['MMCollapsibleLabel/Assets/MMCollapsibleLabel.xib']
}
end
|
Declare this is deprecated in podspec
|
Declare this is deprecated in podspec
|
Ruby
|
mit
|
manicmaniac/MMCollapsibleLabel
|
ruby
|
## Code Before:
Pod::Spec.new do |s|
s.name = 'MMCollapsibleLabel'
s.version = '0.1.0'
s.summary = 'A collapsible UILabel.'
s.description = <<-DESC
A highly customizable UILabel which is collapsible like an accordion with a Show / Hide button.
DESC
s.homepage = 'https://github.com/manicmaniac/MMCollapsibleLabel'
s.license = { :type => 'MIT', :file => 'LICENSE' }
s.author = { 'Ryosuke Ito' => '[email protected]' }
s.screenshot = 'https://media.giphy.com/media/3oriOcw7Dx16LgUkq4/source.gif'
s.source = { :git => 'https://github.com/manicmaniac/MMCollapsibleLabel.git', :tag => s.version.to_s }
s.ios.deployment_target = '7.0'
s.source_files = 'MMCollapsibleLabel/Classes/**/*'
s.resource_bundles = {
'MMCollapsibleLabel' => ['MMCollapsibleLabel/Assets/MMCollapsibleLabel.xib']
}
end
## Instruction:
Declare this is deprecated in podspec
## Code After:
Pod::Spec.new do |s|
s.name = 'MMCollapsibleLabel'
s.version = '0.1.0'
s.summary = 'A collapsible UILabel.'
s.description = <<-DESC
A highly customizable UILabel which is collapsible like an accordion with a Show / Hide button.
DESC
s.homepage = 'https://github.com/manicmaniac/MMCollapsibleLabel'
s.license = { :type => 'MIT', :file => 'LICENSE' }
s.author = { 'Ryosuke Ito' => '[email protected]' }
s.screenshot = 'https://media.giphy.com/media/3oriOcw7Dx16LgUkq4/source.gif'
s.source = { :git => 'https://github.com/manicmaniac/MMCollapsibleLabel.git', :tag => s.version.to_s }
s.deprecated = true
s.ios.deployment_target = '7.0'
s.source_files = 'MMCollapsibleLabel/Classes/**/*'
s.resource_bundles = {
'MMCollapsibleLabel' => ['MMCollapsibleLabel/Assets/MMCollapsibleLabel.xib']
}
end
|
cefd97d217ca4fb139c6ac784b93f0c2f2ef440d
|
README.md
|
README.md
|
A node.js utility to iteratively delete Twilio records of SMS and MMS.
```bash
./twilio-sms-delete --sid [your Twilio SID] --auth [your Twilio Auth Token]
```
## Installation
The following recommended installation requires [npm](https://npmjs.org/). If you are unfamiliar with npm, see the [npm docs](https://npmjs.org/doc/). Npm comes installed with Node.js since node version 0.8.x therefore you likely already have it.
Clone this repository:
```bash
git clone https://github.com/jkingsman/twilio-sms-delete.git
```
Install the necessary dependencies:
```bash
npm install
```
## Usage
```bash
./twilio-sms-delete --sid [your Twilio SID] --auth [your Twilio Auth Token]
```
The script will then loop through all SMS it can see using the Twilio API, deleting each message's media (if it has any), then deleting the message itself
## License
Licensed under the MIT License.
|
A node.js utility to iteratively delete Twilio records of SMS and MMS.
```bash
./twilio-sms-delete --sid [your Twilio SID] --auth [your Twilio Auth Token]
```
## Installation
The following recommended installation requires [npm](https://npmjs.org/). If you are unfamiliar with npm, see the [npm docs](https://npmjs.org/doc/). Npm comes installed with Node.js since node version 0.8.x therefore you likely already have it.
Clone this repository:
```bash
git clone https://github.com/jkingsman/twilio-sms-delete.git
```
Install the necessary dependencies:
```bash
npm install
```
## Usage
```bash
./twilio-sms-delete --sid [your Twilio SID] --auth [your Twilio Auth Token]
```
The script will then loop through all SMS it can see using the Twilio API, deleting each message's media (if it has any), then deleting the message itself.
**Note:** this will not delete media items that have already had their parent message deleted -- as far as I know, there's no way to find and/or delete orphaned media (and as such, it remains publically accesible forever...). This only deletes media that have an SMS to find them by.
## License
Licensed under the MIT License.
|
Add warning about not deleting orphaned media
|
Add warning about not deleting orphaned media
|
Markdown
|
mit
|
jkingsman/twilio-sms-delete
|
markdown
|
## Code Before:
A node.js utility to iteratively delete Twilio records of SMS and MMS.
```bash
./twilio-sms-delete --sid [your Twilio SID] --auth [your Twilio Auth Token]
```
## Installation
The following recommended installation requires [npm](https://npmjs.org/). If you are unfamiliar with npm, see the [npm docs](https://npmjs.org/doc/). Npm comes installed with Node.js since node version 0.8.x therefore you likely already have it.
Clone this repository:
```bash
git clone https://github.com/jkingsman/twilio-sms-delete.git
```
Install the necessary dependencies:
```bash
npm install
```
## Usage
```bash
./twilio-sms-delete --sid [your Twilio SID] --auth [your Twilio Auth Token]
```
The script will then loop through all SMS it can see using the Twilio API, deleting each message's media (if it has any), then deleting the message itself
## License
Licensed under the MIT License.
## Instruction:
Add warning about not deleting orphaned media
## Code After:
A node.js utility to iteratively delete Twilio records of SMS and MMS.
```bash
./twilio-sms-delete --sid [your Twilio SID] --auth [your Twilio Auth Token]
```
## Installation
The following recommended installation requires [npm](https://npmjs.org/). If you are unfamiliar with npm, see the [npm docs](https://npmjs.org/doc/). Npm comes installed with Node.js since node version 0.8.x therefore you likely already have it.
Clone this repository:
```bash
git clone https://github.com/jkingsman/twilio-sms-delete.git
```
Install the necessary dependencies:
```bash
npm install
```
## Usage
```bash
./twilio-sms-delete --sid [your Twilio SID] --auth [your Twilio Auth Token]
```
The script will then loop through all SMS it can see using the Twilio API, deleting each message's media (if it has any), then deleting the message itself.
**Note:** this will not delete media items that have already had their parent message deleted -- as far as I know, there's no way to find and/or delete orphaned media (and as such, it remains publically accesible forever...). This only deletes media that have an SMS to find them by.
## License
Licensed under the MIT License.
|
af57b00165733fa57942c88ce54d46d17cf6d8ef
|
app/assets/stylesheets/modules/_uls.styl
|
app/assets/stylesheets/modules/_uls.styl
|
.uls-trigger
position relative
top -2px
margin-left 0px
.uls-menu
margin-top 10px
input[type=text]
height auto
.uls-menu .uls-lcd-region-section .uls-lcd-region-title
font-weight normal
.uls-search-label
height 27px
.uls-filterinput
padding-top 3px
|
.uls-trigger
position relative
top -2px
margin-left 0px
/*@noflip*/ padding-left: 30px
.uls-menu
margin-top 10px
input[type=text]
height auto
.uls-menu .uls-lcd-region-section .uls-lcd-region-title
font-weight normal
.uls-search-label
height 27px
.uls-filterinput
padding-top 3px
|
Fix overlap of language switcher text in RTL layout
|
Fix overlap of language switcher text in RTL layout
Fixes https://phabricator.wikimedia.org/T152446
|
Stylus
|
mit
|
majakomel/WikiEduDashboard,sejalkhatri/WikiEduDashboard,feelfreelinux/WikiEduDashboard,alpha721/WikiEduDashboard,Wowu/WikiEduDashboard,KarmaHater/WikiEduDashboard,Wowu/WikiEduDashboard,feelfreelinux/WikiEduDashboard,majakomel/WikiEduDashboard,sejalkhatri/WikiEduDashboard,feelfreelinux/WikiEduDashboard,KarmaHater/WikiEduDashboard,sejalkhatri/WikiEduDashboard,alpha721/WikiEduDashboard,sejalkhatri/WikiEduDashboard,KarmaHater/WikiEduDashboard,KarmaHater/WikiEduDashboard,WikiEducationFoundation/WikiEduDashboard,sejalkhatri/WikiEduDashboard,WikiEducationFoundation/WikiEduDashboard,majakomel/WikiEduDashboard,WikiEducationFoundation/WikiEduDashboard,feelfreelinux/WikiEduDashboard,Wowu/WikiEduDashboard,Wowu/WikiEduDashboard,WikiEducationFoundation/WikiEduDashboard,alpha721/WikiEduDashboard,majakomel/WikiEduDashboard,WikiEducationFoundation/WikiEduDashboard,alpha721/WikiEduDashboard
|
stylus
|
## Code Before:
.uls-trigger
position relative
top -2px
margin-left 0px
.uls-menu
margin-top 10px
input[type=text]
height auto
.uls-menu .uls-lcd-region-section .uls-lcd-region-title
font-weight normal
.uls-search-label
height 27px
.uls-filterinput
padding-top 3px
## Instruction:
Fix overlap of language switcher text in RTL layout
Fixes https://phabricator.wikimedia.org/T152446
## Code After:
.uls-trigger
position relative
top -2px
margin-left 0px
/*@noflip*/ padding-left: 30px
.uls-menu
margin-top 10px
input[type=text]
height auto
.uls-menu .uls-lcd-region-section .uls-lcd-region-title
font-weight normal
.uls-search-label
height 27px
.uls-filterinput
padding-top 3px
|
c35887025a2127a527862e664d1ef3bb5c4f528a
|
Constants.py
|
Constants.py
|
IRC_numeric_to_name = {"001": "RPL_WELCOME", "372": "RPL_MOTD", "375": "RPL_MOTDSTART", "376": "RPL_ENDOFMOTD", "433": "ERR_NICKNAMEINUSE"}
CTCP_DELIMITER = chr(1)
|
IRC_numeric_to_name = {"001": "RPL_WELCOME", "315": "RPL_ENDOFWHO", "352": "RPL_WHOREPLY", "372": "RPL_MOTD", "375": "RPL_MOTDSTART", "376": "RPL_ENDOFMOTD", "433": "ERR_NICKNAMEINUSE"}
CTCP_DELIMITER = chr(1)
|
Add some needed IRC numerics
|
Add some needed IRC numerics
|
Python
|
mit
|
Didero/DideRobot
|
python
|
## Code Before:
IRC_numeric_to_name = {"001": "RPL_WELCOME", "372": "RPL_MOTD", "375": "RPL_MOTDSTART", "376": "RPL_ENDOFMOTD", "433": "ERR_NICKNAMEINUSE"}
CTCP_DELIMITER = chr(1)
## Instruction:
Add some needed IRC numerics
## Code After:
IRC_numeric_to_name = {"001": "RPL_WELCOME", "315": "RPL_ENDOFWHO", "352": "RPL_WHOREPLY", "372": "RPL_MOTD", "375": "RPL_MOTDSTART", "376": "RPL_ENDOFMOTD", "433": "ERR_NICKNAMEINUSE"}
CTCP_DELIMITER = chr(1)
|
077c4a0f2346d04a3ce97174dd98638ebe22bd4d
|
lib/cukestart/generator/structure.rb
|
lib/cukestart/generator/structure.rb
|
require 'thor'
module Cukestart
module Generator
class Structure < Thor::Group
argument :project_name, :desc => "Name of the root directory", :default => "teste_gem"
def self.source_root
File.dirname(__FILE__) + :project_name
end
end
end
end
|
require 'thor'
module Cukestart
module Generator
class Structure < Thor::Group
include Thor::Actions
argument :project_name, :desc => "Name of the root directory", :default => "teste_gem"
def self.source_root
File.dirname(__FILE__) + :project_name
end
def create_folders
empty_directory(project_name)
empty_directory("#{project_name}/features")
empty_directory("#{project_name}/features/support")
empty_directory("#{project_name}/features/step_definitions")
end
end
end
end
|
Create folders with a root default name
|
Create folders with a root default name
|
Ruby
|
mit
|
luisfpb/cukestart
|
ruby
|
## Code Before:
require 'thor'
module Cukestart
module Generator
class Structure < Thor::Group
argument :project_name, :desc => "Name of the root directory", :default => "teste_gem"
def self.source_root
File.dirname(__FILE__) + :project_name
end
end
end
end
## Instruction:
Create folders with a root default name
## Code After:
require 'thor'
module Cukestart
module Generator
class Structure < Thor::Group
include Thor::Actions
argument :project_name, :desc => "Name of the root directory", :default => "teste_gem"
def self.source_root
File.dirname(__FILE__) + :project_name
end
def create_folders
empty_directory(project_name)
empty_directory("#{project_name}/features")
empty_directory("#{project_name}/features/support")
empty_directory("#{project_name}/features/step_definitions")
end
end
end
end
|
a739025c8ce278af060a9a2de3c8dffc66eb7360
|
config/defaultPlugins.json
|
config/defaultPlugins.json
|
{
"kuzzle-plugin-logger": {
"version": "1.0.4",
"activated": true,
"defaultConfig": {
"service": "winston",
"level": "info",
"addDate": true
}
}
}
|
{
"kuzzle-plugin-logger": {
"version": "1.0.4",
"activated": true,
"defaultConfig": {
"service": "winston",
"level": "info",
"addDate": true
}
},
"kuzzle-plugin-passportjs": {
"version": "0.0.1",
"activated": true,
"defaultConfig": {
}
}
}
|
Load PassportJS plugin by default for authentication
|
Load PassportJS plugin by default for authentication
|
JSON
|
apache-2.0
|
kuzzleio/kuzzle,kuzzleio/kuzzle,kuzzleio/kuzzle,kuzzleio/kuzzle
|
json
|
## Code Before:
{
"kuzzle-plugin-logger": {
"version": "1.0.4",
"activated": true,
"defaultConfig": {
"service": "winston",
"level": "info",
"addDate": true
}
}
}
## Instruction:
Load PassportJS plugin by default for authentication
## Code After:
{
"kuzzle-plugin-logger": {
"version": "1.0.4",
"activated": true,
"defaultConfig": {
"service": "winston",
"level": "info",
"addDate": true
}
},
"kuzzle-plugin-passportjs": {
"version": "0.0.1",
"activated": true,
"defaultConfig": {
}
}
}
|
4a5d778a3642de24ab5afa62f1444f42d7837ce3
|
tox.ini
|
tox.ini
|
[flake8]
max-line-length = 100
exclude = .tox,docs/modeltranslation/conf.py
[tox]
distribute = False
envlist =
py{27,34,35,36}-1.11.X,
py{34,35,36}-2.0.X,
[testenv]
downloadcache = {toxworkdir}/_download/
commands =
django-admin.py --version
{envpython} runtests.py
basepython =
py27: python2.7
py34: python3.4
py35: python3.5
py36: python3.6
deps =
1.11.X: Django==1.11.*
2.0.X: Django==2.0.*
Pillow
|
[flake8]
max-line-length = 100
exclude = .tox,docs/modeltranslation/conf.py
[tox]
distribute = False
envlist =
py{27,34,35,36}-1.11.X,
py{34,35,36}-2.0.X,
py{35,36,37}-2.1.X,
[testenv]
downloadcache = {toxworkdir}/_download/
commands =
django-admin.py --version
{envpython} runtests.py
basepython =
py27: python2.7
py34: python3.4
py35: python3.5
py36: python3.6
py37: python3.7
deps =
1.11.X: Django==1.11.*
2.0.X: Django==2.0.*
2.1.X: Django==2.1.*
Pillow
|
Update test matrix: add django-2.1 and python 3.7
|
Update test matrix: add django-2.1 and python 3.7
|
INI
|
bsd-3-clause
|
deschler/django-modeltranslation,deschler/django-modeltranslation
|
ini
|
## Code Before:
[flake8]
max-line-length = 100
exclude = .tox,docs/modeltranslation/conf.py
[tox]
distribute = False
envlist =
py{27,34,35,36}-1.11.X,
py{34,35,36}-2.0.X,
[testenv]
downloadcache = {toxworkdir}/_download/
commands =
django-admin.py --version
{envpython} runtests.py
basepython =
py27: python2.7
py34: python3.4
py35: python3.5
py36: python3.6
deps =
1.11.X: Django==1.11.*
2.0.X: Django==2.0.*
Pillow
## Instruction:
Update test matrix: add django-2.1 and python 3.7
## Code After:
[flake8]
max-line-length = 100
exclude = .tox,docs/modeltranslation/conf.py
[tox]
distribute = False
envlist =
py{27,34,35,36}-1.11.X,
py{34,35,36}-2.0.X,
py{35,36,37}-2.1.X,
[testenv]
downloadcache = {toxworkdir}/_download/
commands =
django-admin.py --version
{envpython} runtests.py
basepython =
py27: python2.7
py34: python3.4
py35: python3.5
py36: python3.6
py37: python3.7
deps =
1.11.X: Django==1.11.*
2.0.X: Django==2.0.*
2.1.X: Django==2.1.*
Pillow
|
b3975b4e5b855eb212cc5171e17ed93e315f1c30
|
cheap_repr/utils.py
|
cheap_repr/utils.py
|
import traceback
from qualname import qualname
def safe_qualname(cls):
# type: (type) -> str
result = _safe_qualname_cache.get(cls)
if not result:
try:
result = qualname(cls)
except (AttributeError, IOError):
result = cls.__name__
if '<locals>' not in result:
_safe_qualname_cache[cls] = result
return result
_safe_qualname_cache = {}
def type_name(x):
return safe_qualname(x.__class__)
def exception_string(exc):
assert isinstance(exc, BaseException)
return ''.join(traceback.format_exception_only(type(exc), exc)).strip()
|
import traceback
from qualname import qualname
def safe_qualname(cls):
# type: (type) -> str
result = _safe_qualname_cache.get(cls)
if not result:
try:
result = qualname(cls)
except (AttributeError, IOError, SyntaxError):
result = cls.__name__
if '<locals>' not in result:
_safe_qualname_cache[cls] = result
return result
_safe_qualname_cache = {}
def type_name(x):
return safe_qualname(x.__class__)
def exception_string(exc):
assert isinstance(exc, BaseException)
return ''.join(traceback.format_exception_only(type(exc), exc)).strip()
|
Make safe_qualname more permissive (getting syntax errors on travis in 2.6)
|
Make safe_qualname more permissive (getting syntax errors on travis in 2.6)
|
Python
|
mit
|
alexmojaki/cheap_repr,alexmojaki/cheap_repr
|
python
|
## Code Before:
import traceback
from qualname import qualname
def safe_qualname(cls):
# type: (type) -> str
result = _safe_qualname_cache.get(cls)
if not result:
try:
result = qualname(cls)
except (AttributeError, IOError):
result = cls.__name__
if '<locals>' not in result:
_safe_qualname_cache[cls] = result
return result
_safe_qualname_cache = {}
def type_name(x):
return safe_qualname(x.__class__)
def exception_string(exc):
assert isinstance(exc, BaseException)
return ''.join(traceback.format_exception_only(type(exc), exc)).strip()
## Instruction:
Make safe_qualname more permissive (getting syntax errors on travis in 2.6)
## Code After:
import traceback
from qualname import qualname
def safe_qualname(cls):
# type: (type) -> str
result = _safe_qualname_cache.get(cls)
if not result:
try:
result = qualname(cls)
except (AttributeError, IOError, SyntaxError):
result = cls.__name__
if '<locals>' not in result:
_safe_qualname_cache[cls] = result
return result
_safe_qualname_cache = {}
def type_name(x):
return safe_qualname(x.__class__)
def exception_string(exc):
assert isinstance(exc, BaseException)
return ''.join(traceback.format_exception_only(type(exc), exc)).strip()
|
73a41f2d8f8d2479e67dc8028cf615f2019aeaf2
|
src/main/java/com/metroveu/metroveu/WearConnector.java
|
src/main/java/com/metroveu/metroveu/WearConnector.java
|
package com.metroveu.metroveu;
import android.app.Service;
import android.content.Intent;
import android.os.IBinder;
import android.util.Log;
import com.google.android.gms.wearable.DataEvent;
import com.google.android.gms.wearable.DataEventBuffer;
import com.google.android.gms.wearable.DataMap;
import com.google.android.gms.wearable.DataMapItem;
import com.google.android.gms.wearable.WearableListenerService;
public class WearConnector extends WearableListenerService {
@Override
public void onDataChanged(DataEventBuffer dataEvents) {
for (DataEvent dataEvent : dataEvents) {
if (dataEvent.getType() == DataEvent.TYPE_CHANGED) {
DataMap dataMap = DataMapItem.fromDataItem(dataEvent.getDataItem()).getDataMap();
String path = dataEvent.getDataItem().getUri().getPath();
if (path.equals("/lines")) {
int number = dataMap.getInt("number");
Log.v("wear", Integer.toString(number));
}
}
}
}
}
|
package com.metroveu.metroveu;
import android.util.Log;
import com.google.android.gms.wearable.DataEvent;
import com.google.android.gms.wearable.DataEventBuffer;
import com.google.android.gms.wearable.DataMap;
import com.google.android.gms.wearable.DataMapItem;
import com.google.android.gms.wearable.MessageEvent;
import com.google.android.gms.wearable.WearableListenerService;
public class WearConnector extends WearableListenerService {
public void onMessageReceived(MessageEvent messageEvent) {
System.out.println("Message Received on Phone on launch of wear homepage");
if(messageEvent.getPath().equals("/lines")) {
//sendSavedDeals(); //fetch from db and make a datamap object using PutDataRequest
Log.v("JOAN", "Message received");
}
else {
Log.v("JOAN", "Wrong path");
}
}
@Override
public void onDataChanged(DataEventBuffer dataEvents) {
for (DataEvent dataEvent : dataEvents) {
if (dataEvent.getType() == DataEvent.TYPE_CHANGED) {
DataMap dataMap = DataMapItem.fromDataItem(dataEvent.getDataItem()).getDataMap();
String path = dataEvent.getDataItem().getUri().getPath();
if (path.equals("/lines")) {
int number = dataMap.getInt("number");
Log.v("JOAN", Integer.toString(number));
}
}
}
}
}
|
Change WeareableListener tag and implement onMessageReceived
|
Change WeareableListener tag and implement onMessageReceived
|
Java
|
mit
|
joanvila/MetroVeu
|
java
|
## Code Before:
package com.metroveu.metroveu;
import android.app.Service;
import android.content.Intent;
import android.os.IBinder;
import android.util.Log;
import com.google.android.gms.wearable.DataEvent;
import com.google.android.gms.wearable.DataEventBuffer;
import com.google.android.gms.wearable.DataMap;
import com.google.android.gms.wearable.DataMapItem;
import com.google.android.gms.wearable.WearableListenerService;
public class WearConnector extends WearableListenerService {
@Override
public void onDataChanged(DataEventBuffer dataEvents) {
for (DataEvent dataEvent : dataEvents) {
if (dataEvent.getType() == DataEvent.TYPE_CHANGED) {
DataMap dataMap = DataMapItem.fromDataItem(dataEvent.getDataItem()).getDataMap();
String path = dataEvent.getDataItem().getUri().getPath();
if (path.equals("/lines")) {
int number = dataMap.getInt("number");
Log.v("wear", Integer.toString(number));
}
}
}
}
}
## Instruction:
Change WeareableListener tag and implement onMessageReceived
## Code After:
package com.metroveu.metroveu;
import android.util.Log;
import com.google.android.gms.wearable.DataEvent;
import com.google.android.gms.wearable.DataEventBuffer;
import com.google.android.gms.wearable.DataMap;
import com.google.android.gms.wearable.DataMapItem;
import com.google.android.gms.wearable.MessageEvent;
import com.google.android.gms.wearable.WearableListenerService;
public class WearConnector extends WearableListenerService {
public void onMessageReceived(MessageEvent messageEvent) {
System.out.println("Message Received on Phone on launch of wear homepage");
if(messageEvent.getPath().equals("/lines")) {
//sendSavedDeals(); //fetch from db and make a datamap object using PutDataRequest
Log.v("JOAN", "Message received");
}
else {
Log.v("JOAN", "Wrong path");
}
}
@Override
public void onDataChanged(DataEventBuffer dataEvents) {
for (DataEvent dataEvent : dataEvents) {
if (dataEvent.getType() == DataEvent.TYPE_CHANGED) {
DataMap dataMap = DataMapItem.fromDataItem(dataEvent.getDataItem()).getDataMap();
String path = dataEvent.getDataItem().getUri().getPath();
if (path.equals("/lines")) {
int number = dataMap.getInt("number");
Log.v("JOAN", Integer.toString(number));
}
}
}
}
}
|
38848a976789e35271cc07cc5dae021f6521846f
|
src/main/java/org/icij/extract/core/Spewer.java
|
src/main/java/org/icij/extract/core/Spewer.java
|
package org.icij.extract.core;
import java.io.IOException;
import java.nio.file.Path;
import java.nio.file.FileSystems;
import java.nio.charset.Charset;
import java.util.logging.Logger;
import org.apache.tika.parser.ParsingReader;
import org.apache.tika.exception.TikaException;
/**
* Extract
*
* @author Matthew Caruana Galizia <[email protected]>
* @version 1.0.0-beta
* @since 1.0.0-beta
*/
public abstract class Spewer {
protected final Logger logger;
private Path outputBase = null;
public Spewer(Logger logger) {
this.logger = logger;
}
public abstract void write(Path file, ParsingReader reader, Charset outputEncoding) throws IOException, TikaException, SpewerException;
public void setOutputBase(Path outputBase) {
this.outputBase = outputBase;
}
public void setOutputBase(String outputBase) {
setOutputBase(FileSystems.getDefault().getPath(outputBase));
}
public Path filterOutputPath(Path file) {
if (file.startsWith(outputBase)) {
return file.subpath(outputBase.getNameCount(), file.getNameCount());
}
return file;
}
public void finish() throws IOException {
logger.info("Spewer finishing pending jobs.");
}
}
|
package org.icij.extract.core;
import java.io.IOException;
import java.nio.file.Path;
import java.nio.file.FileSystems;
import java.nio.charset.Charset;
import java.util.logging.Logger;
import org.apache.tika.parser.ParsingReader;
import org.apache.tika.exception.TikaException;
/**
* Extract
*
* @author Matthew Caruana Galizia <[email protected]>
* @version 1.0.0-beta
* @since 1.0.0-beta
*/
public abstract class Spewer {
protected final Logger logger;
private Path outputBase = null;
public Spewer(Logger logger) {
this.logger = logger;
}
public abstract void write(Path file, ParsingReader reader, Charset outputEncoding) throws IOException, TikaException, SpewerException;
public void setOutputBase(Path outputBase) {
this.outputBase = outputBase;
}
public void setOutputBase(String outputBase) {
setOutputBase(FileSystems.getDefault().getPath(outputBase));
}
public Path filterOutputPath(Path file) {
if (null != outputBase && file.startsWith(outputBase)) {
return file.subpath(outputBase.getNameCount(), file.getNameCount());
}
return file;
}
public void finish() throws IOException {
logger.info("Spewer finishing pending jobs.");
}
}
|
Fix NullPointerException when output base is null
|
Fix NullPointerException when output base is null
|
Java
|
mit
|
ICIJ/extract,ICIJ/extract
|
java
|
## Code Before:
package org.icij.extract.core;
import java.io.IOException;
import java.nio.file.Path;
import java.nio.file.FileSystems;
import java.nio.charset.Charset;
import java.util.logging.Logger;
import org.apache.tika.parser.ParsingReader;
import org.apache.tika.exception.TikaException;
/**
* Extract
*
* @author Matthew Caruana Galizia <[email protected]>
* @version 1.0.0-beta
* @since 1.0.0-beta
*/
public abstract class Spewer {
protected final Logger logger;
private Path outputBase = null;
public Spewer(Logger logger) {
this.logger = logger;
}
public abstract void write(Path file, ParsingReader reader, Charset outputEncoding) throws IOException, TikaException, SpewerException;
public void setOutputBase(Path outputBase) {
this.outputBase = outputBase;
}
public void setOutputBase(String outputBase) {
setOutputBase(FileSystems.getDefault().getPath(outputBase));
}
public Path filterOutputPath(Path file) {
if (file.startsWith(outputBase)) {
return file.subpath(outputBase.getNameCount(), file.getNameCount());
}
return file;
}
public void finish() throws IOException {
logger.info("Spewer finishing pending jobs.");
}
}
## Instruction:
Fix NullPointerException when output base is null
## Code After:
package org.icij.extract.core;
import java.io.IOException;
import java.nio.file.Path;
import java.nio.file.FileSystems;
import java.nio.charset.Charset;
import java.util.logging.Logger;
import org.apache.tika.parser.ParsingReader;
import org.apache.tika.exception.TikaException;
/**
* Extract
*
* @author Matthew Caruana Galizia <[email protected]>
* @version 1.0.0-beta
* @since 1.0.0-beta
*/
public abstract class Spewer {
protected final Logger logger;
private Path outputBase = null;
public Spewer(Logger logger) {
this.logger = logger;
}
public abstract void write(Path file, ParsingReader reader, Charset outputEncoding) throws IOException, TikaException, SpewerException;
public void setOutputBase(Path outputBase) {
this.outputBase = outputBase;
}
public void setOutputBase(String outputBase) {
setOutputBase(FileSystems.getDefault().getPath(outputBase));
}
public Path filterOutputPath(Path file) {
if (null != outputBase && file.startsWith(outputBase)) {
return file.subpath(outputBase.getNameCount(), file.getNameCount());
}
return file;
}
public void finish() throws IOException {
logger.info("Spewer finishing pending jobs.");
}
}
|
da8c78c1f7da688fe95a48a5addf51c38d0873f9
|
content/faq/de-onde-vem-os-dados-do-de-olho-nas-metas.md
|
content/faq/de-onde-vem-os-dados-do-de-olho-nas-metas.md
|
---
title: "De onde vem os dados do De Olho nas Metas?"
date: 2017-09-14T15:45:17-03:00
layout: none
type: faq
weight: 5
---
Periodicamente, o De Olho nas Metas consulta automaticamente as informações sobre as metas e projetos do Planeja Sampa - site da Prefeitura de São Paulo que foi especialmente criado para incentivar a transparência e a participação social (http://planejasampa.prefeitura.sp.gov.br). Além dos dados do Planeja Sampa, o De Olho nas Metas também disponibiliza informações sobre as empresas executoras das metas. Essas informações fazem parte do Acordo de Cooperação Técnica entre o Tribunal de Contas do Município de São Paulo e a Rede Nossa São Paulo.
|
---
title: "De onde vem os dados do De Olho nas Metas?"
date: 2017-09-14T15:45:17-03:00
layout: none
type: faq
weight: 5
---
Periodicamente, o De Olho nas Metas consulta automaticamente as informações sobre as metas e projetos do [Planeja Sampa](http://planejasampa.prefeitura.sp.gov.br) - site da Prefeitura de São Paulo que foi especialmente criado para incentivar a transparência e a participação social. Além dos dados do Planeja Sampa, o De Olho nas Metas também disponibiliza informações sobre as empresas executoras das metas. Essas informações fazem parte do Acordo de Cooperação Técnica entre o Tribunal de Contas do Município de São Paulo e a Rede Nossa São Paulo.
|
Fix link in one FAQ text
|
Fix link in one FAQ text
DONM-67
|
Markdown
|
mit
|
AppCivico/DOnM-2017-www,AppCivico/DOnM-2017-www
|
markdown
|
## Code Before:
---
title: "De onde vem os dados do De Olho nas Metas?"
date: 2017-09-14T15:45:17-03:00
layout: none
type: faq
weight: 5
---
Periodicamente, o De Olho nas Metas consulta automaticamente as informações sobre as metas e projetos do Planeja Sampa - site da Prefeitura de São Paulo que foi especialmente criado para incentivar a transparência e a participação social (http://planejasampa.prefeitura.sp.gov.br). Além dos dados do Planeja Sampa, o De Olho nas Metas também disponibiliza informações sobre as empresas executoras das metas. Essas informações fazem parte do Acordo de Cooperação Técnica entre o Tribunal de Contas do Município de São Paulo e a Rede Nossa São Paulo.
## Instruction:
Fix link in one FAQ text
DONM-67
## Code After:
---
title: "De onde vem os dados do De Olho nas Metas?"
date: 2017-09-14T15:45:17-03:00
layout: none
type: faq
weight: 5
---
Periodicamente, o De Olho nas Metas consulta automaticamente as informações sobre as metas e projetos do [Planeja Sampa](http://planejasampa.prefeitura.sp.gov.br) - site da Prefeitura de São Paulo que foi especialmente criado para incentivar a transparência e a participação social. Além dos dados do Planeja Sampa, o De Olho nas Metas também disponibiliza informações sobre as empresas executoras das metas. Essas informações fazem parte do Acordo de Cooperação Técnica entre o Tribunal de Contas do Município de São Paulo e a Rede Nossa São Paulo.
|
fadfef3b2606212d3c09b4bf30aa2046276c1901
|
content/reviews.html
|
content/reviews.html
|
<div id="page-body" style="text-align: left; margin: 25px;">
<h2 class="title">Reviews</h2>
<div class="post">
<p><h4><strong>Professional Reviews</strong></h4></p>
<p><a href="#" title="capitalism" onclick="load_review('capitalism')">Capitalism in Software Development</a> <span class="small"> – Posted on</span> <span class="post-date">2016-01-31</span></strong></i></p>
<p><a href="#" title="databases" onclick="load_review('databases')">Persistent Data Versus APIs</a> <span class="small"> – Posted on</span> <span class="post-date">2016-02-15</span></strong></i></p>
</div>
<p>
<div id="replace-content" class="post">
</div>
</div>
|
<div id="page-body" style="text-align: left; margin: 25px;">
<h2 class="title">Reviews</h2>
<div class="post">
<p><h4><strong>Professional Reviews</strong></h4></p>
<p><a href="#" title="capitalism" onclick="load_review('capitalism')">Capitalism in Software Development</a> <span class="small"> – Posted on</span> <span class="post-date">2016-01-31</span></strong></i></p>
<p><a href="#" title="databases" onclick="load_review('databases')">Persistent Data Versus APIs</a> <span class="small"> – Posted on</span> <span class="post-date">2016-02-15</span></strong></i></p>
<p><a href="#" title="applications" onclick="load_review('applications')">Tiered Application Philosophy</a> <span class="small"> – Posted on</span> <span class="post-date">2016-02-26</span></strong></i></p>
</div>
<p>
<div id="replace-content" class="post">
</div>
</div>
|
Add in the Tiered Application Philosophy
|
Add in the Tiered Application Philosophy
|
HTML
|
bsd-3-clause
|
wparad/Startup-Tech
|
html
|
## Code Before:
<div id="page-body" style="text-align: left; margin: 25px;">
<h2 class="title">Reviews</h2>
<div class="post">
<p><h4><strong>Professional Reviews</strong></h4></p>
<p><a href="#" title="capitalism" onclick="load_review('capitalism')">Capitalism in Software Development</a> <span class="small"> – Posted on</span> <span class="post-date">2016-01-31</span></strong></i></p>
<p><a href="#" title="databases" onclick="load_review('databases')">Persistent Data Versus APIs</a> <span class="small"> – Posted on</span> <span class="post-date">2016-02-15</span></strong></i></p>
</div>
<p>
<div id="replace-content" class="post">
</div>
</div>
## Instruction:
Add in the Tiered Application Philosophy
## Code After:
<div id="page-body" style="text-align: left; margin: 25px;">
<h2 class="title">Reviews</h2>
<div class="post">
<p><h4><strong>Professional Reviews</strong></h4></p>
<p><a href="#" title="capitalism" onclick="load_review('capitalism')">Capitalism in Software Development</a> <span class="small"> – Posted on</span> <span class="post-date">2016-01-31</span></strong></i></p>
<p><a href="#" title="databases" onclick="load_review('databases')">Persistent Data Versus APIs</a> <span class="small"> – Posted on</span> <span class="post-date">2016-02-15</span></strong></i></p>
<p><a href="#" title="applications" onclick="load_review('applications')">Tiered Application Philosophy</a> <span class="small"> – Posted on</span> <span class="post-date">2016-02-26</span></strong></i></p>
</div>
<p>
<div id="replace-content" class="post">
</div>
</div>
|
430fd5393668249f01a2b941eef62569d758c6cf
|
tools/skp/page_sets/skia_intelwiki_desktop.py
|
tools/skp/page_sets/skia_intelwiki_desktop.py
|
from telemetry import story
from telemetry.page import page as page_module
from telemetry.page import shared_page_state
class SkiaBuildbotDesktopPage(page_module.Page):
def __init__(self, url, page_set):
super(SkiaBuildbotDesktopPage, self).__init__(
url=url,
name=url,
page_set=page_set,
shared_page_state_class=shared_page_state.SharedDesktopPageState)
self.archive_data_file = 'data/skia_intelwiki_desktop.json'
def RunNavigateSteps(self, action_runner):
action_runner.Navigate(self.url)
action_runner.Wait(120)
class SkiaIntelwikiDesktopPageSet(story.StorySet):
""" Pages designed to represent the median, not highly optimized web """
def __init__(self):
super(SkiaIntelwikiDesktopPageSet, self).__init__(
archive_data_file='data/skia_intelwiki_desktop.json')
urls_list = [
# go/skia-skps-3-19
'https://en.wikipedia.org/wiki/Intel_Graphics_Technology',
]
for url in urls_list:
self.AddStory(SkiaBuildbotDesktopPage(url, self))
|
from telemetry import story
from telemetry.page import page as page_module
from telemetry.page import shared_page_state
class SkiaBuildbotDesktopPage(page_module.Page):
def __init__(self, url, page_set):
super(SkiaBuildbotDesktopPage, self).__init__(
url=url,
name=url,
page_set=page_set,
shared_page_state_class=shared_page_state.SharedDesktopPageState)
self.archive_data_file = 'data/skia_intelwiki_desktop.json'
def RunNavigateSteps(self, action_runner):
action_runner.Navigate(self.url)
action_runner.Wait(20)
def RunPageInteractions(self, action_runner):
with action_runner.CreateGestureInteraction('ScrollAction'):
action_runner.ScrollPage()
class SkiaIntelwikiDesktopPageSet(story.StorySet):
""" Pages designed to represent the median, not highly optimized web """
def __init__(self):
super(SkiaIntelwikiDesktopPageSet, self).__init__(
archive_data_file='data/skia_intelwiki_desktop.json')
urls_list = [
# go/skia-skps-3-19
'https://en.wikipedia.org/wiki/Intel_Graphics_Technology',
]
for url in urls_list:
self.AddStory(SkiaBuildbotDesktopPage(url, self))
|
Add scrolling to go to the more interesting parts of desk_intelwiki.skp
|
Add scrolling to go to the more interesting parts of desk_intelwiki.skp
Bug: skia:11804
Change-Id: I96ce34311b5e5420ee343a0dbc68ef20f399be4f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/390336
Commit-Queue: Ravi Mistry <[email protected]>
Reviewed-by: Robert Phillips <[email protected]>
|
Python
|
bsd-3-clause
|
google/skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,google/skia,google/skia,google/skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,google/skia,aosp-mirror/platform_external_skia,google/skia,aosp-mirror/platform_external_skia,google/skia,google/skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,google/skia,google/skia,aosp-mirror/platform_external_skia
|
python
|
## Code Before:
from telemetry import story
from telemetry.page import page as page_module
from telemetry.page import shared_page_state
class SkiaBuildbotDesktopPage(page_module.Page):
def __init__(self, url, page_set):
super(SkiaBuildbotDesktopPage, self).__init__(
url=url,
name=url,
page_set=page_set,
shared_page_state_class=shared_page_state.SharedDesktopPageState)
self.archive_data_file = 'data/skia_intelwiki_desktop.json'
def RunNavigateSteps(self, action_runner):
action_runner.Navigate(self.url)
action_runner.Wait(120)
class SkiaIntelwikiDesktopPageSet(story.StorySet):
""" Pages designed to represent the median, not highly optimized web """
def __init__(self):
super(SkiaIntelwikiDesktopPageSet, self).__init__(
archive_data_file='data/skia_intelwiki_desktop.json')
urls_list = [
# go/skia-skps-3-19
'https://en.wikipedia.org/wiki/Intel_Graphics_Technology',
]
for url in urls_list:
self.AddStory(SkiaBuildbotDesktopPage(url, self))
## Instruction:
Add scrolling to go to the more interesting parts of desk_intelwiki.skp
Bug: skia:11804
Change-Id: I96ce34311b5e5420ee343a0dbc68ef20f399be4f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/390336
Commit-Queue: Ravi Mistry <[email protected]>
Reviewed-by: Robert Phillips <[email protected]>
## Code After:
from telemetry import story
from telemetry.page import page as page_module
from telemetry.page import shared_page_state
class SkiaBuildbotDesktopPage(page_module.Page):
def __init__(self, url, page_set):
super(SkiaBuildbotDesktopPage, self).__init__(
url=url,
name=url,
page_set=page_set,
shared_page_state_class=shared_page_state.SharedDesktopPageState)
self.archive_data_file = 'data/skia_intelwiki_desktop.json'
def RunNavigateSteps(self, action_runner):
action_runner.Navigate(self.url)
action_runner.Wait(20)
def RunPageInteractions(self, action_runner):
with action_runner.CreateGestureInteraction('ScrollAction'):
action_runner.ScrollPage()
class SkiaIntelwikiDesktopPageSet(story.StorySet):
""" Pages designed to represent the median, not highly optimized web """
def __init__(self):
super(SkiaIntelwikiDesktopPageSet, self).__init__(
archive_data_file='data/skia_intelwiki_desktop.json')
urls_list = [
# go/skia-skps-3-19
'https://en.wikipedia.org/wiki/Intel_Graphics_Technology',
]
for url in urls_list:
self.AddStory(SkiaBuildbotDesktopPage(url, self))
|
893f4828797cf072e669fd9bb6f7697f738f753c
|
bootstrap/conf/salt/state/freebayes/init.sls
|
bootstrap/conf/salt/state/freebayes/init.sls
|
/opt/:
git.clone:
- repository: git://github.com/ekg/freebayes.git
- opts: --recursive
|
git.clone:
cwd: /opt/
repository: git://github.com/ekg/freebayes.git
opts: --recursive
|
Fix git clone call for freebayes.
|
Fix git clone call for freebayes.
|
SaltStack
|
mit
|
llevar/germline-regenotyper,llevar/germline-regenotyper
|
saltstack
|
## Code Before:
/opt/:
git.clone:
- repository: git://github.com/ekg/freebayes.git
- opts: --recursive
## Instruction:
Fix git clone call for freebayes.
## Code After:
git.clone:
cwd: /opt/
repository: git://github.com/ekg/freebayes.git
opts: --recursive
|
17297ffb0b6caf1b03d054dbff7bda2a77a4eaeb
|
tools/diagtool/CMakeLists.txt
|
tools/diagtool/CMakeLists.txt
|
set(LLVM_LINK_COMPONENTS
Support
)
add_clang_executable(diagtool
diagtool_main.cpp
DiagTool.cpp
DiagnosticNames.cpp
FindDiagnosticID.cpp
ListWarnings.cpp
ShowEnabledWarnings.cpp
TreeView.cpp
)
target_link_libraries(diagtool
PRIVATE
clangBasic
clangFrontend
)
if(UNIX)
set(CLANGXX_LINK_OR_COPY create_symlink)
else()
set(CLANGXX_LINK_OR_COPY copy)
endif()
|
set(LLVM_LINK_COMPONENTS
Support
)
add_clang_executable(diagtool
diagtool_main.cpp
DiagTool.cpp
DiagnosticNames.cpp
FindDiagnosticID.cpp
ListWarnings.cpp
ShowEnabledWarnings.cpp
TreeView.cpp
)
target_link_libraries(diagtool
PRIVATE
clangBasic
clangFrontend
)
|
Remove unused code (made unused by r161073, and later more so by r248043).
|
Remove unused code (made unused by r161073, and later more so by r248043).
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@330601 91177308-0d34-0410-b5e6-96231b3b80d8
|
Text
|
apache-2.0
|
apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang
|
text
|
## Code Before:
set(LLVM_LINK_COMPONENTS
Support
)
add_clang_executable(diagtool
diagtool_main.cpp
DiagTool.cpp
DiagnosticNames.cpp
FindDiagnosticID.cpp
ListWarnings.cpp
ShowEnabledWarnings.cpp
TreeView.cpp
)
target_link_libraries(diagtool
PRIVATE
clangBasic
clangFrontend
)
if(UNIX)
set(CLANGXX_LINK_OR_COPY create_symlink)
else()
set(CLANGXX_LINK_OR_COPY copy)
endif()
## Instruction:
Remove unused code (made unused by r161073, and later more so by r248043).
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@330601 91177308-0d34-0410-b5e6-96231b3b80d8
## Code After:
set(LLVM_LINK_COMPONENTS
Support
)
add_clang_executable(diagtool
diagtool_main.cpp
DiagTool.cpp
DiagnosticNames.cpp
FindDiagnosticID.cpp
ListWarnings.cpp
ShowEnabledWarnings.cpp
TreeView.cpp
)
target_link_libraries(diagtool
PRIVATE
clangBasic
clangFrontend
)
|
01ca1469897b80418f6cfaf7bf2bfa74bb3152be
|
lib/toy_robot_simulator/pose.rb
|
lib/toy_robot_simulator/pose.rb
|
class Pose
module Orientation
EAST = :east
NORTH = :north
WEST = :west
SOUTH = :south
end
def initialize(args)
@x = args[:x]
@y = args[:y]
@orientation = args[:orientation]
end
def adjacent
dup.send(:adjacent!)
end
def rotate!(degrees)
step = (degrees % 90) + (degrees/degrees.abs)
self.orientation = step_orientation(step)
end
def report
{
x: x,
y: y,
orientation: orientation
}
end
private
attr_accessor :x, :y, :orientation
def step_orientation(by = 1)
orientations = [
Pose::Orientation::NORTH,
Pose::Orientation::EAST,
Pose::Orientation::SOUTH,
Pose::Orientation::WEST
]
orientations[(orientations.index(orientation) + by) % 4]
end
def adjacent!
case orientation
when Pose::Orientation::EAST
increment!(:x)
when Pose::Orientation::NORTH
increment!(:y)
when Pose::Orientation::WEST
decrement!(:x)
when Pose::Orientation::SOUTH
decrement!(:y)
end
self
end
def increment!(coordinate, by = 1)
update!(coordinate, by)
end
def decrement!(coordinate, by = -1)
update!(coordinate, by)
end
def update!(coordinate, by)
case coordinate
when :x
self.x = x + by
when :y
self.y = y + by
end
end
end
|
class Pose
module Orientation
EAST = :east
NORTH = :north
WEST = :west
SOUTH = :south
end
attr_accessor :x, :y, :orientation
def initialize(args = {})
@x = args[:x]
@y = args[:y]
@orientation = args[:orientation]
end
def adjacent
dup.send(:adjacent!)
end
def rotate!(degrees)
step = (degrees % 90) + (degrees/degrees.abs)
self.orientation = step_orientation(step)
end
def report
{
x: x,
y: y,
orientation: orientation
}
end
private
def step_orientation(by = 1)
orientations = [
Pose::Orientation::NORTH,
Pose::Orientation::EAST,
Pose::Orientation::SOUTH,
Pose::Orientation::WEST
]
orientations[(orientations.index(orientation) + by) % 4]
end
def adjacent!
case orientation
when Pose::Orientation::EAST
increment!(:x)
when Pose::Orientation::NORTH
increment!(:y)
when Pose::Orientation::WEST
decrement!(:x)
when Pose::Orientation::SOUTH
decrement!(:y)
end
self
end
def increment!(coordinate, by = 1)
update!(coordinate, by)
end
def decrement!(coordinate, by = -1)
update!(coordinate, by)
end
def update!(coordinate, by)
case coordinate
when :x
self.x = x + by
when :y
self.y = y + by
end
end
end
|
Fix Pose Class to get passing tests.
|
Fix Pose Class to get passing tests.
Add public interface messages and allow initialization without
arguments.
|
Ruby
|
unlicense
|
matiasanaya/toy-robot-simulator
|
ruby
|
## Code Before:
class Pose
module Orientation
EAST = :east
NORTH = :north
WEST = :west
SOUTH = :south
end
def initialize(args)
@x = args[:x]
@y = args[:y]
@orientation = args[:orientation]
end
def adjacent
dup.send(:adjacent!)
end
def rotate!(degrees)
step = (degrees % 90) + (degrees/degrees.abs)
self.orientation = step_orientation(step)
end
def report
{
x: x,
y: y,
orientation: orientation
}
end
private
attr_accessor :x, :y, :orientation
def step_orientation(by = 1)
orientations = [
Pose::Orientation::NORTH,
Pose::Orientation::EAST,
Pose::Orientation::SOUTH,
Pose::Orientation::WEST
]
orientations[(orientations.index(orientation) + by) % 4]
end
def adjacent!
case orientation
when Pose::Orientation::EAST
increment!(:x)
when Pose::Orientation::NORTH
increment!(:y)
when Pose::Orientation::WEST
decrement!(:x)
when Pose::Orientation::SOUTH
decrement!(:y)
end
self
end
def increment!(coordinate, by = 1)
update!(coordinate, by)
end
def decrement!(coordinate, by = -1)
update!(coordinate, by)
end
def update!(coordinate, by)
case coordinate
when :x
self.x = x + by
when :y
self.y = y + by
end
end
end
## Instruction:
Fix Pose Class to get passing tests.
Add public interface messages and allow initialization without
arguments.
## Code After:
class Pose
module Orientation
EAST = :east
NORTH = :north
WEST = :west
SOUTH = :south
end
attr_accessor :x, :y, :orientation
def initialize(args = {})
@x = args[:x]
@y = args[:y]
@orientation = args[:orientation]
end
def adjacent
dup.send(:adjacent!)
end
def rotate!(degrees)
step = (degrees % 90) + (degrees/degrees.abs)
self.orientation = step_orientation(step)
end
def report
{
x: x,
y: y,
orientation: orientation
}
end
private
def step_orientation(by = 1)
orientations = [
Pose::Orientation::NORTH,
Pose::Orientation::EAST,
Pose::Orientation::SOUTH,
Pose::Orientation::WEST
]
orientations[(orientations.index(orientation) + by) % 4]
end
def adjacent!
case orientation
when Pose::Orientation::EAST
increment!(:x)
when Pose::Orientation::NORTH
increment!(:y)
when Pose::Orientation::WEST
decrement!(:x)
when Pose::Orientation::SOUTH
decrement!(:y)
end
self
end
def increment!(coordinate, by = 1)
update!(coordinate, by)
end
def decrement!(coordinate, by = -1)
update!(coordinate, by)
end
def update!(coordinate, by)
case coordinate
when :x
self.x = x + by
when :y
self.y = y + by
end
end
end
|
9ce6779752c53ff8ab351a4ac25d906f591df2c7
|
README.md
|
README.md
|
`urban_dictionary` is a Ruby gem to access word definitions and examples from [Urban Dictionary](http://www.urbandictionary.com/).
## Installation ##
Run `gem install urban_dictionary`.
## Usage ##
Get words using `UrbanDictionary.define` or `UrbanDictionary.random_word`. These methods return an instance of UrbanDictionary::Word, which has a list of entries. Each entry has a definition and an example.
word = UrbanDictionary.define("QED")
word.entries.size # => 7
word.entries.each do |entry|
puts entry.definition
puts entry.example
end
|
`urban_dictionary` is a Ruby gem to access word definitions and examples from [Urban Dictionary](http://www.urbandictionary.com/). It also provides a command-line tool for getting definitions.
## Installation ##
Run `gem install urban_dictionary`.
## Usage ##
Get words using `UrbanDictionary.define` or `UrbanDictionary.random_word`. These methods return an instance of UrbanDictionary::Word, which has a list of entries. Each entry has a definition and an example.
require 'urban_dictionary'
word = UrbanDictionary.define("QED")
word.entries.size # => 7
word.entries.each do |entry|
puts entry.definition
puts entry.example
end
## Command Line ##
The urban_dictionary gem includes a command-line interface:
> urban_dictionary super salad
super salad
-----------
1. A mythical dish of the best salad ever compiled
...
...
You can use the `--random` flag to get the definition of random word:
> urban_dictionary --random
|
Add docs for command line
|
Add docs for command line
|
Markdown
|
mit
|
ryangreenberg/urban_dictionary,ryangreenberg/urban_dictionary
|
markdown
|
## Code Before:
`urban_dictionary` is a Ruby gem to access word definitions and examples from [Urban Dictionary](http://www.urbandictionary.com/).
## Installation ##
Run `gem install urban_dictionary`.
## Usage ##
Get words using `UrbanDictionary.define` or `UrbanDictionary.random_word`. These methods return an instance of UrbanDictionary::Word, which has a list of entries. Each entry has a definition and an example.
word = UrbanDictionary.define("QED")
word.entries.size # => 7
word.entries.each do |entry|
puts entry.definition
puts entry.example
end
## Instruction:
Add docs for command line
## Code After:
`urban_dictionary` is a Ruby gem to access word definitions and examples from [Urban Dictionary](http://www.urbandictionary.com/). It also provides a command-line tool for getting definitions.
## Installation ##
Run `gem install urban_dictionary`.
## Usage ##
Get words using `UrbanDictionary.define` or `UrbanDictionary.random_word`. These methods return an instance of UrbanDictionary::Word, which has a list of entries. Each entry has a definition and an example.
require 'urban_dictionary'
word = UrbanDictionary.define("QED")
word.entries.size # => 7
word.entries.each do |entry|
puts entry.definition
puts entry.example
end
## Command Line ##
The urban_dictionary gem includes a command-line interface:
> urban_dictionary super salad
super salad
-----------
1. A mythical dish of the best salad ever compiled
...
...
You can use the `--random` flag to get the definition of random word:
> urban_dictionary --random
|
2a083c5a035720f6d5834a7b42c312541cbb6653
|
app/views/categories/index.html.erb
|
app/views/categories/index.html.erb
|
<h1> All Categories </h1>
<% @categories.each do |category| %>
<li><%= link_to category.name, category_path(category.id)%></li>
<%end%>
|
<h1> Select a Category for your Track </h1>
<% @categories.each do |category| %>
<li><%= link_to category.name, new_category_track_path(category.id)%></li>
<%end%>
|
Change links to point new_category_track_path
|
Change links to point new_category_track_path
|
HTML+ERB
|
mit
|
nyc-fiddler-crabs-2015/Hagwon,nyc-fiddler-crabs-2015/Hagwon,nyc-fiddler-crabs-2015/Hagwon
|
html+erb
|
## Code Before:
<h1> All Categories </h1>
<% @categories.each do |category| %>
<li><%= link_to category.name, category_path(category.id)%></li>
<%end%>
## Instruction:
Change links to point new_category_track_path
## Code After:
<h1> Select a Category for your Track </h1>
<% @categories.each do |category| %>
<li><%= link_to category.name, new_category_track_path(category.id)%></li>
<%end%>
|
e44be1e98dc0655ceac1db552e3b196861245eb6
|
dotnet-tools.json
|
dotnet-tools.json
|
{
"version": 1,
"isRoot": true,
"tools": {
"dotnet-format": {
"version": "4.1.131201",
"commands": [
"dotnet-format"
]
},
"jetbrains.resharper.globaltools": {
"version": "2020.3.2",
"commands": [
"jb"
]
}
}
}
|
{
"version": 1,
"isRoot": true,
"tools": {
"dotnet-format": {
"version": "4.1.131201",
"commands": [
"dotnet-format"
]
}
}
}
|
Uninstall huge JetBrains tool for faster CI builds.
|
Uninstall huge JetBrains tool for faster CI builds.
|
JSON
|
mit
|
Faithlife/Parsing,ejball/ArgsReading,ejball/XmlDocMarkdown,Faithlife/FaithlifeUtility
|
json
|
## Code Before:
{
"version": 1,
"isRoot": true,
"tools": {
"dotnet-format": {
"version": "4.1.131201",
"commands": [
"dotnet-format"
]
},
"jetbrains.resharper.globaltools": {
"version": "2020.3.2",
"commands": [
"jb"
]
}
}
}
## Instruction:
Uninstall huge JetBrains tool for faster CI builds.
## Code After:
{
"version": 1,
"isRoot": true,
"tools": {
"dotnet-format": {
"version": "4.1.131201",
"commands": [
"dotnet-format"
]
}
}
}
|
1e6cac921e118a5f872fa9bf8b697bc321b6e3ed
|
public/stylesheets/maze.css
|
public/stylesheets/maze.css
|
table{
border-collapse: collapse;
}
td{
border: 1px solid grey;
}
table tr:nth-child(odd) {
height: 5px;
}
table tr:nth-child(even) {
height: 40px;
}
tr td:nth-child(odd) {
width: 5px;
}
tr td:nth-child(even) {
width: 40px;
}
.wall, .wallspot:hover{
background-color: black;
}
.tile{
background-color: lightblue;
}
rzslider{
width: 200px;
/* width: 80%;*/
}
.vertical-sliders {
margin: 0;
}
.vertical-sliders > div {
height: 250px;
}
rzslider.rz-vertical {
height: 250px;
}
.confirmation {
width: 300px;
border: 1px dashed black;
}
.plusminus{
box-sizing: content-box;
width: 2em;
padding: 0px 15px;
}
.count{
font-size: 2em;
}
|
table{
border-collapse: collapse;
}
td{
border: 1px solid grey;
}
table tr:nth-child(odd) {
height: 5px;
}
table tr:nth-child(even) {
height: 40px;
}
tr td:nth-child(odd) {
width: 5px;
}
tr td:nth-child(even) {
width: 40px;
}
.wall{
background-color: black;
}
.wallspot:hover{
background-color: darkgrey;
}
.tile{
background-color: lightblue;
}
rzslider{
width: 200px;
/* width: 80%;*/
}
.vertical-sliders {
margin: 0;
}
.vertical-sliders > div {
height: 250px;
}
rzslider.rz-vertical {
height: 250px;
}
.confirmation {
width: 300px;
border: 1px dashed black;
}
.plusminus{
box-sizing: content-box;
width: 2em;
padding: 0px 15px;
}
.count{
font-size: 2em;
}
|
Fix color of hovered wall
|
Fix color of hovered wall
|
CSS
|
mit
|
TechnoX/rcj-rescue-scoring,TechnoX/rcj-rescue-scoring
|
css
|
## Code Before:
table{
border-collapse: collapse;
}
td{
border: 1px solid grey;
}
table tr:nth-child(odd) {
height: 5px;
}
table tr:nth-child(even) {
height: 40px;
}
tr td:nth-child(odd) {
width: 5px;
}
tr td:nth-child(even) {
width: 40px;
}
.wall, .wallspot:hover{
background-color: black;
}
.tile{
background-color: lightblue;
}
rzslider{
width: 200px;
/* width: 80%;*/
}
.vertical-sliders {
margin: 0;
}
.vertical-sliders > div {
height: 250px;
}
rzslider.rz-vertical {
height: 250px;
}
.confirmation {
width: 300px;
border: 1px dashed black;
}
.plusminus{
box-sizing: content-box;
width: 2em;
padding: 0px 15px;
}
.count{
font-size: 2em;
}
## Instruction:
Fix color of hovered wall
## Code After:
table{
border-collapse: collapse;
}
td{
border: 1px solid grey;
}
table tr:nth-child(odd) {
height: 5px;
}
table tr:nth-child(even) {
height: 40px;
}
tr td:nth-child(odd) {
width: 5px;
}
tr td:nth-child(even) {
width: 40px;
}
.wall{
background-color: black;
}
.wallspot:hover{
background-color: darkgrey;
}
.tile{
background-color: lightblue;
}
rzslider{
width: 200px;
/* width: 80%;*/
}
.vertical-sliders {
margin: 0;
}
.vertical-sliders > div {
height: 250px;
}
rzslider.rz-vertical {
height: 250px;
}
.confirmation {
width: 300px;
border: 1px dashed black;
}
.plusminus{
box-sizing: content-box;
width: 2em;
padding: 0px 15px;
}
.count{
font-size: 2em;
}
|
3cf0803640e9dbb1d908771ac2e260e1549ecfe8
|
config/initializers/hosts_blacklist.rb
|
config/initializers/hosts_blacklist.rb
|
require 'url_normalizer'
# Load blacklisted hosts from the YAML config file.
# If the config file changes the server must be restarted to pick up changes.
require 'addressable/uri'
list = YAML.load_file 'config/host_blacklist.yml'
# Store in the blacklist the host for each line, which is what we're interested in
blacklist = []
list['hosts'].each do |url|
blacklisted_url = UrlNormalizer.normalize_feed_url(url).downcase
blacklisted_host = Addressable::URI.parse(blacklisted_url).host
blacklist << blacklisted_host
end
Rails.application.config.hosts_blacklist = blacklist
|
require 'url_normalizer'
# Load blacklisted hosts from the YAML config file.
# If the config file changes the server must be restarted to pick up changes.
require 'addressable/uri'
list = YAML.load_file 'config/host_blacklist.yml'
# Store in the blacklist the host for each line, which is what we're interested in
blacklist = []
if list['hosts'].present?
list['hosts'].each do |url|
blacklisted_url = UrlNormalizer.normalize_feed_url(url).downcase
blacklisted_host = Addressable::URI.parse(blacklisted_url).host
blacklist << blacklisted_host
end
end
Rails.application.config.hosts_blacklist = blacklist
|
Fix crash on startup if hosts blacklist is empty
|
Fix crash on startup if hosts blacklist is empty
|
Ruby
|
mit
|
amatriain/feedbunch,amatriain/feedbunch,amatriain/feedbunch,amatriain/feedbunch
|
ruby
|
## Code Before:
require 'url_normalizer'
# Load blacklisted hosts from the YAML config file.
# If the config file changes the server must be restarted to pick up changes.
require 'addressable/uri'
list = YAML.load_file 'config/host_blacklist.yml'
# Store in the blacklist the host for each line, which is what we're interested in
blacklist = []
list['hosts'].each do |url|
blacklisted_url = UrlNormalizer.normalize_feed_url(url).downcase
blacklisted_host = Addressable::URI.parse(blacklisted_url).host
blacklist << blacklisted_host
end
Rails.application.config.hosts_blacklist = blacklist
## Instruction:
Fix crash on startup if hosts blacklist is empty
## Code After:
require 'url_normalizer'
# Load blacklisted hosts from the YAML config file.
# If the config file changes the server must be restarted to pick up changes.
require 'addressable/uri'
list = YAML.load_file 'config/host_blacklist.yml'
# Store in the blacklist the host for each line, which is what we're interested in
blacklist = []
if list['hosts'].present?
list['hosts'].each do |url|
blacklisted_url = UrlNormalizer.normalize_feed_url(url).downcase
blacklisted_host = Addressable::URI.parse(blacklisted_url).host
blacklist << blacklisted_host
end
end
Rails.application.config.hosts_blacklist = blacklist
|
652cf7755229da71bf92af9564b5e4e15df4dde8
|
templates/Entry/Form.html
|
templates/Entry/Form.html
|
<style>
.entry {
margin: 0 4em;
padding: 4px 8px;
}
.entry-title {
margin-bottom: 1em;
}
.entry-title input {
font-size: 30px;
}
.status-bar {
margin-bottom: 1em;
}
</style>
<script src="<?=$home?>mod/stories/node_modules/jquery-sortable/source/js/jquery-sortable-min.js"></script>
<script>const entryId = '<?=$entryId?>'; const title = '<?=$title?>'; const published = '<?=$published?>'; const publishDate = '<?=$publishDate?>'; const tags = <?=$tags?>;const entryTags = <?=$entryTags?>;</script>
<div class="entry">
<div class="status-bar row">
<div class="col-sm-2">
<a href="./stories/Listing/" class="btn btn-sm btn-default"><i class="fa fa-list"></i> Back to list</a>
</div>
<div class="col-sm-4">
<?=$publishBar?>
</div>
<div class="col-sm-6">
<?=$tagBar?>
</div>
</div>
<div><em>Status:</em> <span id="story-status"><?=$status?></span></div>
<div class="entry-form"></div>
<?=$MediumEditorPack,$EntryForm,$insert,$cssOverride?>
<script>
editor.setContent('<?=$content?>')
</script>
<hr />
</div>
|
<style>
.entry {
margin: 0 4em;
padding: 4px 8px;
}
.entry-title {
margin-bottom: 1em;
}
.entry-title input {
font-size: 30px;
}
.status-bar {
margin-bottom: 1em;
}
</style>
<script src="<?=$home?>mod/stories/node_modules/jquery-sortable/source/js/jquery-sortable-min.js"></script>
<script>const entry = <?=$entry?>; const tags = <?=$tags?>;</script>
<div class="entry">
<div class="status-bar row">
<div class="col-sm-2">
<a href="./stories/Listing/" class="btn btn-sm btn-default"><i class="fa fa-list"></i> Back to list</a>
</div>
<div class="col-sm-4">
<?=$publishBar?>
</div>
<div class="col-sm-6">
<?=$tagBar?>
</div>
</div>
<div><em>Status:</em> <span id="story-status"><?=$status?></span></div>
<div class="entry-form"></div>
<?=$MediumEditorPack,$EntryForm,$insert,$cssOverride?>
<script>
editor.setContent(entry.content)
</script>
<hr />
</div>
|
Cut down declarations by just including entry object.
|
Cut down declarations by just including entry object.
|
HTML
|
mit
|
AppStateESS/stories,AppStateESS/stories,AppStateESS/stories,AppStateESS/stories
|
html
|
## Code Before:
<style>
.entry {
margin: 0 4em;
padding: 4px 8px;
}
.entry-title {
margin-bottom: 1em;
}
.entry-title input {
font-size: 30px;
}
.status-bar {
margin-bottom: 1em;
}
</style>
<script src="<?=$home?>mod/stories/node_modules/jquery-sortable/source/js/jquery-sortable-min.js"></script>
<script>const entryId = '<?=$entryId?>'; const title = '<?=$title?>'; const published = '<?=$published?>'; const publishDate = '<?=$publishDate?>'; const tags = <?=$tags?>;const entryTags = <?=$entryTags?>;</script>
<div class="entry">
<div class="status-bar row">
<div class="col-sm-2">
<a href="./stories/Listing/" class="btn btn-sm btn-default"><i class="fa fa-list"></i> Back to list</a>
</div>
<div class="col-sm-4">
<?=$publishBar?>
</div>
<div class="col-sm-6">
<?=$tagBar?>
</div>
</div>
<div><em>Status:</em> <span id="story-status"><?=$status?></span></div>
<div class="entry-form"></div>
<?=$MediumEditorPack,$EntryForm,$insert,$cssOverride?>
<script>
editor.setContent('<?=$content?>')
</script>
<hr />
</div>
## Instruction:
Cut down declarations by just including entry object.
## Code After:
<style>
.entry {
margin: 0 4em;
padding: 4px 8px;
}
.entry-title {
margin-bottom: 1em;
}
.entry-title input {
font-size: 30px;
}
.status-bar {
margin-bottom: 1em;
}
</style>
<script src="<?=$home?>mod/stories/node_modules/jquery-sortable/source/js/jquery-sortable-min.js"></script>
<script>const entry = <?=$entry?>; const tags = <?=$tags?>;</script>
<div class="entry">
<div class="status-bar row">
<div class="col-sm-2">
<a href="./stories/Listing/" class="btn btn-sm btn-default"><i class="fa fa-list"></i> Back to list</a>
</div>
<div class="col-sm-4">
<?=$publishBar?>
</div>
<div class="col-sm-6">
<?=$tagBar?>
</div>
</div>
<div><em>Status:</em> <span id="story-status"><?=$status?></span></div>
<div class="entry-form"></div>
<?=$MediumEditorPack,$EntryForm,$insert,$cssOverride?>
<script>
editor.setContent(entry.content)
</script>
<hr />
</div>
|
e5b6619b7eacf0b341b84b76725da69106a1f420
|
public/js/js.thirdparty.bat
|
public/js/js.thirdparty.bat
|
"C:\Program Files (x86)\Java\jre7\bin\java.exe" -jar compiler.jar ^
--js=translate.js ^
--js=jquery/jquery-1.11.2.js ^
--js=jquery/jquery-ui.1.11.2.min.js ^
--js=jquery/jquery.qtip.js ^
--js=jquery/jquery.blockUI.js ^
--js=jquery/jquery.color.js ^
--js=jquery/jquery.autocomplete.js ^
--js=jquery/jquery.tablesorter.js ^
--js=jquery/jquery.flot.js ^
--js=jquery/jquery.ui.position.js ^
--js=jquery/jquery.contextMenu.js ^
--js=jquery/jquery.hotkeys.js ^
--js=jquery/jsBezier-0.6-min.js ^
--js=jquery/jquery.jsPlumb-1.7.5.js ^
--js=jquery/jquery.placeholder.js ^
--js=handlebars-v2.0.0.js ^
--js=dropdown.js ^
--source_map_format=V3 ^
--create_source_map thirdparty.compiled.js.map ^
--js_output_file=thirdparty.compiled.js
echo //# sourceMappingURL=thirdparty.compiled.js.map >> thirdparty.compiled.js
@pause
|
"C:\Program Files (x86)\Java\jre7\bin\java.exe" -jar compiler.jar ^
--js=translate.js ^
--js=jquery/jquery-1.11.2.js ^
--js=jquery/jquery-ui.1.11.2.min.js ^
--js=jquery/jquery.qtip.js ^
--js=jquery/jquery.blockUI.js ^
--js=jquery/jquery.color.js ^
--js=jquery/jquery.autocomplete.js ^
--js=jquery/jquery.tablesorter.js ^
--js=jquery/jquery.flot.js ^
--js=jquery/jquery.ui.position.js ^
--js=jquery/jquery.contextMenu.js ^
--js=jquery/jquery.hotkeys.js ^
--js=jquery/jquery.jsPlumb-1.7.5.js ^
--js=jquery/jquery.placeholder.js ^
--js=handlebars-v2.0.0.js ^
--js=dropdown.js ^
--source_map_format=V3 ^
--create_source_map thirdparty.compiled.js.map ^
--js_output_file=thirdparty.compiled.js
echo //# sourceMappingURL=thirdparty.compiled.js.map >> thirdparty.compiled.js
@pause
|
Remove another jsBeizer reference as we weren't using it
|
Remove another jsBeizer reference as we weren't using it
|
Batchfile
|
mit
|
marekr/siggy,marekr/siggy,marekr/siggy,marekr/siggy
|
batchfile
|
## Code Before:
"C:\Program Files (x86)\Java\jre7\bin\java.exe" -jar compiler.jar ^
--js=translate.js ^
--js=jquery/jquery-1.11.2.js ^
--js=jquery/jquery-ui.1.11.2.min.js ^
--js=jquery/jquery.qtip.js ^
--js=jquery/jquery.blockUI.js ^
--js=jquery/jquery.color.js ^
--js=jquery/jquery.autocomplete.js ^
--js=jquery/jquery.tablesorter.js ^
--js=jquery/jquery.flot.js ^
--js=jquery/jquery.ui.position.js ^
--js=jquery/jquery.contextMenu.js ^
--js=jquery/jquery.hotkeys.js ^
--js=jquery/jsBezier-0.6-min.js ^
--js=jquery/jquery.jsPlumb-1.7.5.js ^
--js=jquery/jquery.placeholder.js ^
--js=handlebars-v2.0.0.js ^
--js=dropdown.js ^
--source_map_format=V3 ^
--create_source_map thirdparty.compiled.js.map ^
--js_output_file=thirdparty.compiled.js
echo //# sourceMappingURL=thirdparty.compiled.js.map >> thirdparty.compiled.js
@pause
## Instruction:
Remove another jsBeizer reference as we weren't using it
## Code After:
"C:\Program Files (x86)\Java\jre7\bin\java.exe" -jar compiler.jar ^
--js=translate.js ^
--js=jquery/jquery-1.11.2.js ^
--js=jquery/jquery-ui.1.11.2.min.js ^
--js=jquery/jquery.qtip.js ^
--js=jquery/jquery.blockUI.js ^
--js=jquery/jquery.color.js ^
--js=jquery/jquery.autocomplete.js ^
--js=jquery/jquery.tablesorter.js ^
--js=jquery/jquery.flot.js ^
--js=jquery/jquery.ui.position.js ^
--js=jquery/jquery.contextMenu.js ^
--js=jquery/jquery.hotkeys.js ^
--js=jquery/jquery.jsPlumb-1.7.5.js ^
--js=jquery/jquery.placeholder.js ^
--js=handlebars-v2.0.0.js ^
--js=dropdown.js ^
--source_map_format=V3 ^
--create_source_map thirdparty.compiled.js.map ^
--js_output_file=thirdparty.compiled.js
echo //# sourceMappingURL=thirdparty.compiled.js.map >> thirdparty.compiled.js
@pause
|
64455430370e16470d09c87ab220989ec8804524
|
src/static/pycontw-2019/styles/_box.scss
|
src/static/pycontw-2019/styles/_box.scss
|
$box-content-padding-x: 32px;
$box-content-padding-y: 16px;
.box {
$box-border: solid 1px $egyptian-blue;
border: $box-border;
border-radius: 5px;
overflow: hidden;
.box-title {
line-height: 48px;
margin: 0;
background-color: $egyptian-blue;
color: $white;
font-size: 1.25rem;
font-weight: 400;
}
.box-content {
padding: $box-content-padding-y $box-content-padding-x;
}
.box-control {
display: flex;
overflow: hidden;
> * {
@include header(1.25rem);
@include no-underline();
flex: 1;
border-top: $box-border;
line-height: 48px;
text-align: center;
font-weight: 400;
}
> * + * {
border-left: $box-border;
}
> a:hover {
background: $egyptian-blue;
color: $white;
}
}
}
|
$box-content-padding-x: 32px;
$box-content-padding-y: 16px;
.box {
$box-border: solid 1px $egyptian-blue;
border: $box-border;
border-radius: 5px;
overflow: hidden;
.box-title {
margin: 0;
padding: (2rem / 3) 1rem;
background-color: $egyptian-blue;
color: $white;
line-height: 150%;
font-size: 1.25rem;
font-weight: 400;
}
.box-content {
padding: $box-content-padding-y $box-content-padding-x;
}
.box-control {
display: flex;
overflow: hidden;
> * {
@include header(1.25rem);
@include no-underline();
flex: 1;
border-top: $box-border;
line-height: 48px;
text-align: center;
font-weight: 400;
}
> * + * {
border-left: $box-border;
}
> a:hover {
background: $egyptian-blue;
color: $white;
}
}
}
|
Tweak box title to better display multi lines
|
Tweak box title to better display multi lines
|
SCSS
|
mit
|
pycontw/pycontw2016,pycontw/pycontw2016,pycontw/pycontw2016,pycontw/pycontw2016
|
scss
|
## Code Before:
$box-content-padding-x: 32px;
$box-content-padding-y: 16px;
.box {
$box-border: solid 1px $egyptian-blue;
border: $box-border;
border-radius: 5px;
overflow: hidden;
.box-title {
line-height: 48px;
margin: 0;
background-color: $egyptian-blue;
color: $white;
font-size: 1.25rem;
font-weight: 400;
}
.box-content {
padding: $box-content-padding-y $box-content-padding-x;
}
.box-control {
display: flex;
overflow: hidden;
> * {
@include header(1.25rem);
@include no-underline();
flex: 1;
border-top: $box-border;
line-height: 48px;
text-align: center;
font-weight: 400;
}
> * + * {
border-left: $box-border;
}
> a:hover {
background: $egyptian-blue;
color: $white;
}
}
}
## Instruction:
Tweak box title to better display multi lines
## Code After:
$box-content-padding-x: 32px;
$box-content-padding-y: 16px;
.box {
$box-border: solid 1px $egyptian-blue;
border: $box-border;
border-radius: 5px;
overflow: hidden;
.box-title {
margin: 0;
padding: (2rem / 3) 1rem;
background-color: $egyptian-blue;
color: $white;
line-height: 150%;
font-size: 1.25rem;
font-weight: 400;
}
.box-content {
padding: $box-content-padding-y $box-content-padding-x;
}
.box-control {
display: flex;
overflow: hidden;
> * {
@include header(1.25rem);
@include no-underline();
flex: 1;
border-top: $box-border;
line-height: 48px;
text-align: center;
font-weight: 400;
}
> * + * {
border-left: $box-border;
}
> a:hover {
background: $egyptian-blue;
color: $white;
}
}
}
|
b2150ed8490837bf93845ab00aa03ac4c830c927
|
.travis.yml
|
.travis.yml
|
language: java
jdk:
- oraclejdk8
env:
global:
- SONATYPE_USERNAME=yourusername
- secure: "your encrypted SONATYPE_PASSWORD=pass"
cache:
directories:
- $HOME/.m2
after_success:
- ./mvnw deploy --settings settings.xml -DskipTests=true -B
|
language: java
jdk:
- oraclejdk8
cache:
directories:
- $HOME/.m2
after_success:
- ./mvnw deploy --settings settings.xml -DskipTests=true -B
|
Remove maven deployment overrides - rely on Travis ENV vars instead
|
Remove maven deployment overrides - rely on Travis ENV vars instead
|
YAML
|
apache-2.0
|
scheerer/feign-hystrix-oauth2-spring-boot-starter,nextgearcapital/feign-hystrix-oauth2-spring-boot-starter,nextgearcapital/feign-hystrix-oauth2-spring-boot-starter,scheerer/feign-hystrix-oauth2-spring-boot-starter
|
yaml
|
## Code Before:
language: java
jdk:
- oraclejdk8
env:
global:
- SONATYPE_USERNAME=yourusername
- secure: "your encrypted SONATYPE_PASSWORD=pass"
cache:
directories:
- $HOME/.m2
after_success:
- ./mvnw deploy --settings settings.xml -DskipTests=true -B
## Instruction:
Remove maven deployment overrides - rely on Travis ENV vars instead
## Code After:
language: java
jdk:
- oraclejdk8
cache:
directories:
- $HOME/.m2
after_success:
- ./mvnw deploy --settings settings.xml -DskipTests=true -B
|
e9f6799c10266987e129f9775dea237f865cd421
|
accounts/templates/registration/login.html
|
accounts/templates/registration/login.html
|
{% extends "base.html" %}
{% load render_field from widget_tweaks %}
{% block content %}
<form class="form-simple form-login" method="post">
{% csrf_token %}
{{ form.non_field_errors }}
{% for field in form %}
<fieldset class="form-group">
{{ field.label_tag }}
{{ field.errors }}
{% render_field field class="form-control" %}
</fieldset>
{% endfor %}
<button class="btn btn-primary btn-block" type="submit">Log in</button>
<a class="btn btn-secondary btn-block" href="{% url 'registration_register' %}">Sign up</a>
</form>
{% endblock %}
|
{% extends "base.html" %}
{% load render_field from widget_tweaks %}
{% load i18n %}
{% block content %}
<form class="form-simple form-login" method="post">
{% csrf_token %}
{{ form.non_field_errors }}
{% for field in form %}
<fieldset class="form-group">
{{ field.label_tag }}
{{ field.errors }}
{% render_field field class="form-control" %}
</fieldset>
{% endfor %}
<button class="btn btn-primary btn-block" type="submit">{% trans "Log in" %}</button>
<a class="btn btn-secondary btn-block" href="{% url 'registration_register' %}">{% trans "Sign up" %}</a>
<a class="btn btn-secondar btn-block" href="{% url "password_reset" %}">{% trans "Forgot password?" %}</a>
</form>
{% endblock %}
|
Add link to password reset
|
Add link to password reset
|
HTML
|
mit
|
trimailov/finance,trimailov/finance,trimailov/finance
|
html
|
## Code Before:
{% extends "base.html" %}
{% load render_field from widget_tweaks %}
{% block content %}
<form class="form-simple form-login" method="post">
{% csrf_token %}
{{ form.non_field_errors }}
{% for field in form %}
<fieldset class="form-group">
{{ field.label_tag }}
{{ field.errors }}
{% render_field field class="form-control" %}
</fieldset>
{% endfor %}
<button class="btn btn-primary btn-block" type="submit">Log in</button>
<a class="btn btn-secondary btn-block" href="{% url 'registration_register' %}">Sign up</a>
</form>
{% endblock %}
## Instruction:
Add link to password reset
## Code After:
{% extends "base.html" %}
{% load render_field from widget_tweaks %}
{% load i18n %}
{% block content %}
<form class="form-simple form-login" method="post">
{% csrf_token %}
{{ form.non_field_errors }}
{% for field in form %}
<fieldset class="form-group">
{{ field.label_tag }}
{{ field.errors }}
{% render_field field class="form-control" %}
</fieldset>
{% endfor %}
<button class="btn btn-primary btn-block" type="submit">{% trans "Log in" %}</button>
<a class="btn btn-secondary btn-block" href="{% url 'registration_register' %}">{% trans "Sign up" %}</a>
<a class="btn btn-secondar btn-block" href="{% url "password_reset" %}">{% trans "Forgot password?" %}</a>
</form>
{% endblock %}
|
ceadcb80150278ae29fb60b339049f4c840c135d
|
astroquery/nist/tests/test_nist_remote.py
|
astroquery/nist/tests/test_nist_remote.py
|
from __future__ import print_function
from astropy.tests.helper import remote_data
from astropy.table import Table
import astropy.units as u
import requests
import imp
from ... import nist
imp.reload(requests)
@remote_data
class TestNist:
def test_query_async(self):
response = nist.core.Nist.query_async(4000 * u.nm, 7000 * u.nm)
assert response is not None
def test_query(self):
result = nist.core.Nist.query(4000 * u.nm, 7000 * u.nm)
assert isinstance(result, Table)
# check that no javascript was left in the table
# (regression test for 1355)
assert np.all(result['TP'] == 'T8637')
|
from __future__ import print_function
import numpy as np
from astropy.tests.helper import remote_data
from astropy.table import Table
import astropy.units as u
from ... import nist
@remote_data
class TestNist:
def test_query_async(self):
response = nist.core.Nist.query_async(4000 * u.nm, 7000 * u.nm)
assert response is not None
def test_query(self):
result = nist.core.Nist.query(4000 * u.nm, 7000 * u.nm)
assert isinstance(result, Table)
# check that no javascript was left in the table
# (regression test for 1355)
assert np.all(result['TP'] == 'T8637')
|
Add missing numpy import, and cleanup the rest
|
Add missing numpy import, and cleanup the rest
|
Python
|
bsd-3-clause
|
ceb8/astroquery,imbasimba/astroquery,ceb8/astroquery,imbasimba/astroquery
|
python
|
## Code Before:
from __future__ import print_function
from astropy.tests.helper import remote_data
from astropy.table import Table
import astropy.units as u
import requests
import imp
from ... import nist
imp.reload(requests)
@remote_data
class TestNist:
def test_query_async(self):
response = nist.core.Nist.query_async(4000 * u.nm, 7000 * u.nm)
assert response is not None
def test_query(self):
result = nist.core.Nist.query(4000 * u.nm, 7000 * u.nm)
assert isinstance(result, Table)
# check that no javascript was left in the table
# (regression test for 1355)
assert np.all(result['TP'] == 'T8637')
## Instruction:
Add missing numpy import, and cleanup the rest
## Code After:
from __future__ import print_function
import numpy as np
from astropy.tests.helper import remote_data
from astropy.table import Table
import astropy.units as u
from ... import nist
@remote_data
class TestNist:
def test_query_async(self):
response = nist.core.Nist.query_async(4000 * u.nm, 7000 * u.nm)
assert response is not None
def test_query(self):
result = nist.core.Nist.query(4000 * u.nm, 7000 * u.nm)
assert isinstance(result, Table)
# check that no javascript was left in the table
# (regression test for 1355)
assert np.all(result['TP'] == 'T8637')
|
e01b0c9129c05e366605639553201f0dc2af2756
|
django_fsm_log/apps.py
|
django_fsm_log/apps.py
|
from __future__ import unicode_literals
from django.apps import AppConfig
from django.conf import settings
from django.utils.module_loading import import_string
from django_fsm.signals import pre_transition, post_transition
class DjangoFSMLogAppConfig(AppConfig):
name = 'django_fsm_log'
verbose_name = "Django FSM Log"
default_auto_field = 'django.db.models.BigAutoField'
def ready(self):
backend = import_string(settings.DJANGO_FSM_LOG_STORAGE_METHOD)
StateLog = self.get_model('StateLog')
backend.setup_model(StateLog)
pre_transition.connect(backend.pre_transition_callback)
post_transition.connect(backend.post_transition_callback)
|
from __future__ import unicode_literals
from django.apps import AppConfig
from django.conf import settings
from django.utils.module_loading import import_string
from django_fsm.signals import pre_transition, post_transition
class DjangoFSMLogAppConfig(AppConfig):
name = 'django_fsm_log'
verbose_name = "Django FSM Log"
def ready(self):
backend = import_string(settings.DJANGO_FSM_LOG_STORAGE_METHOD)
StateLog = self.get_model('StateLog')
backend.setup_model(StateLog)
pre_transition.connect(backend.pre_transition_callback)
post_transition.connect(backend.post_transition_callback)
|
Revert "Solve warning coming from django 4.0"
|
Revert "Solve warning coming from django 4.0"
|
Python
|
mit
|
gizmag/django-fsm-log,ticosax/django-fsm-log
|
python
|
## Code Before:
from __future__ import unicode_literals
from django.apps import AppConfig
from django.conf import settings
from django.utils.module_loading import import_string
from django_fsm.signals import pre_transition, post_transition
class DjangoFSMLogAppConfig(AppConfig):
name = 'django_fsm_log'
verbose_name = "Django FSM Log"
default_auto_field = 'django.db.models.BigAutoField'
def ready(self):
backend = import_string(settings.DJANGO_FSM_LOG_STORAGE_METHOD)
StateLog = self.get_model('StateLog')
backend.setup_model(StateLog)
pre_transition.connect(backend.pre_transition_callback)
post_transition.connect(backend.post_transition_callback)
## Instruction:
Revert "Solve warning coming from django 4.0"
## Code After:
from __future__ import unicode_literals
from django.apps import AppConfig
from django.conf import settings
from django.utils.module_loading import import_string
from django_fsm.signals import pre_transition, post_transition
class DjangoFSMLogAppConfig(AppConfig):
name = 'django_fsm_log'
verbose_name = "Django FSM Log"
def ready(self):
backend = import_string(settings.DJANGO_FSM_LOG_STORAGE_METHOD)
StateLog = self.get_model('StateLog')
backend.setup_model(StateLog)
pre_transition.connect(backend.pre_transition_callback)
post_transition.connect(backend.post_transition_callback)
|
38bc8c8599d4165485ada8ca0b55dafd547385c4
|
runserver.py
|
runserver.py
|
import sys
from swift.common.utils import parse_options
from swift.common.wsgi import run_wsgi
if __name__ == '__main__':
conf_file, options = parse_options()
sys.exit(run_wsgi(conf_file, 'proxy-server', **options))
|
import sys
from optparse import OptionParser
from swift.common.utils import parse_options
from swift.common.wsgi import run_wsgi
def run_objgraph(types):
import objgraph
import os
import random
objgraph.show_most_common_types(limit=50, shortnames=False)
for type_ in types:
count = objgraph.count(type_)
print '%s objects: %d' % (type_, count)
if count:
objgraph.show_backrefs(
random.choice(objgraph.by_type(type_)), max_depth=20,
filename='/tmp/backrefs_%s_%d.dot' % (type_, os.getpid()))
if __name__ == '__main__':
parser = OptionParser(usage="%prog CONFIG [options]")
parser.add_option('--objgraph', action='store_true',
help=('Run objgraph, show most common '
'types before exiting'))
parser.add_option('--show-backrefs', action='append', default=list(),
help=('Draw backreference graph for one randomly '
'chosen object of that type. Can be used '
'multiple times.'))
conf_file, options = parse_options(parser)
res = run_wsgi(conf_file, 'proxy-server', **options)
if options.get('objgraph'):
run_objgraph(options.get('show_backrefs', list()))
sys.exit(res)
|
Allow to run objgraph before exiting
|
Allow to run objgraph before exiting
Use "--objgraph" to show most common types.
Add "--show-backrefs <some type>" do draw a graph of backreferences.
|
Python
|
apache-2.0
|
open-io/oio-swift,open-io/oio-swift
|
python
|
## Code Before:
import sys
from swift.common.utils import parse_options
from swift.common.wsgi import run_wsgi
if __name__ == '__main__':
conf_file, options = parse_options()
sys.exit(run_wsgi(conf_file, 'proxy-server', **options))
## Instruction:
Allow to run objgraph before exiting
Use "--objgraph" to show most common types.
Add "--show-backrefs <some type>" do draw a graph of backreferences.
## Code After:
import sys
from optparse import OptionParser
from swift.common.utils import parse_options
from swift.common.wsgi import run_wsgi
def run_objgraph(types):
import objgraph
import os
import random
objgraph.show_most_common_types(limit=50, shortnames=False)
for type_ in types:
count = objgraph.count(type_)
print '%s objects: %d' % (type_, count)
if count:
objgraph.show_backrefs(
random.choice(objgraph.by_type(type_)), max_depth=20,
filename='/tmp/backrefs_%s_%d.dot' % (type_, os.getpid()))
if __name__ == '__main__':
parser = OptionParser(usage="%prog CONFIG [options]")
parser.add_option('--objgraph', action='store_true',
help=('Run objgraph, show most common '
'types before exiting'))
parser.add_option('--show-backrefs', action='append', default=list(),
help=('Draw backreference graph for one randomly '
'chosen object of that type. Can be used '
'multiple times.'))
conf_file, options = parse_options(parser)
res = run_wsgi(conf_file, 'proxy-server', **options)
if options.get('objgraph'):
run_objgraph(options.get('show_backrefs', list()))
sys.exit(res)
|
fc91b5049ee605a9e311b394578b1d4f45e5836d
|
resources/views/components/navbar.blade.php
|
resources/views/components/navbar.blade.php
|
<nav class="navbar navbar-expand navbar-dark bg-dark">
<a class="navbar-brand" href="{{ route("home") }}">WDI Paste</a>
<button class="navbar-toggler" aria-expanded="false" aria-controls="navbarCollapse" aria-label="Toggle navigation" type="button" data-toggle="collapse" data-target="#navbarCollapse">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarCollapse">
<ul class="navbar-nav mr-auto">
<li class="nav-item">
<a class="nav-link" href="{{ route("language.list") }}">Linguaggi</a>
</li>
</ul>
</div>
</nav>
|
<nav class="navbar navbar-expand navbar-dark bg-dark">
<a class="navbar-brand" href="{{ route("home") }}">WDI Paste</a>
<button class="navbar-toggler" aria-expanded="false" aria-controls="navbarCollapse" aria-label="Toggle navigation" type="button" data-toggle="collapse" data-target="#navbarCollapse">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarCollapse">
<ul class="navbar-nav mr-auto">
<li class="nav-item">
<a class="nav-link" href="{{ route("language.list") }}">Linguaggi</a>
</li>
</ul>
<a class="btn btn-primary" href="{{ route("paste.create") }}">Crea nuovo paste</a>
</div>
</nav>
|
Add fancy button on navbar
|
Add fancy button on navbar
|
PHP
|
mit
|
WebDeveloperItaliani/paste,WebDeveloperItaliani/paste
|
php
|
## Code Before:
<nav class="navbar navbar-expand navbar-dark bg-dark">
<a class="navbar-brand" href="{{ route("home") }}">WDI Paste</a>
<button class="navbar-toggler" aria-expanded="false" aria-controls="navbarCollapse" aria-label="Toggle navigation" type="button" data-toggle="collapse" data-target="#navbarCollapse">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarCollapse">
<ul class="navbar-nav mr-auto">
<li class="nav-item">
<a class="nav-link" href="{{ route("language.list") }}">Linguaggi</a>
</li>
</ul>
</div>
</nav>
## Instruction:
Add fancy button on navbar
## Code After:
<nav class="navbar navbar-expand navbar-dark bg-dark">
<a class="navbar-brand" href="{{ route("home") }}">WDI Paste</a>
<button class="navbar-toggler" aria-expanded="false" aria-controls="navbarCollapse" aria-label="Toggle navigation" type="button" data-toggle="collapse" data-target="#navbarCollapse">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarCollapse">
<ul class="navbar-nav mr-auto">
<li class="nav-item">
<a class="nav-link" href="{{ route("language.list") }}">Linguaggi</a>
</li>
</ul>
<a class="btn btn-primary" href="{{ route("paste.create") }}">Crea nuovo paste</a>
</div>
</nav>
|
fb057f1f94237885bc027d0f209739cc384166b7
|
bin/sync-algolia.js
|
bin/sync-algolia.js
|
import algolia from 'algoliasearch';
import icons from '../dist/icons.json';
import tags from '../src/tags.json';
const ALGOLIA_APP_ID = '5EEOG744D0';
if (
process.env.TRAVIS_PULL_REQUEST === 'false' &&
process.env.TRAVIS_BRANCH === 'master'
) {
syncAlgolia();
} else {
console.log('Skipped Algolia sync.');
}
function syncAlgolia() {
// ALGOLIA_ADMIN_KEY must be added as an environment variable in Travis CI
const client = algolia(ALGOLIA_APP_ID, process.env.ALGOLIA_ADMIN_KEY);
console.log('Initializing target and temporary indexes...');
const index = client.initIndex('icons');
const indexTmp = client.initIndex('icons_tmp');
console.log('Copying target index settings into temporary index...');
client.copyIndex(index.indexName, indexTmp.indexName, ['settings'], err => {
if (err) throw err;
});
const records = Object.keys(icons).map(name => ({
name,
tags: tags[name] || [],
}));
console.log('Pushing data to the temporary index...');
indexTmp.addObjects(records, err => {
if (err) throw err;
});
console.log('Moving temporary index to target index...');
client.moveIndex(indexTmp.indexName, index.indexName, err => {
if (err) throw err;
});
}
|
import algolia from 'algoliasearch';
import icons from '../dist/icons.json';
import tags from '../src/tags.json';
const ALGOLIA_APP_ID = '5EEOG744D0';
if (
process.env.TRAVIS_PULL_REQUEST === 'false' &&
process.env.TRAVIS_BRANCH === 'master'
) {
syncAlgolia();
} else {
console.log('Skipped Algolia sync.');
}
function syncAlgolia() {
// ALGOLIA_ADMIN_KEY must be added as an environment variable in Travis CI
const client = algolia(ALGOLIA_APP_ID, process.env.ALGOLIA_ADMIN_KEY);
console.log('Initializing target and temporary indexes...');
const index = client.initIndex('icons');
const indexTmp = client.initIndex('icons_tmp');
index.setSettings({
searchableAttributes: ['unordered(name)', 'unordered(tags)'],
customRanking: ['asc(name)'],
});
console.log('Copying target index settings into temporary index...');
client.copyIndex(index.indexName, indexTmp.indexName, ['settings'], err => {
if (err) throw err;
});
const records = Object.keys(icons).map(name => ({
name,
tags: tags[name] || [],
}));
console.log('Pushing data to the temporary index...');
indexTmp.addObjects(records, err => {
if (err) throw err;
});
console.log('Moving temporary index to target index...');
client.moveIndex(indexTmp.indexName, index.indexName, err => {
if (err) throw err;
});
}
|
Initialize algolia settings in script
|
build: Initialize algolia settings in script
|
JavaScript
|
mit
|
colebemis/feather,colebemis/feather
|
javascript
|
## Code Before:
import algolia from 'algoliasearch';
import icons from '../dist/icons.json';
import tags from '../src/tags.json';
const ALGOLIA_APP_ID = '5EEOG744D0';
if (
process.env.TRAVIS_PULL_REQUEST === 'false' &&
process.env.TRAVIS_BRANCH === 'master'
) {
syncAlgolia();
} else {
console.log('Skipped Algolia sync.');
}
function syncAlgolia() {
// ALGOLIA_ADMIN_KEY must be added as an environment variable in Travis CI
const client = algolia(ALGOLIA_APP_ID, process.env.ALGOLIA_ADMIN_KEY);
console.log('Initializing target and temporary indexes...');
const index = client.initIndex('icons');
const indexTmp = client.initIndex('icons_tmp');
console.log('Copying target index settings into temporary index...');
client.copyIndex(index.indexName, indexTmp.indexName, ['settings'], err => {
if (err) throw err;
});
const records = Object.keys(icons).map(name => ({
name,
tags: tags[name] || [],
}));
console.log('Pushing data to the temporary index...');
indexTmp.addObjects(records, err => {
if (err) throw err;
});
console.log('Moving temporary index to target index...');
client.moveIndex(indexTmp.indexName, index.indexName, err => {
if (err) throw err;
});
}
## Instruction:
build: Initialize algolia settings in script
## Code After:
import algolia from 'algoliasearch';
import icons from '../dist/icons.json';
import tags from '../src/tags.json';
const ALGOLIA_APP_ID = '5EEOG744D0';
if (
process.env.TRAVIS_PULL_REQUEST === 'false' &&
process.env.TRAVIS_BRANCH === 'master'
) {
syncAlgolia();
} else {
console.log('Skipped Algolia sync.');
}
function syncAlgolia() {
// ALGOLIA_ADMIN_KEY must be added as an environment variable in Travis CI
const client = algolia(ALGOLIA_APP_ID, process.env.ALGOLIA_ADMIN_KEY);
console.log('Initializing target and temporary indexes...');
const index = client.initIndex('icons');
const indexTmp = client.initIndex('icons_tmp');
index.setSettings({
searchableAttributes: ['unordered(name)', 'unordered(tags)'],
customRanking: ['asc(name)'],
});
console.log('Copying target index settings into temporary index...');
client.copyIndex(index.indexName, indexTmp.indexName, ['settings'], err => {
if (err) throw err;
});
const records = Object.keys(icons).map(name => ({
name,
tags: tags[name] || [],
}));
console.log('Pushing data to the temporary index...');
indexTmp.addObjects(records, err => {
if (err) throw err;
});
console.log('Moving temporary index to target index...');
client.moveIndex(indexTmp.indexName, index.indexName, err => {
if (err) throw err;
});
}
|
5756c10a7ac709e50d9def571822a45e346f14db
|
AirPrint_Swift/ViewController.swift
|
AirPrint_Swift/ViewController.swift
|
import UIKit
class ViewController: UIViewController {
@IBAction func print(sender: AnyObject) {
let urlPath = "https://cdn2.raywenderlich.com/wp-content/uploads/2014/06/RW-Swift-Cheatsheet-0_3.pdf"
let _ = NSURL(string: urlPath).flatMap{ printUrl($0) }
}
func printUrl(url: NSURL) {
if (UIPrintInteractionController.canPrintURL(url)) {
showPrintInteraction(url)
} else {
Swift.print("Unable to print: \(url)")
}
}
func showPrintInteraction(url: NSURL) {
let controller = UIPrintInteractionController.sharedPrintController()
controller.printingItem = url
controller.printInfo = printerInfo(url.lastPathComponent!)
controller.showsPageRange = true
controller.presentAnimated(true, completionHandler: nil)
}
func printerInfo(jobName: String) -> UIPrintInfo {
let printInfo = UIPrintInfo.printInfo()
printInfo.outputType = .General
printInfo.jobName = jobName
Swift.print("Printing: \(jobName)")
return printInfo
}
}
|
import UIKit
class ViewController: UIViewController {
@IBAction func print(sender: AnyObject) {
let urlPath = "https://cdn2.raywenderlich.com/wp-content/uploads/2014/06/RW-Swift-Cheatsheet-0_3.pdf"
let _ = NSURL(string: urlPath).flatMap{ printUrl($0) }
}
func printUrl(url: NSURL) {
guard (UIPrintInteractionController.canPrintURL(url)) else {
Swift.print("Unable to print: \(url)")
return
}
showPrintInteraction(url)
}
func showPrintInteraction(url: NSURL) {
let controller = UIPrintInteractionController.sharedPrintController()
controller.printingItem = url
controller.printInfo = printerInfo(url.lastPathComponent!)
controller.showsPageRange = true
controller.presentAnimated(true, completionHandler: nil)
}
func printerInfo(jobName: String) -> UIPrintInfo {
let printInfo = UIPrintInfo.printInfo()
printInfo.outputType = .General
printInfo.jobName = jobName
Swift.print("Printing: \(jobName)")
return printInfo
}
}
|
Use guard to see if we can print the url.
|
Use guard to see if we can print the url.
|
Swift
|
mit
|
RussVanBert/AirPrint_Swift
|
swift
|
## Code Before:
import UIKit
class ViewController: UIViewController {
@IBAction func print(sender: AnyObject) {
let urlPath = "https://cdn2.raywenderlich.com/wp-content/uploads/2014/06/RW-Swift-Cheatsheet-0_3.pdf"
let _ = NSURL(string: urlPath).flatMap{ printUrl($0) }
}
func printUrl(url: NSURL) {
if (UIPrintInteractionController.canPrintURL(url)) {
showPrintInteraction(url)
} else {
Swift.print("Unable to print: \(url)")
}
}
func showPrintInteraction(url: NSURL) {
let controller = UIPrintInteractionController.sharedPrintController()
controller.printingItem = url
controller.printInfo = printerInfo(url.lastPathComponent!)
controller.showsPageRange = true
controller.presentAnimated(true, completionHandler: nil)
}
func printerInfo(jobName: String) -> UIPrintInfo {
let printInfo = UIPrintInfo.printInfo()
printInfo.outputType = .General
printInfo.jobName = jobName
Swift.print("Printing: \(jobName)")
return printInfo
}
}
## Instruction:
Use guard to see if we can print the url.
## Code After:
import UIKit
class ViewController: UIViewController {
@IBAction func print(sender: AnyObject) {
let urlPath = "https://cdn2.raywenderlich.com/wp-content/uploads/2014/06/RW-Swift-Cheatsheet-0_3.pdf"
let _ = NSURL(string: urlPath).flatMap{ printUrl($0) }
}
func printUrl(url: NSURL) {
guard (UIPrintInteractionController.canPrintURL(url)) else {
Swift.print("Unable to print: \(url)")
return
}
showPrintInteraction(url)
}
func showPrintInteraction(url: NSURL) {
let controller = UIPrintInteractionController.sharedPrintController()
controller.printingItem = url
controller.printInfo = printerInfo(url.lastPathComponent!)
controller.showsPageRange = true
controller.presentAnimated(true, completionHandler: nil)
}
func printerInfo(jobName: String) -> UIPrintInfo {
let printInfo = UIPrintInfo.printInfo()
printInfo.outputType = .General
printInfo.jobName = jobName
Swift.print("Printing: \(jobName)")
return printInfo
}
}
|
dc73f00874bcd2ba518d744e361e96e441569b98
|
src/pages/index.js
|
src/pages/index.js
|
/**
* @jsx React.DOM
*/
/* Requiring dependencies for demo purposes, this should be done only when required */
var React = require('React');
var jquery = require('../vendor/jquery-2.1.0.js');
var UnderScore = require('underscore/underscore.js');
var Backbone = require('backbone/backbone.js');
var Reactbone = require('../patch/react.backbone.js');
var SiteBoilerPlate = require('../views/core/SiteBoilerPlate.js');
var Skeleton = require('../views/Skeleton/Skeleton.js');
var ProfileCards = require('../views/ProfileCards/ProfileCards.js');
var Router = require('../routes/Routes.js');
var index = React.createClass({
componentDidMount: function() {
/**
* This runs on the client side. Add Jquery and Underscore to the window.
* Initialize Backbone app once the dependencies are set up.
*/
},
render: function() {
return (
<SiteBoilerPlate>
<Skeleton>
<ProfileCards items={["profile-card", "profile-card extra"]} />
</Skeleton>
</SiteBoilerPlate>
);
}
});
module.exports = index;
|
/**
* @jsx React.DOM
*/
/* Requiring dependencies for demo purposes, this should be done only when required */
var React = require('React');
var SiteBoilerPlate = require('../views/core/SiteBoilerPlate.js');
var Skeleton = require('../views/Skeleton/Skeleton.js');
var ProfileCards = require('../views/ProfileCards/ProfileCards.js');
var Router = require('../routes/Routes.js');
var index = React.createClass({
componentDidMount: function() {
/**
* This runs on the client side. Add Jquery and Underscore to the window.
* Initialize Backbone app once the dependencies are set up.
*/
window._ = require('underscore/underscore.js')({});
window.jQuery = require('../../bower_components/jquery/jquery.js');
window.Backbone = require('backbone/backbone.js');
var reactbackbone = require('../../bower_components/react.backbone/react.backbone.js');
},
render: function() {
return (
<SiteBoilerPlate>
<Skeleton>
<ProfileCards items={["profile-card", "profile-card extra"]} />
</Skeleton>
</SiteBoilerPlate>
);
}
});
module.exports = index;
|
Add backbone and it's dependencies using componentDidMount
|
Add backbone and it's dependencies using componentDidMount
|
JavaScript
|
apache-2.0
|
shilpan/TestReactNodeApp
|
javascript
|
## Code Before:
/**
* @jsx React.DOM
*/
/* Requiring dependencies for demo purposes, this should be done only when required */
var React = require('React');
var jquery = require('../vendor/jquery-2.1.0.js');
var UnderScore = require('underscore/underscore.js');
var Backbone = require('backbone/backbone.js');
var Reactbone = require('../patch/react.backbone.js');
var SiteBoilerPlate = require('../views/core/SiteBoilerPlate.js');
var Skeleton = require('../views/Skeleton/Skeleton.js');
var ProfileCards = require('../views/ProfileCards/ProfileCards.js');
var Router = require('../routes/Routes.js');
var index = React.createClass({
componentDidMount: function() {
/**
* This runs on the client side. Add Jquery and Underscore to the window.
* Initialize Backbone app once the dependencies are set up.
*/
},
render: function() {
return (
<SiteBoilerPlate>
<Skeleton>
<ProfileCards items={["profile-card", "profile-card extra"]} />
</Skeleton>
</SiteBoilerPlate>
);
}
});
module.exports = index;
## Instruction:
Add backbone and it's dependencies using componentDidMount
## Code After:
/**
* @jsx React.DOM
*/
/* Requiring dependencies for demo purposes, this should be done only when required */
var React = require('React');
var SiteBoilerPlate = require('../views/core/SiteBoilerPlate.js');
var Skeleton = require('../views/Skeleton/Skeleton.js');
var ProfileCards = require('../views/ProfileCards/ProfileCards.js');
var Router = require('../routes/Routes.js');
var index = React.createClass({
componentDidMount: function() {
/**
* This runs on the client side. Add Jquery and Underscore to the window.
* Initialize Backbone app once the dependencies are set up.
*/
window._ = require('underscore/underscore.js')({});
window.jQuery = require('../../bower_components/jquery/jquery.js');
window.Backbone = require('backbone/backbone.js');
var reactbackbone = require('../../bower_components/react.backbone/react.backbone.js');
},
render: function() {
return (
<SiteBoilerPlate>
<Skeleton>
<ProfileCards items={["profile-card", "profile-card extra"]} />
</Skeleton>
</SiteBoilerPlate>
);
}
});
module.exports = index;
|
56e59219bb583570519e5336737a117cfb715371
|
.ci/jenkins/config/main.yaml
|
.ci/jenkins/config/main.yaml
|
ecosystem:
main_project: optaplanner
projects:
- name: optaplanner
regexs:
- opta.*
git:
branches:
- name: main
seed:
branch: main
- name: 8.28.x
seed:
branch: seed-optaplanner-8.28.x
main_branch:
default: main
seed:
config_file:
git:
repository: optaplanner
author:
name: kiegroup
credentials_id: kie-ci
branch: main
path: .ci/jenkins/config/branch.yaml
jenkins:
email_creds_id: OPTAPLANNER_CI_EMAIL
|
ecosystem:
main_project: optaplanner
projects:
- name: optaplanner
regexs:
- opta.*
git:
branches:
- name: main
seed:
branch: main
- name: 8.28.x
seed:
branch: seed-optaplanner-8.28.x
- name: 8.29.x
seed:
branch: seed-optaplanner-8.29.x
main_branch:
default: main
seed:
config_file:
git:
repository: optaplanner
author:
name: kiegroup
credentials_id: kie-ci
branch: main
path: .ci/jenkins/config/branch.yaml
jenkins:
email_creds_id: OPTAPLANNER_CI_EMAIL
|
Add release branch 8.29.x after cut-off
|
Add release branch 8.29.x after cut-off
|
YAML
|
apache-2.0
|
tkobayas/optaplanner,tkobayas/optaplanner,tkobayas/optaplanner,tkobayas/optaplanner
|
yaml
|
## Code Before:
ecosystem:
main_project: optaplanner
projects:
- name: optaplanner
regexs:
- opta.*
git:
branches:
- name: main
seed:
branch: main
- name: 8.28.x
seed:
branch: seed-optaplanner-8.28.x
main_branch:
default: main
seed:
config_file:
git:
repository: optaplanner
author:
name: kiegroup
credentials_id: kie-ci
branch: main
path: .ci/jenkins/config/branch.yaml
jenkins:
email_creds_id: OPTAPLANNER_CI_EMAIL
## Instruction:
Add release branch 8.29.x after cut-off
## Code After:
ecosystem:
main_project: optaplanner
projects:
- name: optaplanner
regexs:
- opta.*
git:
branches:
- name: main
seed:
branch: main
- name: 8.28.x
seed:
branch: seed-optaplanner-8.28.x
- name: 8.29.x
seed:
branch: seed-optaplanner-8.29.x
main_branch:
default: main
seed:
config_file:
git:
repository: optaplanner
author:
name: kiegroup
credentials_id: kie-ci
branch: main
path: .ci/jenkins/config/branch.yaml
jenkins:
email_creds_id: OPTAPLANNER_CI_EMAIL
|
770a53485e49f7b440c603659b69d38a4a301d54
|
lib/discordrb/version.rb
|
lib/discordrb/version.rb
|
module Discordrb
VERSION = '1.5.4'.freeze
end
|
module Discordrb
# The current version of discordrb.
VERSION = '1.5.4'.freeze
end
|
Add a documentation comment to the VERSION
|
Add a documentation comment to the VERSION
|
Ruby
|
mit
|
meew0/discordrb,megumisonoda/discordrb,Roughsketch/discordrb,megumisonoda/discordrb,meew0/discordrb,VxJasonxV/discordrb,VxJasonxV/discordrb,sarsntony/discordrb,Roughsketch/discordrb,sarsntony/discordrb
|
ruby
|
## Code Before:
module Discordrb
VERSION = '1.5.4'.freeze
end
## Instruction:
Add a documentation comment to the VERSION
## Code After:
module Discordrb
# The current version of discordrb.
VERSION = '1.5.4'.freeze
end
|
9f0fc487cf7ee9d98ce73e26fd7c2afbb0a923ee
|
app/views/shared/_twitter_card.slim
|
app/views/shared/_twitter_card.slim
|
meta name='twitter:card' content='summary_large_image'
meta name='twitter:site' content='@splitsio'
meta name='twitter:domain' content=request.host_with_port
- if @run.present?
- if @run.game.to_s.present?
meta name='twitter:title' [email protected]
- else
meta name='twitter:title' content='(no title)'
- if @run.category.to_s.present?
meta name='twitter:description' [email protected]
- if @run.image_url.present?
meta name='twitter:image:src' [email protected]_url
- elsif @race.present?
meta name='twitter:title' content=@race
- if @race.notes.present?
meta name='twitter:description' [email protected]
- else
meta name='twitter:title' content='Splits.io'
meta name='twitter:title' content='Speedrun data store, analysis engine, and racing platform'
|
meta name='twitter:card' content='summary_large_image'
meta name='twitter:site' content='@splitsio'
meta name='twitter:domain' content=request.host_with_port
- if @run.present? && !(controller_name == 'runs' && action_name == 'index') # runs#index (homepage) sets a @run when logged out for demo purposes
- if @run.game.to_s.present?
meta name='twitter:title' [email protected]
- else
meta name='twitter:title' content='(no title)'
- if @run.category.to_s.present?
meta name='twitter:description' [email protected]
- if @run.image_url.present?
meta name='twitter:image:src' [email protected]_url
- elsif @race.present?
meta name='twitter:title' content=@race
- if @race.notes.present?
meta name='twitter:description' [email protected]
- else
meta name='twitter:title' content='Splits.io'
meta name='twitter:title' content='Speedrun data store, analysis engine, and racing platform'
|
Fix Twitter card using demo run on homepage
|
Fix Twitter card using demo run on homepage
|
Slim
|
agpl-3.0
|
glacials/splits-io,glacials/splits-io,glacials/splits-io,BatedUrGonnaDie/splits-io,BatedUrGonnaDie/splits-io,BatedUrGonnaDie/splits-io,glacials/splits-io,BatedUrGonnaDie/splits-io
|
slim
|
## Code Before:
meta name='twitter:card' content='summary_large_image'
meta name='twitter:site' content='@splitsio'
meta name='twitter:domain' content=request.host_with_port
- if @run.present?
- if @run.game.to_s.present?
meta name='twitter:title' [email protected]
- else
meta name='twitter:title' content='(no title)'
- if @run.category.to_s.present?
meta name='twitter:description' [email protected]
- if @run.image_url.present?
meta name='twitter:image:src' [email protected]_url
- elsif @race.present?
meta name='twitter:title' content=@race
- if @race.notes.present?
meta name='twitter:description' [email protected]
- else
meta name='twitter:title' content='Splits.io'
meta name='twitter:title' content='Speedrun data store, analysis engine, and racing platform'
## Instruction:
Fix Twitter card using demo run on homepage
## Code After:
meta name='twitter:card' content='summary_large_image'
meta name='twitter:site' content='@splitsio'
meta name='twitter:domain' content=request.host_with_port
- if @run.present? && !(controller_name == 'runs' && action_name == 'index') # runs#index (homepage) sets a @run when logged out for demo purposes
- if @run.game.to_s.present?
meta name='twitter:title' [email protected]
- else
meta name='twitter:title' content='(no title)'
- if @run.category.to_s.present?
meta name='twitter:description' [email protected]
- if @run.image_url.present?
meta name='twitter:image:src' [email protected]_url
- elsif @race.present?
meta name='twitter:title' content=@race
- if @race.notes.present?
meta name='twitter:description' [email protected]
- else
meta name='twitter:title' content='Splits.io'
meta name='twitter:title' content='Speedrun data store, analysis engine, and racing platform'
|
30e62e26021c6f389422426f0416779fbc586da7
|
spec/mailers/previews/user_mailer_preview.rb
|
spec/mailers/previews/user_mailer_preview.rb
|
class UserMailerPreview < ActionMailer::Preview
def agency_setup_reminder_preview
UserMailer.agency_setup_reminder(PartnerAgency.last)
end
end
|
class UserMailerPreview < ActionMailer::Preview
def agency_setup_reminder_preview
UserMailer.agency_setup_reminder(PartnerAgency.last)
end
def user_trip_email
UserMailer.user_trip_email(User.find(2), Trip.find(70))
end
def ecolane_trip_email
UserMailer.ecolane_trip_email('[email protected]', Booking.limit(5))
end
end
|
Add Email Preview for trip confirmation emails
|
Add Email Preview for trip confirmation emails
|
Ruby
|
mit
|
camsys/oneclick-core,camsys/oneclick-core,camsys/oneclick-core,camsys/oneclick-core
|
ruby
|
## Code Before:
class UserMailerPreview < ActionMailer::Preview
def agency_setup_reminder_preview
UserMailer.agency_setup_reminder(PartnerAgency.last)
end
end
## Instruction:
Add Email Preview for trip confirmation emails
## Code After:
class UserMailerPreview < ActionMailer::Preview
def agency_setup_reminder_preview
UserMailer.agency_setup_reminder(PartnerAgency.last)
end
def user_trip_email
UserMailer.user_trip_email(User.find(2), Trip.find(70))
end
def ecolane_trip_email
UserMailer.ecolane_trip_email('[email protected]', Booking.limit(5))
end
end
|
b6068440c1848a07da20b32372cb843f4860798c
|
test/metrics-rails_test.rb
|
test/metrics-rails_test.rb
|
require 'test_helper'
class MetricsRailsTest < ActiveSupport::TestCase
test 'is a module' do
assert_kind_of Module, Metrics::Rails
end
test 'client is available' do
assert_kind_of Librato::Metrics::Client, Metrics::Rails.client
end
test 'flush sends data' do
delete_all_metrics
Metrics::Rails.increment :foo
Metrics::Rails.increment :bar, 2
Metrics::Rails.increment :foo
Metrics::Rails.flush
client = Metrics::Rails.client
metric_names = client.list.map { |m| m['name'] }
assert metric_names.include?('rails.foo'), 'rails.foo should be present'
assert metric_names.include?('rails.bar'), 'rails.bar should be present'
foo = client.fetch 'rails.foo', :count => 10
assert_equal 1, foo['unassigned'].length
assert_equal 2, foo['unassigned'][0]['value']
bar = client.fetch 'rails.bar', :count => 10
assert_equal 1, bar['unassigned'].length
assert_equal 2, bar['unassigned'][0]['value']
end
private
def delete_all_metrics
client = Metrics::Rails.client
client.list.each do |metric|
client.connection.delete("metrics/#{metric['name']}")
end
end
end
|
require 'test_helper'
class MetricsRailsTest < ActiveSupport::TestCase
test 'is a module' do
assert_kind_of Module, Metrics::Rails
end
test 'client is available' do
assert_kind_of Librato::Metrics::Client, Metrics::Rails.client
end
test '#increment exists' do
assert Metrics::Rails.respond_to?(:increment)
Metrics::Rails.increment :baz, 5
end
test 'flush sends data' do
delete_all_metrics
Metrics::Rails.increment :foo
Metrics::Rails.increment :bar, 2
Metrics::Rails.increment :foo
Metrics::Rails.flush
client = Metrics::Rails.client
metric_names = client.list.map { |m| m['name'] }
assert metric_names.include?('rails.foo'), 'rails.foo should be present'
assert metric_names.include?('rails.bar'), 'rails.bar should be present'
foo = client.fetch 'rails.foo', :count => 10
assert_equal 1, foo['unassigned'].length
assert_equal 2, foo['unassigned'][0]['value']
bar = client.fetch 'rails.bar', :count => 10
assert_equal 1, bar['unassigned'].length
assert_equal 2, bar['unassigned'][0]['value']
end
test 'counters should persist through flush' do
Metrics::Rails.increment 'knightrider'
Metrics::Rails.flush
assert_equal 1, Metrics::Rails.counters['knightrider']
end
private
def delete_all_metrics
client = Metrics::Rails.client
client.list.each do |metric|
client.connection.delete("metrics/#{metric['name']}")
end
end
end
|
Add coverage for counters persisting between flushes
|
Add coverage for counters persisting between flushes
|
Ruby
|
bsd-3-clause
|
librato/librato-rails,librato/metrics-rails,librato/metrics-rails,librato/librato-rails,librato/librato-rails
|
ruby
|
## Code Before:
require 'test_helper'
class MetricsRailsTest < ActiveSupport::TestCase
test 'is a module' do
assert_kind_of Module, Metrics::Rails
end
test 'client is available' do
assert_kind_of Librato::Metrics::Client, Metrics::Rails.client
end
test 'flush sends data' do
delete_all_metrics
Metrics::Rails.increment :foo
Metrics::Rails.increment :bar, 2
Metrics::Rails.increment :foo
Metrics::Rails.flush
client = Metrics::Rails.client
metric_names = client.list.map { |m| m['name'] }
assert metric_names.include?('rails.foo'), 'rails.foo should be present'
assert metric_names.include?('rails.bar'), 'rails.bar should be present'
foo = client.fetch 'rails.foo', :count => 10
assert_equal 1, foo['unassigned'].length
assert_equal 2, foo['unassigned'][0]['value']
bar = client.fetch 'rails.bar', :count => 10
assert_equal 1, bar['unassigned'].length
assert_equal 2, bar['unassigned'][0]['value']
end
private
def delete_all_metrics
client = Metrics::Rails.client
client.list.each do |metric|
client.connection.delete("metrics/#{metric['name']}")
end
end
end
## Instruction:
Add coverage for counters persisting between flushes
## Code After:
require 'test_helper'
class MetricsRailsTest < ActiveSupport::TestCase
test 'is a module' do
assert_kind_of Module, Metrics::Rails
end
test 'client is available' do
assert_kind_of Librato::Metrics::Client, Metrics::Rails.client
end
test '#increment exists' do
assert Metrics::Rails.respond_to?(:increment)
Metrics::Rails.increment :baz, 5
end
test 'flush sends data' do
delete_all_metrics
Metrics::Rails.increment :foo
Metrics::Rails.increment :bar, 2
Metrics::Rails.increment :foo
Metrics::Rails.flush
client = Metrics::Rails.client
metric_names = client.list.map { |m| m['name'] }
assert metric_names.include?('rails.foo'), 'rails.foo should be present'
assert metric_names.include?('rails.bar'), 'rails.bar should be present'
foo = client.fetch 'rails.foo', :count => 10
assert_equal 1, foo['unassigned'].length
assert_equal 2, foo['unassigned'][0]['value']
bar = client.fetch 'rails.bar', :count => 10
assert_equal 1, bar['unassigned'].length
assert_equal 2, bar['unassigned'][0]['value']
end
test 'counters should persist through flush' do
Metrics::Rails.increment 'knightrider'
Metrics::Rails.flush
assert_equal 1, Metrics::Rails.counters['knightrider']
end
private
def delete_all_metrics
client = Metrics::Rails.client
client.list.each do |metric|
client.connection.delete("metrics/#{metric['name']}")
end
end
end
|
d1aaef16366bb96b9ef66c6693b4ef9a520d276a
|
build.sh
|
build.sh
|
set -e
unset RUBYOPT
export BUNDLE_WITHOUT="test:development"
version_number=${GO_PIPELINE_COUNTER-0}
revision=`git rev-parse HEAD`
build_date=`date +'%Y-%m-%d %H:%M %z'`
cat > public/version <<EOT
{
"version":"$version_number",
"buildDate":"$build_date",
"gitRevision":"$revision"
}
EOT
cp config/database{-ci,}.yml
echo "Cleaning temporary files"
echo "----"
rm -rf public/assets vendor/cache coverage log/* tmp/*
echo "Running Bundle package"
echo "----"
bundle package --all
echo "Precompiling assets"
echo "----"
RAILS_ENV=production RAILS_GROUPS=assets rake assets:precompile
echo "Creating RPM"
echo "----"
cd ..
/usr/local/rpm_builder/create-rails-rpm $artifact_name $artifact_name $version
#prune packaged gems
rm -rf vendor/cache
|
set -e
unset RUBYOPT
export BUNDLE_WITHOUT="test:development"
version_number=${GO_PIPELINE_COUNTER-0}
revision=`git rev-parse HEAD`
build_date=`date +'%Y-%m-%d %H:%M %z'`
cat > public/version <<EOT
{
"version":"$version_number",
"buildDate":"$build_date",
"gitRevision":"$revision"
}
EOT
cp config/database{,-original}.yml
cp config/database{-ci,}.yml
echo "Cleaning temporary files"
echo "----"
rm -rf public/assets vendor/cache coverage log/* tmp/*
echo "Running Bundle package"
echo "----"
bundle package --all
echo "Precompiling assets"
echo "----"
RAILS_ENV=production RAILS_GROUPS=assets rake assets:precompile
echo "Creating RPM"
echo "----"
cd ..
/usr/local/rpm_builder/create-rails-rpm $artifact_name $artifact_name $version
#prune packaged gems
rm -rf vendor/cache
cp config/database{-original,}.yml
|
Build process restores original database.yml
|
Build process restores original database.yml
|
Shell
|
mit
|
moneyadviceservice/cms,moneyadviceservice/cms,moneyadviceservice/cms,moneyadviceservice/cms
|
shell
|
## Code Before:
set -e
unset RUBYOPT
export BUNDLE_WITHOUT="test:development"
version_number=${GO_PIPELINE_COUNTER-0}
revision=`git rev-parse HEAD`
build_date=`date +'%Y-%m-%d %H:%M %z'`
cat > public/version <<EOT
{
"version":"$version_number",
"buildDate":"$build_date",
"gitRevision":"$revision"
}
EOT
cp config/database{-ci,}.yml
echo "Cleaning temporary files"
echo "----"
rm -rf public/assets vendor/cache coverage log/* tmp/*
echo "Running Bundle package"
echo "----"
bundle package --all
echo "Precompiling assets"
echo "----"
RAILS_ENV=production RAILS_GROUPS=assets rake assets:precompile
echo "Creating RPM"
echo "----"
cd ..
/usr/local/rpm_builder/create-rails-rpm $artifact_name $artifact_name $version
#prune packaged gems
rm -rf vendor/cache
## Instruction:
Build process restores original database.yml
## Code After:
set -e
unset RUBYOPT
export BUNDLE_WITHOUT="test:development"
version_number=${GO_PIPELINE_COUNTER-0}
revision=`git rev-parse HEAD`
build_date=`date +'%Y-%m-%d %H:%M %z'`
cat > public/version <<EOT
{
"version":"$version_number",
"buildDate":"$build_date",
"gitRevision":"$revision"
}
EOT
cp config/database{,-original}.yml
cp config/database{-ci,}.yml
echo "Cleaning temporary files"
echo "----"
rm -rf public/assets vendor/cache coverage log/* tmp/*
echo "Running Bundle package"
echo "----"
bundle package --all
echo "Precompiling assets"
echo "----"
RAILS_ENV=production RAILS_GROUPS=assets rake assets:precompile
echo "Creating RPM"
echo "----"
cd ..
/usr/local/rpm_builder/create-rails-rpm $artifact_name $artifact_name $version
#prune packaged gems
rm -rf vendor/cache
cp config/database{-original,}.yml
|
6e64361bd90499e652f78b01e642e04fc2eaefe3
|
server/database.coffee
|
server/database.coffee
|
Bookshelf = require('bookshelf')
config = require('../knex_config').database
Bookshelf.PG = PG = Bookshelf.initialize(config)
Team = PG.Model.extend
tableName: 'teams'
hasTimestamps: ['created_at', 'updated_at']
toJSON: -> {
id: @id
name: @get('name')
generation: @get('generation')
pokemon: JSON.parse(@get('contents'))
}
Teams = PG.Collection.extend
model: Team
module.exports = {Team, Teams}
|
Bookshelf = require('bookshelf')
{_} = require('underscore')
config = require('../knex_config').database
Bookshelf.PG = PG = Bookshelf.initialize(config)
Team = PG.Model.extend
tableName: 'teams'
hasTimestamps: ['created_at', 'updated_at']
toJSON: ->
contents = @get('contents')
{
id: @id
name: @get('name')
generation: @get('generation')
# Postgres 9.2+ support the JSON datatype. Other versions/DBs do not.
# So if the JSON data type is supported, then loading will load as JSON.
pokemon: (if _.isObject(contents) then contents else JSON.parse(contents))
}
Teams = PG.Collection.extend
model: Team
module.exports = {Team, Teams}
|
Support JSON datatype a bit better.
|
Sim: Support JSON datatype a bit better.
|
CoffeeScript
|
mit
|
sarenji/pokebattle-sim,sarenji/pokebattle-sim,sarenji/pokebattle-sim
|
coffeescript
|
## Code Before:
Bookshelf = require('bookshelf')
config = require('../knex_config').database
Bookshelf.PG = PG = Bookshelf.initialize(config)
Team = PG.Model.extend
tableName: 'teams'
hasTimestamps: ['created_at', 'updated_at']
toJSON: -> {
id: @id
name: @get('name')
generation: @get('generation')
pokemon: JSON.parse(@get('contents'))
}
Teams = PG.Collection.extend
model: Team
module.exports = {Team, Teams}
## Instruction:
Sim: Support JSON datatype a bit better.
## Code After:
Bookshelf = require('bookshelf')
{_} = require('underscore')
config = require('../knex_config').database
Bookshelf.PG = PG = Bookshelf.initialize(config)
Team = PG.Model.extend
tableName: 'teams'
hasTimestamps: ['created_at', 'updated_at']
toJSON: ->
contents = @get('contents')
{
id: @id
name: @get('name')
generation: @get('generation')
# Postgres 9.2+ support the JSON datatype. Other versions/DBs do not.
# So if the JSON data type is supported, then loading will load as JSON.
pokemon: (if _.isObject(contents) then contents else JSON.parse(contents))
}
Teams = PG.Collection.extend
model: Team
module.exports = {Team, Teams}
|
1e8e00f22af740792b1915c6723db451d21a6ed4
|
lib/Version.pod
|
lib/Version.pod
|
=begin pod
class Version { }
Version objects identify version of software components (and potentially other
entities). Perl 6 uses them internally for versioning modules.
A version consists of several parts, which are visually represented by joining
them with a dot. A version part is usually an integer, a string like I<alpha>,
or a L<Whatever>-star C<*>. The latter is used to indicate that any version
part is acceptable in another version that is compared to the current one.
say v1.0.1 ~~ v.1.*; # True
Version literals can only contain numeric and L<Whatever> parts. They start
with a lowe-case C<v>, and are followed by at least one part. Multiple parts
are separate with a dot C<.>. A trailing C<+> indicates that higher versions
are OK in comparisons:
say v1.2 ~~ v1.0; # False
say v1.2 ~~ v1.0+; # True
In comparisons, early parts take precedence over later parts.
say v1.2 cmp v2.1; # Increase
=head1 Methods
=head2 parts
method parts(Version:D:) returns List:D
Returns the list of parts that make up this Version object
=head2 plus
method plus(Version:D:) returns Bool:D
Returns C<True> if comparisons against this version allow larger versions too.
=end pod
|
=begin pod
class Version { }
Version objects identify version of software components (and potentially other
entities). Perl 6 uses them internally for versioning modules.
A version consists of several parts, which are visually represented by joining
them with a dot. A version part is usually an integer, a string like I<alpha>,
or a L<Whatever>-star C<*>. The latter is used to indicate that any version
part is acceptable in another version that is compared to the current one.
say v1.0.1 ~~ v.1.*; # True
Version literals can only contain numeric and L<Whatever> parts. They start
with a lowe-case C<v>, and are followed by at least one part. Multiple parts
are separate with a dot C<.>. A trailing C<+> indicates that higher versions
are OK in comparisons:
say v1.2 ~~ v1.0; # False
say v1.2 ~~ v1.0+; # True
In comparisons, early parts take precedence over later parts.
say v1.2 cmp v2.1; # Increase
=head1 Methods
=head2 new
method new(Str:d $s)
Creates a Version from a string C<$s>. The string is combed
for the numeric, alphabetic, and wildcard components of the version object.
Any characters other than alphanumerics and asterisks are assumed
to be equivalent to a dot. A dot is also assumed between any adjacent
numeric and alphabetic characters.
=head2 parts
method parts(Version:D:) returns List:D
Returns the list of parts that make up this Version object
=head2 plus
method plus(Version:D:) returns Bool:D
Returns C<True> if comparisons against this version allow larger versions too.
=end pod
|
Add draft of method 'new'.
|
Add draft of method 'new'.
|
Pod
|
artistic-2.0
|
dha/doc,MasterDuke17/doc,dha/doc,stmuk/doc,antquinonez/doc,cygx/doc,LLFourn/doc,vadz/doc,perl6/doc,tbrowder/doc,tbrowder/doc,muraiki/doc,MadcapJake/doc,cygx/doc,MadcapJake/doc,MadcapJake/doc,dnmfarrell/doc,dnmfarrell/doc,dnmfarrell/doc,stmuk/doc,LLFourn/doc,vadz/doc,dha/doc,tbrowder/doc,dmaestro/doc,stmuk/doc,gfldex/doc,jkeenan/doc,jonathanstowe/doc,dmaestro/doc,dmaestro/doc,dha/doc,gfldex/doc,dha/doc,gfldex/doc,vadz/doc,perl6/doc,jkeenan/doc,antquinonez/doc,dmaestro/doc,cygx/doc,muraiki/doc,dnmfarrell/doc,tbrowder/doc,jkeenan/doc,muraiki/doc,gfldex/doc,hoelzro/perl6-doc,antquinonez/doc,jonathanstowe/doc,MasterDuke17/doc,muraiki/doc,perl6/doc,perl6/doc,hoelzro/perl6-doc,muraiki/doc,dnmfarrell/doc,LLFourn/doc,MasterDuke17/doc,LLFourn/doc,jonathanstowe/doc,MadcapJake/doc,LLFourn/doc,stmuk/doc,jkeenan/doc,cygx/doc,hoelzro/perl6-doc,MadcapJake/doc,jonathanstowe/doc,antquinonez/doc,gfldex/doc,jkeenan/doc,MasterDuke17/doc,cygx/doc,jonathanstowe/doc,perl6/doc,hoelzro/perl6-doc,hoelzro/perl6-doc,antquinonez/doc,stmuk/doc,dmaestro/doc
|
pod
|
## Code Before:
=begin pod
class Version { }
Version objects identify version of software components (and potentially other
entities). Perl 6 uses them internally for versioning modules.
A version consists of several parts, which are visually represented by joining
them with a dot. A version part is usually an integer, a string like I<alpha>,
or a L<Whatever>-star C<*>. The latter is used to indicate that any version
part is acceptable in another version that is compared to the current one.
say v1.0.1 ~~ v.1.*; # True
Version literals can only contain numeric and L<Whatever> parts. They start
with a lowe-case C<v>, and are followed by at least one part. Multiple parts
are separate with a dot C<.>. A trailing C<+> indicates that higher versions
are OK in comparisons:
say v1.2 ~~ v1.0; # False
say v1.2 ~~ v1.0+; # True
In comparisons, early parts take precedence over later parts.
say v1.2 cmp v2.1; # Increase
=head1 Methods
=head2 parts
method parts(Version:D:) returns List:D
Returns the list of parts that make up this Version object
=head2 plus
method plus(Version:D:) returns Bool:D
Returns C<True> if comparisons against this version allow larger versions too.
=end pod
## Instruction:
Add draft of method 'new'.
## Code After:
=begin pod
class Version { }
Version objects identify version of software components (and potentially other
entities). Perl 6 uses them internally for versioning modules.
A version consists of several parts, which are visually represented by joining
them with a dot. A version part is usually an integer, a string like I<alpha>,
or a L<Whatever>-star C<*>. The latter is used to indicate that any version
part is acceptable in another version that is compared to the current one.
say v1.0.1 ~~ v.1.*; # True
Version literals can only contain numeric and L<Whatever> parts. They start
with a lowe-case C<v>, and are followed by at least one part. Multiple parts
are separate with a dot C<.>. A trailing C<+> indicates that higher versions
are OK in comparisons:
say v1.2 ~~ v1.0; # False
say v1.2 ~~ v1.0+; # True
In comparisons, early parts take precedence over later parts.
say v1.2 cmp v2.1; # Increase
=head1 Methods
=head2 new
method new(Str:d $s)
Creates a Version from a string C<$s>. The string is combed
for the numeric, alphabetic, and wildcard components of the version object.
Any characters other than alphanumerics and asterisks are assumed
to be equivalent to a dot. A dot is also assumed between any adjacent
numeric and alphabetic characters.
=head2 parts
method parts(Version:D:) returns List:D
Returns the list of parts that make up this Version object
=head2 plus
method plus(Version:D:) returns Bool:D
Returns C<True> if comparisons against this version allow larger versions too.
=end pod
|
46d9bced77903473b943d8cccc6a49a7df1f5434
|
python2.7/Dockerfile
|
python2.7/Dockerfile
|
FROM ubuntu
MAINTAINER Sujay Mansingh
RUN echo "deb http://archive.ubuntu.com/ubuntu precise main universe" > /etc/apt/sources.list
RUN apt-get update
RUN apt-get upgrade -y
RUN apt-get install -y python2.7 python-virtualenv git
RUN apt-get install -y vim
|
FROM ubuntu
MAINTAINER Sujay Mansingh
RUN echo "deb http://archive.ubuntu.com/ubuntu precise main universe" > /etc/apt/sources.list
RUN apt-get update
RUN apt-get upgrade -y
RUN apt-get install -y build-essential
RUN apt-get install -y python2.7 python-dev python-virtualenv git
RUN apt-get install -y vim
|
Add packages required for installing various pip packages.
|
Add packages required for installing various pip packages.
|
unknown
|
bsd-3-clause
|
sujaymansingh/Dockerfiles,sujaymansingh/Dockerfiles
|
unknown
|
## Code Before:
FROM ubuntu
MAINTAINER Sujay Mansingh
RUN echo "deb http://archive.ubuntu.com/ubuntu precise main universe" > /etc/apt/sources.list
RUN apt-get update
RUN apt-get upgrade -y
RUN apt-get install -y python2.7 python-virtualenv git
RUN apt-get install -y vim
## Instruction:
Add packages required for installing various pip packages.
## Code After:
FROM ubuntu
MAINTAINER Sujay Mansingh
RUN echo "deb http://archive.ubuntu.com/ubuntu precise main universe" > /etc/apt/sources.list
RUN apt-get update
RUN apt-get upgrade -y
RUN apt-get install -y build-essential
RUN apt-get install -y python2.7 python-dev python-virtualenv git
RUN apt-get install -y vim
|
723578acbf6be863d9116d5fea86f82196d41d2b
|
.travis.yml
|
.travis.yml
|
language: swift
matrix:
include:
- os: osx
osx_image: xcode7.3
script:
- xcrun swiftc --version
- xctool -project EonilJSON.xcodeproj -scheme EonilJSON-iOS -sdk iphonesimulator ONLY_ACTIVE_ARCH=NO
- xctool test -project EonilJSON.xcodeproj -scheme EonilJSON-iOS-Tests -sdk iphonesimulator ONLY_ACTIVE_ARCH=NO
|
language: swift
matrix:
include:
- os: osx
osx_image: xcode7.3
script:
- xcrun swiftc --version
- xctool -project EonilJSON.xcodeproj -scheme EonilJSON-iOS -sdk iphonesimulator ONLY_ACTIVE_ARCH=NO
- xctool test -project EonilJSON.xcodeproj -scheme EonilJSON-iOS -sdk iphonesimulator ONLY_ACTIVE_ARCH=NO
- xctool -project EonilJSON.xcodeproj -scheme EonilJSON-OSX -sdk macosx ONLY_ACTIVE_ARCH=NO
- xctool test -project EonilJSON.xcodeproj -scheme EonilJSON-OSX -sdk macosx ONLY_ACTIVE_ARCH=NO
|
Fix Travis CI setting to find proper test scheme.
|
Fix Travis CI setting to find proper test scheme.
|
YAML
|
mit
|
Eonil/JSON.Swift
|
yaml
|
## Code Before:
language: swift
matrix:
include:
- os: osx
osx_image: xcode7.3
script:
- xcrun swiftc --version
- xctool -project EonilJSON.xcodeproj -scheme EonilJSON-iOS -sdk iphonesimulator ONLY_ACTIVE_ARCH=NO
- xctool test -project EonilJSON.xcodeproj -scheme EonilJSON-iOS-Tests -sdk iphonesimulator ONLY_ACTIVE_ARCH=NO
## Instruction:
Fix Travis CI setting to find proper test scheme.
## Code After:
language: swift
matrix:
include:
- os: osx
osx_image: xcode7.3
script:
- xcrun swiftc --version
- xctool -project EonilJSON.xcodeproj -scheme EonilJSON-iOS -sdk iphonesimulator ONLY_ACTIVE_ARCH=NO
- xctool test -project EonilJSON.xcodeproj -scheme EonilJSON-iOS -sdk iphonesimulator ONLY_ACTIVE_ARCH=NO
- xctool -project EonilJSON.xcodeproj -scheme EonilJSON-OSX -sdk macosx ONLY_ACTIVE_ARCH=NO
- xctool test -project EonilJSON.xcodeproj -scheme EonilJSON-OSX -sdk macosx ONLY_ACTIVE_ARCH=NO
|
b2657a564c4d514ebc3d7b73a9ae352989464fb6
|
docs/publish.sh
|
docs/publish.sh
|
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
mkdir -p tmp
if [ ! -d "tmp/gh-pages" ]; then
git clone [email protected]:Hacker0x01/react-datepicker.git --branch gh-pages --single-branch tmp/gh-pages
fi
cd tmp/gh-pages
git pull
find . -maxdepth 1 ! -name '.git' ! -name '.' -exec rm -r {} \;
cp -r $DIR/{bundle.js,index.html,style.css,images} ./
git add --all
git commit -m "Publish new docs (automated commit)"
git push
|
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
npm run build
mkdir -p tmp
if [ ! -d "tmp/gh-pages" ]; then
git clone [email protected]:Hacker0x01/react-datepicker.git --branch gh-pages --single-branch tmp/gh-pages
fi
cd tmp/gh-pages
git pull
find . -maxdepth 1 ! -name '.git' ! -name '.' -exec rm -r {} \;
cp -r $DIR/{bundle.js,index.html,style.css,images} ./
git add --all
git commit -m "Publish new docs (automated commit)"
git push
|
Make sure the code is compiled before pushing it to gh-pages
|
Make sure the code is compiled before pushing it to gh-pages
|
Shell
|
mit
|
bekerov/react-datepicker-roco,lmenus/react-datepicker,marketplacer/react-datepicker,flexport/react-datepicker,Hacker0x01/react-datepicker,BrunoAlcides/react-datepicker,marketplacer/react-datepicker,Hacker0x01/react-datepicker,bekerov/react-datepicker-roco,sss0791/react-datepicker,BrunoAlcides/react-datepicker,lmenus/react-datepicker,mitchrosu/react-datepicker,mitchrosu/react-datepicker,Hacker0x01/react-datepicker,flexport/react-datepicker,marketplacer/react-datepicker,flexport/react-datepicker,BrunoAlcides/react-datepicker,mitchrosu/react-datepicker,bekerov/react-datepicker-roco,lmenus/react-datepicker
|
shell
|
## Code Before:
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
mkdir -p tmp
if [ ! -d "tmp/gh-pages" ]; then
git clone [email protected]:Hacker0x01/react-datepicker.git --branch gh-pages --single-branch tmp/gh-pages
fi
cd tmp/gh-pages
git pull
find . -maxdepth 1 ! -name '.git' ! -name '.' -exec rm -r {} \;
cp -r $DIR/{bundle.js,index.html,style.css,images} ./
git add --all
git commit -m "Publish new docs (automated commit)"
git push
## Instruction:
Make sure the code is compiled before pushing it to gh-pages
## Code After:
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
npm run build
mkdir -p tmp
if [ ! -d "tmp/gh-pages" ]; then
git clone [email protected]:Hacker0x01/react-datepicker.git --branch gh-pages --single-branch tmp/gh-pages
fi
cd tmp/gh-pages
git pull
find . -maxdepth 1 ! -name '.git' ! -name '.' -exec rm -r {} \;
cp -r $DIR/{bundle.js,index.html,style.css,images} ./
git add --all
git commit -m "Publish new docs (automated commit)"
git push
|
3fb26e4828cbd40d87c1f976f5ec5bb019841123
|
examples/arcenbot.json
|
examples/arcenbot.json
|
{
"command_prefix": "please ",
"description": "Arcensoth's personal assistant. beep",
"managers": [
"135616361157099520"
],
"staff_roles": [
"409808531865337866"
],
"extensions": [
"cogbot.extensions.ping",
"cogbot.extensions.say",
"cogbot.extensions.react",
"cogbot.extensions.vote",
"cogbot.extensions.feed",
"cogbot.extensions.mccq",
"cogbot.extensions.nbt"
],
"extension_state": {
"cogbot.extensions.feed": {
"polling_interval": 300,
"subscriptions": {
"247818621005332480": {
"subreddit": {
"url": "https://www.reddit.com/r/MinecraftCommands/new/.rss"
},
"arqade": {
"url": "https://gaming.stackexchange.com/feeds/tag/minecraft-commands"
},
"minecraft": {
"url": "https://minecraft.net/en-us/feeds/community-content/rss"
}
}
}
},
"cogbot.extensions.mccq": {
"cooldown_rate": 5,
"cooldown_per": 10,
"max_results": 10,
"help_url": "https://minecraft.gamepedia.com/Commands/{command}",
"database": "https://raw.githubusercontent.com/Arcensoth/mcdata",
"show_versions": [
"master"
],
"version_labels": {
"master": "{actual} (latest)"
}
}
}
}
|
{
"command_prefix": "please ",
"description": "Arcensoth's personal assistant. beep",
"managers": [
"135616361157099520"
],
"staff_roles": [
"409808531865337866"
],
"extensions": [
"cogbot.extensions.ping",
"cogbot.extensions.say",
"cogbot.extensions.react",
"cogbot.extensions.vote",
"cogbot.extensions.mccq",
"cogbot.extensions.nbt"
],
"extension_state": {
"cogbot.extensions.mccq": {
"cooldown_rate": 5,
"cooldown_per": 10,
"max_results": 10,
"help_url": "https://minecraft.gamepedia.com/Commands/{command}",
"database": "https://raw.githubusercontent.com/Arcensoth/mcdata",
"show_versions": [
"master"
],
"version_labels": {
"master": "{actual} (latest)"
}
}
}
}
|
Remove feed extension from ArcenBot
|
Remove feed extension from ArcenBot
|
JSON
|
mit
|
Arcensoth/cogbot
|
json
|
## Code Before:
{
"command_prefix": "please ",
"description": "Arcensoth's personal assistant. beep",
"managers": [
"135616361157099520"
],
"staff_roles": [
"409808531865337866"
],
"extensions": [
"cogbot.extensions.ping",
"cogbot.extensions.say",
"cogbot.extensions.react",
"cogbot.extensions.vote",
"cogbot.extensions.feed",
"cogbot.extensions.mccq",
"cogbot.extensions.nbt"
],
"extension_state": {
"cogbot.extensions.feed": {
"polling_interval": 300,
"subscriptions": {
"247818621005332480": {
"subreddit": {
"url": "https://www.reddit.com/r/MinecraftCommands/new/.rss"
},
"arqade": {
"url": "https://gaming.stackexchange.com/feeds/tag/minecraft-commands"
},
"minecraft": {
"url": "https://minecraft.net/en-us/feeds/community-content/rss"
}
}
}
},
"cogbot.extensions.mccq": {
"cooldown_rate": 5,
"cooldown_per": 10,
"max_results": 10,
"help_url": "https://minecraft.gamepedia.com/Commands/{command}",
"database": "https://raw.githubusercontent.com/Arcensoth/mcdata",
"show_versions": [
"master"
],
"version_labels": {
"master": "{actual} (latest)"
}
}
}
}
## Instruction:
Remove feed extension from ArcenBot
## Code After:
{
"command_prefix": "please ",
"description": "Arcensoth's personal assistant. beep",
"managers": [
"135616361157099520"
],
"staff_roles": [
"409808531865337866"
],
"extensions": [
"cogbot.extensions.ping",
"cogbot.extensions.say",
"cogbot.extensions.react",
"cogbot.extensions.vote",
"cogbot.extensions.mccq",
"cogbot.extensions.nbt"
],
"extension_state": {
"cogbot.extensions.mccq": {
"cooldown_rate": 5,
"cooldown_per": 10,
"max_results": 10,
"help_url": "https://minecraft.gamepedia.com/Commands/{command}",
"database": "https://raw.githubusercontent.com/Arcensoth/mcdata",
"show_versions": [
"master"
],
"version_labels": {
"master": "{actual} (latest)"
}
}
}
}
|
e62ec09f9134da3d0f5f8f07377b250786de1c22
|
test.sh
|
test.sh
|
COMMAND="node index.js"
$COMMAND
$COMMAND --version
$COMMAND --help
node -e "require('babel-core/register'); require('./test/server').default(4002);" &
SERVER_PID=$!
$COMMAND http://localhost:4002/no-error
CODE=$?
echo $CODE
if [ $CODE -ne 0 ];
then
exit 1;
fi
$COMMAND http://localhost:4002/error
CODE=$?
echo $CODE
if [ $CODE -ne 2 ];
then
exit 1;
fi
$COMMAND http://localhost:9999/notfound
CODE=$?
echo $CODE
if [ $CODE -ne 1 ];
then
exit 1;
fi
kill $SERVER_PID
|
COMMAND="node index.js"
$COMMAND
$COMMAND --version
$COMMAND --help
node -e "require('babel-core/register'); require('./test/server').default(4002);" &
SERVER_PID=$!
echo "No JS error"
$COMMAND http://localhost:4002/no-error
CODE=$?
echo $CODE
if [ $CODE -ne 0 ];
then
exit 1;
fi
echo "JS error"
$COMMAND http://localhost:4002/error
CODE=$?
echo $CODE
if [ $CODE -ne 2 ];
then
exit 1;
fi
echo "Load error"
$COMMAND http://localhost:9999/notfound
CODE=$?
echo $CODE
if [ $CODE -ne 1 ];
then
exit 1;
fi
echo "No immediate JS error"
$COMMAND http://localhost:4002/error-wait
CODE=$?
echo $CODE
if [ $CODE -ne 0 ];
then
exit 1;
fi
echo "JS error after 2500ms wait"
$COMMAND http://localhost:4002/error-wait --wait 2500
CODE=$?
echo $CODE
if [ $CODE -ne 2 ];
then
exit 1;
fi
kill $SERVER_PID
|
Test wait parameter in output script
|
Test wait parameter in output script
|
Shell
|
isc
|
ThibWeb/is-js-error,ThibWeb/is-js-error,ThibWeb/is-js-error
|
shell
|
## Code Before:
COMMAND="node index.js"
$COMMAND
$COMMAND --version
$COMMAND --help
node -e "require('babel-core/register'); require('./test/server').default(4002);" &
SERVER_PID=$!
$COMMAND http://localhost:4002/no-error
CODE=$?
echo $CODE
if [ $CODE -ne 0 ];
then
exit 1;
fi
$COMMAND http://localhost:4002/error
CODE=$?
echo $CODE
if [ $CODE -ne 2 ];
then
exit 1;
fi
$COMMAND http://localhost:9999/notfound
CODE=$?
echo $CODE
if [ $CODE -ne 1 ];
then
exit 1;
fi
kill $SERVER_PID
## Instruction:
Test wait parameter in output script
## Code After:
COMMAND="node index.js"
$COMMAND
$COMMAND --version
$COMMAND --help
node -e "require('babel-core/register'); require('./test/server').default(4002);" &
SERVER_PID=$!
echo "No JS error"
$COMMAND http://localhost:4002/no-error
CODE=$?
echo $CODE
if [ $CODE -ne 0 ];
then
exit 1;
fi
echo "JS error"
$COMMAND http://localhost:4002/error
CODE=$?
echo $CODE
if [ $CODE -ne 2 ];
then
exit 1;
fi
echo "Load error"
$COMMAND http://localhost:9999/notfound
CODE=$?
echo $CODE
if [ $CODE -ne 1 ];
then
exit 1;
fi
echo "No immediate JS error"
$COMMAND http://localhost:4002/error-wait
CODE=$?
echo $CODE
if [ $CODE -ne 0 ];
then
exit 1;
fi
echo "JS error after 2500ms wait"
$COMMAND http://localhost:4002/error-wait --wait 2500
CODE=$?
echo $CODE
if [ $CODE -ne 2 ];
then
exit 1;
fi
kill $SERVER_PID
|
b0f186923e838c20cc9f4fd082e4db1ca8e96a15
|
tests/threadsafe.rs
|
tests/threadsafe.rs
|
extern crate ratelimit_meter;
use ratelimit_meter::{GCRA, Threadsafe, Limiter, Decider, Decision};
use std::thread;
#[test]
fn simple_operation() {
let mut lim = Limiter::new()
.capacity(5)
.weight(1)
.build::<Threadsafe<GCRA>>()
.unwrap();
assert_eq!(Decision::Yes, lim.check());
}
#[test]
fn actual_threadsafety() {
let lim = Limiter::new()
.capacity(5)
.weight(1)
.build::<Threadsafe<GCRA>>()
.unwrap();
let mut children = vec![];
for _i in 0..20 {
let mut lim = lim.clone();
children.push(thread::spawn(move || {
lim.check();
}));
}
for child in children {
child.join().unwrap();
}
}
|
extern crate ratelimit_meter;
use ratelimit_meter::{GCRA, Threadsafe, Limiter, Decider, Decision};
use std::thread;
use std::time::{Instant, Duration};
#[test]
fn simple_operation() {
let mut lim = Limiter::new()
.capacity(5)
.weight(1)
.build::<Threadsafe<GCRA>>()
.unwrap();
assert_eq!(Decision::Yes, lim.check());
}
#[test]
fn actual_threadsafety() {
let mut lim = Limiter::new()
.capacity(20)
.weight(1)
.build::<Threadsafe<GCRA>>()
.unwrap();
let now = Instant::now();
let ms = Duration::from_millis(1);
let mut children = vec![];
lim.test_and_update(now);
for _i in 0..20 {
let mut lim = lim.clone();
children.push(thread::spawn(move || {
lim.test_and_update(now);
}));
}
for child in children {
child.join().unwrap();
}
assert!(!lim.test_and_update(now).is_compliant());
assert_eq!(Decision::Yes, lim.test_and_update(now+ms*1000));
}
|
Test that the threaded rate-limiter is actually doing its work
|
Test that the threaded rate-limiter is actually doing its work
(It does! \o/)
|
Rust
|
mit
|
antifuchs/ratelimit_meter
|
rust
|
## Code Before:
extern crate ratelimit_meter;
use ratelimit_meter::{GCRA, Threadsafe, Limiter, Decider, Decision};
use std::thread;
#[test]
fn simple_operation() {
let mut lim = Limiter::new()
.capacity(5)
.weight(1)
.build::<Threadsafe<GCRA>>()
.unwrap();
assert_eq!(Decision::Yes, lim.check());
}
#[test]
fn actual_threadsafety() {
let lim = Limiter::new()
.capacity(5)
.weight(1)
.build::<Threadsafe<GCRA>>()
.unwrap();
let mut children = vec![];
for _i in 0..20 {
let mut lim = lim.clone();
children.push(thread::spawn(move || {
lim.check();
}));
}
for child in children {
child.join().unwrap();
}
}
## Instruction:
Test that the threaded rate-limiter is actually doing its work
(It does! \o/)
## Code After:
extern crate ratelimit_meter;
use ratelimit_meter::{GCRA, Threadsafe, Limiter, Decider, Decision};
use std::thread;
use std::time::{Instant, Duration};
#[test]
fn simple_operation() {
let mut lim = Limiter::new()
.capacity(5)
.weight(1)
.build::<Threadsafe<GCRA>>()
.unwrap();
assert_eq!(Decision::Yes, lim.check());
}
#[test]
fn actual_threadsafety() {
let mut lim = Limiter::new()
.capacity(20)
.weight(1)
.build::<Threadsafe<GCRA>>()
.unwrap();
let now = Instant::now();
let ms = Duration::from_millis(1);
let mut children = vec![];
lim.test_and_update(now);
for _i in 0..20 {
let mut lim = lim.clone();
children.push(thread::spawn(move || {
lim.test_and_update(now);
}));
}
for child in children {
child.join().unwrap();
}
assert!(!lim.test_and_update(now).is_compliant());
assert_eq!(Decision::Yes, lim.test_and_update(now+ms*1000));
}
|
a73254afd186609d890a3868541c7f207a364f1c
|
docker-compose.yml
|
docker-compose.yml
|
wordpress:
build: docker/wordpress
links:
- db:db
volumes:
- ./wordpress:/var/www/html
- ./plugin:/data
ports:
- 81:80
db:
image: mysql:5.5
environment:
MYSQL_ROOT_PASSWORD: example
MYSQL_DATABASE: wordpress
|
wordpress:
build: docker/wordpress
links:
- db:db
volumes:
- ./wordpress:/var/www/html
- ./plugin:/data
db:
image: mysql:5.5
environment:
MYSQL_ROOT_PASSWORD: example
MYSQL_DATABASE: wordpress
|
Remove ports from WordPress container
|
Remove ports from WordPress container
It doesn't work well to expose the port if
the uri inside does not match outside
|
YAML
|
mit
|
hirowatari/Docker-for-Wordpress-Plugin-Testing,hirowatari/Docker-for-Wordpress-Plugin-Testing
|
yaml
|
## Code Before:
wordpress:
build: docker/wordpress
links:
- db:db
volumes:
- ./wordpress:/var/www/html
- ./plugin:/data
ports:
- 81:80
db:
image: mysql:5.5
environment:
MYSQL_ROOT_PASSWORD: example
MYSQL_DATABASE: wordpress
## Instruction:
Remove ports from WordPress container
It doesn't work well to expose the port if
the uri inside does not match outside
## Code After:
wordpress:
build: docker/wordpress
links:
- db:db
volumes:
- ./wordpress:/var/www/html
- ./plugin:/data
db:
image: mysql:5.5
environment:
MYSQL_ROOT_PASSWORD: example
MYSQL_DATABASE: wordpress
|
675f5a269859f1e38419b23a82b732f22f858b74
|
setup.py
|
setup.py
|
from distutils.core import setup
setup(
name="sqlite_object",
version="0.3.3",
author_email="[email protected]",
description="sqlite-backed collection objects",
author="Luke Hospadaruk",
url="https://github.com/hospadar/sqlite_object",
packages=["sqlite_object"],
)
|
from distutils.core import setup
setup(
name="sqlite_object",
version="0.3.3",
author_email="[email protected]",
description="sqlite-backed collection objects",
author="Matt Stancliff via originally Luke Hospadaruk",
url="https://github.com/mattsta/sqlite_object",
packages=["sqlite_object"],
)
|
Update package details to point to my repo
|
Update package details to point to my repo
Is this right? I guess it's right since I'm taking over
responsibility for this fork. Would be nice if the package
ecosystem had a full "history of ownership" feature instead
of just overwriting everything in your own name?
|
Python
|
mit
|
hospadar/sqlite_object
|
python
|
## Code Before:
from distutils.core import setup
setup(
name="sqlite_object",
version="0.3.3",
author_email="[email protected]",
description="sqlite-backed collection objects",
author="Luke Hospadaruk",
url="https://github.com/hospadar/sqlite_object",
packages=["sqlite_object"],
)
## Instruction:
Update package details to point to my repo
Is this right? I guess it's right since I'm taking over
responsibility for this fork. Would be nice if the package
ecosystem had a full "history of ownership" feature instead
of just overwriting everything in your own name?
## Code After:
from distutils.core import setup
setup(
name="sqlite_object",
version="0.3.3",
author_email="[email protected]",
description="sqlite-backed collection objects",
author="Matt Stancliff via originally Luke Hospadaruk",
url="https://github.com/mattsta/sqlite_object",
packages=["sqlite_object"],
)
|
ebc761f0d4c0e6262b2960a0d53aae75ceac9665
|
src/app/app.ts
|
src/app/app.ts
|
import {Component, View, provide} from 'angular2/core';
import {bootstrap} from 'angular2/platform/browser';
import {RouteConfig, ROUTER_PROVIDERS, ROUTER_DIRECTIVES, LocationStrategy, HashLocationStrategy} from 'angular2/router';
import {PersonsView} from './views/persons/personsViewComponent';
import {AboutView} from './views/about/aboutViewComponent';
import {SomethingView} from './views/something/somethingViewComponent';
@Component({
selector: 'my-app'
})
@View({
templateUrl: 'app/app.html',
directives: [ROUTER_DIRECTIVES]
})
@RouteConfig([
{path: '/about', name: 'About', component: AboutView},
{path: '/something', name: 'Something', component: SomethingView},
{path: '/persons', name: 'Persons', component: PersonsView, useAsDefault: true}
])
class AppComponent { }
bootstrap(
AppComponent,
[
ROUTER_PROVIDERS,
provide(LocationStrategy, {useClass: HashLocationStrategy})
]);
|
import {Component, View, provide} from 'angular2/core';
import {bootstrap} from 'angular2/platform/browser';
import {RouteConfig, ROUTER_PROVIDERS, ROUTER_DIRECTIVES, LocationStrategy, HashLocationStrategy} from 'angular2/router';
import {PersonsView} from './views/persons/personsViewComponent';
import {AboutView} from './views/about/aboutViewComponent';
import {SomethingView} from './views/something/somethingViewComponent';
@Component({
selector: 'my-app'
})
@View({
templateUrl: 'app/app.html',
directives: [ROUTER_DIRECTIVES]
})
@RouteConfig([
{path: '/about', name: 'About', component: AboutView},
{path: '/something', name: 'Something', component: SomethingView},
{path: '/persons', name: 'Persons', component: PersonsView, useAsDefault: true}
])
class AppComponent { }
// Use this for hash based location strategy (old style when running in live-server mode)
bootstrap(AppComponent, [
ROUTER_PROVIDERS,
provide(LocationStrategy, {useClass: HashLocationStrategy})
]);
// Use this for HTML5 Push location strategy
//bootstrap(AppComponent, [ROUTER_PROVIDERS]);
|
Duplicate boostrap to be able to toggle easy between HTML5 push and hash based location strategy
|
Duplicate boostrap to be able to toggle easy between HTML5 push and hash based location strategy
|
TypeScript
|
mit
|
lokanx/courses-angular2-persons,lokanx/courses-angular2-persons,lokanx/courses-angular2-persons
|
typescript
|
## Code Before:
import {Component, View, provide} from 'angular2/core';
import {bootstrap} from 'angular2/platform/browser';
import {RouteConfig, ROUTER_PROVIDERS, ROUTER_DIRECTIVES, LocationStrategy, HashLocationStrategy} from 'angular2/router';
import {PersonsView} from './views/persons/personsViewComponent';
import {AboutView} from './views/about/aboutViewComponent';
import {SomethingView} from './views/something/somethingViewComponent';
@Component({
selector: 'my-app'
})
@View({
templateUrl: 'app/app.html',
directives: [ROUTER_DIRECTIVES]
})
@RouteConfig([
{path: '/about', name: 'About', component: AboutView},
{path: '/something', name: 'Something', component: SomethingView},
{path: '/persons', name: 'Persons', component: PersonsView, useAsDefault: true}
])
class AppComponent { }
bootstrap(
AppComponent,
[
ROUTER_PROVIDERS,
provide(LocationStrategy, {useClass: HashLocationStrategy})
]);
## Instruction:
Duplicate boostrap to be able to toggle easy between HTML5 push and hash based location strategy
## Code After:
import {Component, View, provide} from 'angular2/core';
import {bootstrap} from 'angular2/platform/browser';
import {RouteConfig, ROUTER_PROVIDERS, ROUTER_DIRECTIVES, LocationStrategy, HashLocationStrategy} from 'angular2/router';
import {PersonsView} from './views/persons/personsViewComponent';
import {AboutView} from './views/about/aboutViewComponent';
import {SomethingView} from './views/something/somethingViewComponent';
@Component({
selector: 'my-app'
})
@View({
templateUrl: 'app/app.html',
directives: [ROUTER_DIRECTIVES]
})
@RouteConfig([
{path: '/about', name: 'About', component: AboutView},
{path: '/something', name: 'Something', component: SomethingView},
{path: '/persons', name: 'Persons', component: PersonsView, useAsDefault: true}
])
class AppComponent { }
// Use this for hash based location strategy (old style when running in live-server mode)
bootstrap(AppComponent, [
ROUTER_PROVIDERS,
provide(LocationStrategy, {useClass: HashLocationStrategy})
]);
// Use this for HTML5 Push location strategy
//bootstrap(AppComponent, [ROUTER_PROVIDERS]);
|
313b955076ea4ef46c3c695ae7e6f0010582ba71
|
app/Criterion/UI/Controller/HookController.php
|
app/Criterion/UI/Controller/HookController.php
|
<?php
namespace Criterion\UI\Controller;
class HookController
{
public function github(\Silex\Application $app)
{
$payload = json_decode($app['request']->get('payload'), true);
if ( ! isset($payload['repository']['url']))
{
return $app->json(array(
'success' => false
));
}
$repo = $payload['repository']['url'];
// Detect if its an private repository, if so then we need to use SSH
if ($payload['repository']['private'])
{
$repo = \Criterion\Helper\Github::toSSHUrl($repo);
}
$project = new \Criterion\Model\Project(array(
'repo' => $repo
));
if ( ! $project->exists)
{
$project->save();
}
$test = new \Criterion\Model\Test();
$test->project_id = $project->id;
$test->branch = str_replace('refs/heads/', null, $payload['ref']);
$test->save();
return $app->json(array(
'success' => true,
'test' => (string) $test->id
));
}
}
|
<?php
namespace Criterion\UI\Controller;
class HookController
{
public function github(\Silex\Application $app)
{
$query_token = $app['request']->query->get('token');
$token = new \Criterion\Model\Token($query_token);
if ( ! $token->exists)
{
return $app->abort(404, 'Page does not exist');
}
$payload = json_decode($app['request']->get('payload'), true);
if ( ! isset($payload['repository']['url']))
{
return $app->json(array(
'success' => false
));
}
$repo = $payload['repository']['url'];
// Detect if its an private repository, if so then we need to use SSH
if ($payload['repository']['private'])
{
$repo = \Criterion\Helper\Github::toSSHUrl($repo);
}
$project = new \Criterion\Model\Project(array(
'repo' => $repo
));
if ( ! $project->exists)
{
$project->save();
}
$test = new \Criterion\Model\Test();
$test->project_id = $project->id;
$test->branch = str_replace('refs/heads/', null, $payload['ref']);
$test->save();
return $app->json(array(
'success' => true,
'test' => (string) $test->id
));
}
}
|
Use token in github hook
|
Use token in github hook
|
PHP
|
mit
|
romhut/criterion,romhut/criterion,romhut/criterion,romhut/criterion
|
php
|
## Code Before:
<?php
namespace Criterion\UI\Controller;
class HookController
{
public function github(\Silex\Application $app)
{
$payload = json_decode($app['request']->get('payload'), true);
if ( ! isset($payload['repository']['url']))
{
return $app->json(array(
'success' => false
));
}
$repo = $payload['repository']['url'];
// Detect if its an private repository, if so then we need to use SSH
if ($payload['repository']['private'])
{
$repo = \Criterion\Helper\Github::toSSHUrl($repo);
}
$project = new \Criterion\Model\Project(array(
'repo' => $repo
));
if ( ! $project->exists)
{
$project->save();
}
$test = new \Criterion\Model\Test();
$test->project_id = $project->id;
$test->branch = str_replace('refs/heads/', null, $payload['ref']);
$test->save();
return $app->json(array(
'success' => true,
'test' => (string) $test->id
));
}
}
## Instruction:
Use token in github hook
## Code After:
<?php
namespace Criterion\UI\Controller;
class HookController
{
public function github(\Silex\Application $app)
{
$query_token = $app['request']->query->get('token');
$token = new \Criterion\Model\Token($query_token);
if ( ! $token->exists)
{
return $app->abort(404, 'Page does not exist');
}
$payload = json_decode($app['request']->get('payload'), true);
if ( ! isset($payload['repository']['url']))
{
return $app->json(array(
'success' => false
));
}
$repo = $payload['repository']['url'];
// Detect if its an private repository, if so then we need to use SSH
if ($payload['repository']['private'])
{
$repo = \Criterion\Helper\Github::toSSHUrl($repo);
}
$project = new \Criterion\Model\Project(array(
'repo' => $repo
));
if ( ! $project->exists)
{
$project->save();
}
$test = new \Criterion\Model\Test();
$test->project_id = $project->id;
$test->branch = str_replace('refs/heads/', null, $payload['ref']);
$test->save();
return $app->json(array(
'success' => true,
'test' => (string) $test->id
));
}
}
|
de0ac21479dcc7d9da599c14b246171e3f402a48
|
README.md
|
README.md
|
photomosaic
===========
[](https://travis-ci.org/danielballan/photomosaic)
Assemble thumbnail-sized images from a large collection into a mosaic which,
viewed at a distance, gives the impression of one large photo.
Example
-------
```python
import photomosaic as pm
# Load a sample image
from skimage import data
img = data.chelsea() # cat picture!
# Generate dummy images covering the color gamut to use as a pool.
pm.generate_tile_pool('pool')
# Build the pool (analyze the dummy images).
pool = pm.make_pool('pool/*.png')
# Create a mosiac with 15x15 tiles.
mos = pm.basic_mosaic(img, pool, (15, 15))
# (Optional) Plot the mosaic using matplotlib.
import matplotlib.pyplot as plt
plt.imshow(mos)
# Save it.
from skimage import imsave
imsave(mos, 'mosaic.png')
```
Related Project
---------------
[John Louis Del Rosario](https://github.com/john2x) also has a
[photomosaic project](https://github.com/john2x/photomosaic) in Python. I
studied his code while I began writing version 0.1.0 of this project in 2012,
and there were similarities. Version 0.2.0 (2016) is a complete rewrite that
takes a fundamentally different approach.
|
photomosaic
===========
[](https://travis-ci.org/danielballan/photomosaic)
Assemble thumbnail-sized images from a large collection into a mosaic which,
viewed at a distance, gives the impression of one large photo.
Documentation: [http://danielballan.github.io/photomosaic/docs/](http://danielballan.github.io/photomosaic/docs/)
Related Work
------------
[John Louis Del Rosario](https://github.com/john2x) also has a
[photomosaic project](https://github.com/john2x/photomosaic) in Python. I
studied his code while I began writing version 0.1.0 of this project in 2012,
and there were similarities. Version 0.2.0 (2016) is a complete rewrite that
takes a fundamentally different approach.
|
Replace example in readme with link to docs.
|
DOC: Replace example in readme with link to docs.
|
Markdown
|
bsd-3-clause
|
danielballan/photomosaic
|
markdown
|
## Code Before:
photomosaic
===========
[](https://travis-ci.org/danielballan/photomosaic)
Assemble thumbnail-sized images from a large collection into a mosaic which,
viewed at a distance, gives the impression of one large photo.
Example
-------
```python
import photomosaic as pm
# Load a sample image
from skimage import data
img = data.chelsea() # cat picture!
# Generate dummy images covering the color gamut to use as a pool.
pm.generate_tile_pool('pool')
# Build the pool (analyze the dummy images).
pool = pm.make_pool('pool/*.png')
# Create a mosiac with 15x15 tiles.
mos = pm.basic_mosaic(img, pool, (15, 15))
# (Optional) Plot the mosaic using matplotlib.
import matplotlib.pyplot as plt
plt.imshow(mos)
# Save it.
from skimage import imsave
imsave(mos, 'mosaic.png')
```
Related Project
---------------
[John Louis Del Rosario](https://github.com/john2x) also has a
[photomosaic project](https://github.com/john2x/photomosaic) in Python. I
studied his code while I began writing version 0.1.0 of this project in 2012,
and there were similarities. Version 0.2.0 (2016) is a complete rewrite that
takes a fundamentally different approach.
## Instruction:
DOC: Replace example in readme with link to docs.
## Code After:
photomosaic
===========
[](https://travis-ci.org/danielballan/photomosaic)
Assemble thumbnail-sized images from a large collection into a mosaic which,
viewed at a distance, gives the impression of one large photo.
Documentation: [http://danielballan.github.io/photomosaic/docs/](http://danielballan.github.io/photomosaic/docs/)
Related Work
------------
[John Louis Del Rosario](https://github.com/john2x) also has a
[photomosaic project](https://github.com/john2x/photomosaic) in Python. I
studied his code while I began writing version 0.1.0 of this project in 2012,
and there were similarities. Version 0.2.0 (2016) is a complete rewrite that
takes a fundamentally different approach.
|
651fd66f865d4a091a507ef935cf204522ff687e
|
src/background/contexts/speeddial/SpeeddialContext.js
|
src/background/contexts/speeddial/SpeeddialContext.js
|
var SpeeddialContext = function() {
this.properties = {};
global.opr.speeddial.get(function(speeddialProperties) {
this.properties.url = speeddialProperties.url;
this.properties.title = speeddialProperties.title;
// Set WinTabs feature to LOADED
deferredComponentsLoadStatus['SPEEDDIAL_LOADED'] = true;
}.bind(this));
};
SpeeddialContext.prototype.constructor = SpeeddialContext;
SpeeddialContext.prototype.__defineGetter__('url', function() {
return this.properties.url || "";
}); // read
SpeeddialContext.prototype.__defineSetter__('url', function(val) {
global.opr.speeddial.update({ 'url': val }, function(speeddialProperties) {
this.properties.url = speeddialProperties.url;
}.bind(this));
}); // write
SpeeddialContext.prototype.__defineGetter__('title', function() {
return this.properties.title || "";
}); // read
SpeeddialContext.prototype.__defineSetter__('title', function(val) {
global.opr.speeddial.update({ 'title': val }, function(speeddialProperties) {
this.properties.title = speeddialProperties.title;
}.bind(this));
}); // write
|
var SpeeddialContext = function() {
this.properties = {};
global.opr.speeddial.get(function(speeddialProperties) {
this.properties.url = speeddialProperties.url;
this.properties.title = speeddialProperties.title;
// Set WinTabs feature to LOADED
deferredComponentsLoadStatus['SPEEDDIAL_LOADED'] = true;
}.bind(this));
};
SpeeddialContext.prototype.constructor = SpeeddialContext;
SpeeddialContext.prototype.__defineGetter__('url', function() {
return this.properties.url || "";
}); // read
SpeeddialContext.prototype.__defineSetter__('url', function(val) {
this.properties.url = val;
global.opr.speeddial.update({ 'url': val }, function() {});
}); // write
SpeeddialContext.prototype.__defineGetter__('title', function() {
return this.properties.title || "";
}); // read
SpeeddialContext.prototype.__defineSetter__('title', function(val) {
this.properties.title = val;
global.opr.speeddial.update({ 'title': val }, function() {});
}); // write
|
Update Speed Dial API implementation to set attributes independent of Chromium call to update attributes.
|
Update Speed Dial API implementation to set attributes independent of Chromium call to update attributes.
|
JavaScript
|
mit
|
operasoftware/operaextensions.js,operasoftware/operaextensions.js,operasoftware/operaextensions.js
|
javascript
|
## Code Before:
var SpeeddialContext = function() {
this.properties = {};
global.opr.speeddial.get(function(speeddialProperties) {
this.properties.url = speeddialProperties.url;
this.properties.title = speeddialProperties.title;
// Set WinTabs feature to LOADED
deferredComponentsLoadStatus['SPEEDDIAL_LOADED'] = true;
}.bind(this));
};
SpeeddialContext.prototype.constructor = SpeeddialContext;
SpeeddialContext.prototype.__defineGetter__('url', function() {
return this.properties.url || "";
}); // read
SpeeddialContext.prototype.__defineSetter__('url', function(val) {
global.opr.speeddial.update({ 'url': val }, function(speeddialProperties) {
this.properties.url = speeddialProperties.url;
}.bind(this));
}); // write
SpeeddialContext.prototype.__defineGetter__('title', function() {
return this.properties.title || "";
}); // read
SpeeddialContext.prototype.__defineSetter__('title', function(val) {
global.opr.speeddial.update({ 'title': val }, function(speeddialProperties) {
this.properties.title = speeddialProperties.title;
}.bind(this));
}); // write
## Instruction:
Update Speed Dial API implementation to set attributes independent of Chromium call to update attributes.
## Code After:
var SpeeddialContext = function() {
this.properties = {};
global.opr.speeddial.get(function(speeddialProperties) {
this.properties.url = speeddialProperties.url;
this.properties.title = speeddialProperties.title;
// Set WinTabs feature to LOADED
deferredComponentsLoadStatus['SPEEDDIAL_LOADED'] = true;
}.bind(this));
};
SpeeddialContext.prototype.constructor = SpeeddialContext;
SpeeddialContext.prototype.__defineGetter__('url', function() {
return this.properties.url || "";
}); // read
SpeeddialContext.prototype.__defineSetter__('url', function(val) {
this.properties.url = val;
global.opr.speeddial.update({ 'url': val }, function() {});
}); // write
SpeeddialContext.prototype.__defineGetter__('title', function() {
return this.properties.title || "";
}); // read
SpeeddialContext.prototype.__defineSetter__('title', function(val) {
this.properties.title = val;
global.opr.speeddial.update({ 'title': val }, function() {});
}); // write
|
317a34d603af75c96e2ed3fe972cb93824b840d0
|
cookbooks/fish/files/.config/fish/conf.d/basic.fish
|
cookbooks/fish/files/.config/fish/conf.d/basic.fish
|
export EDITOR="nvim"
export XDG_CONFIG_HOME="$HOME/.config"
export PAGER="less"
export LESS="-g -i -M -R -S -W -z-4 -x4"
export PATH="$HOME/.bin:$PATH"
export PATH="$PATH:/usr/local/sbin"
## Set Locale
export LC_ALL="en_US.UTF-8"
export LC_CTYPE="en_US.UTF-8"
export LANG="en_US.UTF-8"
|
export EDITOR="nvim"
export XDG_CONFIG_HOME="$HOME/.config"
export PAGER="less"
export LESS="-g -i -M -R -S -W -z-4 -x4"
export PATH="$HOME/.bin:$PATH"
## Set Locale
export LC_ALL="en_US.UTF-8"
export LC_CTYPE="en_US.UTF-8"
export LANG="en_US.UTF-8"
|
Revert "Add /usr/local/sbin in $PATH"
|
Revert "Add /usr/local/sbin in $PATH"
This reverts commit fd131ca67fab8608af69a652b06989c6dbfbd10d.
|
fish
|
mit
|
tsub/dotfiles,tsub/dotfiles,tsub/dotfiles,tsub/dotfiles,tsub/dotfiles
|
fish
|
## Code Before:
export EDITOR="nvim"
export XDG_CONFIG_HOME="$HOME/.config"
export PAGER="less"
export LESS="-g -i -M -R -S -W -z-4 -x4"
export PATH="$HOME/.bin:$PATH"
export PATH="$PATH:/usr/local/sbin"
## Set Locale
export LC_ALL="en_US.UTF-8"
export LC_CTYPE="en_US.UTF-8"
export LANG="en_US.UTF-8"
## Instruction:
Revert "Add /usr/local/sbin in $PATH"
This reverts commit fd131ca67fab8608af69a652b06989c6dbfbd10d.
## Code After:
export EDITOR="nvim"
export XDG_CONFIG_HOME="$HOME/.config"
export PAGER="less"
export LESS="-g -i -M -R -S -W -z-4 -x4"
export PATH="$HOME/.bin:$PATH"
## Set Locale
export LC_ALL="en_US.UTF-8"
export LC_CTYPE="en_US.UTF-8"
export LANG="en_US.UTF-8"
|
410ff51047f076982f54b3b580a45ca190a6befd
|
contracts/Adjudicator.sol
|
contracts/Adjudicator.sol
|
contract Adjudicator {
bool public frozen = false;
uint nonce = 0;
uint lastTimestamp = 0;
address owner;
uint timeout;
bytes32[] state;
modifier onlyOwner {
if (msg.sender == owner) {
_
} else {
throw;
}
}
modifier notFrozen {
if (frozen) {
throw;
} else {
_
}
}
function Adjudicator(address _owner, uint _timeout) {
owner = _owner;
timeout = _timeout;
}
function getStateLength() constant returns (uint) {
return state.length;
}
function getStateAt(uint _index) constant returns (bytes32) {
return state[_index];
}
function submit(uint _newNonce, bytes32[] _state)
external
onlyOwner
notFrozen
returns (bool)
{
if (_newNonce > nonce) {
nonce = _newNonce;
state = _state;
return true;
} else {
return false;
}
}
function giveConsent() external onlyOwner notFrozen {
frozen = true;
}
function finalize() external notFrozen returns (bool) {
if (lastTimestamp > 0 && now > lastTimestamp + timeout) {
frozen = true;
return true;
} else {
return false;
}
}
function kill(address _recipient) external onlyOwner {
selfdestruct(_recipient);
}
}
|
contract Adjudicator {
bool public frozen = false;
uint nonce = 0;
uint lastTimestamp = 0;
address owner;
uint timeout;
bytes32 public stateHash;
modifier onlyOwner {
if (msg.sender == owner) {
_
} else {
throw;
}
}
modifier notFrozen {
if (frozen) {
throw;
} else {
_
}
}
function Adjudicator(address _owner, uint _timeout) {
owner = _owner;
timeout = _timeout;
}
function submit(uint _newNonce, bytes32 _stateHash)
external
onlyOwner
notFrozen
returns (bool)
{
if (_newNonce > nonce) {
nonce = _newNonce;
stateHash = _stateHash;
return true;
} else {
return false;
}
}
function giveConsent() external onlyOwner notFrozen {
frozen = true;
}
function finalize() external notFrozen returns (bool) {
if (lastTimestamp > 0 && now > lastTimestamp + timeout) {
frozen = true;
return true;
} else {
return false;
}
}
function kill(address _recipient) external onlyOwner {
selfdestruct(_recipient);
}
}
|
Change to support hash of state
|
Change to support hash of state
|
Solidity
|
mit
|
ledgerlabs/toy-state-channels,ledgerlabs/toy-state-channels
|
solidity
|
## Code Before:
contract Adjudicator {
bool public frozen = false;
uint nonce = 0;
uint lastTimestamp = 0;
address owner;
uint timeout;
bytes32[] state;
modifier onlyOwner {
if (msg.sender == owner) {
_
} else {
throw;
}
}
modifier notFrozen {
if (frozen) {
throw;
} else {
_
}
}
function Adjudicator(address _owner, uint _timeout) {
owner = _owner;
timeout = _timeout;
}
function getStateLength() constant returns (uint) {
return state.length;
}
function getStateAt(uint _index) constant returns (bytes32) {
return state[_index];
}
function submit(uint _newNonce, bytes32[] _state)
external
onlyOwner
notFrozen
returns (bool)
{
if (_newNonce > nonce) {
nonce = _newNonce;
state = _state;
return true;
} else {
return false;
}
}
function giveConsent() external onlyOwner notFrozen {
frozen = true;
}
function finalize() external notFrozen returns (bool) {
if (lastTimestamp > 0 && now > lastTimestamp + timeout) {
frozen = true;
return true;
} else {
return false;
}
}
function kill(address _recipient) external onlyOwner {
selfdestruct(_recipient);
}
}
## Instruction:
Change to support hash of state
## Code After:
contract Adjudicator {
bool public frozen = false;
uint nonce = 0;
uint lastTimestamp = 0;
address owner;
uint timeout;
bytes32 public stateHash;
modifier onlyOwner {
if (msg.sender == owner) {
_
} else {
throw;
}
}
modifier notFrozen {
if (frozen) {
throw;
} else {
_
}
}
function Adjudicator(address _owner, uint _timeout) {
owner = _owner;
timeout = _timeout;
}
function submit(uint _newNonce, bytes32 _stateHash)
external
onlyOwner
notFrozen
returns (bool)
{
if (_newNonce > nonce) {
nonce = _newNonce;
stateHash = _stateHash;
return true;
} else {
return false;
}
}
function giveConsent() external onlyOwner notFrozen {
frozen = true;
}
function finalize() external notFrozen returns (bool) {
if (lastTimestamp > 0 && now > lastTimestamp + timeout) {
frozen = true;
return true;
} else {
return false;
}
}
function kill(address _recipient) external onlyOwner {
selfdestruct(_recipient);
}
}
|
dfc3c21f1c7864ee78182bec0800fd957599d355
|
marco/portal/base/templates/portal/components/media_item.html
|
marco/portal/base/templates/portal/components/media_item.html
|
{% load wagtailcore_tags %}
<div class="media-item media">
{% if item.media_position == 'left' %}
{% if item.media_image %}
<div class="media-left thumbnail">
{% include "portal/components/media.html" %}
</div>
{% endif %}
{% if item.media_embed_url %}
<div class="media-full">
{% include "portal/components/media.html" %}
</div>
{% endif %}
{% endif %}
<div class="media-body">
<div class="item-text">
{% block body %}
{{ item.body|richtext }}
{% endblock %}
</div>
</div>
{% if item.media_position == 'right' %}
{% if item.media_image %}
<div class="media-right thumbnail">
{% include "portal/components/media.html" %}
</div>
{% endif %}
{% if item.media_embed_url %}
<div class="media-full">
{% include "portal/components/media.html" %}
</div>
{% endif %}
{% endif %}
</div>
{% if item.media_image and item.media_position == 'full' %}
<div class="media-full">
{% include "portal/components/media.html" %}
</div>
{% endif %}
|
{% load wagtailcore_tags %}
<div class="media-item media">
{% if item.media_position == 'left' %}
{% if item.media_image or item.media_embed_url %}
<div class="media-left thumbnail">
{% include "portal/components/media.html" %}
</div>
{% endif %}
{% endif %}
<div class="media-body">
<div class="item-text">
{% block body %}
{{ item.body|richtext }}
{% endblock %}
</div>
</div>
{% if item.media_position == 'right' %}
{% if item.media_image or item.media_embed_url %}
<div class="media-right thumbnail">
{% include "portal/components/media.html" %}
</div>
{% endif %}
{% endif %}
</div>
{% if item.media_position == 'full' %}
{% if item.media_image or item.media_embed_url %}
<div class="media-full">
{% include "portal/components/media.html" %}
</div>
{% endif %}
{% endif %}
|
Fix up video embeds even better.
|
POR-401: Fix up video embeds even better.
|
HTML
|
isc
|
Ecotrust/marineplanner-core,MidAtlanticPortal/marco-portal2,MidAtlanticPortal/marco-portal2,MidAtlanticPortal/marco-portal2,Ecotrust/marineplanner-core,Ecotrust/marineplanner-core,Ecotrust/marineplanner-core,Ecotrust/marineplanner-core,MidAtlanticPortal/marco-portal2
|
html
|
## Code Before:
{% load wagtailcore_tags %}
<div class="media-item media">
{% if item.media_position == 'left' %}
{% if item.media_image %}
<div class="media-left thumbnail">
{% include "portal/components/media.html" %}
</div>
{% endif %}
{% if item.media_embed_url %}
<div class="media-full">
{% include "portal/components/media.html" %}
</div>
{% endif %}
{% endif %}
<div class="media-body">
<div class="item-text">
{% block body %}
{{ item.body|richtext }}
{% endblock %}
</div>
</div>
{% if item.media_position == 'right' %}
{% if item.media_image %}
<div class="media-right thumbnail">
{% include "portal/components/media.html" %}
</div>
{% endif %}
{% if item.media_embed_url %}
<div class="media-full">
{% include "portal/components/media.html" %}
</div>
{% endif %}
{% endif %}
</div>
{% if item.media_image and item.media_position == 'full' %}
<div class="media-full">
{% include "portal/components/media.html" %}
</div>
{% endif %}
## Instruction:
POR-401: Fix up video embeds even better.
## Code After:
{% load wagtailcore_tags %}
<div class="media-item media">
{% if item.media_position == 'left' %}
{% if item.media_image or item.media_embed_url %}
<div class="media-left thumbnail">
{% include "portal/components/media.html" %}
</div>
{% endif %}
{% endif %}
<div class="media-body">
<div class="item-text">
{% block body %}
{{ item.body|richtext }}
{% endblock %}
</div>
</div>
{% if item.media_position == 'right' %}
{% if item.media_image or item.media_embed_url %}
<div class="media-right thumbnail">
{% include "portal/components/media.html" %}
</div>
{% endif %}
{% endif %}
</div>
{% if item.media_position == 'full' %}
{% if item.media_image or item.media_embed_url %}
<div class="media-full">
{% include "portal/components/media.html" %}
</div>
{% endif %}
{% endif %}
|
899a528f8a3cf9495cd1111793c2c0a4f0b07504
|
src/components/item_card/SkillTag.vue
|
src/components/item_card/SkillTag.vue
|
<template>
</template>
<script>
export default {
name: "skill-tag"
}
</script>
<style scoped>
</style>
|
<template>
<span class="tag is-info">
<span class="icon">
<farming-icon v-if="skill === 'farming'"/>
<mining-icon v-if="skill === 'mining'"/>
<foraging-icon v-if="skill === 'foraging'"/>
<fishing-icon v-if="skill === 'fishing'"/>
<combat-icon v-if="skill === 'combat'"/>
</span>
</span>
</template>
<script>
import Skills from '@/assets/game_data/skills.json'
import FarmingIcon from 'mdi-vue/CowIcon'
import MiningIcon from 'mdi-vue/DiamondIcon'
import ForagingIcon from 'mdi-vue/MushroomIcon'
import FishingIcon from 'mdi-vue/FishIcon'
import CombatIcon from 'mdi-vue/SwordIcon'
export default {
name: 'skill-tag',
props: {
skill: {
type: String,
required: true,
default: 'farming',
validator: function (value) {
return value.toLowerCase() in Skills
}
}
},
components: {
FarmingIcon,
MiningIcon,
ForagingIcon,
FishingIcon,
CombatIcon
}
}
</script>
<style scoped>
</style>
|
Add skill icons in tag.
|
Add skill icons in tag.
|
Vue
|
mit
|
kihashi/stardew_community_checklist,kihashi/stardew_community_checklist
|
vue
|
## Code Before:
<template>
</template>
<script>
export default {
name: "skill-tag"
}
</script>
<style scoped>
</style>
## Instruction:
Add skill icons in tag.
## Code After:
<template>
<span class="tag is-info">
<span class="icon">
<farming-icon v-if="skill === 'farming'"/>
<mining-icon v-if="skill === 'mining'"/>
<foraging-icon v-if="skill === 'foraging'"/>
<fishing-icon v-if="skill === 'fishing'"/>
<combat-icon v-if="skill === 'combat'"/>
</span>
</span>
</template>
<script>
import Skills from '@/assets/game_data/skills.json'
import FarmingIcon from 'mdi-vue/CowIcon'
import MiningIcon from 'mdi-vue/DiamondIcon'
import ForagingIcon from 'mdi-vue/MushroomIcon'
import FishingIcon from 'mdi-vue/FishIcon'
import CombatIcon from 'mdi-vue/SwordIcon'
export default {
name: 'skill-tag',
props: {
skill: {
type: String,
required: true,
default: 'farming',
validator: function (value) {
return value.toLowerCase() in Skills
}
}
},
components: {
FarmingIcon,
MiningIcon,
ForagingIcon,
FishingIcon,
CombatIcon
}
}
</script>
<style scoped>
</style>
|
f998f5fe7aedb8e33a81727c8371b690a698c73b
|
src/browser.js
|
src/browser.js
|
/*
*
* This is used to build the bundle with browserify.
*
* The bundle is used by people who doesn't use browserify.
* Those who use browserify will install with npm and require the module,
* the package.json file points to index.js.
*/
import Auth0Lock from './classic';
import Auth0LockPasswordless from './passwordless';
global.window.Auth0Lock = Auth0Lock;
global.window.Auth0LockPasswordless = Auth0LockPasswordless;
//use amd or just throught to window object.
if (typeof global.window.define == 'function' && global.window.define.amd) {
global.window.define('auth0Lock', function () { return Auth0Lock; });
global.window.define('auth0LockPasswordless', function () { return Auth0LockPasswordless; });
} else if (global.window) {
global.window.Auth0Lock = Auth0Lock;
global.window.Auth0LockPasswordless = Auth0LockPasswordless;
}
|
/*
*
* This is used to build the bundle with browserify.
*
* The bundle is used by people who doesn't use browserify.
* Those who use browserify will install with npm and require the module,
* the package.json file points to index.js.
*/
import Auth0Lock from './classic';
// import Auth0LockPasswordless from './passwordless';
global.window.Auth0Lock = Auth0Lock;
// global.window.Auth0LockPasswordless = Auth0LockPasswordless;
//use amd or just throught to window object.
if (typeof global.window.define == 'function' && global.window.define.amd) {
global.window.define('auth0Lock', function () { return Auth0Lock; });
// global.window.define('auth0LockPasswordless', function () { return Auth0LockPasswordless; });
} else if (global.window) {
global.window.Auth0Lock = Auth0Lock;
// global.window.Auth0LockPasswordless = Auth0LockPasswordless;
}
|
Exclude passwordless stuff from build
|
Exclude passwordless stuff from build
|
JavaScript
|
mit
|
mike-casas/lock,mike-casas/lock,mike-casas/lock
|
javascript
|
## Code Before:
/*
*
* This is used to build the bundle with browserify.
*
* The bundle is used by people who doesn't use browserify.
* Those who use browserify will install with npm and require the module,
* the package.json file points to index.js.
*/
import Auth0Lock from './classic';
import Auth0LockPasswordless from './passwordless';
global.window.Auth0Lock = Auth0Lock;
global.window.Auth0LockPasswordless = Auth0LockPasswordless;
//use amd or just throught to window object.
if (typeof global.window.define == 'function' && global.window.define.amd) {
global.window.define('auth0Lock', function () { return Auth0Lock; });
global.window.define('auth0LockPasswordless', function () { return Auth0LockPasswordless; });
} else if (global.window) {
global.window.Auth0Lock = Auth0Lock;
global.window.Auth0LockPasswordless = Auth0LockPasswordless;
}
## Instruction:
Exclude passwordless stuff from build
## Code After:
/*
*
* This is used to build the bundle with browserify.
*
* The bundle is used by people who doesn't use browserify.
* Those who use browserify will install with npm and require the module,
* the package.json file points to index.js.
*/
import Auth0Lock from './classic';
// import Auth0LockPasswordless from './passwordless';
global.window.Auth0Lock = Auth0Lock;
// global.window.Auth0LockPasswordless = Auth0LockPasswordless;
//use amd or just throught to window object.
if (typeof global.window.define == 'function' && global.window.define.amd) {
global.window.define('auth0Lock', function () { return Auth0Lock; });
// global.window.define('auth0LockPasswordless', function () { return Auth0LockPasswordless; });
} else if (global.window) {
global.window.Auth0Lock = Auth0Lock;
// global.window.Auth0LockPasswordless = Auth0LockPasswordless;
}
|
e5a3a72f3418dda2ba1bb574437f18387935aec8
|
README.md
|
README.md
|
U-Prove
=======
My implementation of Microsoft U-Prove for the Identity and Privacy couse
|
U-Prove
=======
My implementation of Microsoft U-Prove for the Identity and Privacy course.
NB! Due to time constrains I did not finish the implementation fully, thus
the code here cannot be used as a reference implementation.
|
Update readme with a warning of half baked implementation
|
Update readme with a warning of half baked implementation
|
Markdown
|
mit
|
tbrixen/u-prove
|
markdown
|
## Code Before:
U-Prove
=======
My implementation of Microsoft U-Prove for the Identity and Privacy couse
## Instruction:
Update readme with a warning of half baked implementation
## Code After:
U-Prove
=======
My implementation of Microsoft U-Prove for the Identity and Privacy course.
NB! Due to time constrains I did not finish the implementation fully, thus
the code here cannot be used as a reference implementation.
|
938702e3eba45634c21cac145aa37144b3a94867
|
src/resources/views/administrator/welcome.blade.php
|
src/resources/views/administrator/welcome.blade.php
|
@extends('admin::layouts.master')
@section('page-title')
@stop
@section('content')
@include('administrator.dashboard.stats')
<div class="row">
<div class="col-md-6">
@include('administrator.dashboard.latest')
</div>
<div class="col-md-6">
@include('administrator.dashboard.popular')
</div>
</div>
<div class="row">
<div class="col-md-6">
@include('administrator.dashboard.config')
</div>
</div>
@endsection
|
@extends('admin::layouts.master')
@section('page-title')
@stop
@section('content')
@include('administrator.dashboard.stats')
<div class="row">
<div class="col-md-6">
@include('administrator.dashboard.latest')
@include('administrator.dashboard.config')
</div>
<div class="col-md-6">
@include('administrator.dashboard.popular')
</div>
</div>
@endsection
|
Include config on latest wrapper.
|
Include config on latest wrapper.
|
PHP
|
mit
|
yajra/cms-core,yajra/cms-core
|
php
|
## Code Before:
@extends('admin::layouts.master')
@section('page-title')
@stop
@section('content')
@include('administrator.dashboard.stats')
<div class="row">
<div class="col-md-6">
@include('administrator.dashboard.latest')
</div>
<div class="col-md-6">
@include('administrator.dashboard.popular')
</div>
</div>
<div class="row">
<div class="col-md-6">
@include('administrator.dashboard.config')
</div>
</div>
@endsection
## Instruction:
Include config on latest wrapper.
## Code After:
@extends('admin::layouts.master')
@section('page-title')
@stop
@section('content')
@include('administrator.dashboard.stats')
<div class="row">
<div class="col-md-6">
@include('administrator.dashboard.latest')
@include('administrator.dashboard.config')
</div>
<div class="col-md-6">
@include('administrator.dashboard.popular')
</div>
</div>
@endsection
|
4a6e1615894f998d8e286e26f8fd27371d0a103a
|
app/styles/components/user/skills-list.scss
|
app/styles/components/user/skills-list.scss
|
.user__skills-list {
ul {
align-items: flex-start;
display: flex;
margin-top: 10px;
li {
background: #E8EBED;
border-radius: 2px;
color: #333;
font-weight: 600;
margin-right: 5px;
padding: 4px 7px;
}
}
}
|
.user__skills-list {
ul {
margin-top: 10px;
li {
background: #E8EBED;
border-radius: 2px;
color: #333;
display: inline-block;
font-weight: 600;
margin: 0 3px 5px 0;
padding: 4px 7px;
}
}
}
|
Fix user skills list display
|
Fix user skills list display
|
SCSS
|
mit
|
jderr-mx/code-corps-ember,code-corps/code-corps-ember,jderr-mx/code-corps-ember,code-corps/code-corps-ember
|
scss
|
## Code Before:
.user__skills-list {
ul {
align-items: flex-start;
display: flex;
margin-top: 10px;
li {
background: #E8EBED;
border-radius: 2px;
color: #333;
font-weight: 600;
margin-right: 5px;
padding: 4px 7px;
}
}
}
## Instruction:
Fix user skills list display
## Code After:
.user__skills-list {
ul {
margin-top: 10px;
li {
background: #E8EBED;
border-radius: 2px;
color: #333;
display: inline-block;
font-weight: 600;
margin: 0 3px 5px 0;
padding: 4px 7px;
}
}
}
|
c8a46f504f90eb1f049025f531d046fa2631594d
|
vm/null.go
|
vm/null.go
|
package vm
var (
nullClass *RNull
// NULL represents Goby's null objects.
NULL *NullObject
)
// RNull is the built in class of Goby's null objects.
type RNull struct {
*BaseClass
}
// NullObject represnts the null value in Goby.
type NullObject struct {
Class *RNull
}
// toString returns the name of NullObject
func (n *NullObject) toString() string {
return "nil"
}
func (n *NullObject) toJSON() string {
return "null"
}
func (n *NullObject) returnClass() Class {
return n.Class
}
func initNullClass() {
baseClass := &BaseClass{Name: "Null", Methods: newEnvironment(), ClassMethods: newEnvironment(), Class: classClass, pseudoSuperClass: objectClass}
nc := &RNull{BaseClass: baseClass}
nc.setBuiltInMethods(builtInNullInstanceMethods, false)
nullClass = nc
NULL = &NullObject{Class: nullClass}
}
var builtInNullInstanceMethods = []*BuiltInMethodObject{
{
Name: "!",
Fn: func(receiver Object) builtinMethodBody {
return func(t *thread, args []Object, blockFrame *callFrame) Object {
return TRUE
}
},
},
}
|
package vm
var (
nullClass *RNull
// NULL represents Goby's null objects.
NULL *NullObject
)
// RNull is the built in class of Goby's null objects.
type RNull struct {
*BaseClass
}
// NullObject (`nil`) represents the null value in Goby.
// `nil` is convert into `null` when exported to JSON format.
// Cannot perform `Null.new`.
type NullObject struct {
Class *RNull
}
// toString returns the name of NullObject
func (n *NullObject) toString() string {
return "nil"
}
func (n *NullObject) toJSON() string {
return "null"
}
func (n *NullObject) returnClass() Class {
return n.Class
}
func initNullClass() {
baseClass := &BaseClass{Name: "Null", Methods: newEnvironment(), ClassMethods: newEnvironment(), Class: classClass, pseudoSuperClass: objectClass}
nc := &RNull{BaseClass: baseClass}
nc.setBuiltInMethods(builtInNullInstanceMethods, false)
nullClass = nc
NULL = &NullObject{Class: nullClass}
}
var builtInNullInstanceMethods = []*BuiltInMethodObject{
{
// Returns true: the flipped boolean value of nil object.
//
// ```ruby
// a = nil
// !a
// # => true
// ```
Name: "!",
Fn: func(receiver Object) builtinMethodBody {
return func(t *thread, args []Object, blockFrame *callFrame) Object {
return TRUE
}
},
},
}
|
Add API doc to NullObject
|
Add API doc to NullObject
|
Go
|
mit
|
Maxwell-Alexius/goby,hachi8833/goby,Maxwell-Alexius/goby,Maxwell-Alexius/goby,goby-lang/goby,goby-lang/goby,goby-lang/goby,st0012/Rooby,hachi8833/goby,st0012/Rooby,hachi8833/goby
|
go
|
## Code Before:
package vm
var (
nullClass *RNull
// NULL represents Goby's null objects.
NULL *NullObject
)
// RNull is the built in class of Goby's null objects.
type RNull struct {
*BaseClass
}
// NullObject represnts the null value in Goby.
type NullObject struct {
Class *RNull
}
// toString returns the name of NullObject
func (n *NullObject) toString() string {
return "nil"
}
func (n *NullObject) toJSON() string {
return "null"
}
func (n *NullObject) returnClass() Class {
return n.Class
}
func initNullClass() {
baseClass := &BaseClass{Name: "Null", Methods: newEnvironment(), ClassMethods: newEnvironment(), Class: classClass, pseudoSuperClass: objectClass}
nc := &RNull{BaseClass: baseClass}
nc.setBuiltInMethods(builtInNullInstanceMethods, false)
nullClass = nc
NULL = &NullObject{Class: nullClass}
}
var builtInNullInstanceMethods = []*BuiltInMethodObject{
{
Name: "!",
Fn: func(receiver Object) builtinMethodBody {
return func(t *thread, args []Object, blockFrame *callFrame) Object {
return TRUE
}
},
},
}
## Instruction:
Add API doc to NullObject
## Code After:
package vm
var (
nullClass *RNull
// NULL represents Goby's null objects.
NULL *NullObject
)
// RNull is the built in class of Goby's null objects.
type RNull struct {
*BaseClass
}
// NullObject (`nil`) represents the null value in Goby.
// `nil` is convert into `null` when exported to JSON format.
// Cannot perform `Null.new`.
type NullObject struct {
Class *RNull
}
// toString returns the name of NullObject
func (n *NullObject) toString() string {
return "nil"
}
func (n *NullObject) toJSON() string {
return "null"
}
func (n *NullObject) returnClass() Class {
return n.Class
}
func initNullClass() {
baseClass := &BaseClass{Name: "Null", Methods: newEnvironment(), ClassMethods: newEnvironment(), Class: classClass, pseudoSuperClass: objectClass}
nc := &RNull{BaseClass: baseClass}
nc.setBuiltInMethods(builtInNullInstanceMethods, false)
nullClass = nc
NULL = &NullObject{Class: nullClass}
}
var builtInNullInstanceMethods = []*BuiltInMethodObject{
{
// Returns true: the flipped boolean value of nil object.
//
// ```ruby
// a = nil
// !a
// # => true
// ```
Name: "!",
Fn: func(receiver Object) builtinMethodBody {
return func(t *thread, args []Object, blockFrame *callFrame) Object {
return TRUE
}
},
},
}
|
9b453d65f92670a9016441e48e560e6c978d55f1
|
spec/connection_spec.rb
|
spec/connection_spec.rb
|
require 'oculus'
describe Oculus::Connection do
describe "non-nonexistent adapter" do
it "raises an adapter not found error" do
lambda {
Oculus::Connection.connect adapter: 'nonexistent-adapter'
}.should raise_error Oculus::Connection::AdapterNotFound, "nonexistent-adapter is not currently implemented. You should write it!"
end
end
describe "mysql adapter option" do
it "returns a new instance of MySql adapter" do
adapter = Oculus::Connection.connect adapter: 'mysql'
adapter.should be_an_instance_of Oculus::Connection::Mysql2
end
end
describe "postgres adapter option" do
it "returns a new instance of Postgres adapter" do
adapter = Oculus::Connection.connect adapter: 'postgres'
adapter.should be_an_instance_of Oculus::Connection::Postgres
end
end
describe "pg adapter" do
it "returns a new instance of Postgres adapter" do
adapter = Oculus::Connection.connect adapter: 'pg'
adapter.should be_an_instance_of Oculus::Connection::Postgres
end
end
end
|
require 'oculus'
describe Oculus::Connection do
describe "non-nonexistent adapter" do
it "raises an adapter not found error" do
lambda {
Oculus::Connection.connect adapter: 'nonexistent-adapter'
}.should raise_error Oculus::Connection::AdapterNotFound, "nonexistent-adapter is not currently implemented. You should write it!"
end
end
describe "mysql adapter option" do
it "returns a new instance of MySQL adapter" do
adapter = Oculus::Connection.connect adapter: 'mysql'
adapter.should be_an_instance_of Oculus::Connection::Mysql2
end
end
describe "postgres adapter option" do
it "returns a new instance of Postgres adapter" do
adapter = Oculus::Connection.connect adapter: 'postgres', database: 'oculus_test'
adapter.should be_an_instance_of Oculus::Connection::Postgres
end
end
describe "pg adapter alias" do
it "returns a new instance of Postgres adapter" do
adapter = Oculus::Connection.connect adapter: 'pg', database: 'oculus_test'
adapter.should be_an_instance_of Oculus::Connection::Postgres
end
end
end
|
Clean up Postgres bits of connection spec
|
Clean up Postgres bits of connection spec
|
Ruby
|
mit
|
paulrosania/oculus,paulrosania/oculus
|
ruby
|
## Code Before:
require 'oculus'
describe Oculus::Connection do
describe "non-nonexistent adapter" do
it "raises an adapter not found error" do
lambda {
Oculus::Connection.connect adapter: 'nonexistent-adapter'
}.should raise_error Oculus::Connection::AdapterNotFound, "nonexistent-adapter is not currently implemented. You should write it!"
end
end
describe "mysql adapter option" do
it "returns a new instance of MySql adapter" do
adapter = Oculus::Connection.connect adapter: 'mysql'
adapter.should be_an_instance_of Oculus::Connection::Mysql2
end
end
describe "postgres adapter option" do
it "returns a new instance of Postgres adapter" do
adapter = Oculus::Connection.connect adapter: 'postgres'
adapter.should be_an_instance_of Oculus::Connection::Postgres
end
end
describe "pg adapter" do
it "returns a new instance of Postgres adapter" do
adapter = Oculus::Connection.connect adapter: 'pg'
adapter.should be_an_instance_of Oculus::Connection::Postgres
end
end
end
## Instruction:
Clean up Postgres bits of connection spec
## Code After:
require 'oculus'
describe Oculus::Connection do
describe "non-nonexistent adapter" do
it "raises an adapter not found error" do
lambda {
Oculus::Connection.connect adapter: 'nonexistent-adapter'
}.should raise_error Oculus::Connection::AdapterNotFound, "nonexistent-adapter is not currently implemented. You should write it!"
end
end
describe "mysql adapter option" do
it "returns a new instance of MySQL adapter" do
adapter = Oculus::Connection.connect adapter: 'mysql'
adapter.should be_an_instance_of Oculus::Connection::Mysql2
end
end
describe "postgres adapter option" do
it "returns a new instance of Postgres adapter" do
adapter = Oculus::Connection.connect adapter: 'postgres', database: 'oculus_test'
adapter.should be_an_instance_of Oculus::Connection::Postgres
end
end
describe "pg adapter alias" do
it "returns a new instance of Postgres adapter" do
adapter = Oculus::Connection.connect adapter: 'pg', database: 'oculus_test'
adapter.should be_an_instance_of Oculus::Connection::Postgres
end
end
end
|
d647fa03f16f315d9a2b0231fd22ddbb1ec507f1
|
spec/features/override_sendgrid_spec.rb
|
spec/features/override_sendgrid_spec.rb
|
require 'poltergeist_helper'
RSpec.feature "overriding Sendgrid" do
include ActiveJobHelper
include FeaturesHelper
before do
ActionMailer::Base.deliveries.clear
end
scenario 'overriding spam report' do
allow(SendgridHelper).to receive(:spam_reported?).and_return(true)
visit '/prisoner-details'
enter_prisoner_information
enter_visitor_information
click_button 'Continue'
expect(page).to have_text('marked as spam')
check 'Tick this box to confirm you’d like us to try sending messages to you again'
click_button 'Continue'
expect(page).to have_content('When do you want to visit?')
select_a_slot
click_button 'Continue'
expect(page).to have_content('Check your request')
click_button 'Send request'
expect(page).to have_content('Your request is being processed')
end
end
|
require 'poltergeist_helper'
RSpec.feature "overriding Sendgrid" do
include ActiveJobHelper
include FeaturesHelper
before do
ActionMailer::Base.deliveries.clear
end
scenario 'overriding spam report' do
allow(SendgridHelper).to receive(:spam_reported?).and_return(true)
visit '/prisoner-details'
enter_prisoner_information
enter_visitor_information
click_button 'Continue'
expect(page).to have_text('marked as spam')
check 'Tick this box to confirm you’d like us to try sending messages to you again'
click_button 'Continue'
expect(page).to have_content('When do you want to visit?')
select_a_slot
click_button 'Continue'
expect(page).to have_content('Check your request')
click_button 'Send request'
expect(page).to have_content('Your request is being processed')
end
scenario 'overriding bounce' do
allow(SendgridHelper).to receive(:bounced?).and_return(true)
visit '/prisoner-details'
enter_prisoner_information
enter_visitor_information
click_button 'Continue'
expect(page).to have_text('returned in the past')
check 'Tick this box to confirm you’d like us to try sending messages to you again'
click_button 'Continue'
expect(page).to have_content('When do you want to visit?')
select_a_slot
click_button 'Continue'
expect(page).to have_content('Check your request')
click_button 'Send request'
expect(page).to have_content('Your request is being processed')
end
end
|
Add end-to-end bounce override spec
|
Add end-to-end bounce override spec
|
Ruby
|
mit
|
ministryofjustice/prison-visits,ministryofjustice/prison-visits,ministryofjustice/prison-visits
|
ruby
|
## Code Before:
require 'poltergeist_helper'
RSpec.feature "overriding Sendgrid" do
include ActiveJobHelper
include FeaturesHelper
before do
ActionMailer::Base.deliveries.clear
end
scenario 'overriding spam report' do
allow(SendgridHelper).to receive(:spam_reported?).and_return(true)
visit '/prisoner-details'
enter_prisoner_information
enter_visitor_information
click_button 'Continue'
expect(page).to have_text('marked as spam')
check 'Tick this box to confirm you’d like us to try sending messages to you again'
click_button 'Continue'
expect(page).to have_content('When do you want to visit?')
select_a_slot
click_button 'Continue'
expect(page).to have_content('Check your request')
click_button 'Send request'
expect(page).to have_content('Your request is being processed')
end
end
## Instruction:
Add end-to-end bounce override spec
## Code After:
require 'poltergeist_helper'
RSpec.feature "overriding Sendgrid" do
include ActiveJobHelper
include FeaturesHelper
before do
ActionMailer::Base.deliveries.clear
end
scenario 'overriding spam report' do
allow(SendgridHelper).to receive(:spam_reported?).and_return(true)
visit '/prisoner-details'
enter_prisoner_information
enter_visitor_information
click_button 'Continue'
expect(page).to have_text('marked as spam')
check 'Tick this box to confirm you’d like us to try sending messages to you again'
click_button 'Continue'
expect(page).to have_content('When do you want to visit?')
select_a_slot
click_button 'Continue'
expect(page).to have_content('Check your request')
click_button 'Send request'
expect(page).to have_content('Your request is being processed')
end
scenario 'overriding bounce' do
allow(SendgridHelper).to receive(:bounced?).and_return(true)
visit '/prisoner-details'
enter_prisoner_information
enter_visitor_information
click_button 'Continue'
expect(page).to have_text('returned in the past')
check 'Tick this box to confirm you’d like us to try sending messages to you again'
click_button 'Continue'
expect(page).to have_content('When do you want to visit?')
select_a_slot
click_button 'Continue'
expect(page).to have_content('Check your request')
click_button 'Send request'
expect(page).to have_content('Your request is being processed')
end
end
|
fe0eee2d9d3a6b807153a26f9634df58e571cb23
|
README.md
|
README.md
|
Just Another Movies List App.
<table>
<tbody>
<tr>
<th>App Version</th>
<td>v1.0.0</td>
</tr>
<tr>
<th>Meteor Version</th>
<td>v1.4.4.1</td>
</tr>
</tbody>
</table>
##
### Up and running steps:
1. install meteorjs from [here](https://www.meteor.com/install)
2. execute these from your terminal:
```
$ meteor npm install
$ meteor npm run start
```
3: open your browser to http://localhost:3000
##
### Coming soon features:
* REST api endpoints
* MobX UI states
|
Just Another Movies List App.
<table>
<tbody>
<tr>
<th>App Version</th>
<td>v1.0.0</td>
</tr>
<tr>
<th>Meteor Chef Base Version</th>
<td>v4.15.0</td>
</tr>
<tr>
<th>Meteor Version</th>
<td>v1.4.4.1</td>
</tr>
</tbody>
</table>
##
### Up and running steps:
1. install meteorjs from [here](https://www.meteor.com/install)
2. execute these from your terminal:
```
$ meteor npm install
$ meteor npm run start
```
3: open your browser to http://localhost:3000
##
### Coming soon features:
* REST api endpoints
* MobX UI states
|
Add meteor chef base version info
|
Add meteor chef base version info
|
Markdown
|
mit
|
zarazi/movies-listie,zarazi/movies-listie
|
markdown
|
## Code Before:
Just Another Movies List App.
<table>
<tbody>
<tr>
<th>App Version</th>
<td>v1.0.0</td>
</tr>
<tr>
<th>Meteor Version</th>
<td>v1.4.4.1</td>
</tr>
</tbody>
</table>
##
### Up and running steps:
1. install meteorjs from [here](https://www.meteor.com/install)
2. execute these from your terminal:
```
$ meteor npm install
$ meteor npm run start
```
3: open your browser to http://localhost:3000
##
### Coming soon features:
* REST api endpoints
* MobX UI states
## Instruction:
Add meteor chef base version info
## Code After:
Just Another Movies List App.
<table>
<tbody>
<tr>
<th>App Version</th>
<td>v1.0.0</td>
</tr>
<tr>
<th>Meteor Chef Base Version</th>
<td>v4.15.0</td>
</tr>
<tr>
<th>Meteor Version</th>
<td>v1.4.4.1</td>
</tr>
</tbody>
</table>
##
### Up and running steps:
1. install meteorjs from [here](https://www.meteor.com/install)
2. execute these from your terminal:
```
$ meteor npm install
$ meteor npm run start
```
3: open your browser to http://localhost:3000
##
### Coming soon features:
* REST api endpoints
* MobX UI states
|
d78222041f331810690b169ff50b9ae60a307b1d
|
plugin/pivo.vim
|
plugin/pivo.vim
|
" BEGIN
if exists("g:loaded_VimPivo") || &cp
finish
endif
let g:loaded_VimPivo = 1
let s:keepcpo = &cpo
set cpo&vim
" END
let &cpo= s:keepcpo
unlet s:keepcpo
|
" BEGIN
if exists("g:loaded_pivo") || &cp
finish
endif
let g:loaded_pivo = 1
let s:keepcpo = &cpo
set cpo&vim
let PivoBufferName = "__Pivotal__"
function! s:PivoBufferOpen()
" Check whether the scratch buffer is already created
let scr_bufnum = bufnr(g:PivoBufferName)
if scr_bufnum == -1
" open a new scratch buffer
exe "new " . g:PivoBufferName
else
" Pivo buffer is already created,
" check whether it is open in one of the windows.
let scr_winnum = bufwinnr(scr_bufnum)
if scr_winnum != -1
" Jump to the window which has the scratch buffer if we are not
" already in that window
if winnr() != scr_winnum
exe scr_winnum . "wincmd w"
endif
else
" Create a new scratch buffer
exe "split +buffer" . scr_bufnum
endif
endif
endfunction
command! -nargs=0 Pivo call s:PivoBufferOpen()
" END
let &cpo= s:keepcpo
unlet s:keepcpo
|
Add :Pivo command which opens Pivotal buffer
|
Add :Pivo command which opens Pivotal buffer
|
VimL
|
mit
|
netguru-hackathon/vim-pivo,netguru-hackathon/vim-pivo
|
viml
|
## Code Before:
" BEGIN
if exists("g:loaded_VimPivo") || &cp
finish
endif
let g:loaded_VimPivo = 1
let s:keepcpo = &cpo
set cpo&vim
" END
let &cpo= s:keepcpo
unlet s:keepcpo
## Instruction:
Add :Pivo command which opens Pivotal buffer
## Code After:
" BEGIN
if exists("g:loaded_pivo") || &cp
finish
endif
let g:loaded_pivo = 1
let s:keepcpo = &cpo
set cpo&vim
let PivoBufferName = "__Pivotal__"
function! s:PivoBufferOpen()
" Check whether the scratch buffer is already created
let scr_bufnum = bufnr(g:PivoBufferName)
if scr_bufnum == -1
" open a new scratch buffer
exe "new " . g:PivoBufferName
else
" Pivo buffer is already created,
" check whether it is open in one of the windows.
let scr_winnum = bufwinnr(scr_bufnum)
if scr_winnum != -1
" Jump to the window which has the scratch buffer if we are not
" already in that window
if winnr() != scr_winnum
exe scr_winnum . "wincmd w"
endif
else
" Create a new scratch buffer
exe "split +buffer" . scr_bufnum
endif
endif
endfunction
command! -nargs=0 Pivo call s:PivoBufferOpen()
" END
let &cpo= s:keepcpo
unlet s:keepcpo
|
2810439a6393e049f3417295e9b29598cded277b
|
TLRadioButton.podspec
|
TLRadioButton.podspec
|
Pod::Spec.new do |s|
s.name = 'TLRadioButton'
s.version = '0.1.0'
s.summary = 'Animated RadioButton for iOS.'
s.description = <<-DESC

Radio button for iOS.
##Usage
* _isChecked_ - button status. Default - false
* _Animation duratoin_ - button animation speed in ms. Default - 500 ms
DESC
s.homepage = 'http://ftp27.ru/'
# s.screenshots = 'www.example.com/screenshots_1', 'www.example.com/screenshots_2'
s.license = { :type => 'MIT', :file => 'LICENSE' }
s.author = { 'Aleksey Cherepanov' => '[email protected]' }
s.source = { :git => 'https://github.com/ftp27/TLRadioButton.git', :tag => s.version.to_s }
s.social_media_url = 'https://twitter.com/ftp27host'
s.ios.deployment_target = '7.0'
s.source_files = 'TLRadioButton/Classes/**/*'
end
|
Pod::Spec.new do |s|
s.name = 'TLRadioButton'
s.version = '0.1.1'
s.summary = 'Animated RadioButton for iOS.'
s.description = <<-DESC

Radio button for iOS.
##Usage
* _isChecked_ - button status. Default - false
* _Animation duratoin_ - button animation speed in ms. Default - 500 ms
DESC
s.screenshots = 'https://github.com/ftp27/TLRadioButton/raw/master/TLRadioButton.gif'
s.license = { :type => 'MIT', :file => 'LICENSE' }
s.author = { 'Aleksey Cherepanov' => '[email protected]' }
s.source = { :git => 'https://github.com/ftp27/TLRadioButton.git', :tag => s.version.to_s }
s.social_media_url = 'https://twitter.com/ftp27host'
s.ios.deployment_target = '7.0'
s.source_files = 'TLRadioButton/Classes/**/*'
end
|
Add screenshots to pod configure
|
Add screenshots to pod configure
|
Ruby
|
mit
|
ftp27/TLRadioButton
|
ruby
|
## Code Before:
Pod::Spec.new do |s|
s.name = 'TLRadioButton'
s.version = '0.1.0'
s.summary = 'Animated RadioButton for iOS.'
s.description = <<-DESC

Radio button for iOS.
##Usage
* _isChecked_ - button status. Default - false
* _Animation duratoin_ - button animation speed in ms. Default - 500 ms
DESC
s.homepage = 'http://ftp27.ru/'
# s.screenshots = 'www.example.com/screenshots_1', 'www.example.com/screenshots_2'
s.license = { :type => 'MIT', :file => 'LICENSE' }
s.author = { 'Aleksey Cherepanov' => '[email protected]' }
s.source = { :git => 'https://github.com/ftp27/TLRadioButton.git', :tag => s.version.to_s }
s.social_media_url = 'https://twitter.com/ftp27host'
s.ios.deployment_target = '7.0'
s.source_files = 'TLRadioButton/Classes/**/*'
end
## Instruction:
Add screenshots to pod configure
## Code After:
Pod::Spec.new do |s|
s.name = 'TLRadioButton'
s.version = '0.1.1'
s.summary = 'Animated RadioButton for iOS.'
s.description = <<-DESC

Radio button for iOS.
##Usage
* _isChecked_ - button status. Default - false
* _Animation duratoin_ - button animation speed in ms. Default - 500 ms
DESC
s.screenshots = 'https://github.com/ftp27/TLRadioButton/raw/master/TLRadioButton.gif'
s.license = { :type => 'MIT', :file => 'LICENSE' }
s.author = { 'Aleksey Cherepanov' => '[email protected]' }
s.source = { :git => 'https://github.com/ftp27/TLRadioButton.git', :tag => s.version.to_s }
s.social_media_url = 'https://twitter.com/ftp27host'
s.ios.deployment_target = '7.0'
s.source_files = 'TLRadioButton/Classes/**/*'
end
|
33c07430e1871b72f0c369febb804f244cc17003
|
core/bourbon/library/_padding.scss
|
core/bourbon/library/_padding.scss
|
@charset "UTF-8";
/// Provides a quick method for targeting `padding` on specific sides of a
/// box. Use a `null` value to “skip” a side.
///
/// @argument {arglist} $values
/// List of padding values, defined as CSS shorthand.
///
/// @example scss
/// .element {
/// @include padding(12vh null 10px 5%);
/// }
///
/// @example css
/// .element {
/// padding-bottom: 10px;
/// padding-left: 5%;
/// padding-top: 12vh;
/// }
///
/// @require {mixin} _directional-property
@mixin padding($values...) {
@include _directional-property(padding, false, $values...);
}
|
@charset "UTF-8";
/// Provides a quick method for targeting `padding` on specific sides of a
/// box. Use a `null` value to “skip” a side.
///
/// @argument {arglist} $values
/// List of padding values, defined as CSS shorthand.
///
/// @example scss
/// .element-one {
/// @include padding(null 1rem);
/// }
///
/// .element-two {
/// @include padding(10vh null 10px 5%);
/// }
///
/// @example css
/// .element-one {
/// padding-left: 1rem;
/// padding-right: 1rem;
/// }
///
/// .element-two {
/// padding-bottom: 10px;
/// padding-left: 5%;
/// padding-top: 10vh;
/// }
///
/// @require {mixin} _directional-property
@mixin padding($values...) {
@include _directional-property(padding, false, $values...);
}
|
Add more detail to the padding mixin documentation example
|
Add more detail to the padding mixin documentation example
Show use with only two values in the arglist
|
SCSS
|
mit
|
Jazz-Man/bourbon,thoughtbot/bourbon,thoughtbot/bourbon,Jazz-Man/bourbon
|
scss
|
## Code Before:
@charset "UTF-8";
/// Provides a quick method for targeting `padding` on specific sides of a
/// box. Use a `null` value to “skip” a side.
///
/// @argument {arglist} $values
/// List of padding values, defined as CSS shorthand.
///
/// @example scss
/// .element {
/// @include padding(12vh null 10px 5%);
/// }
///
/// @example css
/// .element {
/// padding-bottom: 10px;
/// padding-left: 5%;
/// padding-top: 12vh;
/// }
///
/// @require {mixin} _directional-property
@mixin padding($values...) {
@include _directional-property(padding, false, $values...);
}
## Instruction:
Add more detail to the padding mixin documentation example
Show use with only two values in the arglist
## Code After:
@charset "UTF-8";
/// Provides a quick method for targeting `padding` on specific sides of a
/// box. Use a `null` value to “skip” a side.
///
/// @argument {arglist} $values
/// List of padding values, defined as CSS shorthand.
///
/// @example scss
/// .element-one {
/// @include padding(null 1rem);
/// }
///
/// .element-two {
/// @include padding(10vh null 10px 5%);
/// }
///
/// @example css
/// .element-one {
/// padding-left: 1rem;
/// padding-right: 1rem;
/// }
///
/// .element-two {
/// padding-bottom: 10px;
/// padding-left: 5%;
/// padding-top: 10vh;
/// }
///
/// @require {mixin} _directional-property
@mixin padding($values...) {
@include _directional-property(padding, false, $values...);
}
|
acd034cfbaf7487ed75d22e22a52d65f6287e6ff
|
run-reliability-test.bash
|
run-reliability-test.bash
|
set -eu
: ${SCRIPTS=$(readlink -f $(dirname $0))}
new_juju=$(find $new_juju_dir -name juju)
old_stable_juju=$(find $old_stable_juju_dir -name juju)
export JUJU_HOME=$HOME/cloud-city
build_id=${JOB_NAME}-${BUILD_NUMBER}
s3cfg=$JUJU_HOME/juju-qa.s3cfg
s3base=s3://juju-qa-data/industrial-test/${build_id}
if [ "$new_agent_url" != "" ]; then
extra_args="--new-agent-url $new_agent_url"
else
extra_args=""
fi
set -x
$SCRIPTS/write_industrial_test_metadata.py $new_juju_dir/buildvars.json \
$environment metadata.json
s3cmd -c $s3cfg put metadata.json $s3base-metadata.json
timeout -sINT -k 10m 1d $SCRIPTS/industrial_test.py $environment $new_juju \
--old-stable $old_stable_juju $suite --attempts $attempts \
--json-file results.json $extra_args
s3cmd -c $s3cfg put results.json $s3base-results.json
|
set -eu
: ${SCRIPTS=$(readlink -f $(dirname $0))}
new_juju=$(find $new_juju_dir -name juju)
old_stable_juju=$(find $old_stable_juju_dir -name juju)
export JUJU_HOME=$HOME/cloud-city
build_id=${JOB_NAME}-${BUILD_NUMBER}
s3cfg=$JUJU_HOME/juju-qa.s3cfg
s3base=s3://juju-qa-data/industrial-test/${build_id}
if [ "$new_agent_url" != "" ]; then
extra_args="--new-agent-url $new_agent_url"
else
extra_args=""
fi
set -x
# Delete all files in $WORKSPACE, but no error if empty.
find $WORKSPACE -type f -delete
$SCRIPTS/write_industrial_test_metadata.py $new_juju_dir/buildvars.json \
$environment metadata.json
s3cmd -c $s3cfg put metadata.json $s3base-metadata.json
timeout -sINT -k 10m 1d $SCRIPTS/industrial_test.py $environment $new_juju \
--old-stable $old_stable_juju $suite --attempts $attempts \
--json-file results.json $extra_args
s3cmd -c $s3cfg put results.json $s3base-results.json
|
Delete all files in before running industrial-test.
|
Delete all files in before running industrial-test.
|
Shell
|
agpl-3.0
|
mjs/juju,mjs/juju,mjs/juju,mjs/juju,mjs/juju,mjs/juju,mjs/juju
|
shell
|
## Code Before:
set -eu
: ${SCRIPTS=$(readlink -f $(dirname $0))}
new_juju=$(find $new_juju_dir -name juju)
old_stable_juju=$(find $old_stable_juju_dir -name juju)
export JUJU_HOME=$HOME/cloud-city
build_id=${JOB_NAME}-${BUILD_NUMBER}
s3cfg=$JUJU_HOME/juju-qa.s3cfg
s3base=s3://juju-qa-data/industrial-test/${build_id}
if [ "$new_agent_url" != "" ]; then
extra_args="--new-agent-url $new_agent_url"
else
extra_args=""
fi
set -x
$SCRIPTS/write_industrial_test_metadata.py $new_juju_dir/buildvars.json \
$environment metadata.json
s3cmd -c $s3cfg put metadata.json $s3base-metadata.json
timeout -sINT -k 10m 1d $SCRIPTS/industrial_test.py $environment $new_juju \
--old-stable $old_stable_juju $suite --attempts $attempts \
--json-file results.json $extra_args
s3cmd -c $s3cfg put results.json $s3base-results.json
## Instruction:
Delete all files in before running industrial-test.
## Code After:
set -eu
: ${SCRIPTS=$(readlink -f $(dirname $0))}
new_juju=$(find $new_juju_dir -name juju)
old_stable_juju=$(find $old_stable_juju_dir -name juju)
export JUJU_HOME=$HOME/cloud-city
build_id=${JOB_NAME}-${BUILD_NUMBER}
s3cfg=$JUJU_HOME/juju-qa.s3cfg
s3base=s3://juju-qa-data/industrial-test/${build_id}
if [ "$new_agent_url" != "" ]; then
extra_args="--new-agent-url $new_agent_url"
else
extra_args=""
fi
set -x
# Delete all files in $WORKSPACE, but no error if empty.
find $WORKSPACE -type f -delete
$SCRIPTS/write_industrial_test_metadata.py $new_juju_dir/buildvars.json \
$environment metadata.json
s3cmd -c $s3cfg put metadata.json $s3base-metadata.json
timeout -sINT -k 10m 1d $SCRIPTS/industrial_test.py $environment $new_juju \
--old-stable $old_stable_juju $suite --attempts $attempts \
--json-file results.json $extra_args
s3cmd -c $s3cfg put results.json $s3base-results.json
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.