Skip to content

Instantly share code, notes, and snippets.

View tdegrunt's full-sized avatar

Tom de Grunt tdegrunt

View GitHub Profile
@tdegrunt
tdegrunt / .solargraph.yml
Created November 14, 2022 13:39 — forked from searls/.solargraph.yml
My config with steps to use solargraph for Rails projects in VS Code (WIP)
---
include:
- ".solargraph_definitions.rb"
- "app/**/*.rb"
- "config/**/*.rb"
- "lib/**/*.rb"
exclude:
- test/**/*
- vendor/**/*
- ".bundle/**/*"
@tdegrunt
tdegrunt / ssdp.node.js
Created January 15, 2012 13:11 — forked from chrishulbert/ssdp.node.js
Service discovery using node.js and ssdp / universal plug n play
var dgram = require('dgram'); // dgram is UDP
// Listen for responses
function listen(port) {
var server = dgram.createSocket("udp4");
server.on("message", function (msg, rinfo) {
console.log("server got: " + msg + " from " + rinfo.address + ":" + rinfo.port);
});
@tdegrunt
tdegrunt / Readme.md
Created July 6, 2022 19:56 — forked from mechamogera/Readme.md
Route53のDynamicDNS設定Rubyスクリプト

使用方法

  • 以下のようにしてスクリプトを取得する。もしくは、downloadして解凍。
 $ git clone git://gist.github.com/3973319.git
  • 実行
  • 自マシンでのIPアドレスを取得してRoute53にhoge.example.com.のAレコードを設定する
@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 / provision.sh
Created February 29, 2016 10:46 — forked from c3mdigital/provision.sh
Vagrant Provisioning Script
#!/bin/bash
#
# provision.sh
#
# This file is specified in Vagrantfile and is loaded by Vagrant as the primary
# provisioning script whenever the commands `vagrant up`, `vagrant provision`,
# or `vagrant reload` are used. It provides all of the default packages and
# configurations included with Varying Vagrant Vagrants.
# By storing the date now, we can calculate the duration of provisioning at the
@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