View curry.js
1 2 3 4 5 6 7 8 9 10
!function() {
'use strict';
 
// https://github.com/petkaantonov/bluebird/wiki/Optimization-killers#32-leaking-arguments
var cloneArgs = function(props) {
var args = new Array(props.length);
for(var i = 0; i < props.length; i++) {
args[i] = props[i];
}
return args;
View gist:bb5b84b4fc64681888d5
1 2 3 4 5 6 7 8 9 10
python cct/cli/main.py -v process dummy.yaml
2015-05-27 15:56:49,066 - cct - DEBUG - processing change [{'environment': [{'foo': 'gfoo'}, {'bar': 'gbar'}], 'changes': [{'dummy': [{'environment': [{'bar': 'lbar'}, {'baz': 'lbaz'}]}, {'foo': 'bar baz'}, {'qux': 'norfy'}]}, {'shell': [{'shell': 'pwd'}, {'shell': 'ls -l'}, {'shell': 'echo $HOME'}]}], 'name': 'dummy', 'description': 'execute dummy steps'}]
2015-05-27 15:56:49,066 - cct - INFO - executing change dummy
{'baz': 'lbaz', 'foo': 'gfoo', 'bar': 'lbar'}
{'baz': 'lbaz', 'foo': 'gfoo', 'bar': 'lbar'}
{'foo': 'gfoo', 'bar': 'gbar'}
{'foo': 'gfoo', 'bar': 'gbar'}
2015-05-27 15:56:49,066 - cct - DEBUG - Runner has no module instace, creating one
2015-05-27 15:56:49,066 - cct - DEBUG - importing module /home/dbecvari/repository/github/containers-tools/cct/cct/modules/dummy/cct_module.py to cct.module.dummy
{'baz': 'lbaz', 'foo': 'gfoo', 'bar': 'lbar'}
View test.json
1 2 3
{"title": "The Complete Works of Someone",
"contents":
[{"url": "https://www.reddit.com/r/HFY/comments/37fnu0/the_big_b/", "title": "The Tale of Foo and Bar"}]}
View InfoPlist.strings
1 2 3 4 5 6 7 8
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>NSLocationAlwaysUsageDescription</key>
<string>Change this line to inform consumer about how location is being used in the background</string>
</dict>
</plist>
View cache_path_alias.php
1 2 3 4 5 6 7 8 9 10
/**
* @implement entity_load
*/
function entity_load($entities, $type) {
array_walk($entities, function ($entity) use ($type) {
$path = entity_uri($type, $entity)['path'];
if ($path && $path !== ($alias = drupal_get_path_alias($path))) {
$entity->path['alias'] = $alias;
}
View test-icc.s
1 2 3 4 5 6 7 8 9 10
# mark_description "Intel(R) C Intel(R) 64 Compiler XE for applications running on Intel(R) 64, Version 14.0.0.080 Build 2013072";
# mark_description "8";
# mark_description "-S";
.file "test.c"
.text
..TXTST0:
# -- Begin main
# mark_begin;
.align 16,0x90
.globl main
View pwphotos.py
1 2 3 4 5 6 7 8 9 10
#!/usr/bin/env python
import gdata.photos.service
import argparse
 
"""
For those who are lazy enough to create a wordpress content and just want to dump everything from their Picasaweb album.
Usage: ./pwphotos.py -u PICASAWEB_USER -a PICASAWEB_ALBUM
Output will be printed to stdout, you can simply redirect it to a file > out.txt or just copy paste to WordPress (Text mode)
"""
gd_client = gdata.photos.service.PhotosService()
View luhn.js
1 2 3 4 5 6 7 8 9 10
/**
* Luhn algorithm in JavaScript: validate credit card number supplied as string of numbers
* @author ShirtlessKirk. Copyright (c) 2012.
* @license WTFPL (http://www.wtfpl.net/txt/copying)
*/
var luhnChk = (function (arr) {
return function (ccNum) {
var
len = ccNum.length,
bit = 1,
Something went wrong with that request. Please try again.