Skip to content

Instantly share code, notes, and snippets.

@lukebeer
lukebeer / installgo.sh
Created May 30, 2016 22:41
Install google go
#!/bin/bash
wget https://storage.googleapis.com/golang/go1.6.2.linux-amd64.tar.gz -O - | tar -zxf - -C /usr/local
mv /usr/local/go /usr/local/gostrap
wget https://storage.googleapis.com/golang/go1.6.2.src.tar.gz -O - | tar -zxf - -C /usr/local
echo 'R09ST09UX0JPT1RTVFJBUD0vdXNyL2xvY2FsL2dvc3RyYXAKZXhwb3J0IEdPUk9PVF9CT09UU1RSQVAKCkdPUEFUSD0kSE9NRS9nbwpleHBvcnQgR09QQVRICgpQQVRIPSIkUEFUSDovdXNyL2xvY2FsL2dvL2JpbjokR09QQVRIL2JpbiIKZXhwb3J0IFBBVEgKCg==' | base64 -d >> /etc/profile
cd /usr/local/go/src
source /etc/profile
./all.bash
@lukebeer
lukebeer / arch-linux-install
Created February 15, 2016 22:20 — forked from mattiaslundberg/arch-linux-install
Minimal instructions for installing arch linux on an UEFI system with full system encryption using dm-crypt and luks
# Install ARCH Linux with encrypted file-system and UEFI
# The official installation guide (https://wiki.archlinux.org/index.php/Installation_Guide) contains a more verbose description.
# Download the archiso image from https://www.archlinux.org/
# Copy to a usb-drive
dd if=archlinux.img of=/dev/sdX bs=16M && sync # on linux
# Boot from the usb. If the usb fails to boot, make sure that secure boot is disabled in the BIOS configuration.
# Set swedish keymap
@lukebeer
lukebeer / .tmux.conf
Last active September 13, 2016 13:50
.tmux.conf
set -g history-limit 500000
set -g mouse on
set-option -g status-attr default
bind-key v split-window -h
bind-key b split-window
#set-window-option -g window-status-attr dim
bind-key s set-window-option synchronize-panes
# clock
set-window-option -g clock-mode-colour green #green
set -g status-interval 1
@lukebeer
lukebeer / addjob.php
Created January 27, 2016 15:43
Example code from a webapp adding serialised OCI-P messages into a Redis list by POST then processed by 1 or more workers in separate processes to decouple the processor - old code, depends on v1 of broadworks-ocip
<?php
require_once 'common.php';
require_once BASE_PATH . 'inc/Broadworks_OCI-P/common.php';
require_once BASE_PATH . 'inc/Broadworks_OCI-P/core/OCISession.php';
ini_set('display_errors',1);
require 'Predis/Autoloader.php';
Predis\Autoloader::register();
if (isset($_POST['file'])) {
if (preg_match('/^migrate_/', $_POST['file'])) {
$file = JOBFILE_BASE_PATH . strtolower($_SESSION['platform']) . '/migrate/' . $_POST['file'];
@lukebeer
lukebeer / oci.py
Created December 27, 2015 00:07
Broadworks simple OCI client in Python
import cgi
import hashlib
import HTMLParser
import httplib2
import random
import re
class OCISchemaSystem:
@lukebeer
lukebeer / Fake xinerama
Created December 4, 2015 05:47 — forked from phillipberndt/Fake xinerama
Fake Xinerama configuration to split the DELL Latitude E7440 two-external monitors into two virtual heads
WHAT THIS IS
------------
The DELL LATITUDE E7440's docking station supports two external displays, and
the notebook's Haswell architecture supports having three displays active at
the same time. It works well, but the two external monitors are merged into one
big display:
$ xrandr
Screen 0: minimum 320 x 200, current 5280 x 1080, maximum 32767 x 32767
eDP1 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 309mm x 174mm
@lukebeer
lukebeer / GoogleHackMasterList.txt
Last active May 10, 2024 15:53 — forked from cmartinbaughman/GoogleHackMasterList.txt
The definitive super list for "Google Hacking".
admin account info" filetype:log
!Host=*.* intext:enc_UserPassword=* ext:pcf
"# -FrontPage-" ext:pwd inurl:(service | authors | administrators | users) "# -FrontPage-" inurl:service.pwd
"AutoCreate=TRUE password=*"
"http://*:*@www&#8221; domainname
"index of/" "ws_ftp.ini" "parent directory"
"liveice configuration file" ext:cfg -site:sourceforge.net
"parent directory" +proftpdpasswd
Duclassified" -site:duware.com "DUware All Rights reserved"
duclassmate" -site:duware.com
@lukebeer
lukebeer / codesearch.py
Created August 25, 2015 18:47
Command line source search using searchcode.com API
import asyncio
import aiohttp
import urllib
import json
import tqdm
import math
import sys
import ssl
from urllib import request
from urllib import parse
@lukebeer
lukebeer / gitget.py
Last active December 8, 2015 20:08
gitget :: gist to search Github for repos, return results and clone via menu selection.
#!/usr/bin/env python
"""
- Search Github for repos, return results and clone via menu selection.
- Created because we all spend far too much time looking for the repo addresses.
- Requires 'requests', pip install requests
- wget https://gist.githubusercontent.com/lukebeer/9bb732dd6129ebd92fdc/raw/gitget.py -O /usr/local/bin/gitget; chmod +x /usr/local/bin/gitget; ln -s /usr/local/bin/gitget /usr/local/bin/gg
"""
import sys