Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
🌃 💾

x0 xero

💭
🌃 💾
View GitHub Profile
@dehora
dehora / disapprove.scala
Last active May 16, 2016
object ಠ_ಠ
View disapprove.scala
object ಠ_ಠ {
class ಠ_ಠ(m: String) extends Exception(m)
def main(a: Array[String]) = {
throw new ಠ_ಠ("ಠ_ಠ")
}
}
@ghiden
ghiden / bargraph.css
Last active Jan 13, 2017
D3.js bar graph example
View bargraph.css
.chart {
background: #b0e0f8;
margin: 5px;
}
.chart rect {
stroke: white;
fill: steelblue;
}
@dustyfresh
dustyfresh / python-nameserver.py
Created Jun 7, 2019
DNS nameserver implemented in python
View python-nameserver.py
#!/usr/bin/env python3
import sys
from datetime import datetime
import time
from time import sleep
from dnslib import DNSLabel, QTYPE, RD, RR, RCODE
from dnslib import A, AAAA, CNAME, MX, NS, SOA, TXT
from dnslib.server import DNSServer
@FrankSpierings
FrankSpierings / README.md
Last active Nov 6, 2020
Linux Container Escapes and Hardening
View README.md
@textarcana
textarcana / git-log2json.sh
Last active Nov 7, 2020
Convert Git logs to JSON. The first script (git-log2json.sh) is all you need, the other two files contain only optional bonus features 😀THIS GIST NOW HAS A FULL GIT REPO: https://github.com/context-driven-testing-toolkit/git-log2json
View git-log2json.sh
#!/usr/bin/env bash
# Use this one-liner to produce a JSON literal from the Git log:
git log \
--pretty=format:'{%n "commit": "%H",%n "author": "%aN <%aE>",%n "date": "%ad",%n "message": "%f"%n},' \
$@ | \
perl -pe 'BEGIN{print "["}; END{print "]\n"}' | \
perl -pe 's/},]/}]/'
@johan
johan / laughing-man.svg
Created Jul 6, 2011
The Laughing Man (Ghost in the Shell), 1000 byte SVG :-)
View laughing-man.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@MicahElliott
MicahElliott / colortrans.py
Created Nov 29, 2010
Convert values between RGB hex codes and xterm-256 color codes.
View colortrans.py
#! /usr/bin/env python
""" Convert values between RGB hex codes and xterm-256 color codes.
Nice long listing of all 256 colors and their codes. Useful for
developing console color themes, or even script output schemes.
Resources:
* http://en.wikipedia.org/wiki/8-bit_color
* http://en.wikipedia.org/wiki/ANSI_escape_code
You can’t perform that action at this time.