Skip to content

Instantly share code, notes, and snippets.

View pvdb's full-sized avatar
🖥️
Busy making computers do things!

Peter Vandenberk pvdb

🖥️
Busy making computers do things!
View GitHub Profile
@pvdb
pvdb / git-hub
Last active February 27, 2023 08:55
#!/usr/bin/ruby
# frozen_string_literal: true
#
# INSTALLATION
#
# ln -s ${PWD}/git-hub $(brew --prefix)/bin/
# sudo ln -s ${PWD}/git-hub /usr/local/bin/
#
# CONFIGURATION
#!/usr/bin/env ruby
#
# INSTALLATION
#
# ln -s ${PWD}/git-stash-switcher $(brew --prefix)/bin/
#
# COMING SOON!
@pvdb
pvdb / rbenv-upgrade
Last active November 16, 2023 10:09
#!/usr/bin/env ruby -r semantic -r consenter
# frozen_string_literal: true
#
# INSTALLATION
#
# ln -s ${PWD}/rbenv-upgrade $(brew --prefix)/bin/
# sudo ln -s ${PWD}/rbenv-upgrade /usr/local/bin/
#
@pvdb
pvdb / subst
Last active March 11, 2023 09:29
#!/usr/bin/env bash
#
# INSTALLATION
#
# ln -s ${PWD}/subst $(brew --prefix)/bin/
# sudo ln -s ${PWD}/subst /usr/local/bin/
#
# ALTERNATIVE IMPLEMENTATION
#
@pvdb
pvdb / git-ctags
Last active April 23, 2025 07:50
#!/bin/sh
#
# INSTALLATION
#
# ln -s ${PWD}/git-ctags $(brew --prefix)/bin/
# sudo ln -s ${PWD}/git-ctags /usr/local/bin/
#
# https://tbaggery.com/2011/08/08/effortless-ctags-with-git.html
@pvdb
pvdb / git-recurse
Last active January 30, 2025 21:11
#!/bin/sh
#
# INSTALLATION
#
# ln -s ${PWD}/git-recurse $(brew --prefix)/bin/
# sudo ln -s ${PWD}/git-recurse /usr/local/bin/
#
(
@pvdb
pvdb / git-subst
Last active August 20, 2024 15:01
#!/usr/bin/env bash
#
# INSTALLATION
#
# ln -s ${PWD}/git-subst $(brew --prefix)/bin/
# sudo ln -s ${PWD}/git-subst /usr/local/bin/
#
FROM="$1" ;
@pvdb
pvdb / consenter.rb
Last active September 4, 2018 17:59
idiomatic Enumerable extensions to filter elements by consent
# rubocop:disable all
# https://github.com/pvdb/consenter
require 'io/console'
class Consenter # :nodoc:
VALID_RESPONSES = {
'y' => 'yes to this',
@pvdb
pvdb / git-rev-diff
Last active July 12, 2023 21:26
Run the same command against two git revisions, and diff the output
#!/usr/bin/env bash
#
# INSTALLATION
#
# ln -s ${PWD}/git-rev-diff $(brew --prefix)/bin/
# sudo ln -s ${PWD}/git-rev-diff /usr/local/bin/
#
# check command-line options
@pvdb
pvdb / SSLPoke.java
Created May 18, 2016 19:21 — forked from 4ndrej/SSLPoke.java
Test of java SSL / keystore / cert setup. Check the commet #1 for howto.
import javax.net.ssl.SSLSocket;
import javax.net.ssl.SSLSocketFactory;
import java.io.*;
/** Establish a SSL connection to a host and port, writes a byte and
* prints the response. See
* http://confluence.atlassian.com/display/JIRA/Connecting+to+SSL+services
*/
public class SSLPoke {
public static void main(String[] args) {