Skip to content

Instantly share code, notes, and snippets.

View wrouesnel's full-sized avatar

Will Rouesnel wrouesnel

View GitHub Profile
@wrouesnel
wrouesnel / gist:15d9359fc88b0937b6bf
Created February 21, 2016 23:49
Build command for totally static go images
CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -ldflags '-s' -o main .
@wrouesnel
wrouesnel / gist:7c00af6e71a127308e34
Created February 27, 2016 01:28
JSON Injection for setting up LDAP on Gogs
{
"AdminFilter": "adminfilter",
"AttributeMail": "email",
"AttributeName": "firstname",
"AttributeSurname": "lastname",
"AttributeUsername": "uid",
"AttributesInBind": false,
"BindDN": "",
"BindPassword": "",
"Enabled": true,
@wrouesnel
wrouesnel / Gulpfile.js
Last active March 6, 2016 04:04
Lightweight gulpfile for developing Webpack'd go-applications with CerebralJS.
/**
* Created by will on 6/09/15.
*/
var path = require('path');
var gulp = require('gulp');
var run = require('gulp-run');
var gutil = require('gulp-util');
var minimist = require('minimist');
(gdb) (gdb) Attaching to process 17801
Reading symbols from /usr/bin/cinnamon...(no debugging symbols found)...done.
Reading symbols from /usr/lib/x86_64-linux-gnu/cinnamon/libcinnamon.so...(no debugging symbols found)...done.
Reading symbols from /usr/lib/x86_64-linux-gnu/libmuffin.so.0...(no debugging symbols found)...done.
Reading symbols from /usr/lib/x86_64-linux-gnu/libgirepository-1.0.so.1...(no debugging symbols found)...done.
Reading symbols from /usr/lib/x86_64-linux-gnu/libatk-bridge-2.0.so.0...Reading symbols from /usr/lib/debug/.build-id/03/5d5b0c2efd32e34e3bad20bceb30f1dd6ca99d.debug...done.
done.
Reading symbols from /usr/lib/x86_64-linux-gnu/libclutter-1.0.so.0...Reading symbols from /usr/lib/debug/.build-id/a4/f1a53a1a4a0ea90c8e2e805d288df352026d5d.debug...done.
done.
Reading symbols from /usr/lib/x86_64-linux-gnu/libX11.so.6...Reading symbols from /usr/lib/debug//usr/lib/x86_64-linux-gnu/libX11.so.6.3.0...done.
(gdb) (gdb) Attaching to process 18307
Reading symbols from /usr/bin/cinnamon...(no debugging symbols found)...done.
Reading symbols from /usr/lib/x86_64-linux-gnu/cinnamon/libcinnamon.so...(no debugging symbols found)...done.
Reading symbols from /usr/lib/x86_64-linux-gnu/libmuffin.so.0...Reading symbols from /usr/lib/debug/.build-id/46/79bc47123fbb3697c66e8175e432a0ad11788b.debug...done.
done.
Reading symbols from /usr/lib/x86_64-linux-gnu/libgirepository-1.0.so.1...(no debugging symbols found)...done.
Reading symbols from /usr/lib/x86_64-linux-gnu/libatk-bridge-2.0.so.0...Reading symbols from /usr/lib/debug/.build-id/03/5d5b0c2efd32e34e3bad20bceb30f1dd6ca99d.debug...done.
done.
Reading symbols from /usr/lib/x86_64-linux-gnu/libclutter-1.0.so.0...Reading symbols from /usr/lib/debug/.build-id/a4/f1a53a1a4a0ea90c8e2e805d288df352026d5d.debug...done.
done.
@wrouesnel
wrouesnel / Dockerfile
Last active May 12, 2016 08:17
Centos7 and naked docker
FROM centos:7
RUN echo 'filesystems+="ext4"' > /etc/dracut.conf.d/supported_filesystems.conf
RUN yum update -y && \
yum install -y kernel ca-certificates \
systemd-networkd systemd-resolved
RUN update-ca-trust
This file has been truncated, but you can view the full file.
./anaconda-post.log system_u:object_r:etc_runtime_t:s0
./.autorelabel
./bin system_u:object_r:bin_t:s0
./boot/config-3.10.0-327.18.2.el7.x86_64 system_u:object_r:boot_t:s0
./boot/grub/fonts system_u:object_r:boot_t:s0
./boot/grub/fonts/unicode.pf2 system_u:object_r:boot_t:s0
./boot/grub/grub.cfg system_u:object_r:boot_t:s0
./boot/grub/grubenv system_u:object_r:boot_t:s0
./boot/grub/i386-pc/915resolution.mod system_u:object_r:boot_t:s0
./boot/grub/i386-pc/acpi.mod system_u:object_r:boot_t:s0
@wrouesnel
wrouesnel / Gulpfile.js
Last active October 19, 2016 19:42
webpack, react, golang self-contained gulpfile
var path = require('path');
var gulp = require('gulp');
var run = require('gulp-run');
var gutil = require('gulp-util');
var minimist = require('minimist');
var options = minimist(process.argv.slice(2), {
string: 'env',
@wrouesnel
wrouesnel / remote-backup.cmd
Created June 21, 2014 20:32
A batch file suitable for invoking a cygwin shell script which carries out a backup on Windows using unix-tooling.
rem This batch file is executed by vscsc.exe after the shadow copy has been
rem created. It is used to initate the backup.
rem
rem %1 is the volume ID of the backup, we pass it to the bash script which
rem runs rsync for us.
c:\cygwin64\bin\bash.exe --login -i ./do-remote-backup.bsh "%1"
@wrouesnel
wrouesnel / home-directory-backup
Created June 21, 2014 20:53
A script for doing routine backups of one's home directory with bup and ZFS
#!/bin/bash
# Script to do sensible home directory backups. Expects to receive the
# target user as it's first argument, and then proceeds to do a home
# directory backup in a ZFS-aware way. The second arg should be the name
# for the backup. hostname is used if it's blank.
# The ZFS backup is done by snapshotting every file system underneath the
# home directory and then indexing them all with appropriate graft options.
# The backup destination is determined by the user-name, and expects to find