Skip to content

Instantly share code, notes, and snippets.

View git-hub-tig's full-sized avatar
🏠
Working from home

Carson git-hub-tig

🏠
Working from home
View GitHub Profile
// ; hello world on win32 writen in asm.
// ; compile: 8a helloworld.s
// ; link : 8l -o helloworld.exe helloworld.8
// ; run : helloworld.exe
// ;
// ; if you get the following compile error,
// ; maybe, namespace separator was broken by copy-and-paste.
// ; open this file with text editor as utf-8 encoding, and fix following...
// ;
// ; main!main
@Deco
Deco / deepcopy.lua
Created October 31, 2012 05:38
Lua Non-recursive Deep-copy
--[[ deepcopy.lua
Deep-copy function for Lua - v0.2
==============================
- Does not overflow the stack.
- Maintains cyclic-references
- Copies metatables
- Maintains common upvalues between copied functions (for Lua 5.2 only)
TODO
@timofurrer
timofurrer / .bash_aliases
Created June 15, 2013 13:33
cp and move commands with progress bar using rsync
# copy and move with progress bar
alias pcp='rsync -aP'
alias pmv='rsync -aP --remove-source-files'
@hofmannsven
hofmannsven / README.md
Last active November 10, 2024 13:48
Git CLI Cheatsheet
#!/usr/bin/env python2
# vim: set fileencoding=utf8
import re, os
s = u'\x1b[1;%dm%s\x1b[0m' # terminual color template
r = re.compile(r'[^ -~\n]+')
a = []
print ' --> runing', s % (93, 'http://www.xunlei6.com/2.htm')
f = os.popen("curl -s http://www.xunlei6.com/2.htm | iconv -f gbk -t utf8 | html2text -ascii | grep -E '(迅雷会|白|企)' | sort -u").read()
To add a prefix to filenames in an folder.
1. open the command line window
2. go into the folder where are the files to add the "_prefix"
3. FOR /r "." %a in (*.*) DO REN "%~a" "prefix%~nxa"
You can also define which files should get prefixed
eg. only .txt files
FOR /r "." %a in (*.txt) DO REN "%~a" "prefix%~nxa"
@tsiege
tsiege / The Technical Interview Cheat Sheet.md
Last active November 14, 2024 15:40
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

ANNOUNCEMENT

I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!






\

@safeng
safeng / gen_rand.cc
Created October 8, 2014 01:14
Generate uniform random numbers in [a, b] from 0/1 random number generator
#include <iostream>
#include <cstdlib>
#include <ctime>
using namespace std;
// Generate random numbers in large ranges with random number
// generator in small ranges
// For random number generator with 0/1, we can use it to generate bits
unsigned char zero_one()
{

现整理收集C++世界里那些“牛人”的个人博客。凡三类:一是令人高山仰止的大牛,对C++语言本身产生过深远的影响的人;二是C++运用炉火纯青的高手,有原创性的技术干货;三是中文世界里的C++牛人。

C++大牛的博客

@bishboria
bishboria / springer-free-maths-books.md
Last active October 3, 2024 09:17
Springer made a bunch of books available for free, these were the direct links