Skip to content

Instantly share code, notes, and snippets.

View igaskin's full-sized avatar
🏠
Working from home

Isaac Gaskin igaskin

🏠
Working from home
View GitHub Profile
@rgreenjr
rgreenjr / postgres_queries_and_commands.sql
Last active July 18, 2024 22:25
Useful PostgreSQL Queries and Commands
-- show running queries (pre 9.2)
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query
FROM pg_stat_activity
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%'
ORDER BY query_start desc;
-- show running queries (9.2)
SELECT pid, age(clock_timestamp(), query_start), usename, query
FROM pg_stat_activity
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'
@nicerobot
nicerobot / README.md
Last active July 22, 2020 00:51
HTTPS Basic Authentication in Go :Gish
@pcolazurdo
pcolazurdo / Execute logstash
Last active December 2, 2016 09:20
LogStash configuration Sample
java -cp . logstash.runner agent -f logstash.conf -- web --backend elasticsearch:///?local
@dorentus
dorentus / 95-lolcat
Last active February 15, 2022 12:21
dynamically generated /etc/motd using fortune, cowsay & lolcat,save it as /etc/update-motd.d/95-lolcat.Google `pam_motd` or `update-motd` for more details of dynamically generated message-of-the-day.
#!/bin/bash
# see: http://blog.tomtung.com/2009/11/cowsay-fortune
# http://www.commandlinefu.com/commands/view/3584/remove-color-codes-special-characters-with-sed
# https://github.com/busyloop/lolcat
# https://github.com/dorentus/mruby-lolcat-bin
#
# requires `fortune`, `cowsay`,
# and ruby gem `lolcat` or its mruby version equivalent
export LANG="en_US.UTF-8"
@TheRealEdDawson
TheRealEdDawson / BootPython.sh
Last active June 20, 2020 19:28
A simple shell script to run a Python program at boot time on Raspberry Pi.
#! /bin/sh
# /etc/init.d/BootPython
### BEGIN INIT INFO
# Provides: Runs a Python script on startup
# Required-Start: BootPython start
# Required-Stop: BootPython stop
# Default-Start: 2 3 4 5
# Default-stop: 0 1 6
# Short-Description: Simple script to run python program at boot
@colinvh
colinvh / aws.md
Last active July 12, 2024 10:54
AWS Region Names

Alternative naming schemes for AWS regions

Purpose

The intent is to define terse, standards-supported names for AWS regions.

Schemes

@pstengel
pstengel / install-ixgbevf.sh
Last active August 20, 2019 08:01
Install the latest ixgbevf driver for AWS enhanced networking
#!/bin/bash
VERSION="2.16.4"
apt-get update && apt-get install -y dkms
wget "http://sourceforge.net/projects/e1000/files/ixgbevf stable/${VERSION}/ixgbevf-${VERSION}.tar.gz"
tar -C /usr/src -zxvf ixgbevf-${VERSION}.tar.gz
rm -f ixgbevf-${VERSION}.tar.gz
@nakedible-p
nakedible-p / proxy.js
Created October 19, 2015 19:55
AWS ES proxy
var AWS = require('aws-sdk');
var http = require('http');
var httpProxy = require('http-proxy');
var express = require('express');
var bodyParser = require('body-parser');
var stream = require('stream');
if (process.argv.length != 3) {
console.error('usage: aws-es-proxy <my-cluster-endpoint>');
process.exit(1);
@eliquious
eliquious / README.md
Created January 4, 2016 05:01
Golang OpenPGP examples

Building

go build -o goencrypt main.go

Generating Keys

@igaskin
igaskin / 95-lolcat
Created January 14, 2016 21:31 — forked from dorentus/95-lolcat
dynamically generated /etc/motd using fortune, cowsay & lolcat,save it as /etc/update-motd.d/95-lolcat.Google `pam_motd` or `update-motd` for more details of dynamically generated message-of-the-day.
#!/bin/bash
# see: http://blog.tomtung.com/2009/11/cowsay-fortune
# http://www.commandlinefu.com/commands/view/3584/remove-color-codes-special-characters-with-sed
# https://github.com/busyloop/lolcat
# https://github.com/dorentus/mruby-lolcat-bin
#
# requires `fortune`, `cowsay`,
# and ruby gem `lolcat` or its mruby version equivalent
export LANG="en_US.UTF-8"