Skip to content

Instantly share code, notes, and snippets.

@pral2a
pral2a / proxy
Created September 17, 2018 21:47 — forked from sheerun/proxy
Automatic SOCKS proxy setup through SSH connection on Mac OS X
# Script for automatic setup of SOCKS proxy through SSH connection.
# It automatically teardowns SOCKS configuration before stopping.
# It's supposed to work on Mac OS X 10.6+
#
# Author: Adam Stankiewicz (@sheerun)
#
[[ -n "$1" ]] || { echo "Usage: proxy user@example.com"; exit 1; }
# get service GUID and NAME (like Wi-Fi) to set SOCKS proxy
@pral2a
pral2a / noise.sh
Created January 23, 2017 17:15 — forked from rsvp/noise.sh
noise : relaxing ambient Brown noise generator (cf. white noise) | Linux bash script using sox | CogSci notes
#!/usr/bin/env bash
# bash 4.1.5(1) Linux Ubuntu 10.04 Date : 2011-10-04
#
# _______________| noise : ambient Brown noise generator (cf. white noise).
#
# Usage: noise [minutes=59] [band-pass freq center=1786] [wave]
# ^minutes can be any positive integer.
# Command "noise 1" will display peak-level meter.
#
# Dependencies: play (from sox package)
@pral2a
pral2a / hi8-anim-howto.md
Created January 27, 2016 08:02 — forked from celoyd/hi8-anim-howto.md
A way to make Himawari-8 animations

Himawari-8 animation tutorial

Here’s how to make animations like this one. It requires intermediate Unix command-line knowledge, to install some tools and to debug if they don’t work. You’ll need these utilities:

  • curl (or you can translate to wget)
  • convert and montage, part of ImageMagick
  • ffmpeg, plus whatever codecs
  • parallel, for iteration that’s nicer than shell for loops or xargs
  • run everything in zsh for leading 0s in numerical ranges to work
@pral2a
pral2a / 0_reuse_code.js
Last active August 29, 2015 14:18
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@pral2a
pral2a / vanilla.sql
Last active August 29, 2015 14:13 — forked from ziadoz/vanilla.sql
-- Delete Spammers.
delete from GDN_User where ((CountDiscussions = 0 and CountComments = 0) or About != '' or Name = '[Deleted User]') and Admin = 0;
delete from GDN_User where CountVisits = 0 and Admin = 0;
delete from GDN_UserRole where UserID not in (select UserID from GDN_User);
-- Cleanup Data.
delete from GDN_Discussion where InsertUserID not in (select UserID from GDN_User);
delete from GDN_Comment where InsertUserID not in (select UserID from GDN_User);
delete from GDN_UserDiscussion where UserID not in (select UserID from GDN_User);
delete from GDN_Session where UserID not in (select UserID from GDN_User);
@pral2a
pral2a / .monitrc
Created August 12, 2014 14:26 — forked from arikfr/.monitrc
set mailserver smtp.gmail.com port 587 username "user@domain.com" password "password" using tlsv1 with timeout 30 seconds
q = { PlayBuf.ar(1, b, -1, 0, 0, 1) * 5 }.play;
q.free;
//
(
f = {
q = { PlayBuf.ar(1, b, -1, 0, 0, 1) * 5 }.play;
q.free;