Skip to content

Instantly share code, notes, and snippets.

View statianzo's full-sized avatar
🎯
Focusing

Jason Staten statianzo

🎯
Focusing
View GitHub Profile
//@flow
import React from 'react';
import Styled from './Styled';
import {View, TouchableOpacity, Text} from 'react-native';
type Props = {
children?: any,
};
import React from 'react';
import {
View,
Image,
ListView,
ScrollView,
Text,
TouchableHighlight,
TouchableNativeFeedback,
@statianzo
statianzo / openssl.sh
Last active August 29, 2015 14:17 — forked from colby/openssl.sh
#!/bin/bash
awk=$(which awk || echo 'missing: install awk' && exit 1)
# update apt
sudo apt-get update
# get ssl related packages from simulated upgrade
sudo apt-get upgrade -s | grep ssl | grep Inst | $awk '{print $2}' | xargs -t sudo apt-get install
#!/usr/bin/env bash
# HubCrypt
# ========
#
# Decrypt a file encrypted using hubencrypt (ok, it's just openssl + rsautl +
# your SSH keys). It needs the private key that matches your last public key
# listed at github.com/<user>.keys
#
@statianzo
statianzo / selectable_queue.rb
Created September 10, 2012 19:02 — forked from garybernhardt/selectable_queue.rb
A queue that you can pass to IO.select. This is for use in a GUI application. I'm not turning into a Node programmer.
# A queue that you can pass to IO.select.
#
# NOT THREAD SAFE: Only one thread should write; only one thread should read.
#
# Purpose:
# Allow easy integration of data-producing threads into event loops. The
# queue will be readable from select's perspective as long as there are
# objects in the queue.
#
# Implementation:
@statianzo
statianzo / error_handler.rb
Created August 27, 2012 17:25 — forked from bdotdub/error_handler.rb
Hoptoad notifier for Sinatra
error do
exception = request.env['sinatra.error']
Hoptoad::Notifier.send_error exception, params, request.env if %w(staging production).include?(ENV['RACK_ENV'])
erb :five_hundred
end
@statianzo
statianzo / chat.rb
Created March 9, 2012 02:57 — forked from rkh/chat.rb
Simple Chat Application using the Sinatra Streaming API
# coding: utf-8
require 'sinatra'
set server: 'thin', connections: []
get '/' do
halt erb(:login) unless params[:user]
erb :chat, locals: { user: params[:user].gsub(/\W/, '') }
end
get '/stream', provides: 'text/event-stream' do
@statianzo
statianzo / gist:1886365
Created February 22, 2012 18:07 — forked from m0tive/gist:1884821
export google history
require 'mechanize'
require 'logger'
require 'date'
## Call:
## $ ruby export.rb <gmail> <password>
caFile = File.join(File.dirname(__FILE__), 'cacert.pem')
if not File.exists? caFile
require 'net/http'
@statianzo
statianzo / about.md
Created August 11, 2011 03:34 — forked from jasonrudolph/about.md
Programming Achievements: How to Level Up as a Developer