Skip to content

Instantly share code, notes, and snippets.

View stevenschobert's full-sized avatar

Steven Schobert stevenschobert

View GitHub Profile
@stevenschobert
stevenschobert / create_ssl_cert_with_chain.sh
Created April 11, 2016 15:05
Just need to concat the original cert with the chain bundle
cat original.crt chain.ca-bundle > chained.crt
@stevenschobert
stevenschobert / check_ssl.sh
Created April 11, 2016 15:04
Checks SSL handshake
openssl s_client -connect example.com:443
@stevenschobert
stevenschobert / fix_bundle_puma.sh
Created April 11, 2016 04:17
Fixing openssl in puma build
# uninstall all gems
gem uninstall puma
# tell bundler about homebrews openssl directory
bundle config build.puma --with-opt-include=/usr/local/opt/openssl/include
# re-install
bundle install
@stevenschobert
stevenschobert / table_link.js
Created April 7, 2016 20:39
Shortcut to link table rows
@stevenschobert
stevenschobert / states.txt
Created February 29, 2016 18:28
Tab separate list of US states and their respective 2 letter codes
Alabama Ala. AL
Alaska Alaska AK
Arizona Ariz. AZ
Arkansas Ark. AR
California Calif. CA
Colorado Colo. CO
Connecticut Conn. CT
Delaware Del. DE
Dist. of Columbia D.C. DC
Florida Fla. FL
@stevenschobert
stevenschobert / my_list.js
Last active February 25, 2016 17:45
Barebones React Native list view
"use strict";
import React, {
StyleSheet,
Text,
View,
TouchableHighlight,
ListView
} from "react-native";
@stevenschobert
stevenschobert / my_component.js
Last active February 23, 2016 20:36
Barebones React Native component
"use strict";
import React, {
StyleSheet,
Text,
View
} from "react-native";
const styles = StyleSheet.create({
container: {
@stevenschobert
stevenschobert / footer_copyright.haml
Created February 6, 2016 06:14
Ruby/Haml snippet for an auto-updating copyright notice. Good for footers and such.
@stevenschobert
stevenschobert / api_client_standalone.rb
Last active February 2, 2017 19:17
Standalone Net::HTTP wrapper class for interfacing with JSON APIs. I typically use this when I have many classes that need to talk to different APIs in a project. Otherwise if I'm building a single API client gem, I sometimes use this instead: https://gist.github.com/stevenschobert/8df1dc08a96ba0ecc274
class ApiClient
attr_accessor :base_url
attr_accessor :default_headers
attr_accessor :default_params
attr_accessor :basic_auth
attr_reader :body
def initialize(base_url:, headers: {}, params: {})
@base_url = base_url
@stevenschobert
stevenschobert / jira_header_color.js
Last active January 11, 2016 20:06
Tampermonkey (http://tampermonkey.net) script to change JIRA header color to black
// ==UserScript==
// @name JIRA Header color
// @namespace https://stevenschobert.com/
// @version 0.1
// @description Changes header color for JIRA.
// @author Steven Schobert
// @match https://ovenbits.atlassian.net/*
// @grant GM_addStyle
// ==/UserScript==