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
import re | |
def phpdict(src): | |
myDict = {} | |
for k, v in src.items(): | |
pattern = re.search('([^[]+)((?:\[[^\]]*\])+)', k) | |
if pattern: | |
path = [(int(p) if p.isdigit() else p) for p in re.findall('\[([^\]]+)\]', k)] | |
new_key = pattern.group(1) |
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
interface RestApiService { | |
companion object { | |
const val PUSH_PLATFORM = "gcm" | |
} | |
@PUT | |
fun installPush(@Url endpoint: String, | |
@Header("Authorization") authorization: String, | |
@Body request: PushInstallationRequest): Observable<ResponseBody> |
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
⋊> ~/.c/f/functions pwd | |
/Users/mensly/.config/fish/functions | |
⋊> ~/.c/f/functions cat focus.fish | |
function focus | |
cd ~/Projects/mensly/katzrdum | |
clear | |
end | |
⋊> ~/.c/f/functions cat github.fish | |
function github | |
~/Applications/github $argv |
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
function smv --description "smv <localfile> <user>@<host>:<remotefile>" | |
# What deranged mind needed this? | |
scp $argv[1..-1] | |
if [ $argv[1] = '-r' ] | |
rm $argv[1..2] | |
else | |
rm $argv[1] | |
end | |
# TODO: Support -r parameter properly | |
end |
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
#!/usr/bin/env python3 | |
""" | |
deeplink.py | |
Script to make it easier to test deeplinks from the command line without remembering arcane | |
incantations to conjure the spirits of the computer. | |
Add to your path somewhere, and run in your project directory passing the url of the deeplink. | |
If the platform name 'ios' or 'android' is in the working directory name, it doesn't need to be | |
passed as an argument, though this can be done as well. The Android package name can also be | |
explicitly included. |