Skip to content

Instantly share code, notes, and snippets.

View jjasonclark's full-sized avatar
🏠
Working from home

Jason Clark jjasonclark

🏠
Working from home
View GitHub Profile
@ageis
ageis / YubiKey-GPG-SSH-guide.md
Last active July 5, 2024 09:20
Technical guide for using YubiKey series 4 for GPG and SSH

YubiKey 4 series GPG and SSH setup guide

Written for fairly adept technical users, preferably of Debian GNU/Linux, not for absolute beginners.

You'll probably be working with a single smartcard, so you'll want only one primary key (1. Sign & Certify) and two associated subkeys (2. Encrypt, 3. Authenticate). I've published a Bash function which automates this slightly special key generation process.

@alexellis
alexellis / k8s-pi.md
Last active April 11, 2024 14:17
K8s on Raspbian
@rondomondo
rondomondo / check_jwt_sig.py
Last active February 21, 2024 14:55
Two methods/examples of how to decode and verify the signature of AWS cognito JWT web tokens externally. This uses RSA key pair and alternatively PKCS1_v1_5. See https://gist.github.com/rondomondo/efff911f2c41c295e23415e94e12b8d3 for example of signing and verification by downloading an ISSUERS PKI SSL certificate from the signers website, and h…
#!/usr/bin/env python
import os
import time
import json
import base64
import requests
import argparse
from base64 import urlsafe_b64decode, b64decode
from Crypto.Hash import SHA256, SHA512
@ipbastola
ipbastola / clean-up-boot-partition-ubuntu.md
Last active June 5, 2024 21:05
Safest way to clean up boot partition - Ubuntu 14.04LTS-x64, Ubuntu 16.04LTS-x64

Safest way to clean up boot partition - Ubuntu 14.04LTS-x64, Ubuntu 16.04LTS-x64

Reference

Case I: if /boot is not 100% full and apt is working

1. Check the current kernel version

$ uname -r 
@gerryk
gerryk / 50-autobackup.rules
Created February 5, 2016 13:15
UDEV rule to automatically backup stuff when I attach my backup drive
# UDEV rules to setup automatic backup upon disk insertion
# You can get the discriminant informations with the following command :
# udevinfo -a -p $(udevinfo -q path -n /dev/sda)
KERNEL=="sd?1", ACTION=="add", SUBSYSTEMS=="scsi", ATTRS{vendor}=="Maxtor", ATTRS{model}=="Basics Portable", RUN+="/root/autobackup.sh %k"
@vamdt
vamdt / city.rb
Last active July 26, 2022 05:01 — forked from sumskyi/README.md
rails4 sti, custom "type" column name and value
class City < GeoEntity
def self.sti_name
3
end
end
@proubits
proubits / rubymine-set-spork
Last active April 21, 2016 00:19
Make RubyMine to run rspec/cucumber with Spork DRb Server
==Make RubyMine to run rspec/cucumber with Spork DRb Server
I was testing RubyMine 6.3 and encountered a problem when running spec file with Spork DRb Server running at the background. The Rspec test failed with the following error message:
no such file to load -- teamcity/spec/runner/formatter/teamcity/formatter (LoadError)
RubyMine can run the spec without problem if there's no DRb running.
I spent a lot of time researching the topic to fix it and couldn't find an exact solution for the problem. However from the online resources I was able to come out with a way to fix the problem. Basically, you need to tell RubyMine to run spork with load path for the formatter.
In RubyMine you can set the Run options for Spork. For RubyMine 6.3, go to menu <b>Run</b>...<b>Edit Configurations</b>..., select <b>Defaults</b>...<b>Spork DRb</b>. Now on the <i>Environment variables</i> add this "<tt>RUBYMINE_HOME=/path/to/your-ruby-mine/</tt>"(ignore the double quote), and on the <i>Ruby arguments</i>, append this to th
@lodestone
lodestone / install-macvim-with-lua.sh
Created January 25, 2014 09:17
brew install macvim with lua
brew install macvim --with-cscope --with-lua --override-system-vim
(source "melpa" "http://melpa.milkbox.net/packages/")
(source "gnu" "http://elpa.gnu.org/packages/")
(source "marmalade" "http://marmalade-repo.org/packages/")
(depends-on "ac-js2")
(depends-on "adaptive-wrap")
(depends-on "ag")
(depends-on "auto-complete")
(depends-on "calfw")
(depends-on "cask")
;; Set the starting position and width and height of Emacs Window
(add-to-list 'default-frame-alist '(left . 0))
(add-to-list 'default-frame-alist '(top . 0))
(add-to-list 'default-frame-alist '(height . 45))
(add-to-list 'default-frame-alist '(width . 175))
;; To get rid of Weird color escape sequences in Emacs.
;; Instruct Emacs to use emacs term-info not system term info
;; http://stackoverflow.com/questions/8918910/weird-character-zsh-in-emacs-terminal
(setq system-uses-terminfo nil)