Skip to content

Instantly share code, notes, and snippets.

View riipandi's full-sized avatar
🦀
Deep dive into Rust

Aris Ripandi riipandi

🦀
Deep dive into Rust
View GitHub Profile
<VirtualHost *:80>
ServerName ${vhost}
ServerAlias www.${vhost}
DocumentRoot /var/www/${vhost}/public/html
Redirect / https://${vhost}
</VirtualHost>
<VirtualHost *:443>
Header set Strict-Transport-Security "max-age=63072000; includeSubdomains;"
Header set Content-Security-Policy "default-src https://${vhost}:443"
Header set x-frame-options "SAMEORIGIN"
@riipandi
riipandi / unbound-osx-homebrew.md
Last active May 10, 2020 13:30 — forked from denji/unbound-osx-homebrew.md
Install unbound DNS(SEC) resolver on OS X, on the basis of https://www.spatof.org/blog/unbound-dns-resolver-on-osx.html
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:
@riipandi
riipandi / _readme.md
Last active August 17, 2020 20:46 — forked from irazasyed/1-dnsmasq-dnscrypt-proxy-setup.md
DNSCrypt + dnsmasq-proxy + Laravel Valet

Setup dnsmasq with Cloudflare on macOS

Using Laravel Valet for localhost development, So it installs dnsmasq with it. dnsmasq runs on port 53, The default DNS port. So we setup dnscrypt-proxy on port 5300 with the default config files in this gist.

dnscrypt-proxy Installation

brew install dnscrypt-proxy
Get-AppxPackage "Microsoft.3DBuilder" | ForEach-Object {Add-AppxPackage -DisableDevelopmentMode -Register
Get-AppxPackage "Microsoft.AppConnector" | ForEach-Object {Add-AppxPackage -DisableDevelopmentMode -Register
Get-AppxPackage "Microsoft.BingFinance" | ForEach-Object {Add-AppxPackage -DisableDevelopmentMode -Register
Get-AppxPackage "Microsoft.BingFoodAndDrink" | ForEach-Object {Add-AppxPackage -DisableDevelopmentMode -Register
Get-AppxPackage "Microsoft.BingHealthAndFitness" | ForEach-Object {Add-AppxPackage -DisableDevelopmentMode -Register
Get-AppxPackage "Microsoft.BingMaps" | ForEach-Object {Add-AppxPackage -DisableDevelopmentMode -Register
Get-AppxPackage "Microsoft.BingNews" | ForEach-Object {Add-AppxPackage -DisableDevelopmentMode -Register
Get-AppxPackage "Microsoft.BingSports" | ForEach-Object {Add-AppxPackage -DisableDevelopmentMode -Register
Get-AppxPackage "Microsoft.BingTranslator" | ForEach-Object {Add-AppxPackage -DisableDevelopmentMode -Register
Get-AppxPackage "Microsoft.BingTra
@riipandi
riipandi / update-path.sh
Last active December 24, 2020 18:09
Script to install Golang on Linux and WSL (Windows Subsystem for Linux)
#!/usr/bin/env bash
if [[ $EUID -ne 1 ]]; then echo -e 'This script must be run as non-root user' ; exit 1 ; fi
# Add Golang to path
echo "Configuring environment variables..."
GOROOT="/usr/local/go"
GOPATH="/mnt/d/Workspace/Goland"
if [ -d "$GOROOT" ]; then
if ! grep -q 'GOPATH' $HOME/.bashrc ; then
@riipandi
riipandi / DropboxSync.py
Last active December 19, 2015 14:09 — forked from wrenoud/DropboxSync.py
Dropbox with Python
import os
import sys
import pickle
import console
# I moved 'dropboxlogin' into a sub folder so it doesn't clutter my main folder
sys.path += [os.path.join(os.path.dirname(os.path.abspath(__file__)), 'lib')]
import dropboxlogin # this code can be found here https://gist.github.com/4034526
STATE_FILE = '.dropbox_state'
@riipandi
riipandi / Sublimetext-Shortcut
Last active December 10, 2015 02:38
Sublime Text 2 Shortcut
h1. Sublime Text 2 - Useful Shortcuts (PC)
Loosely ordered with the commands I use most towards the top. Sublime also offer "full documentation":http://www.sublimetext.com/docs/2/.
h2. Editing
| *Ctrl+C* | copy current line (if no selection) |
| *Ctrl+X* | cut current line (if no selection) |
| *Ctrl+⇧+K*| delete line |
| *Ctrl+↩* | insert line after |