Skip to content

Instantly share code, notes, and snippets.

View HendrikPetertje's full-sized avatar

Peter van der Meulen HendrikPetertje

View GitHub Profile
@HendrikPetertje
HendrikPetertje / 2-factor-terminal .md
Last active September 27, 2018 13:07
Setting up time-based authenticator in your terminal

Wanna try google auth, but not have the app on your phone and use your CLI instead? sure!

making it easy

Begin by adding this fun alias to your ~/.bashrc. that way executing this bit of fun will be easier

alias google_auth=`sudo ~/.auth/google.sh`

Turn your auth-seed into something safer

@HendrikPetertje
HendrikPetertje / .tmux-powerlinerc
Last active September 21, 2018 13:34
Tmux conf
# Default configuration file for tmux-powerline.
# Modeline {
# vi: foldmarker={,} foldmethod=marker foldlevel=0 tabstop=4 filetype=sh
# }
# General {
# Show which segment fails and its exit code.
export TMUX_POWERLINE_DEBUG_MODE_ENABLED="false"
# Use patched font symbols.
export TMUX_POWERLINE_PATCHED_FONT_IN_USE="true"
@HendrikPetertje
HendrikPetertje / doc.md
Last active August 15, 2018 13:54
Drive-by Västerboten

Here are some good options for your next night stop:

1. Björnlandet

pic
Björnlandet is an officialy recognized national park, which means it's being maintained by the state and not just the province. The park is quite big and you can have fun for a good day or 3 if you want to explore everything.

Pro's:

  • There are huts, that can be used freely (though be open to sharing your space with others) for up to 3 days.
  • There are marked tent places with basic supplies (wood, etc.).

Keybase proof

I hereby claim:

  • I am hendrikpetertje on github.
  • I am hendrikpeter (https://keybase.io/hendrikpeter) on keybase.
  • I have a public key ASBiiWOoByGe635B7w3Vu7fh7a15KnjaFjhFrU1d-my7Bgo

To claim this, I am signing this object:

@HendrikPetertje
HendrikPetertje / install-elixir.sh
Created September 13, 2016 11:50
install elixir
#!/bin/sh
# Install script for elixir by Peter van der Meulen
echo "Welcome to elixir install script";
echo "Please make sure you currently have no installation of elixir on your computer before running this script \n";
echo "This script will install:";
echo "-erlang via homebrew";
echo "-exenv (an rbenv flavor for elixir)";
echo "-elixir build 1.3";
@HendrikPetertje
HendrikPetertje / readme.md
Last active February 13, 2023 22:59
How to Make your own delivery methods in rails 4.+

Writing your own delivery method in Rails (4.+)

Imagine, you got your rails server and you need to send out a bunch of mails to your recipients. no big deal, but SMTP is just very slow when compared with things like simple HTTP API calls.

I set out a few days to write my own delivery method, but found online sources somewhat lacking, outdated or completely skipping this part of sending mails in rails. So lets start making a simple mail_delivery method that outputs the mail to a file in your project home.

You can change the postman step in this tutorial to match your API, etc. instead.

@HendrikPetertje
HendrikPetertje / instructions.md
Created October 29, 2015 16:30
powder with https

For everyone who wants to try https in their powder: install tunnelssl it’s tunnel but it makes sure yoyr ssl is system verified.

gem install tunnelssl

Tunnel ssl requires some form of sudo. problem being that when you run a gem in sudo all files it touches become root files. There is a handy rbenv plugin to tackle this problem:

git clone git://github.com/dcarley/rbenv-sudo.git ~/.rbenv/plugins/rbenv-sudo

open your .bashrc, .bash_profile, .zshrc or zsh_profile (for pro’s) and add

@HendrikPetertje
HendrikPetertje / installation.md
Last active August 20, 2016 02:38
React Native course

Installing react native

like a baws
ps: MacosX only sorry linux fans.

Installing NodeJS using ndenv

As of writing this in september 2015 react native requires installing nodejs 4.0.+

I like ndenv so let’s use that.

Open a terminal and issue the following commands (I’m assuming you have home-brew and some form of git installed here)

@HendrikPetertje
HendrikPetertje / atom.sh
Last active August 29, 2015 14:23
atom
# bash <(curl -s https://gist.githubusercontent.com/HendrikPetertje/a7772596943d55acfd14/raw/2e52a0402b938639d1d909facd301c8f783176ec/atom.sh)
add-apt-repository ppa:webupd8team/atom -y
apt-get update
apt-get install atom
# Search strftime on google to find time formats and default day month etc annotation
en:
# (or sv: whatever)
time:
formats:
short: "%A %e %B"
time: "%H:%M"
default: "%d/%m/%Y %H:%M"
small: '%a %d %B'
date: