View generate_xcode_assets.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
CAT_NAME=${PWD##*/} | |
XCASSETS_DIR="./${CAT_NAME}.xcassets" | |
mkdir $XCASSETS_DIR | |
for SVG_FILE in *.svg |
View index.coffee
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
csv = require 'csv' | |
request = require 'superagent' | |
require('superagent-retry')(request); | |
cheerio = require 'cheerio' | |
fs = require 'fs' | |
async = require 'async' | |
require('debug-http')() | |
INFILE = "deals2.csv" | |
OUTFILE = "OUTPUT-#{INFILE}" |
View workspace.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# where to store the sparse-image | |
WORKSPACE=${HOME}/Documents/workspace.dmg.sparseimage | |
create() { | |
hdiutil create -type SPARSE -fs 'Case-sensitive Journaled HFS+' -size 60g -volname workspace ${WORKSPACE} | |
} | |
automount() { |
View class.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
trait Bar { | |
public function jsonSerialize() { | |
return ["switch" => static::$SWITCH]; | |
} | |
} | |
class Foo implements JsonSerializable { | |
public static $SWITCH = false; |
View index.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
# Run as: | |
# php -S 0.0.0.0:80 -t . index.php | |
# A GET Request of | |
# http://127.0.0.1/3/en/mobile/merchant/nearby?longitude=-0.127758&latitude=51.5073509&merchant_id=123 | |
# Would output the contents of | |
# ./repo/get/3/en/mobile/merchant/nearby/latitude=51.5073509&longitude=-0.127758&merchant_id=123.json |
View index.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* | |
* To run: | |
* | |
* #1 change token | |
* | |
* #2 php -S localhost:8080 index.php | |
* |