Skip to content

Instantly share code, notes, and snippets.

View sammy8806's full-sized avatar

Steven Tappert sammy8806

View GitHub Profile
@brandonb927
brandonb927 / osx-for-hackers.sh
Last active July 24, 2024 15:28
OSX for Hackers: Yosemite/El Capitan Edition. This script tries not to be *too* opinionated and any major changes to your system require a prompt. You've been warned.
#!/bin/sh
###
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer)
# For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos
###
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx
@igmar
igmar / extensions.lua
Created November 13, 2012 15:55
Asterisk LUA dialplan
require("lsqlite3")
-- Igmar: Wanneer closen we dat DB object eigenlijk ?
db = sqlite3.open('/etc/asterisk/users.sqlite')
--CONSOLE = "Console/dsp" -- Console interface for demo
--CONSOLE = "DAHDI/1"
--CONSOLE = "Phone/phone0"
TRUNK = "DAHDI/G1"
@willurd
willurd / web-servers.md
Last active July 25, 2024 21:14
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@clemensg
clemensg / etc_sysctl.conf
Created February 5, 2014 16:50
My FreeBSD /etc/sysctl.conf
# /etc/sysctl.conf
# Clemens Gruber, 2014
#
# Uncomment this to prevent users from seeing information about processes that
# are being run under another UID.
security.bsd.see_other_uids=0
## I/O
@mildmojo
mildmojo / rotate_desktop.sh
Created June 18, 2014 06:47
Script to rotate the screen and touch devices on modern Linux desktops. Great for convertible laptops.
#!/bin/bash
#
# rotate_desktop.sh
#
# Rotates modern Linux desktop screen and input devices to match. Handy for
# convertible notebooks. Call this script from panel launchers, keyboard
# shortcuts, or touch gesture bindings (xSwipe, touchegg, etc.).
#
# Using transformation matrix bits taken from:
# https://wiki.ubuntu.com/X/InputCoordinateTransformation
@kevinelliott
kevinelliott / osx-10.10-setup.md
Last active December 1, 2023 08:21
Mac OS X 10.10 Yosemite Setup

Mac OS X 10.10 Yosemite

Custom recipe to get OS X 10.10 Yosemite running from scratch, setup applications and developer environment. I use this gist to keep track of the important software and steps required to have a functioning system after a semi-annual fresh install. On average, I reinstall each computer from scratch every 6 months, and I do not perform upgrades between distros.

This keeps the system performing at top speeds, clean of trojans, spyware, and ensures that I maintain good organizational practices for my content and backups. I highly recommend this.

You are encouraged to fork this and modify it to your heart's content to match your own needs.

Install Software

@TobleMiner
TobleMiner / gist:cde1825190f66893710d
Last active August 29, 2015 14:16
Dmesg human readable timestamps
#!/usr/bin/perl
use strict;
use warnings;
my @dmesg_new = ();
my $dmesg = "/bin/dmesg";
my @dmesg_old = `$dmesg`;
my $now = time();
my $uptime = `cat /proc/uptime | cut -d"." -f1`;
@elomatreb
elomatreb / autoexec.cfg
Last active September 27, 2018 07:03
my CSGO settings
// General
sensitivity 1.15 // 1200 DPI
zoom_sensitivity_ratio_mouse 1
cl_autowepswitch 0
cl_disablehtmlmotd 1
net_graph 1
net_graphpos 3
net_graphproportionalfont 0
viewmodel_offset_y 2
@TobleMiner
TobleMiner / vfio-bind
Created April 10, 2016 14:41
VFIO binding service
#!/bin/sh
modprobe vfio-pci
for dev in "$@"; do
echo Handling device "$dev"
devpath="/sys/bus/pci/devices/$dev"
if ! [ -d $devpath ]; then
echo "$devpath doesn't exist"
exit 1
fi
if [ -L $devpath/driver/module ]; then
@TobleMiner
TobleMiner / blaze
Last active December 28, 2016 06:26
dn42 OSPF setup: Lockdown is the peering vm, blaze is the primary router and connects to lockdown via interface dn42. 'some random dn42 enabled vm' is connected to blaze via interface dn42-gw.
protocol ospf dn42
{
table vm;
instance id 1;
export all;
import all;
area 0
{
interface "dn42"
{