Skip to content

Instantly share code, notes, and snippets.

View arlimus's full-sized avatar

Dominik Richter arlimus

View GitHub Profile
@iafan
iafan / analyze-gopherjs
Created May 29, 2017 19:36
Small tool to report the size of Go packages in the GopherJS-compiled file
#!/usr/bin/perl
# This script can be used to see the size of each Go package
# in the JavaScript file complied by GopherJS.
#
# Run:
#
# ./analyze-gopherjs client.js
#
# to analyze client.js file, or:
@sh1n0b1
sh1n0b1 / ssltest.py
Created April 8, 2014 07:53
Python Heartbleed (CVE-2014-0160) Proof of Concept
#!/usr/bin/python
# Quick and dirty demonstration of CVE-2014-0160 by Jared Stafford (jspenguin@jspenguin.org)
# The author disclaims copyright to this source code.
import sys
import struct
import socket
import time
import select
@arlimus
arlimus / gitconfig
Last active May 17, 2021 18:36
my gitconfig configuration
# git config; arlimus, public domain
## Make your adjustments
########################
[user]
name = Your Name
email = your.name@email.com
[core]
@arlimus
arlimus / i3.conf
Last active January 29, 2018 08:39
i3 configuration
# arlimus i3 config; public domain
# Please see http://i3wm.org/docs/userguide.html for a complete reference!
set $mod Mod4
# Use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod
# start a terminal
bindsym $mod+r exec TERMINAL=xfce4-terminal i3-sensible-terminal
@UniIsland
UniIsland / SimpleHTTPServerWithUpload.py
Created August 14, 2012 04:01
Simple Python Http Server with Upload
#!/usr/bin/env python
"""Simple HTTP Server With Upload.
This module builds on BaseHTTPServer by implementing the standard GET
and HEAD requests in a fairly straightforward manner.
"""
@botimer
botimer / yesno.rb
Created June 7, 2012 19:56
Handy yes/no prompt for little ruby scripts
# This is a reasonably well-behaved helper for command-line scripts needing to ask a simple yes/no question.
# It optionally accepts a prompt and a default answer that will be returned on enter keypress.
# It keeps asking and echoes the answer on the same line until it gets y/n/Y/N or enter.
# I tried to get Highline to behave like this directly, but even though it's sophisticated, I didn't like the result.
# This isn't especially elegant, but it is straightforward and gets the job done.
require 'highline/import'
def yesno(prompt = 'Continue?', default = true)
a = ''
s = default ? '[Y/n]' : '[y/N]'