Skip to content

Instantly share code, notes, and snippets.

View naufdotal's full-sized avatar

Ariq Naufal naufdotal

View GitHub Profile
@chriswayg
chriswayg / Ubuntu_Debian_Cloud_images_in_Proxmox.md
Last active April 14, 2024 16:14
Ubuntu and Debian Cloud images in Proxmox
@laineantti
laineantti / openvpn_pia
Created November 6, 2018 19:07
How to setup headless (No GUI/CLI Only) ubuntu openvpn pia
## Install OpenVPN
# Now we install and configure OpenVPN, do the following commands:
sudo apt-get install openvpn
cd /etc/openvpn
sudo wget https://www.privateinternetaccess.com/openvpn/openvpn.zip
@nginx-gists
nginx-gists / api_backends.conf
Last active April 14, 2024 07:55 — forked from lcrilly/api_backends.conf
Deploying NGINX Plus as an API Gateway, Part 1
upstream warehouse_inventory {
zone inventory_service 64k;
server 10.0.0.1:80;
server 10.0.0.2:80;
server 10.0.0.3:80;
}
upstream warehouse_pricing {
zone pricing_service 64k;
server 10.0.0.7:80;
@floyd0987
floyd0987 / index.html
Created April 22, 2018 16:58
react filter by category
<div id="root"></div>
@naufdotal
naufdotal / interfaces
Last active February 6, 2018 16:20
networking kimsufi 1 ip NAT (/etc/network/)
# network interface settings; autogenerated
# Please do NOT modify this file directly, unless you know what
# you're doing.
#
# If you want to manage part of the network configuration manually,
# please utilize the 'source' or 'source-directory' directives to do
# so.
# PVE will preserve these directives, but will NOT its network
# configuration from sourced files, so do not attempt to move any of
# the PVE managed interfaces into external files!
@rm77
rm77 / client.py
Last active October 8, 2018 14:46
simple tcp client server, pemrograman jaringan 2017 2018
import socket
import sys
# Inisialisasi Create a TCP/IP socket
client_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
#Koneksi
server_address = ('www.detik.com', 80)
print >>sys.stderr, 'connecting to %s port %s' % server_address
@miya0001
miya0001 / cors-for-the-wordpress-rest-api.php
Last active January 31, 2023 07:42
CORS for the WordPress REST API
<?php
function my_customize_rest_cors() {
remove_filter( 'rest_pre_serve_request', 'rest_send_cors_headers' );
add_filter( 'rest_pre_serve_request', function( $value ) {
header( 'Access-Control-Allow-Origin: *' );
header( 'Access-Control-Allow-Methods: GET' );
header( 'Access-Control-Allow-Credentials: true' );
header( 'Access-Control-Expose-Headers: Link', false );
@yancyn
yancyn / jekyll-ubuntu.md
Last active July 13, 2019 06:17
Setup Jekyll on Ubuntu 16.04

Pre-requisition*

$ sudo apt-get update
$ sudo apt-get upgrade

*if fail see Upgrade Ubuntu 16.04 Live Stick

Ubuntu 16.04

$ sudo apt-get install ruby ruby-dev make gcc
@ianmustafa
ianmustafa / imageoptim.php
Last active February 23, 2023 06:20
Optimalisasi Gambar dalam PHP menggunakan Imagick.
<?php
/* Maafkan kalo penamaan variabelnya berantakan 😁
Ini juga agak lambat karena kompleksitasnya, terutama
di baris 61-95 (pembuatan gambar latar yang di-blur
untuk mengisi ruang kosong / menghindari crop)
*/
function imageoptim($imagepath, $savename) {
// Set imagepath default
$imagepath = "upload/source/{$savename}";
@ianmustafa
ianmustafa / readme.md
Last active September 26, 2020 00:44
Konfigurasi Sublime Text 3 Favorit. Dikumpulkan dengan penuh ❤︎ oleh Ian Mustafa.

Konfigurasi Sublime Text 3 Favorit

Dikumpulkan dengan penuh ❤︎︎ oleh Ian Mustafa.

Konfigurasi

Bisa diakses melalui Ctrl+Shift+P (atau +Shift+P di Mac).

{