Skip to content

Instantly share code, notes, and snippets.

View jrwren's full-sized avatar
๐Ÿ’ญ
๐Ÿคฏ๐Ÿ’ฏ๐Ÿ‘๐Ÿ”ฅ๐ŸŽ‰๐Ÿคทโ€โ™€๏ธ๐Ÿ˜๐Ÿ˜•๐Ÿ•ด๐Ÿฝ๐Ÿ˜ต๐Ÿ˜ž๐Ÿค•๐Ÿคฎ

Jay R. Wren jrwren

๐Ÿ’ญ
๐Ÿคฏ๐Ÿ’ฏ๐Ÿ‘๐Ÿ”ฅ๐ŸŽ‰๐Ÿคทโ€โ™€๏ธ๐Ÿ˜๐Ÿ˜•๐Ÿ•ด๐Ÿฝ๐Ÿ˜ต๐Ÿ˜ž๐Ÿค•๐Ÿคฎ
View GitHub Profile
@jberkus
jberkus / gist:6b1bcaf7724dfc2a54f3
Last active July 2, 2025 14:38
Finding Unused Indexes
WITH table_scans as (
SELECT relid,
tables.idx_scan + tables.seq_scan as all_scans,
( tables.n_tup_ins + tables.n_tup_upd + tables.n_tup_del ) as writes,
pg_relation_size(relid) as table_size
FROM pg_stat_user_tables as tables
),
all_writes as (
SELECT sum(writes) as total_writes
FROM table_scans
@staltz
staltz / introrx.md
Last active July 22, 2025 08:36
The introduction to Reactive Programming you've been missing
# Basic Strongswan ikev2 server setup
* paltform: atlantic.net ubuntu 14.04 x64
* the commands below are run with root account
## Strongswan
```
apt-get install strongswan
apt-get install iptables iptables-persistent
```
@einthusan
einthusan / go1.4arc65-ubuntu.sh
Last active July 10, 2018 23:43
Install Golang 1.4.1 on Ubuntu 14.04 AWS EC2
#!/bin/sh
# OPTIONAL FLAGS:
#
# -geoip true
# this will install maxmind geoip and auto update crontab file
#
# -cloudwatch true
# this will install aws cloud watch metrics and send them to aws dashboard
#
@mpcabd
mpcabd / curlp.pl
Last active April 9, 2024 22:11
curl with Proxy auto-config (PAC) files
#!/usr/bin/env perl
# This work is licensed under the GNU Public License (GPLv3).
# To view a copy of this license, visit http://www.gnu.org/copyleft/gpl.html
# To read more about this script go to: http://mpcabd.xyz/using-curl-with-proxy-pac-configuration-files/
use strict;
use warnings;
@erica
erica / gist:0c445044e1bf97778263
Last active February 19, 2020 13:32
#swift-lang ReadMe

"JUST BECAUSE YOU'RE USING SWIFT DOESN'T MEAN YOUR QUESTION IS ABOUT SWIFT"

How To Get Answers

Ask your question and then be patient. Tell us what you want to happen, what is actually happening, and include any error messages you find:

  • Provide a scenario. "I am trying to do X, I do so by calling APIs W and Y, but Z happens instead. I see the following error messages:..."
  • Focus on the goal. Ask about what you're trying to achieve (the big story) rather than the specific technical detail that you believe is holding you back.
  • Don't solicit help. Don't say, "Does anyone here know about (for example) Protocol Extensions". Just ask your question.
  • Do your homework. Search the web before asking in-channel.
  • Be courteous Don't just paste Stack Overflow questions in-channel.
  • Remember the topic Refer questions about third party libraries to their developers.
@paulirish
paulirish / bling.js
Last active July 22, 2025 16:34
bling dot js
/* bling.js */
window.$ = document.querySelector.bind(document);
window.$$ = document.querySelectorAll.bind(document);
Node.prototype.on = window.on = function(name, fn) { this.addEventListener(name, fn); };
NodeList.prototype.__proto__ = Array.prototype;
NodeList.prototype.on = function(name, fn) { this.forEach((elem) => elem.on(name, fn)); };
@DomSless
DomSless / KodiSendURL.html
Last active September 15, 2021 20:48
Quick, Dirty 'n' Hacky Method to Send Video URL's to Kodi/XBMC
<!DOCTYPE html>
<html lang=โ€enโ€>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
</head>
<body>
Enter URL:
<input type="text" style="width: 300px;" value="http://download.blender.org/peach/bigbuckbunny_movies/big_buck_bunny_480p_surround-fix.avi">
<button>Send..</button>
</br></br>
@searls
searls / github-wiki-override-test-double-style.css
Last active May 11, 2021 16:33
Some CSS that will make Github Wiki content full-screen friendly (useful when presenting). Override with your browser or an extension like greasemonkey or Stylish to apply to the wikis you want.
/* and now with 100% more branding */
body { border: 10px solid #82FA32; min-height: 720px; }
.container { width: inherit; }
.header { display: none; }
.gh-header { padding: 30px 0px 30px 0px; background-color: black; color: white; }
.gh-header-actions { float: inherit; text-align: center; }
.btn-primary { border-color: #000; background-image: linear-gradient(#333, #000); }
.gh-header-actions .btn { float: inherit; }
.gh-header-title { padding-top: 20px; text-align: center; font-size: 4.2em; margin-right: 0px; font-weight: 100; }
.pagehead { display: none; }
@dragonfax
dragonfax / main.go
Created August 28, 2015 01:24
simple client to access Riak CS using aws-sdk-go
package main
import (
"bytes"
"fmt"
"io/ioutil"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/credentials"
"github.com/aws/aws-sdk-go/service/s3"