Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View nuex's full-sized avatar
👾

Chase James nuex

👾
  • Lexington, KY
View GitHub Profile
@nuex
nuex / scan.sh
Created October 20, 2016 03:45
convert scanned docs to tiny pdfs
#!/bin/sh
outname="$1"; shift
target="${outname}.tif"
scanimage --format tiff --resolution 300 --mode Gray > "$target" && \
convert "$target" -colorspace gray -level 10%,90%,1 -blur 2 +dither -monochrome "${outname}_bw.tif" && \
tiff2pdf -o "${outname}.pdf" "${outname}_bw.tif"
@nuex
nuex / getEmails.js
Created August 16, 2016 21:02
function for converting labelled gmail emails to a spreadsheet
function getEmails() {
// set spreadsheet and retrieve labels
var ss = SpreadsheetApp.getActiveSpreadsheet();
var name = "LABEL";
// create sheets and clear content
var label = GmailApp.getUserLabelByName(name);
var sh = ss.getSheetByName(label.getName()) ||
ss.insertSheet(label.getName(), ss.getSheets().length);
sh.clear();
@nuex
nuex / page-sync.php
Last active June 13, 2016 06:05
Sync a directory of static html pages with Wordpress
<?php
$dir = '/var/www/html';
if (getenv('WORDPRESS_PATH')) {
$dir = getenv('WORDPRESS_PATH');
}
require_once($dir . '/wp-load.php');
class PageSync
{
public static function export() {
@nuex
nuex / standup
Created January 9, 2015 05:28
Say something in a Slack channel without being there.
#!/bin/sh
#
# Say something in a slack channel.
#
# Usage:
#
# standup 't: doing a thing'
#
# Finding Values:
#
@nuex
nuex / hacker_evocation.md
Last active August 29, 2015 14:07
hacker evocation

hacker evocation

These are albums and tracks that evoke hacker intention.

Mostly ambient albums so far.

  • The Social Network (album) - Trent Reznor and Atticus Ross
  • Plume (album) - Loscil
  • Ghosts (album) - Monolake
@nuex
nuex / groupify
Created September 8, 2014 16:11
I hate permissions
#!/bin/sh
# Run this in your current directory to chmod files and directories with
# default permissions to allow group access.
find . -type f -perm 644 -print -exec chmod 664 {} \;
find . -type d -perm 744 -print -exec chmod 774 {} \;

Keybase proof

I hereby claim:

  • I am nuex on github.
  • I am nuex (https://keybase.io/nuex) on keybase.
  • I have a public key whose fingerprint is 2F0C E0A6 5AED D09C 0819 0B30 1F90 A3C0 A420 BEBD

To claim this, I am signing this object:

@nuex
nuex / goal-calc
Created October 7, 2012 18:07
goal-calc
#!/usr/bin/awk -f
#
# goal-calc
#
# Returns a weekly budget amount given the date of your next
# paycheck, a target date, and a target amount.
#
# USAGE
#
# If you're next paycheck will be arriving on 2011/08/29 and you have