Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
working

Christer Johansson chrjoh

💭
working
View GitHub Profile
@chrjoh
chrjoh / user.js
Created May 16, 2020 — forked from AetherEternity/user.js
Silent firefox
View user.js
// 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
View keybase.md

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:9805762
Created Mar 27, 2014
loop over rows of hosts in a file and fetch the cerificate of each host and display the cerificate date's
View gist:9805762
#!/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 / gist:6900092
Created Oct 9, 2013
Simple script to check the date of a certificate on a web site
View gist:6900092
#!/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' |\
@chrjoh
chrjoh / gist:3819587
Created Oct 2, 2012
Local setup of Jenkins on a mac
View gist:3819587
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 / aprompt.png
Created Sep 24, 2012 — forked from mislav/aprompt.png
My zsh prompt. No oh-my-zsh needed
@chrjoh
chrjoh / config.ru
Created Mar 6, 2012
Rails Lightweight Stack. Most of this is detailed on Crafting Rails Applications - http://pragprog.com/book/jvrails/crafting-rails-applications
View config.ru
# 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