- Using a ready-to-use Ubuntu image
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="root"></div> | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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 ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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}"; |
Konfigurasi Sublime Text 3 Favorit
Dikumpulkan dengan penuh ❤︎︎ oleh Ian Mustafa.
Bisa diakses melalui Ctrl
+Shift
+P
(atau ⌘
+Shift
+P
di Mac).
{
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env bash | |
# Install any build dependencies needed for curl | |
sudo apt-get build-dep curl | |
# Get latest (as of Feb 25, 2016) libcurl | |
mkdir ~/curl | |
cd ~/curl | |
wget http://curl.haxx.se/download/curl-7.50.2.tar.bz2 | |
tar -xvjf curl-7.50.2.tar.bz2 |
NewerOlder