Skip to content

Instantly share code, notes, and snippets.

View zhiephie's full-sized avatar
:octocat:
Focusing

Yudi Purwanto zhiephie

:octocat:
Focusing
View GitHub Profile
@zhiephie
zhiephie / workbox.md
Created November 21, 2018 02:34 — forked from addyosmani/workbox.md
Workbox recipes

Workbox runtime caching recipes

Your Service Worker script will need to import in Workbox and initialize it before calling any of the routes documented in this write-up, similar to the below:

importScripts('workbox-sw.prod.v1.3.0.js');
const workbox = new WorkboxSW();

// Placeholder array populated automatically by workboxBuild.injectManifest()
@zhiephie
zhiephie / php-oracle.md
Created November 8, 2018 17:03 — forked from odan/php-oracle.md
XAMPP - Oracle Driver Setup (v12)

XAMPP - Oracle Driver Setup (v12)

Requirements

This driver requires the Microsoft Visual C++ Redistributable. The redistributable can easily be downloaded on the Microsoft website as x86 or x64 edition. Notice: On a x64 computer the x86 AND the x64 version must be installed.

Visual C++ Redistributable für Visual Studio 2015

Setup

@zhiephie
zhiephie / install_oci8_ubuntu_16.04_php7.1.md
Created September 7, 2018 01:57 — forked from hewerthomn/install_oci8_ubuntu_16.04_php7.1.md
How to install OCI8 on Ubuntu 16.04 and PHP 7.1
@zhiephie
zhiephie / install-go-to-with-bash-script.md
Created August 7, 2018 11:31 — forked from d2s/install-go-to-with-bash-script.md
Installing Go with command line

Install Go language with a Bash script

Another alternative to installing Go is to use a simple Bash script. It will download and install Go language under of your own user account.

Note that a system-wide installation might be better for some things (for example, better protected from accidental modifications etc.), but this was a bit simpler to setup.

For this example, we are using:

@zhiephie
zhiephie / client.go
Created August 3, 2018 02:50 — forked from kenshinx/client.go
golang socket server & client ping-pong demo
package main
import (
"log"
"net"
"strconv"
"strings"
)
const (
package main
import (
"fmt"
"log"
"net/http"
"github.com/nirasan/go-jwt-handler"
)
@zhiephie
zhiephie / tld.cf
Created April 8, 2018 07:28
SpamAssassin rules tld domain
# add points if the From address is not a valid host in a listed TLD
header LOCAL_FROM_TLD From !~ /@[a-z0-9\-\.]+\.(com|net|mil|edu|cn|id|co\.id|go\.id|sch\.id|or\.id|ponpes\.id)/i
describe LOCAL_FROM_TLD From address is not a valid host in a listed TLD
score LOCAL_FROM_TLD 15
https://www.pccc.com/downloads/SpamAssassin/old/spamassassin.cf
@zhiephie
zhiephie / custom_rules.cf
Created April 7, 2018 15:16
spamassassin rules
header LOCAL_DEMONSTRATION_SUBJECT Subject =~ /\bpenis\b|\bsex\b|\bsexs\b|\bporn\b|\bgay\b|\brussian\b|\bteen\b|\bviagra\b|\borgasms\b|\blove\b|\bdating\b|\bgirl\b|\bgirls\b|\bbitcoin\b|\bhorny\b|\bexotic\b|\bbabe\b|\bbabes\b|\bbra\b|\bpanties\b|\bjessy\b|\bcock\b|\bsucking\b|\bblonde\b|\bshag\b|\bbeach\b|\banal\b|\bbikini\b|\bprostitutes\b|\bhollywood\b|\bsucking\b|\bbeggar\b|\bidiot\b|\bhairy\b|\bpussy\b|\bsexy\b|\bPregnant\b|\babe\b|\bhottie\b|\bskinned\b|\bsensual\b|\blatina\b|\bplayboy\b/i
body LOCAL_DEMONSTRATION_BODY /\bpenis\b|\bsex\b|\bsexs\b|\bporn\b|\bgay\b|\brussian\b|\bteen\b|\bviagra\b|\borgasms\b|\blove\b|\bdating\b|\bgirl\b|\bgirls\b|\bbitcoin\b|\bhorny\b|\bexotic\b|\bbabe\b|\bbabes\b|\bbra\b|\bpanties\b|\bjessy\b|\bcock\b|\bsucking\b|\bblonde\b|\bshag\b|\bbeach\b|\banal\b|\bbikini\b|\bprostitutes\b|\bhollywood\b|\bsucking\b|\bbeggar\b|\bidiot\b|\bhairy\b|\bpussy\b|\bsexy\b|\bPregnant\b|\babe\b|\bhottie\b|\bskinned\b|\bsensual\b|\blatina\b|\bplayboy\b/i
meta LOCAL_DEMONSTRATION
@zhiephie
zhiephie / free-space-on-boot-disk.md
Created April 2, 2018 15:40 — forked from jbgo/free-space-on-boot-disk.md
Free up space on /boot disk (ubuntu)

Free disk space when /boot is full (Ubuntu)

TL;DR

dpkg -l linux-image*
uname -r
sudo apt-get remove linux-image-2.6.32-{21,37,38,39,40,41,42,43,44}-server
sudo apt-get autoremove