Skip to content

Instantly share code, notes, and snippets.

View robrwo's full-sized avatar
💭
Fnorjd

Robert Rothenberg robrwo

💭
Fnorjd
View GitHub Profile

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@bjhess
bjhess / pull_request_webhook.md
Created May 18, 2012 15:58
The way I had to add a github repo webhook for pull requests

This is more complex than necessary.

GitHub webhooks for a URL by default only fire on repo pushes. There appears to be no way in the web UI to set up webhooks for other events. And so we go to the API. I prefer to do this type of thing with Hurl.

{
  "name": "web",
 "active": true,
@rgreenjr
rgreenjr / postgres_queries_and_commands.sql
Last active May 12, 2025 02:24
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%'
BuiltinFunctions::ProhibitBooleanGrep
BuiltinFunctions::ProhibitStringyEval
BuiltinFunctions::ProhibitStringySplit
BuiltinFunctions::ProhibitUniversalCan
BuiltinFunctions::ProhibitUniversalIsa
ClassHierarchies::ProhibitExplicitISA
ControlStructures::ProhibitMutatingListFunctions
ControlStructures::ProhibitUnreachableCode
ErrorHandling::RequireCarping
InputOutput::ProhibitBarewordFileHandles
@briandfoy
briandfoy / perl-cert.json
Last active December 11, 2015 01:48
A JSON representation of the CERT Perl Secure Coding Standards (https://www.securecoding.cert.org/confluence/display/perl/CERT+Perl+Secure+Coding+Standard)
[
{
"priority" : "P4",
"name" : "Canonicalize path names before validating them",
"rule" : "",
"section" : "1",
"recommedation" : "1",
"level" : "L3",
"url" : "https://www.securecoding.cert.org/confluence/display/perl/IDS00-PL.+Canonicalize+path+names+before+validating+them",
"class" : "IDS00-PL",
@willurd
willurd / web-servers.md
Last active May 13, 2025 01:45
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@robrwo
robrwo / sync-dotfiles.sh
Last active January 2, 2016 12:19
This is a quick-and-dirty utility to synchronise dotfiles and utilities to other machines
#!/bin/bash
hostname=$1
command=`basename $0`
if [ -z "${hostname}" ]; then
echo Usage: ${command} hostname
exit 1
fi
@peczenyj
peczenyj / monads.pl
Last active August 29, 2015 13:57
Monads in Perl, with operator >>= , is it possible?
package Maybe;
use Moo::Role;
has value => (is => 'ro', required => 1);
use overload
'>>='=> \&bind;
sub bind {
@topheman
topheman / git-notes.md
Created June 29, 2015 17:39
Git notes cheat sheet
@spyesx
spyesx / adblock-blacklist.css
Last active February 7, 2024 09:48
Class and ID to avoid because of AdBlock
.sidebar_newsletter_sign_up,
.sidebar_subscribe,
.sign-up-form-single,
.signup-form--header,
.signup-with-checkboxes,
.skinny-sign-up,
.slidedown-newsletter,
.small-newsletter,
.social-link-mail,
.social_newsletter_box,