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
@riipandi
riipandi / virtualhost.sh
Created February 16, 2013 08:52
Apache2 Virtual Host Generator
#!/bin/sh
#================================================================================
# virtualhost.sh
#
# A fancy little script to setup a new virtualhost in Ubuntu based upon the
# excellent virtualhost (V1.04) script by Patrick Gibson <patrick@patrickg.com> for OS X.
#
# This script has been tested on Ubuntu 7.10 (Gutsy Gibbon) with Apache2(!) and
# probably works on Debian as well, but this has not been tested (yet). If you use
# this script on other Linux distributions and can confirm it to work I would like to hear
@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 / wp-banned-subdomain.txt
Last active September 13, 2020 11:34
Example configuration
about access account accounts add address adm admin administrator administration adult advertising affiliate affiliates ajax analytics android anon anonymous api app apps archive atom auth authentication avatar backup banner banners bin billing blog blogs board bot bots business chat cache cadastro calendar campaign careers cgi cp client cliente code comercial compare config connect contact contest create code compras cpanel css dashboard data db design delete demo design designer dev devel dir directory dns dnsadmin doc docs domain download downloads edit editor email ecommerce forum forums faq favorite feed feedback flog follow file files free ftp gadget gadgets games guest group groups help home homepage host hosting hostname html http httpd https hpg info information image img images imap index inside insight invite intranet indice ipad iphone irc java javascript job jobs js knowledgebase log login logs logout list lists mail mail1 mail2 mail3 mail4 mail5 mailer mailing main mx manager marketing master me
@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
@riipandi
riipandi / python-flask.sh
Last active July 20, 2020 14:17
Instalasi Python dan Nginx di Server
# Tahapan :
1. Update komponen sistem operasi :
> apt update
> apt full-upgrade
> apt install net-tools
2. Instalasi Python 3
> apt install python3-all python-is-python3
> apt install python3-pip pipenv
@riipandi
riipandi / application-example.yml
Created July 9, 2020 07:50
Spring Boot Dev Notes
# Database connection parameter
spring.datasource:
url: jdbc:postgresql://localhost:5432/dbname?useSSL=false&useLegacyDatetimeCode=false
username: postgres
password: dbpasswd
# Hibernate ddl auto (create, create-drop, validate, update)
spring.jpa:
database-platform: org.hibernate.dialect.PostgreSQLDialect
hibernate.ddl-auto: update
<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 / raspbian.sh
Last active January 27, 2020 23:32
Rasberry Pi Configuration
# TV Online : https://www.vidio.com/live
useradd -mg sudo -s `which bash` ariss -c "Aris Ripandi" -p `openssl passwd -1 ripandi`
chsh -s `which bash` root ; chsh -s `which bash` ariss ; perl -pi -e 's#(.*sudo.*ALL=)(.*)#${1}(ALL) NOPASSWD:ALL#' /etc/sudoers
apt install axel htop whois binutils dnsutils zip unzip unrar tar p7zip nscd lsof \
crudini openssl openssh-server openssh-client curl screenfetch screen elinks nano
touch /usr/bin/duckdns ; chmod +x /usr/bin/duckdns
cat > /usr/bin/duckdns <<EOF
@riipandi
riipandi / dbeaverDecryptor.java
Created January 23, 2020 18:47
DBeaver Decryptor
import javax.crypto.*;
import javax.crypto.spec.IvParameterSpec;
import javax.crypto.spec.SecretKeySpec;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.security.*;