Skip to content

Instantly share code, notes, and snippets.

View LaurentFough's full-sized avatar
👨‍🔬
🕺👨‍✈️🕵️‍♂️

Łaurent ʘ❢Ŧ Ŧough LaurentFough

👨‍🔬
🕺👨‍✈️🕵️‍♂️
View GitHub Profile
@LaurentFough
LaurentFough / .bashrc
Created June 5, 2016 23:41 — forked from vsouza/.bashrc
Golang 1.5 setup in Mac OSX with HomeBrew. Set `GOPATH` and `GOROOT` variables in zshell or bash.
# Set variables in .bashrc file
# don't forget to change your path correctly!
export GOPATH=$HOME/golang
export GOROOT=/usr/local/opt/go/libexec
export PATH=$PATH:$GOPATH/bin
export PATH=$PATH:$GOROOT/bin
To install unbound you can use homebrew
$ brew install unbound ldns
Now we can edit the configuration file of unbound which by default is located in /usr/local/etc/unbound/unbound.conf:
@LaurentFough
LaurentFough / notes.md
Created April 25, 2017 01:44 — forked from monicao/notes.md
Setting up your own Ruby Dev Environment on a Mac

Setting up the Ruby dev environment on a Mac

Tested on Yosemite. Should work on El Cap. Message me if it doesn't.

Why would I want to do that?

  • You are tired of using vagrant
  • You want to run guard
  • You want use Sublime plugins (like RSpec or Guard plugins)
  • You want your code to run faster in development
@LaurentFough
LaurentFough / dvm.fish
Created April 26, 2017 23:46 — forked from 7sDream/dvm.fish
Set up dvm command for fish shell.
# Docker Version Manager wrapper for *nix
# Implemented as a POSIX-compliant function
# Should work on sh, dash, bash, ksh, zsh
# To use, source this file from your bash profile
begin # This ensures the entire script is downloaded
set DVM_SCRIPT_SOURCE $_
# __dvm_has() {
# type "$1" > /dev/null 2>&1
@LaurentFough
LaurentFough / Readme.md
Created July 26, 2017 03:50 — forked from fffonion/Readme.md
Simple GeoIP and ASNnum query server http://ip.yooooo.us
  • nginx with ngx_http_geoip_module, echo-nginx-module, lua-nginx-module is required; libgeoip needs to be installed and geoip database should be placed under /usr/share/GeoIP.
  • http://example.com for current GeoIP and http://example.com/ip for current IP only
  • http://example.com/x.x.x.x to query any IP.
  • http://example.com/domain-name for GeoIP of domain-name and http://example.com/domain-name/ip to return IP of domain-name only. If multiple IPs are set to single domain-name, all of them will be returned. Only A record will be used.
  • Sample requests are:
$ curl http://example.com/
x.x.x.x
Country, City
ASN number
@LaurentFough
LaurentFough / CBC_Podcast_Data.json
Last active August 27, 2018 04:26
CBC Podcast Data (oldish)
[
{
"_comment": "https://github.com/caryan/CBC-Radio-Player/blob/develop/resources/stationData/PodCastData.json",
},
{
"RSSFeed": "http://www.cbc.ca/podcasting/includes/andthewinneris.xml",
"description": "Award-winning radio fresh from the winners-circle to your computer. From the Peabody Awards, to the Prix Italia to the New York Festivals - every mp3 is a champ.",
"imgLink": "http://www.cbc.ca/podcasting/images/promo-andthewinneris-sm.jpg",
"title": "And the Winner Is..."
},
@LaurentFough
LaurentFough / index.php
Created September 14, 2018 08:16
Remake of the famous Raspberry Pi Sysinfo Script
<?php
// modified by PROXIMO https://gist.github.com/PROX1MO
// Remake of the famous Raspberry Pi Sysinfo Script
header("Cache-Control: no-cache, must-revalidate");
header("Expires: Sat, 26 May 1983 13:00:00 GMT");
header("Pragma: no-cache");
function NumberWithCommas($in)
{
return number_format($in);
}
@LaurentFough
LaurentFough / README-setup-tunnel-as-systemd-service.md
Created February 28, 2019 08:11 — forked from drmalex07/README-setup-tunnel-as-systemd-service.md
Setup a secure (SSH) tunnel as a systemd service. #systemd #ssh #ssh-tunnel #ssh-forward

README

Create a template service file at /etc/systemd/system/secure-tunnel@.service. The template parameter will correspond to the name of target host:

[Unit]
Description=Setup a secure tunnel to %I
After=network.target
@LaurentFough
LaurentFough / pfctl-cheat-sheet-gist.txt
Last active December 12, 2019 08:12
pfctl cheat sheet
# basic pfctl control
# ==
# Related: http://www.OpenBSD.org
# Last update: Tue Dec 28, 2004
# ==
# Note:
# this document is only provided as a basic overview
# for some common pfctl commands and is by no means
# a replacement for the pfctl and pf manual pages.

basic pfctl control

Related: http://www.OpenBSD.org Last update: Tue Dec 28, 2004 Note: this document is only provided as a basic overview for some common pfctl commands and is by no means a replacement for the pfctl and pf manual pages.

General PFCTL Commands

disable packet-filtering: pfctl -d