Skip to content

Instantly share code, notes, and snippets.

View tawrahim's full-sized avatar
🐢
Focusing

Tawheed Raheem tawrahim

🐢
Focusing
View GitHub Profile
public class SavedAddress {
private String label;
private String address;
public SavedAddress(String label, String address) {
this.label = label;
this.address = address;
}
public void setLabel(String label) {
@tawrahim
tawrahim / overlaping.java
Created January 11, 2018 21:17
Uber interview question
public class Interview {
class Interval {
int start;
int end;
public Interval(int start, int end) {
this.start = start;
this.end = end;
}
@tawrahim
tawrahim / classHierarchy.md
Created December 5, 2017 12:17
Return a hierarchy of a given string separated by "."
public class KV {
  String key;
  String value;
}

/* Input:
      [
 new KV("foo.bar.baz", "james"),
@tawrahim
tawrahim / file.md
Last active November 29, 2017 15:44
Interview algorithm practice
@tawrahim
tawrahim / ioslocaleidentifiers.csv
Created March 21, 2017 21:45 — forked from JaseHadd/ioslocaleidentifiers.csv
iOS Locale Identifiers
localeIdentifier Description
eu Basque
hr_BA Croatian (Bosnia & Herzegovina)
en_CM English (Cameroon)
rw_RW Kinyarwanda (Rwanda)
en_SZ English (Swaziland)
tk_Latn Turkmen (Latin)
he_IL Hebrew (Israel)
ar Arabic
uz_Arab Uzbek (Arabic)
@tawrahim
tawrahim / ioslocaleidentifiers.csv
Created March 21, 2017 21:45 — forked from JaseHadd/ioslocaleidentifiers.csv
iOS Locale Identifiers
eu Basque
hr_BA Croatian (Bosnia & Herzegovina)
en_CM English (Cameroon)
rw_RW Kinyarwanda (Rwanda)
en_SZ English (Swaziland)
tk_Latn Turkmen (Latin)
he_IL Hebrew (Israel)
ar Arabic
uz_Arab Uzbek (Arabic)

YARD CHEATSHEET http://yardoc.org

cribbed from http://pastebin.com/xgzeAmBn

Templates to remind you of the options and formatting for the different types of objects you might want to document using YARD.

Modules

Namespace for classes and modules that handle serving documentation over HTTP

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@tawrahim
tawrahim / vim status line
Created May 11, 2013 16:33
An informative status line in vim
" show little divider at bottom of vim
set laststatus=2
"an informative status line
set statusline=\[%t%m]\ [FORMAT=%{&ff}]\ [TYPE=%Y]\ [LINE=%04l,COL=%04v]\ %{GitBranch()}
" Function to display git branch
function! GitBranch()
let branch = system("git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* //'")
@tawrahim
tawrahim / descriptionOfProgram.m
Created July 13, 2012 01:04 — forked from Elephruit/descriptionOfProgram.m
Description of Program (CS193P Assignment 2)
+ (NSString *) descriptionOfProgram:(id)program
{
NSMutableArray *stack;
if ([program isKindOfClass:[NSArray class]]) stack = [program mutableCopy];
NSString *programDescription = @"";
while (stack.count) {
programDescription = [programDescription stringByAppendingString:[self descriptionOfTopOfStack:stack]];
if (stack.count) {
programDescription = [programDescription stringByAppendingString:@", "];
}