Skip to content

Instantly share code, notes, and snippets.

View satie's full-sized avatar

Satie Sharma satie

  • Virginia, US
View GitHub Profile
@satie
satie / nginx-unificontroller.conf
Created February 2, 2019 03:01 — forked from vidia/nginx-unificontroller.conf
Example, working, NGINX config for proxying to Unifi Controller software and using letsencrypt. Includes websocket fix.
# I had a bit of trouble getting my unifi controller (hosted offsite) to use a proxy/letsencrypt. So here are the fruits of my labor.
# The unifi default port is 8443 running on localhost.
# License: CC0 (Public Domain)
server {
# SSL configuration
#
listen 443 ssl default_server;
listen [::]:443 ssl default_server;
@satie
satie / raspberry-pi-vpn-router.md
Created August 20, 2018 04:56 — forked from superjamie/raspberry-pi-vpn-router.md
Raspberry Pi VPN Router

Raspberry Pi VPN Router

This is a quick-and-dirty guide to setting up a Raspberry Pi as a "router on a stick" to PrivateInternetAccess VPN.

Requirements

Install Raspbian Jessie (2016-05-27-raspbian-jessie.img) to your Pi's sdcard.

Use the Raspberry Pi Configuration tool or sudo raspi-config to:

// Includes functions for exporting active sheet or all sheets as JSON object (also Python object syntax compatible).
// Tweak the makePrettyJSON_ function to customize what kind of JSON to export.
var FORMAT_ONELINE = 'One-line';
var FORMAT_MULTILINE = 'Multi-line';
var FORMAT_PRETTY = 'Pretty';
var LANGUAGE_JS = 'JavaScript';
var LANGUAGE_PYTHON = 'Python';
#!/bin/bash
function jsonval {
temp=`echo $json | sed 's/\\\\\//\//g' | sed 's/[{}]//g' | awk -v k="text" '{n=split($0,a,","); for (i=1; i<=n; i++) print a[i]}' | sed 's/\"\:\"/\|/g' | sed 's/[\,]/ /g' | sed 's/\"//g' | grep -w $prop`
echo ${temp##*|}
}
json=`curl -s -X GET http://twitter.com/users/show/$1.json`
prop='profile_image_url'
picurl=`jsonval`
module AppData
#require 'deep_symbolizable'
# again - it's a singleton, thus implemented as a self-extended module
extend self
@_settings = {}
attr_reader :_settings
@satie
satie / index.html
Created March 1, 2013 09:21
A CodePen by satiesharma. fade loading - based on previous pen: http://codepen.io/diegopardo/pen/JFBCn
<h1 class="loader">
<span>C</span>
<span>O</span>
<span>M</span>
<span>I</span>
<span>N</span>
<span>G</span>
<span>&nbsp;</span>
<span>S</span>
<span>O</span>