This file contains hidden or 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
[ | |
{ | |
"keys": ["super+alt+left"], | |
"command": "set_layout", | |
"args": | |
{ | |
"cols": [0.0, 0.2, 1.0], | |
"rows": [0.0, 1.0], | |
"cells": [[0, 0, 1, 1], [1, 0, 2, 1]] | |
} |
This file contains hidden or 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 you come from bash you might have to change your $PATH. | |
# export PATH=$HOME/bin:/usr/local/bin:$PATH | |
# Path to your oh-my-zsh installation. | |
export ZSH="$HOME/.oh-my-zsh" | |
# Set name of the theme to load --- if set to "random", it will | |
# load a random theme each time oh-my-zsh is loaded, in which case, | |
# to know which specific one was loaded, run: echo $RANDOM_THEME | |
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes |
This file contains hidden or 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
# Add this to your .oh-my-zsh theme if you're using those, or directly to your zsh theme :) | |
# Colors vary depending on time lapsed. | |
ZSH_THEME_GIT_TIME_SINCE_COMMIT_SHORT="%{$fg[green]%}" | |
ZSH_THEME_GIT_TIME_SHORT_COMMIT_MEDIUM="%{$fg[yellow]%}" | |
ZSH_THEME_GIT_TIME_SINCE_COMMIT_LONG="%{$fg[red]%}" | |
ZSH_THEME_GIT_TIME_SINCE_COMMIT_NEUTRAL="%{$fg[cyan]%}" | |
#Customized git status, oh-my-zsh currently does not allow render dirty status before branch | |
git_custom_status() { |
This file contains hidden or 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
var validCreditCard = function(a,b,c,d,e){b=a.length-1,e=0,d=~~a[b];while(b--){e++,c=~~a[b],d+=e%2?[0,2,4,6,8,1,3,5,7,9][c]:c};return(d%10==0)}; | |
validCreditCard('378282246310005'); //=> true | |
validCreditCard('378282246310006'); //=> false | |
/* | |
VALID TEST NUMBERS | |
378282246310005 371449635398431 378734493671000 | |
30569309025904 38520000023237 6011111111111117 |
This file contains hidden or 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
get_h: function(timeString) { | |
var seperator = timeString.indexOf(":"); | |
return this.timeTrim(timeString.substring(0,seperator)); | |
}, | |
get_m: function(timeString) { | |
var seperator = timeString.indexOf(":"); | |
var timeMinusHour = timeString.substring(seperator); | |
var theWhiteSpace = timeMinusHour.indexOf(" "); | |
return this.timeTrim(timeMinusHour.substring(1,theWhiteSpace)); |
This file contains hidden or 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
#!/bin/sh | |
# build_fat.sh | |
# | |
# Created by Robert Carlsen on 15.07.2009. Updated 24.9.2010. | |
# Added armv7 into Universal Binary, and updated to 4.3 SDK 26.3.2011. | |
# | |
# build an arm / i386 lib of standard linux project | |
# | |
# initially configured for tesseract-ocr v2.0.4 | |
# updated for tesseract prerelease v3 |
This file contains hidden or 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 NSString (reverse) | |
-(NSString *) reverseString; | |
@end | |
@implementation NSString (reverse) | |
-(NSString *) reverseString |
This file contains hidden or 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
<html> | |
<head> | |
<style> | |
div { | |
font-family:"A_Randhoo"; | |
direction: rtl; | |
unicode-bidi: bidi-override; | |
} | |
h2 { | |
font-family:"A_Randhoo"; |
This file contains hidden or 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
CTCallCenter *callCenter; | |
BOOL callHandlerSetup = NO; | |
// Setup Call Center | |
if (callHandlerSetup == NO) { | |
callCenter = [[CTCallCenter alloc] init]; | |
callCenter.callEventHandler = ^(CTCall *call) { | |
//Call this function when there is an incoming call | |
// the incoming call state is in call.callState (NSString) |
This file contains hidden or 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
[outputLanguages enumerateKeysAndObjectsUsingBlock:^(id key, id object, BOOL *stop) { | |
NSLog(@"%@ = %@", key, object); | |
}]; |
NewerOlder