Skip to content

Instantly share code, notes, and snippets.

@oxplot
oxplot / ether-waker.sh
Last active March 2, 2019 23:55
Wake up PCs behind the lan when SSH connection is attempted.
# Moved to https://github.com/oxplot/gists/blob/master/ether-waker.sh
@kevinelliott
kevinelliott / osx-10.10-setup.md
Last active December 1, 2023 08:21
Mac OS X 10.10 Yosemite Setup

Mac OS X 10.10 Yosemite

Custom recipe to get OS X 10.10 Yosemite running from scratch, setup applications and developer environment. I use this gist to keep track of the important software and steps required to have a functioning system after a semi-annual fresh install. On average, I reinstall each computer from scratch every 6 months, and I do not perform upgrades between distros.

This keeps the system performing at top speeds, clean of trojans, spyware, and ensures that I maintain good organizational practices for my content and backups. I highly recommend this.

You are encouraged to fork this and modify it to your heart's content to match your own needs.

Install Software

@tylerneylon
tylerneylon / json.lua
Last active April 19, 2024 21:02
Pure Lua json library.
--[[ json.lua
A compact pure-Lua JSON library.
The main functions are: json.stringify, json.parse.
## json.stringify:
This expects the following to be true of any tables being encoded:
* They only have string or number keys. Number keys must be represented as
strings in json; this is part of the json spec.
@mschoch
mschoch / test-bleve-search.sh
Last active June 18, 2023 03:53
bleve - create index, index JSON, query index
#!/bin/sh
# create a custom mapping
cat > /tmp/mapping.json << MAPPING
{
"types": {
"_default": {
"properties": {
"location": {
"properties": {
#!/bin/sh
remove_dangling() {
echo "Removing dangling images ..."
docker rmi $(docker images -f dangling=true -q)
}
remove_stopped_containers() {
echo "Removing stopped containers ..."
docker rm $(docker ps -qa)
@trehn
trehn / damazon.py
Last active November 22, 2016 08:47 — forked from zakx/damazon.py
#!/usr/bin/python
# setup: pip install requests beautifulsoup4
from decimal import Decimal
import requests
from bs4 import BeautifulSoup
import sys
import getpass
@rfdrake
rfdrake / raid1.cfg
Last active April 21, 2024 23:08
Debian Wheezy raid1 preseed configuration
# This puts all files in one partition. You'll need to change proxy settings
# (USERNAME, PASSWORD, PROXYSERVER) and crypted passwords, as well as the
# get_domain string to your dns domain.
# This is not quite fully automatic. It will prompt you for hostname. If you
# want to automatically fill in the hostname you'll need to provide it in the
# kernel APPEND line by saying netcfg/get_hostname=hostname
# If you've never setup preseeding, the first step is going to be getting PXE
# netinstall working. You don't need a full CD, you just need netboot/debian-installer/amd64/linux
@wnoguchi
wnoguchi / README.md
Last active April 24, 2018 06:48
Preseed Recipe: Soft RAID1, LVM

Ubuntu Preseed Recipe: RAID1 + LVM

System Requirements

  • Ubuntu Server 16.04.4 LTS AMD64
  • Disk Size: 80GiB
  • Number of Disks: 2
  • LVM: YES
  • RAID: RAID1
  • Partition Table Format: MBR
@reyjrar
reyjrar / New-iTerm-Window.scpt
Created February 8, 2012 13:14
AppleScript to Open a New iTerm Window and bring it to the front
(*
* New-iTerm-Window.scpt
*
* Intended for use with QuickSilver
* I mapped option-y to running this script to create
* a new iTerm window on the current workspace
*
* Based on much Googling - very little "original" code here
* Comments/Suggestions to brad.lhotsky@gmail.com
*)
@epaule
epaule / cufflinks2hints.pl
Last active September 27, 2015 05:08
Cufflinks FTP to Agustus hints GFF conversion (exon|intron|ep)
#!/usr/bin/env perl
#
# convert cufflinks GTF into a Augustus hintfile
#
# seq source ep|exon|intron start stop score +/- phase grp=ID; src=E
my %transcripts;
while(<>){
next unless /Cufflinks\s+exon.*transcript_id/;