As configured in my dotfiles.
start new:
tmux
start new with session name:
| /* | |
| Distributed under The MIT License: | |
| http://opensource.org/licenses/mit-license.php | |
| Permission is hereby granted, free of charge, to any person obtaining | |
| a copy of this software and associated documentation files (the | |
| "Software"), to deal in the Software without restriction, including | |
| without limitation the rights to use, copy, modify, merge, publish, | |
| distribute, sublicense, and/or sell copies of the Software, and to |
As configured in my dotfiles.
start new:
tmux
start new with session name:
| #!/usr/bin/python | |
| import sys | |
| import argparse | |
| import os | |
| import re | |
| ''' | |
| A simple script to create lower-resolution Android drawables from higher-resolution ones. |
| #include <stdarg.h> | |
| #import <Foundation/Foundation.h> | |
| @interface Cls : NSObject {} | |
| -(int) takes_block: (int)limit withBlock:(int (^)(int first, ...))block; | |
| @end | |
| @implementation Cls | |
| -(int) takes_block: (int)limit withBlock:(int (^)(int first, ...))block { |
| - (void)animateUpdateFromOldList:(NSArray *)oldList newList:(NSArray *)newList { | |
| NSMutableArray *workArray = [oldList mutableCopy]; | |
| NSMutableSet *oldSet = [[NSMutableSet alloc] initWithArray:oldList]; | |
| NSMutableSet *newSet = [[NSMutableSet alloc] initWithArray:newList]; | |
| NSMutableSet *deleteSet = nil; | |
| NSMutableSet *insertSet = nil; | |
| static NSInteger offset = 0; | |
| deleteSet = [oldSet mutableCopy]; | |
| [deleteSet minusSet:newSet]; |
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
| #!/bin/sh | |
| ### | |
| # SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer) | |
| # For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos | |
| ### | |
| # Alot of these configs have been taken from the various places | |
| # on the web, most from here | |
| # https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx |
| $ ghci | |
| GHCi, version 7.4.2: http://www.haskell.org/ghc/ :? for help | |
| Loading package ghc-prim ... linking ... done. | |
| Loading package integer-gmp ... linking ... done. | |
| Loading package base ... linking ... done. | |
| Prelude> :l hello-ski.hs | |
| [1 of 1] Compiling Main ( hello-ski.hs, interpreted ) | |
| Ok, modules loaded: Main. | |
| *Main> main | |
| Hello world! |
| ----- Esc ----- | |
| Quick change directory: Esc + c | |
| Quick change directory history: Esc + c and then Esc + h | |
| Quick change directory previous entry: Esc + c and then Esc + p | |
| Command line history: Esc + h | |
| Command line previous command: Esc + p | |
| View change: Esc + t (each time you do this shortcut a new directory view will appear) | |
| Print current working directory in command line: Esc + a | |
| Switch between background command line and MC: Ctrl + o | |
| Search/Go to directory in active panel: Esc + s / Ctrl + s then start typing directory name |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <assert.h> | |
| typedef unsigned int u32; | |
| typedef unsigned long long u64; | |
| //------------------------------------------------------------------------- | |
| // WorkArea | |
| //------------------------------------------------------------------------- |