Skip to content

Instantly share code, notes, and snippets.

View ericksuryadinata's full-sized avatar
🏠
Working from home

Erick Surya Dinata ericksuryadinata

🏠
Working from home
View GitHub Profile
@ericksuryadinata
ericksuryadinata / Before choosing
Last active March 8, 2021 11:53
extension PHP installer
sudo apt install software-properties-common && sudo add-apt-repository ppa:ondrej/php && sudo apt update
@ericksuryadinata
ericksuryadinata / 000-default.conf.7.0
Created August 16, 2018 06:34
Shell scripts to activate different php versions and activate apache with fpm/fastCGI
<VirtualHost *:80>
# The ServerName directive sets the request scheme, hostname and port that
# the server uses to identify itself. This is used when creating
# redirection URLs. In the context of virtual hosts, the ServerName
# specifies what hostname must appear in the request's Host: header to
# match this virtual host. For the default virtual host (this file) this
# value is not decisive as it is used as a last resort host regardless.
# However, you must set it for any further virtual host explicitly.
#ServerName www.example.com
@ericksuryadinata
ericksuryadinata / forward_chaining_example.cpp
Created August 29, 2018 13:45
Saya gak tau kalo ini bener gaknya :D
#include <iostream>
#include <string>
#include <algorithm>
int main(){
std::string weather, location, means, actions;
int distance, time;
std::cout<<"Distance ? ";
std::cin>>distance;
#!/bin/sh
exit=1
getout=0
if [ "$1" = "" ];
then
echo "You must suply filename to import"
getout=1
else
file=$1
fi
@ericksuryadinata
ericksuryadinata / proxy.nginx.conf
Last active May 1, 2020 23:04
Configuration Nginx Server
server{
server_name your-tld-server-name.com www.your-tld-server-name.com
# this configuration for serving python application
location / {
proxy_set_header Host $host;
proxy_http_version 1.1;
proxy_pass_header Authorization;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
@ericksuryadinata
ericksuryadinata / default.conf
Last active May 2, 2020 00:00
Starting point nginx config
##
# You should look at the following URL's in order to grasp a solid understanding
# of Nginx configuration files in order to fully unleash the power of Nginx.
# http://wiki.nginx.org/Pitfalls
# http://wiki.nginx.org/QuickStart
# http://wiki.nginx.org/Configuration
#
# Generally, you will want to move this file somewhere, and start with a clean
# file but keep this around for reference. Or just disable in sites-enabled.
#
@ericksuryadinata
ericksuryadinata / config.bak
Last active August 13, 2021 08:27
Proxyon and off, paired with netshare app on android
# if you want to use github/gitlab, put this on your .ssh/ folder
# github.com
Host github.com
Hostname ssh.github.com
ProxyCommand nc -X connect -x 192.168.49.1:8282 %h %p
# windows
#ProxyCommand connect -H 192.168.49.1:8282 %h %p
Port 443
ServerAliveInterval 20
User git