Skip to content

Instantly share code, notes, and snippets.

Lucas Jenß x3ro

View GitHub Profile
View git-rewrite-to-subfolder
#!/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 / install_teamspeak.sh
Last active Sep 29, 2019
Teamspeak 3 installation script for Debian based systens (incl. Ubuntu)
View install_teamspeak.sh
#!/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/"
View go-script
#!/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 Feb 27, 2017
Example of SVG embedded in Markdown
View gist:4635451

Hi

--- hello

wat

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

View keybase.md

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:

View gitlab.nginxconf
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";
View gist:7924869
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 / Makefile
Created Sep 12, 2013
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
View Makefile
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
View gist:6274616
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:
View gist:3908985
# 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"
You can’t perform that action at this time.