Skip to content

Instantly share code, notes, and snippets.

View soediro's full-sized avatar

Sudiro soediro

View GitHub Profile
@soediro
soediro / laravel.md
Last active November 5, 2021 13:23
Laravel cheat sheets

Laravel cheat sheet

Just to remind me

Create new Laravel Project:

laravel new myProject
cd myProject
git init
git add .
git commit -m "Initial commit"

Make Auth

php artisan jetstream:install livewire\

@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 / gen.md
Last active September 27, 2019 00:25
generate Letsencrypt certificate on SmartOS
# acme_tiny   --account-key /opt/local/etc/acme/account.key \
            --csr /opt/local/etc/acme/domain.csr \
            --acme-dir /opt/local/www/acme \
            > /opt/local/etc/acme/signed.crt 
# curl -s 'https://letsencrypt.org/certs/lets-encrypt-x3-cross-signed.pem' > /opt/local/etc/acme/intermediate.pem
cat /opt/local/etc/acme/signed.crt /opt/local/etc/acme/intermediate.pem > /opt/local/etc/acme/fullchain.pem 
@soediro
soediro / nginx.conf
Created September 27, 2019 00:21
Nginx configuration on SunOS 5.11
user www www;
worker_processes 1;
events {
# After increasing this value You probably should increase limit
# of file descriptors (for example in start_precmd in startup script)
worker_connections 1024;
}
@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;
https://superuser.com/questions/680416/how-to-add-something-every-x-line
@soediro
soediro / build.txt
Created June 11, 2019 04:57
build note
UNIX BUILD NOTES
================
To Build
--------
cd src/
make -f makefile.unix # Headless MAJACOIN
See readme-qt.rst for instructions on building MAJACOIN QT,
@soediro
soediro / logstash-config.conf
Created May 22, 2019 23:25
Logstash configuration file
input {
jdbc {
# Oracle JDBC Driver
jdbc_driver_library => "H:\downloads\ojdbc14.jar\ojdbc14.jar"
jdbc_driver_class => "Java::oracle.jdbc.driver.OracleDriver"
jdbc_connection_string => "jdbc:oracle:thin:@localhost:1521/orcl.local"
jdbc_user => "scott"
jdbc_password => "pass123"
# SQL query to execute
statement => "select * from emp"