Skip to content

Instantly share code, notes, and snippets.

public class singHadGadiaSong {
public static void singHadGadia(String[] characters, String[] actions, int n)
{
if (n >= characters.length)
return;
System.out.println("ואתא " + characters[n]);
for (int i = n - 1; i >= 0; i--) {
String prefix = (i == n - 1 ? "ו" : "ד");
System.out.println(prefix + actions[i] + " ל" + characters[i]);
}
@dirtyhenry
dirtyhenry / gist:7547064
Created November 19, 2013 15:27
iOS code that: 1/ validates an email found in a UITextField 2/ check chances of spelling mistakes
- (NSArray *)allMyContacts {
// cf. http://stackoverflow.com/questions/12083643/how-do-i-correctly-use-abaddressbookcreatewithoptions-method-in-ios-6
CFErrorRef error = nil;
ABAddressBookRef addressBook = ABAddressBookCreateWithOptions(NULL, &error);
__block BOOL accessGranted = NO;
dispatch_semaphore_t sema = dispatch_semaphore_create(0);
ABAddressBookRequestAccessWithCompletion(addressBook, ^(bool granted, CFErrorRef error) {
accessGranted = granted;
@tir38
tir38 / terminalTimer.sh
Last active August 26, 2020 14:10
in-terminal timer shell script
# script to create timer in terminal
# Jason Atwood
# 2013/6/22
#!/bin/sh
# start up
echo "starting timer script ..."
sleep 1 # seconds
# get input from user