Skip to content

Instantly share code, notes, and snippets.

View tdegrunt's full-sized avatar

Tom de Grunt tdegrunt

View GitHub Profile
@tdegrunt
tdegrunt / bootstrap.sh
Created September 20, 2021 11:53
ubuntu 20.04 ruby / rails bootstrap
sudo apt-get install autoconf bison build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm6 libgdbm-dev libdb-dev
sudo apt-get update
sudo apt-get -y install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev software-properties-common libffi-dev postgresql-13 postgresql-13-postgis-3 libpq-dev libtool-bin cmake pkg-config
curl -fsSL https://github.com/rbenv/rbenv-installer/raw/HEAD/bin/rbenv-installer | bash
sh -c 'echo "export PATH=~/.rbenv/bin:\$PATH" >> ~/.bash_profile'
sh -c 'echo "eval \"\$(rbenv init - bash)\"" >> ~/.bash_profile'
@tdegrunt
tdegrunt / a_openssl_playground.md
Created July 12, 2021 17:47 — forked from jcheng3397/a_openssl_playground.md
openSSL public key extract

OpenSSL Playground

Certificates

Print Certificate ( crt file )

openssl x509 -in stackexchangecom.crt -text -noout

Print Certificate ( pem file )

openssl x509 -in cert.pem -text -noout

Print Certificate ( cer file )

openssl x509 -inform der -in foobar.cer -noout -text

Read part of Certificate
@tdegrunt
tdegrunt / generatesamplembox.rb
Last active July 2, 2021 10:30
Generating sample mbox for IMAPtest
require 'mail'
require 'securerandom'
size_distribution = {
10 => (0..19),
80 => (20..39),
150 => (40..59),
250 => (60..79),
15_000 => (80..100)
}

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@tdegrunt
tdegrunt / spacemacs-keybindings
Created April 5, 2020 09:11 — forked from adham90/spacemacs-keybindings
spacemacs keybindings that i need to learn
SPC s c remove highlight
**** Files manipulations key bindings
Files manipulation commands (start with ~f~):
| Key Binding | Description |
|-------------+----------------------------------------------------------------|
| ~SPC f c~ | copy current file to a different location |
| ~SPC f C d~ | convert file from unix to dos encoding |
| ~SPC f C u~ | convert file from dos to unix encoding |
;;; x12-mode.el --- major mode for editing X12 messages
;; Copyright (C) 2005 APP Design, Inc.
;; Author: Ivan K, x12 at users.sourceforge.net
;; Maintainer: Ivan K, x12 at users.sourceforge.net
;; Version: 1.0
;; Keywords: X12 evil must die message file EDI major mode
;; Created: 2005-02-08
;; Modified: 2005-02-08
@tdegrunt
tdegrunt / keyboardLayout.json
Last active January 27, 2025 01:36
Visual Studio Code (vscode/code) Colemak keyboard layout
{
"layout": {
"id": "com.apple.keylayout.Colemak",
"localizedName": "Colemak",
"lang": "en"
},
"rawMapping": {
"KeyA": {
"value": "a",
"valueIsDeadKey": false,
@tdegrunt
tdegrunt / tmux-tmuxinator-setup.md
Created March 3, 2020 22:09 — forked from colmarius/tmux-tmuxinator-setup.md
Project start/stop with tmux + tmuxinator

1. Install tmux + tmuxinator

gem install tmuxinator

2. Add ~/.tmuxinator project specific configurations

# File: ~/.tmuxinator/project-name.yml

name: project-name
@tdegrunt
tdegrunt / sidekiq_monitoring
Created February 15, 2020 23:10 — forked from ngsmrk/sidekiq_monitoring
Sidekiq queue checking via rails console
stats = Sidekiq::Stats.new
stats.queues
stats.enqueued
stats.processed
stats.failed
@tdegrunt
tdegrunt / bt-agent.service
Created June 28, 2019 05:56 — forked from rcarmo/bt-agent.service
Set up PAN networking on Raspbian Stretch (use sudo to create these files and run all commands)
# in /etc/systemd/system
[Unit]
Description=Bluetooth Agent
[Service]
ExecStart=/usr/bin/bt-agent -c NoInputNoOutput
Type=simple
[Install]
WantedBy=multi-user.target