Skip to content

Instantly share code, notes, and snippets.

View chrjoh's full-sized avatar
💭
working

Christer Johansson chrjoh

💭
working
View GitHub Profile
@chrjoh
chrjoh / gist:9805762
Created March 27, 2014 11:46
loop over rows of hosts in a file and fetch the cerificate of each host and display the cerificate date's
#!/bin/sh
#
# usage: check_dates_all_hosts.sh hosts_file
# where hosts_:file is a file with one hostename per row
#
function get_cerificate {
REMHOST=$1
REMPORT=${2:-443}
@chrjoh
chrjoh / config.ru
Created March 6, 2012 07:49
Rails Lightweight Stack. Most of this is detailed on Crafting Rails Applications - http://pragprog.com/book/jvrails/crafting-rails-applications
# Run this file with `RAILS_ENV=production rackup -p 3000 -s thin`
# Be sure to have rails and thin installed.
require "rubygems"
# We are not loading Active Record, nor the Assets Pipeline, etc.
# This could also be in your Gemfile.
gem "actionpack", "~> 3.2"
gem "railties", "~> 3.2"
# The following lines should come as no surprise. Except by
@chrjoh
chrjoh / aprompt.png
Created September 24, 2012 06:48 — forked from mislav/aprompt.png
My zsh prompt. No oh-my-zsh needed
aprompt.png
@chrjoh
chrjoh / gist:6900092
Created October 9, 2013 11:55
Simple script to check the date of a certificate on a web site
#!/bin/sh
#
# usage: fetch_certificate_and_check_date.sh remote.host.name [port]
#
REMHOST=$1
REMPORT=${2:-443}
echo |\
openssl s_client -connect ${REMHOST}:${REMPORT} 2>&1 |\
sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' |\

Keybase proof

I hereby claim:

  • I am chrjoh on github.
  • I am lodakai (https://keybase.io/lodakai) on keybase.
  • I have a public key whose fingerprint is 034A 52E2 052A BCDA 999B 6A40 4312 C16F 0BC2 0F65

To claim this, I am signing this object:

@chrjoh
chrjoh / gist:3819587
Created October 2, 2012 14:32
Local setup of Jenkins on a mac
Jenkins
Download from jenkins and run the installer
Load and unload manually can be done with
load:sudo launchctl load /Library/LaunchDaemons/org.jenkins-ci.plist
unload: sudo launchctl unload /Library/LaunchDaemons/org.jenkins-ci.plist
heap-size
sudo defaults write /Library/Preferences/org.jenkins-ci heapSize 1024M
@chrjoh
chrjoh / user.js
Created May 16, 2020 08:52 — forked from AetherEternity/user.js
Silent firefox
// Mozilla User Preferences
// To change a preference value, you can either:
// - modify it via the UI (e.g. via about:config in the browser); or
// - set it within a user.js file in your profile (create it if it doesn't exist).
//
// Profile folder location on different systems:
// Windows: C:\Users\<username>\AppData\Roaming\Mozilla\Firefox\Profiles\xxxxxxxx.default
// Mac OS X: Users/<username>/Library/Application Support/Firefox/Profiles/xxxxxxxx.default
// Linux: /home/<username>/.mozilla/firefox/xxxxxxxx.default