Skip to content

Instantly share code, notes, and snippets.

burningTyger /
Created Feb 20, 2018 — forked from chrislkeller/
Displaying data from a flat JSON file on a Handlebars.js template file rendered with AJAX.

Demo: ajax-handlebars

This repo's location has changed.

burningTyger / sequel_to_ms_access.rb
Created Dec 12, 2016 — forked from thinkAmi/sequel_to_ms_access.rb
Sequel: Connecting to Microsoft Access(*.accdb)
View sequel_to_ms_access.rb
# Tested Environment
# Windows7 x64, MS Access2010/2013, sequel 4.11.0
# Gemfile
# source ''
# gem 'sequel'
# gem 'ruby-odbc' # for ODBC
require 'sequel'
burningTyger /
Created Mar 7, 2016 — forked from enginefeeder101/
Test outgoing open ports
LC_ALL=C nc -vzw5 $1 2>&1 | grep -v 'Connection timed out'
N=50 # Specify number of ports to check at once
for port in {1..65535}; do # Specify port range to check here
((i=i%N)); ((i++==0)) && wait
burningTyger / autossh.service
Last active Oct 18, 2015 — forked from thomasfr/autossh.service
Systemd service for autossh
View autossh.service
# use this if you have a systemctl --user script. Runs it as a user.
Description=Keeps a tunnel to '' open
# -p [PORT]
# -l [user]
# -M 0 --> no monitoring
burningTyger / 0_reuse_code.js
Last active Aug 29, 2015
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
These two files should help you to import passwords from mac OS X keychains to 1password.
1) You have some experience with scripting/are a power-user. These scripts worked for me
but they haven't been extensively tested and if they don't work, you're on your own!
Please read this whole document before starting this process. If any of it seems
incomprehensible/frightening/over your head please do not use these scripts. You will
probably do something Very Bad and I wouldn't want that.
2) You have ruby 1.9.2 installed on your machine. This comes as standard with Lion, previous
versions of OS X may have earlier versions of ruby, which *may* work, but then again, they
View bs3-login-form.html
<div class="container">
<div class="row">
<div class="col-sm-6 col-md-4 col-md-offset-4">
<h1 class="text-center login-title">Sign in to continue to Bootsnipp</h1>
<div class="account-wall">
<img class="profile-img" src=""
<form class="form-signin">
<input type="text" class="form-control" placeholder="Email" required autofocus>
<input type="password" class="form-control" placeholder="Password" required>
View server.rb
require 'sinatra'
require 'haml'
$users = {'john' => {:roles => [:user] }, 'mike' => {:roles => [:user, :admin] } }
$tokens = {'123' => {:username => 'john', :expires_at =>}}
helpers do
def authenticate_user!
@auth_token = auth_token
if $tokens.has_key?(@auth_token) && !$tokens[@auth_token][:expires_at].nil? && $tokens[@auth_token][:expires_at] >
# Copy data from a Time Machine volume mounted on a Linux box.
# Usage: <source> <target>
# source: the source directory inside a time machine backup
# target: the target directory in which to copy the reconstructed
# directory trees. Created if it does not exists.