Skip to content

Instantly share code, notes, and snippets.

View andrey-str's full-sized avatar

Andrey Streltsov andrey-str

View GitHub Profile
@andrey-str
andrey-str / ape2mp3.sh
Created January 6, 2016 09:08 — forked from jingle/ape2mp3.sh
Convert ape to mp3 using avconv, split with mp3splt and cue
#!/bin/bash
find "$1" -type f -name "*.ape" -print0 | while read -d $'\0' song
do
output=${song%.ape}.mp3
cue=${song%.ape}.cue
avconv -i "$song" -b 192k "$output"
if ls "$cue" &> /dev/null; then
mp3splt -a -c "$cue" "$output"
@andrey-str
andrey-str / NSDictionary+XXXConvertValues.h
Created November 12, 2015 08:59 — forked from kristopherjohnson/NSDictionary+XXXConvertValues.h
Category on NSDictionary that will convert string values to numbers or vice versa. Useful for JSON deserialization.
#import <Foundation/Foundation.h>
@interface NSDictionary (XXXConvertValues)
// Return value associated wth key, converted to NSString
- (NSString *) stringValueForKey:(id)key;
// Return integer value associated with key, converted to integer
- (NSInteger) integerValueForKey:(id)key;
@andrey-str
andrey-str / lldb_qt.py
Last active August 29, 2015 14:23 — forked from wmanth/lldb_qt.py
import lldb
def __lldb_init_module(debugger, internal_dict):
debugger.HandleCommand('type summary add QString -F lldb_qt.QString_summary')
debugger.HandleCommand('type summary add QUuid -F lldb_qt.QUuid_summary')
print 'lldb_qt.py has been loaded and is ready for use.'
def QString_summary(value, internal_dict):
name = value.GetName()
deref = '->' if value.TypeIsPointerType() else '.'
@andrey-str
andrey-str / isup.py
Last active August 29, 2015 14:17 — forked from andrix/isup.py
#!/usr/bin/env python
import re
import sys
from urllib import urlopen
def isup(domain):
resp = urlopen("http://www.isup.me/%s" % domain).read()
return "%s: %s" % (domain, "UP" if re.search("It's just you.", resp,
re.DOTALL) else "DOWN")
#!/bin/bash
# https://gist.github.com/949831
# http://blog.carbonfive.com/2011/05/04/automated-ad-hoc-builds-using-xcode-4/
# command line OTA distribution references and examples
# http://nachbaur.com/blog/how-to-automate-your-iphone-app-builds-with-hudson
# http://nachbaur.com/blog/building-ios-apps-for-over-the-air-adhoc-distribution
# http://blog.octo.com/en/automating-over-the-air-deployment-for-iphone/
# http://www.neat.io/posts/2010/10/27/automated-ota-ios-app-distribution.html
@andrey-str
andrey-str / xcodeSwitch.sh
Created March 20, 2012 07:47 — forked from doronkatz/xcodeSwitch.sh
XCode switch script
$ sudo /usr/bin/xcode-select -switch /Applications/Xcode.app