Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
# We need the TAB character for SED (Mac OS X sed does not understand \t)
TAB="$(printf '\t')"
function abort {
echo "$(tput setaf 1)$1$(tput sgr0)"
exit 1
}
@x3ro
x3ro / Makefile
Created September 12, 2013 12:44
Source files for my latest blog post on working with assembly routines and C on Mac OS X - http://x3ro.de/2013/09/12/link-assembly-routine-with-c-on-osx.html
all: run
run: clean test
./test
test: asm.o test.o
clang -o test asm.o test.o
asm64.o:
nasm -f macho64 asm.s
@x3ro
x3ro / install_teamspeak.sh
Last active September 29, 2019 18:44
Teamspeak 3 installation script for Debian based systens (incl. Ubuntu)
#!/bin/bash
#
# A small script that sets up a teamspeak 3 server.
# Tested on debian and ubuntu.
#
# Source: http://coding-journal.com
#
TMP="/tmp/teamspeak/"
INSTALL_PATH="/usr/local/teamspeak3/"
#!/usr/bin/env python
from __future__ import print_function
from optparse import OptionParser
import os
import sys
parser = OptionParser()
parser.add_option("-i", "--import", dest="imports", action="append", default=[],
@x3ro
x3ro / gist:4635451
Last active February 27, 2017 00:30
Example of SVG embedded in Markdown

Hi

--- hello

wat

![](data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIKICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPgo8IS0tIEdlbmVyYXRlZCBieSBncmFwaHZpeiB2ZXJzaW9uIDIuMjguMCAoMjAxMzAxMjUuMTUzMikKIC0tPgo8IS0tIFRpdGxlOiBldGhhbmUgUGFnZXM6IDEgLS0+Cjxzdmcgd2lkdGg9IjQwOHB0IiBoZWlnaHQ9Ijk4cHQiCiB2aWV3Qm94PSIwLjAwIDAuMDAgNDA4LjAwIDk4LjAwIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIj4KPGcgaWQ9ImdyYXBoMSIgY2xhc3M9ImdyYXBoIiB0cmFuc2Zvcm09InNjYWxlKDEgMSkgcm90YXRlKDApIHRyYW5zbGF0ZSg0IDk0KSI+Cjx0aXRsZT5ldGhhbmU8L3RpdGxlPgo8cG9seWdvbiBmaWxsPSJ3aGl0ZSIgc3Ryb2tlPSJ3aGl0ZSIgcG9pbnRzPSItNCw1IC00LC05NCA0MDUsLTk0IDQwNSw1IC00LDUiLz4KPCEtLSBzdGVwMV8xIC0tPgo8ZyBpZD0ibm9kZTEiIGNsYXNzPSJub2RlIj48dGl0bGU+c3RlcDFfMTwvdGl0bGU+CjxlbGxpcHNlIGZpbGw9Im5vbmUiIHN0cm9rZT0i

@x3ro
x3ro / keybase.md
Last active September 6, 2016 14:15

Keybase proof

I hereby claim:

  • I am x3ro on github.
  • I am fresskoma (https://keybase.io/fresskoma) on keybase.
  • I have a public key ASCWLW8_UfKTpsTWuji76j_UfzJ2PIRkKRKiV-tcNrpa8Ao

To claim this, I am signing this object:

upstream gitlab {
server unix:/home/git/gitlab/tmp/sockets/gitlab.socket;
}
server {
listen 80 default_server;
server_name <change this to your FQDN>;
rewrite ^ https://$server_name$request_uri? permanent;
add_header Strict-Transport-Security "max-age=31536000; includeSubdomains";
Hi Lucas.
I know that you have high-rated account on stackoverflow.
I want you to do a undelete vote for a very good and useful
question. It's really nice. I don't know why somebody deleted
it, but I want to revert it.
If you will do it, I will pay you $30 on your paypal account.
Or you can suggest another way of payment.
@x3ro
x3ro / gist:6274616
Last active December 21, 2015 07:58
draft.sx
Hello visitor. This is a fork of [@idan](https://github.com/idan)'s [gist.io](http://gist.io) project, adding a couple new features and fixing some bugs that have not been touched for a while. Idan intends to keep on working on the original gist.io, for which, at some point, he wants to charge a bit of money in order to even out the server costs ([source](https://github.com/idan/gistio/issues/55#issuecomment-22453283)), but he's currently unclear when that will be. At least until then, I will work on my own improvements, which might some day make it back into upstream :)
# Features added
## Callouts
> You can now use callouts, which are great to draw attention to specific, important sections of your text:
# A little modification to Wynn Netherland's (http://wynnnetherland.com/journal/a-stylesheet-author-s-guide-to-terminal-colors)
# "git n" alias which allows one to specify a subdirectory.
[alias]
n = !"f() { git ls-files $1 | xargs notes | awk -F: '{ print $1,$2; print $3,$4; print $5}' | grcat conf.notes | less -r; }; f"