Skip to content

Instantly share code, notes, and snippets.

View soediro's full-sized avatar

Sudiro soediro

View GitHub Profile
#!/bin/bash
#
# ./makeitrain.sh bitcoin-qt.crashdump.core
# __ _ _ __ ___ __ ____ ____
# / ( \/ )/ _\ / __)/ _\/ ___(_ )
# ( O ) (/ ( (_ / \___ \ )(
# \__(_/\_\_/\_/\___\_/\_(____/(__)
#
# Donations:
# btc: 34fDhMUkvGVr1s2jQvhwmBfw1xqjstrLed
@soediro
soediro / client.conf
Created August 25, 2021 12:54
Wireguard on FreeBSD with pf
[Interface]
PrivateKey = ***********************
Address = 192.168.10.2/32, fc::2/128
DNS = 1.1.1.1, 2606:4700:4700::1111
[Peer]
PublicKey = ***********************
AllowedIPs = 0.0.0.0/0, ::/0
Endpoint = endpoint.domain.tld:51820

Lumen / Laravel Cheat sheet

Install Lumen / Laravel

install global installer

composer global require "laravel/lumen-installer"

composer global require "laravel/installer"

start new project

@soediro
soediro / pfctl-cheatsheet.txt
Created January 12, 2021 09:21 — forked from johnbianchi/pfctl-cheatsheet.txt
pfctl cheat sheet
#### General PFCTL Commands ####
$ pfctl -d disable # packet-filtering
$ pfctl -e enable # packet-filtering
$ pfctl -q # run quiet
$ pfctl -v -v # run even more verbose
#### Loading PF Rules ####
$ pfctl -f /etc/pf.conf # load /etc/pf.conf
$ pfctl -n -f /etc/pf.conf # parse /etc/pf.conf, but dont load it
$ pfctl -R -f /etc/pf.conf # load only the FILTER rules
$ pfctl -N -f /etc/pf.conf # load only the NAT rules
@soediro
soediro / letsencrypt_notes_openbsd.sh
Created October 1, 2020 11:22 — forked from Nothing4You/letsencrypt_notes_openbsd.sh
Set up LetsEncrypt using acme.sh without root on OpenBSD
# Modified for OpenBSD
# Assumes being root
# Requires curl to be installed, wget can also be used, relevant commands need to be adjusted. acme.sh supports both.
# Configured to use Cloudflare DNS for verification
# How to use "acme.sh" to set up Lets Encrypt without root permissions
# See https://github.com/Neilpang/acme.sh for more
# This assumes that your website has a webroot at "/var/www/<domain>"
# I'll use the domain "EXAMPLE.com" as an example
@soediro
soediro / frebsd_laravel_install.md
Last active December 29, 2020 23:33 — forked from ar-android/frebsd_laravel_install.md
Setup FreeBSD 12.1-RELEASE-p11 Server for Laravel

Update Package

sudo pkg update

Install NGINX

sudo pkg install nginx
@soediro
soediro / Base64Servlet.java
Last active September 25, 2019 20:35 — forked from sjpuas/Base64Servlet.java
Servlet for decode base64 of images. You would change content type for others type.
package cl.puas.web.servlet;
import sun.misc.BASE64Decoder;
import javax.imageio.ImageIO;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.awt.image.BufferedImage;
@soediro
soediro / vmbup.sh
Last active April 17, 2019 15:33 — forked from baetheus/vmbup.sh
Zone Backup Script
#!/bin/sh
# This script will backup all smartos zones to remote servers
# or local directories.
# taken from Brandon Blaylock ([email protected])
### Defaults
FTPHOST=
SCPHOST=
LOCALDIR=
DAEMON_URL = http://<bitcoin.conf rpcuser>:<bitcoin.conf rpcpassowrd>@localhost:8332/
DB_DIRECTORY = /Users/bitcoin/.electrumx/
DB_ENGINE = leveldb
USERNAME = bitcoin
ELECTRUMX = /Users/bitcoin/source/electrumx/electrumx_server
HOST = 0.0.0.0
ANON_LOGS = fuck off :)
BANNER_FILE = /Users/bitcoin/.electrumx/banner.txt
DONATION_ADDRESS = 34ie35p4G1npt6GoXR9BDhmMndNwCsiiEr
@soediro
soediro / dependencies.sh
Last active November 29, 2017 13:45 — forked from richardiux/dependencies.sh
golang on smartos with image magick
pkgin -y install git mercurial gcc47 gmake giflib-5.0.5 ImageMagick-6.8.7.4
export GOROOT=$HOME/go
export PATH=$PATH:$GOROOT/bin
export GOPATH=$HOME/gocode
cd
git clone https://github.com/golang/go.git
cd go
hg update default