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
// Communication is done by ansci | |
const int FIRST_ON = '0'; | |
const int SECOND_ON = '1'; | |
const int ALL_ON = '2'; | |
const int ALL_OFF = '3'; | |
boolean stop = false; | |
struct led{ | |
int delayLength; |
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
if (weakSelf.followers.count==1) { | |
[weakSelf.tableView reloadData]; | |
}else { | |
NSIndexPath *indexPath = [NSIndexPath indexPathForRow:0 inSection:0]; | |
[weakSelf.tableView insertRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationFade]; | |
// refresh index path | |
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 0.5 * NSEC_PER_SEC), dispatch_get_current_queue(), ^{ | |
[weakSelf.tableView reloadData]; | |
}); |
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
for i in {0..255} ; do | |
printf "\x1b[38;5;${i}mcolour${i}\n" | |
done |
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
self performBlock:^{code here} afterDelay: 2.5]; | |
[self performBlock:^{code here} afterDelay: 10]; |
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
- (void) navigateToSplitViewController{ | |
[SVProgressHUD dismiss]; | |
UIStoryboard *storyboard = self.storyboard; | |
IPadSplitViewHolder *splitView = [storyboard instantiateViewControllerWithIdentifier:@"IPadSplitViewHolder"]; | |
//[self.navigationController pushViewController:splitView animated:YES]; | |
//self.parentViewController.view.window.rootViewController = splitView; | |
self.view.window.rootViewController = splitView; | |
} | |
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
before do | |
user.stub(:facebook_connected?).and_return(true) | |
user.stub(:facebook_allows_permission?).with(anything) | |
.and_return(true) | |
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
[color] | |
ui = true | |
[user] | |
name = Warut Surapat | |
email = s.warut@gmail.com | |
[alias] | |
st = status | |
br = branch | |
df = diff | |
co = checkout |
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
# built application files | |
*.apk | |
*.ap_ | |
# files for the dex VM | |
*.dex | |
# Java class files | |
*.class |
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
scope :in_network, ->(network) do | |
joins{user_network_profiles}.where{ user_network_profiles.network_id == network.id } | |
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
[[ -s "/Users/warut/.rvm/scripts/rvm" ]] && source "/Users/warut/.rvm/scripts/rvm" # Load RVM into a shell session *as a function* | |
PATH=/usr/local/sbin:/usr/local/bin:$PATH | |
RED="\[\033[0;31m\]" | |
GREEN="\[\033[0;32m\]" | |
YELLOW="\[\033[0;33m\]" | |
LIGHT_BLUE="\[\033[0;34m\]" | |
NO_COLOR="\[\033[0m\]" | |
IMGS=( |