Skip to content

Instantly share code, notes, and snippets.

@lloesche
lloesche / tox265.sh
Created March 13, 2016 22:07
encode input file to hevc
#!/bin/bash
set -euo pipefail
infile="$1"
preset=veryfast
audiobitrateperchannel=64
ffmpeg_docker='lloesche/nginx-fatpack'
originfile=$infile
[ ! -f "$infile" ] && \
echo "file $infile not found" && \
@kirbysayshi
kirbysayshi / mass-aggregation-change.sh
Created November 23, 2011 17:14
quick examples of how to change many many wsp (graphite/whisper) files settings
for f in $(find $1 -iname "*.wsp"); do
if [ -a $f ];
then /opt/graphite/bin/whisper-set-aggregation-method.py $f max;
fi;
done
@roxlu
roxlu / install_cygwin_sshd.txt
Last active November 27, 2023 22:20
Installing CYGWIN + SSHD for remote access through SSH on windows
Installing CYGWIN with SSH
1) Download cygwin setup.exe from http://www.cygwin.com
- Execute setup.exe
- Install from internet
- Root directory: `c:\cygwin` + all users
- Local package directory: use default value
- Select a mirror to download files from
- Select these packages:
- editors > xemacs 21.4.22-1
- net > openssh 6.1-p
@canadaduane
canadaduane / Filter-NGPVAN-Political-Emails.md
Last active February 6, 2024 18:16
Move Incoming NGPVAN Political Emails in Gmail to Spam (Google Apps Script)
  1. Go to https://script.google.com
  2. Create a New Project
  3. Replace the Code.gs file it creates for you with the javascript below (copy/paste)
  4. Save the script
  5. Go to Triggers (looks like an alarm clock on left-hand side)
  6. Create a Trigger that acts every 10 minutes and calls filterNGPVANSpam
  7. You'll need to authorize this script to act on your behalf, which may require that you use the scary "Advanced" section to allow the script to read/write to your email inbox.
@MicahElliott
MicahElliott / colortrans.py
Created November 29, 2010 07:57
Convert values between RGB hex codes and xterm-256 color codes.
#! /usr/bin/env python
""" Convert values between RGB hex codes and xterm-256 color codes.
Nice long listing of all 256 colors and their codes. Useful for
developing console color themes, or even script output schemes.
Resources:
* http://en.wikipedia.org/wiki/8-bit_color
* http://en.wikipedia.org/wiki/ANSI_escape_code
@erikh
erikh / hack.sh
Created March 31, 2012 07:02 — forked from DAddYE/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#