Skip to content

Instantly share code, notes, and snippets.

View daryltucker's full-sized avatar

Daryl Tucker daryltucker

  • Neo-Retro Group
  • Salem, Or
View GitHub Profile
@codenamezjames
codenamezjames / floatdiv.js
Created June 12, 2014 20:18
add the class "magic-floating-stuff" to any bootstrap column and it will follow your screen when you pass it
$(function(){
var MFS = $('.magic-floating-stuff')
var ogScrollTop = $('body').offset().top,
ogElementOffset = MFS.offset().top,
ogDistance = (ogElementOffset - ogScrollTop);
MFSheight = MFS.outerHeight()
documentHeight = $(document).outerHeight()
$('body').change(function(){
MFSheight = MFS.outerHeight()
@daryltucker
daryltucker / linux_kernel_compile.mkd
Last active August 29, 2015 14:05
Compiling a new Kernel using old configuration.

Copy current kernel configuration to linux source

cp -vi /boot/config-`uname -r` .config

Decide about new kernel options

Use the following if you wish to only build modules for devices currently in use/connected. For example, if you don't have any usb_storage devices, you won't be able to plug in usb drives.

make localmodconfig

Compile the kernel

make -j6

Compile kernel modules

@theirishpenguin
theirishpenguin / irssi-libnotify-plugin-ubuntu-installer.sh
Created October 11, 2012 13:46
irssi libnotify installer for ubuntu
#!/bin/bash
# This is a wrapped up version of the instructions at
# http://code.google.com/p/irssi-libnotify/wiki/MainPage for ubuntu
#
# Usage: Just run this script from the command line with no arguments
#
# Tested on Ubuntu 12.04.1 (64 bit)
echo ""
@yellowcrescent
yellowcrescent / Makefile
Created December 11, 2016 03:35
makefile for pinger thing
# Trying to build a fucking makefile
# jacob AVR makefile
#BUILDNAME=BLINKTEST
BUILDNAME=PINGER-2016
## Program names
CC=avr-gcc
CXX=avr-g++
OBJ2HEX=avr-objcopy
@kinifi
kinifi / index.html
Created November 26, 2016 21:31
Minecraft Overviewer has a google API key error. Here is how to fix it
<!DOCTYPE html>
<html>
<head>
<title>{title}</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Minecraft-Overviewer {version}" />
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
@yellowcrescent
yellowcrescent / amazon_total.py
Last active June 20, 2018 17:58
Calculate total Amazon spending from Order Report
#!/usr/bin/env python
# vim: set ts=4 sw=4 expandtab:
"""
amazon_total.py
Calculate total cost of Amazon orders
Usage:
- Login to your Amazon account, then click on 'Download order reports'
Choose the time period, and Amazon will generate a CSV file for you.
@npcardoso
npcardoso / force_resolution.sh
Last active August 30, 2018 20:59
This is a script that will change the resolution in Linux on a Macbook Pro Retina computer. Parts of this script were taken from https://gist.github.com/Garland-g/4552263
#!/bin/zsh
if [[ $# != 2 ]]; then
echo "Usage: Res.sh <device> <resolution_width>";
exit 1;
fi
DEV=$1
WIDTH=$(xrandr | grep $DEV -A1 | tail -n1 | sed 's/ *\([0-9]*\).*$/\1/')
HEIGHT=$(xrandr | grep $DEV -A1 | tail -n1 | sed 's/.*x\([0-9]*\).*$/\1/')
CURRENT_WIDTH=$(xrandr | grep $DEV | cut -d ' ' -f 3 | sed 's/ *\([0-9]*\).*$/\1/')
@yellowcrescent
yellowcrescent / k8s-coreos-setup.md
Last active December 17, 2018 21:32
CoreOS Kubernetes cluster setup at Digitalocean

Notes on setting up a Kubernetes cluster on CoreOS (stable) with DigitalOcean's platform.

Partially stolen from this guide by kevashcraft

Spin up VMs

  • Spin up 4 VMs with CoreOS Stable. One will be the master, the other 3 will be workers
  • Tag them with k8s:master and k8s:worker respectively, along with a tag for the cluster
  • Droplets can be created via your DO control panel, or by using doctl. Just change the CLUSTER_NAME, CLUSTER_DOMAIN, and SSHKEY_ID values below to match your own, then save the file to cluster_create.sh, chmod +x cluster_create.sh, then run it ./cluster_create.sh. If you don't already have doctl setup, it will probably be easier to just do this from the DO control panel if you only need to do a one-time setup for development.
@yellowcrescent
yellowcrescent / nginx_sockuser.diff
Last active April 4, 2019 23:12
add sock_user, sock_group, sock_perm options to nginx listen directive
diff -r 72d3aefc2993 src/core/ngx_connection.c
--- a/src/core/ngx_connection.c Wed Jul 26 13:13:51 2017 +0300
+++ b/src/core/ngx_connection.c Fri Jul 28 22:39:23 2017 -0400
@@ -87,6 +87,12 @@
ls->fastopen = -1;
#endif
+#if (NGX_HAVE_UNIX_DOMAIN)
+ ls->sock_user = -1;
+ ls->sock_group = -1;