Skip to content

Instantly share code, notes, and snippets.

@Chuongv
Chuongv / .bash_prompt
Created June 14, 2016 05:07
.bash_prompt
# @gf3’s Sexy Bash Prompt, inspired by “Extravagant Zsh Prompt”
# Shamelessly copied from https://github.com/gf3/dotfiles
# Screenshot: http://i.imgur.com/s0Blh.png
if [[ $COLORTERM = gnome-* && $TERM = xterm ]] && infocmp gnome-256color >/dev/null 2>&1; then
export TERM=gnome-256color
elif infocmp xterm-256color >/dev/null 2>&1; then
export TERM=xterm-256color
fi
@Chuongv
Chuongv / gist:40afeeaf4cafd3baadb9
Last active August 29, 2015 14:24
Antidote Audio status summary
This is to keep track of how calling works with Antidote (2 channels 1/4th tox iterate)
Antidote <----> Antidote Call quality is a little spotty. Missing a second every so often?
Antidote <----> Toxic, Neither side can hear each other.
Antidote <----> SharpTox, Sharptox can hear Antidote fine, however Antidote can not hear well from Sharptox
Antidote <----> Antox, Not tested yet
Antidote <----> Tox4J, Not tested yet
SharpTox <---> SharpTox sounds fine
SharpTox <---> Toxic, Sharptox can hear Toxic, but stuttery. Toxic can hear SharpTox but poor static.
@Chuongv
Chuongv / gist:cbfcc013741ab7c9851d
Created June 4, 2015 18:45
Test Cases for statecallback
- (void)testCallStateCallback
{
[self makeTestCallbackWithCallBlock:^{
callstateCallback(NULL, 1, TOXAV_CALL_STATE_RECEIVING_A | TOXAV_CALL_STATE_SENDING_A, (__bridge void *)self.toxAV);
} expectBlock:^(id<OCTToxAVDelegate> delegate) {
OCTToxFriendNumber friendNumber = 1;
OCMExpect([self.toxAV.delegate toxAV:self.toxAV
callStateChanged: OCTToxAVCallStateReceivingAudio | OCTToxAVCallStateSendingAudio
friendNumber:friendNumber]);
}];
@Chuongv
Chuongv / manoolAV.podspec
Last active August 29, 2015 14:22
toxav
#
# Be sure to run `pod lib lint toxcore-ios.podspec' to ensure this is a
# valid spec and remove all comments before submitting the spec.
#
# Any lines starting with a # are optional, but encouraged
#
# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html
#
Pod::Spec.new do |s|
- (void)tableView:(UITableView *)tableView moveRowAtIndexPath:(NSIndexPath *)sourceIndexPath
toIndexPath:(NSIndexPath *)destinationIndexPath
{
//if user tries to move past the end of the list.
NSInteger totalInItems = [[[BNRItemStore sharedStore] allItems] count];
if (destinationIndexPath.row >= totalInItems) {
NSLog(@"this turned on");
return;
}
[[BNRItemStore sharedStore] moveItemAtIndex:sourceIndexPath.row