Skip to content

Instantly share code, notes, and snippets.

Avatar

Isao Sugimoto d6rkaiz

View GitHub Profile
@d6rkaiz
d6rkaiz / debian-strongswan.md
Created Nov 14, 2020 — forked from andrewlkho/debian-strongswan.md
Setting up a secure VPN with strongSwan on debian
View debian-strongswan.md

With heightening concern regarding the state of internet privacy (fuelled in part by the passing of the Investigatory Powers Act in the UK), I have set up a VPN server on the virtual server I have hosted with Mythic Beasts. This uses strongSwan and certificate-based IKEv2 authentication.

Assumptions:

  • Debian Jessie server already set up and accessible via debian.example.com, a public IPv4 of 203.0.113.1 and a public IPv6 of 2001:db8::1
  • Client username of me
  • Clients are running the latest versions of macOS and iOS (Sierra and 10 respectively at the time of writing)
  • No need to support any other operating systems (although the setup is easily translated)

For automated deployment of a similar setup, albeit Ubuntu-based and using ansible for deployment, I recommend you take a look at Algo VPN. I used that project as a basis for my configuration.

@d6rkaiz
d6rkaiz / Gemfile
Created Jun 25, 2020 — forked from dhh/Gemfile
HEY's Gemfile
View Gemfile
ruby '2.7.1'
gem 'rails', github: 'rails/rails'
gem 'tzinfo-data', '>= 1.2016.7' # Don't rely on OSX/Linux timezone data
# Action Text
gem 'actiontext', github: 'basecamp/actiontext', ref: 'okra'
gem 'okra', github: 'basecamp/okra'
# Drivers
View gist:593af52771bdfcf6cbb7a5a1fc38dd34
$ git status
# HEAD detached at v2.2.0
# Changes not staged for commit:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
# modified: public/android-chrome-192x192.png
# modified: public/apple-touch-icon.png
# modified: public/favicon.ico
#
View gist:927aef2f4f40ff6f89f8673958ba2783
$ git status
# HEAD detached at v2.2.0
# Changes not staged for commit:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
# modified: public/android-chrome-192x192.png
# modified: public/apple-touch-icon.png
# modified: public/favicon.ico
#
@d6rkaiz
d6rkaiz / git-cleanup-repo
Created Oct 21, 2017 — forked from robmiller/git-cleanup-repo
A script for cleaning up Git repositories; it deletes branches that are fully merged into `origin/master`, prunes obsolete remote tracking branches, and as an added bonus will replicate these changes on the remote.
View git-cleanup-repo
#!/bin/bash
# git-cleanup-repo
#
# Author: Rob Miller <rob@bigfish.co.uk>
# Adapted from the original by Yorick Sijsling
git checkout master &> /dev/null
# Make sure we're working with the most up-to-date version of master.
git fetch
@d6rkaiz
d6rkaiz / cron.sh
Created Sep 20, 2017
remove_remote
View cron.sh
#!/bin/bash
export RBENV_ROOT=$HOME/.rbenv
export PATH=/home/mastodon/.rbenv/shims:/home/mastodon/.rbenv/bin:/usr/local/bin:/usr/bin:/bin
export RAILS_ENV=production
cd /home/mastodon/live && bundle exec rake mastodon:media:remove_remote
@d6rkaiz
d6rkaiz / gist:539a30f6e2e81887eb681e59cfa39a8e
Created Aug 2, 2017
mastodon 1.5.0 missing lib install package for centos 7
View gist:539a30f6e2e81887eb681e59cfa39a8e
yum install libicu-devel
wget ftp://fr2.rpmfind.net/linux/centos/7.3.1611/os/x86_64/Packages/libidn-devel-1.28-4.el7.x86_64.rpm
rpm -ivh libidn-devel-1.28-4.el7.x86_64.rpm
View netstat
# netstat -tpln
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 647/sshd
tcp 0 0 0.0.0.0:5432 0.0.0.0:* LISTEN 22183/postgres
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 1099/master
tcp 0 0 0.0.0.0:443 0.0.0.0:* LISTEN 7779/apache2
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 7779/apache2
View delegates.xml.diff
--- delegates.xml.bak 2017-04-28 09:53:38.042426862 +0000
+++ delegates.xml 2017-04-28 09:55:54.043880544 +0000
@@ -81,8 +81,6 @@
<delegate decode="dvi" command="&quot;dvips&quot; -q -o &quot;%o&quot; &quot;%i&quot;"/>
<delegate decode="dxf" command="&quot;uniconvertor&quot; &quot;%i&quot; &quot;%o.svg&quot;; mv &quot;%o.svg&quot; &quot;%o&quot;"/>
<delegate decode="edit" stealth="True" command="&quot;/etc/alternatives/x-terminal-emulator&quot; -title &quot;Edit Image Comment&quot; -e vi &quot;%o&quot;"/>
- <delegate decode="eps" encode="pdf" mode="bi" command="&quot;gs&quot; -q -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 &quot;-sDEVICE=pdfwrite&quot; &quot;-sOutputFile=%o&quot; &quot;-f%i&quot;"/>
- <delegate decode="eps" encode="ps" mode="bi" command="&quot;gs&quot; -q -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 &quot;-sDEVICE=ps2write&quot; &quot;-sOutputFile=%o&quot; &quot;-f%i&quot;"/>
<delegate decode="fi
@d6rkaiz
d6rkaiz / custom.scss
Created Apr 22, 2017
Mastodon custom.scss for https://mstdn.club default theme
View custom.scss
@import 'application';
/*
* Mastodon custom.scss for https://mstdn.club default theme
* by d6rkaiz
*
* original css created by 生駒菜々(やっきゅん)
* ref: https://userstyles.org/styles/141389/lite-masudon-kun-lite,
* https://userstyles.org/styles/141517/theme
*/
You can’t perform that action at this time.