Skip to content

Instantly share code, notes, and snippets.

View drio's full-sized avatar
🐢
I don't know

David Rio Deiros drio

🐢
I don't know
View GitHub Profile
@rcrowley
rcrowley / statebird.sh
Created July 18, 2013 15:04
How to get a reservation at State Bird Provisions
set -e
mail() {
echo "$@" |
/usr/bin/mail -a"From: Richard Crowley <r@rcrowley.org>" -s"State Bird Provisions" "1234567890@vtext.com"
echo "$(date): there was a reservation!" >&2
}
TMP="$(mktemp)"
trap "mail \"FAILURE\"; rm -f \"$TMP\"" EXIT INT QUIT TERM
@luk3thomas
luk3thomas / Gemfile
Created February 22, 2018 16:52
Proxy to staging
source "https://rubygems.org"
gem "rack"
gem "rack-proxy"
# vim: filetype=muttrc
#
#
# make sure that you are using mutt linked against slang, not ncurses, or
# suffer the consequences of weird color issues. use "mutt -v" to check this.
# custom body highlights -----------------------------------------------
# highlight my name and other personally relevant strings
color body color136 default "(dominique|orban)"
@jon-a-nygaard
jon-a-nygaard / README-Highcharts-Webpack-Babel.md
Last active October 30, 2020 18:50
A Highcharts example in use with Webpack and Babel.

A Highcharts example in use with Webpack and Babel.

Install

  1. Download source files
  2. Run npm install to install all dependencies.
  3. Run npm run build to bundle app.js into bundle.js

Open application

  1. Open index.html in a browser.
@nhimf
nhimf / mqtt-to-influx.py
Created February 4, 2016 21:08
Very crude Python script to transfer data from mqtt to InfluxDB
import paho.mqtt.client as mqtt
from influxdb import InfluxDBClient
import datetime
# The callback for when the client receives a CONNACK response from the server.
def on_connect(client, userdata, flags, rc):
print("Connected with result code "+str(rc))
# Subscribing in on_connect() means that if we lose the connection and
# reconnect then subscriptions will be renewed.
@DominicBreuker
DominicBreuker / iptables.md
Last active October 14, 2021 17:47
iptables firewall

iptables cheat sheet

Concepts

iptables defines tables, which group features:

  • filter: use it to filter traffic
  • nat: use it to implement NAT
  • raw: use it to define which connections iptables should track (stateful firewall)
  • mangle: use it to change some fields in packets (e.g., TTL)
  • security: use it to define access control
@schmurfy
schmurfy / gist:3199254
Created July 29, 2012 14:33
Install pandoc Mac OS X 10.8
# Install MacTex: http://mirror.ctan.org/systems/mac/mactex/mactex-basic.pkg
$ sudo chown -R `whoami` /usr/local/texlive
$ tlmgr update --self
$ tlmgr install ucs
$ tlmgr install etoolbox
# Install pandoc view homebrew
@enjalot
enjalot / ndjson.md
Last active December 15, 2021 04:10
Tips for processing Quick, Draw! data with ndjson-cli

Quick, Draw! ndjson data

The Quick, Draw! dataset uses ndjson as one of the formats to store its millions of drawings.

We can use the ndjons-cli utility to quickly create interesting subsets of this dataset.

The drawings (stroke data and associated metadata) are stored as one JSON object per line. e.g.:

{
@pdxjohnny
pdxjohnny / WIREGUARD.md
Last active January 27, 2023 13:41
Wireguard Setup

How to use Wireguard

Wireguard is a VPN that comes built into Linux kernels >= 5.6 It also has clients for OSs like Windows, OSX, and Android.

If you're looking for how to have a virtual LAN party, Wireguard is a great way to do it. Since it's cross platform. You can even play Windows games on Linux using Lutris and network them with Wireguard to get Windows and Linux machines playing together.

@billdwhite
billdwhite / index.html
Last active February 7, 2023 05:49
d3 treemap with child highlighting
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<title>Treemap - Neat Zoom Effect</title>
<script type="text/javascript" src="http://www.billdwhite.com/wordpress/wp-content/js/browserdetect/browserdetect.js"></script>
<script type="text/javascript" src="http://www.billdwhite.com/wordpress/wp-content/js/d3/d3.js"></script>
<style type="text/css">
body {
overflow: hidden;