Skip to content

Instantly share code, notes, and snippets.

View iggym's full-sized avatar
🎯
😄

Iggy iggym

🎯
😄
View GitHub Profile
@iggym
iggym / .gitignore
Created January 2, 2014 18:47 — forked from adamgit/.gitignore
#########################
# .gitignore file for Xcode4 / OS X Source projects
#
# Version 2.0
# For latest version, see: http://stackoverflow.com/questions/49478/git-ignore-file-for-xcode-projects
#
# 2013 updates:
# - fixed the broken "save personal Schemes"
#
# NB: if you are storing "built" products, this WILL NOT WORK,
@iggym
iggym / .gitignore
Created January 2, 2014 18:14 — forked from mmorey/.gitignore
#########################
# .gitignore file for Xcode5
#
# NB: if you are storing "built" products, this WILL NOT WORK,
# and you should use a different .gitignore (or none at all)
# This file is for SOURCE projects, where there are many extra
# files that we want to exclude
#
# For updates, see: http://stackoverflow.com/questions/49478/git-ignore-file-for-xcode-projects
# and https://gist.github.com/adamgit/3786883
#/usr/bin/env python
import lldb
# Put _this_ file into ~/Library/lldb/thread_return.py
# Put the following line into ~/.lldbinit
# command script import ~/Library/lldb/thread_return.py
def __lldb_init_module(debugger, internal_dict):
debugger.HandleCommand('command script add -f thread_return.thread_return thread_return')
#!/bin/sh
# Current as working as of 2012/4/17
# Xcode 4.3.2
PROJECT_ROOT="$HOME/SomeDirWhereYourProjectLives/XXXXXXXX"
WORKSPACE="$PROJECT_ROOT/XXXXXXXX.xcodeproj/project.xcworkspace"
CONFIG="AdHoc"
SCHEME="XXXXXXXX"
@iggym
iggym / ASP.NET_WebAPI_Routing_Notes.cs
Last active December 25, 2015 05:19 — forked from AlexZeitler/gist:1843616
Web API Routing notes and example
//Web API Routing notes and example
routes.MapHttpRoute(
name: "DefaultApi",
routeTemplate: "api/{controller}/{action}/{id}",
defaults: new { id = RouteParameter.Optional }
);
//================ The Controller =========================================
public class VTRoutingController : ApiController
[...] = starting state
States:
not running (dead)
onResume (running)
onStop (minimized)
onPause (screen off)
Launch Application:
@iggym
iggym / gist:6452326
Created September 5, 2013 16:11 — forked from mharper/gist:1251818
public class LifecycleActivity extends Activity
{
private int createCount = 0;
private int configCount = 0;
private String sentinel = "";
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState)
{

Latency numbers every programmer should know

L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns
L2 cache reference ........................... 7 ns
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns             
Compress 1K bytes with Zippy ............. 3,000 ns  =   3 µs
Send 2K bytes over 1 Gbps network ....... 20,000 ns  =  20 µs
SSD random read ........................ 150,000 ns  = 150 µs

Read 1 MB sequentially from memory ..... 250,000 ns = 250 µs

#navigation {
float: left;
width: 100%;
position: relative;
}
#navigation .nav {
clear: left;
float: right;
position: relative;
right: 50%;
@iggym
iggym / .gitignore
Created August 20, 2013 20:47 — forked from adamgit/.gitignore
#########################
# .gitignore file for Xcode4 / OS X Source projects
#
# Version 2.0
# For latest version, see: http://stackoverflow.com/questions/49478/git-ignore-file-for-xcode-projects
#
# 2013 updates:
# - fixed the broken "save personal Schemes"
#
# NB: if you are storing "built" products, this WILL NOT WORK,