Skip to content

Instantly share code, notes, and snippets.

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

Ilham Arrouf ilhamarrouf

🏠
Working from home
View GitHub Profile
@ilhamarrouf
ilhamarrouf / docker-compose.yml
Created May 28, 2019 04:00 — forked from sen0rxol0/docker-compose.yml
Nuxt.js with SSR featuring “Docker Multi-stage build” and “node-prune"
version: '3.5'
services:
app:
build: .
volumes:
- '.:/app'
ports:
- '3000:80'
environment:
@ilhamarrouf
ilhamarrouf / command.sh
Created April 19, 2019 23:39
PHP Modul
php php-cli php-curl php-intl php-mbstring php-xml php-zip php-bcmath php-cli php-fpm php-imap php-json php-opcache php-apcu php-xmlrpc php-bz2 php-common php-gd php-ldap php-mysql php-pgsql php-readline php-soap php-tidy php-xsl php-apcu php-mcrypt php-fileinfo
@ilhamarrouf
ilhamarrouf / nginx.conf
Last active March 10, 2021 09:39
Nginx Config
# For more information on configuration, see:
# * Official English Documentation: http://nginx.org/en/docs/
# * Official Russian Documentation: http://nginx.org/ru/docs/
user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log;
pid /run/nginx.pid;
# Load dynamic modules. See /usr/share/nginx/README.dynamic.
@ilhamarrouf
ilhamarrouf / default.vcl
Created April 18, 2019 02:53
Varnish Default Config
#
# This is an example VCL file for Varnish.
#
# It does not do anything by default, delegating control to the
# builtin VCL. The builtin VCL is called when there is no explicit
# return statement.
#
# See the VCL chapters in the Users Guide at https://www.varnish-cache.org/docs/
# and https://www.varnish-cache.org/trac/wiki/VCLExamples for more examples.
@ilhamarrouf
ilhamarrouf / command.sh
Created April 2, 2019 09:36
SSH socks proxy
ssh -N -p 22 -D 8000 [email protected]
@ilhamarrouf
ilhamarrouf / main.go
Created March 29, 2019 11:53
Golang rate limiting
package main
import (
"fmt"
"time"
)
func main() {
requests := make(chan int, 5)
@ilhamarrouf
ilhamarrouf / main.go
Last active March 29, 2019 11:52
Outer loop matrix golang
package main
import "fmt"
func main() {
outerLoop:
for i := 0; i < 5; i++ {
for j := 0; j < 5; j++ {
if i == 5 {
break outerLoop
@ilhamarrouf
ilhamarrouf / cron.sh
Created March 19, 2019 17:32
Crontab database backup mysql
0 3 * * * /usr/bin/mysqldump -u root --password=P@ssw0rd mydb > /root/mydb$(date +\%w).sql
@ilhamarrouf
ilhamarrouf / query.sql
Created March 14, 2019 14:07
INSERT SELECT Query
INSERT INTO batman20190306.public."EventParticipant"
SELECT '2019-03-14' :: date AS "BEGDA",
'9999-12-31' :: date AS "ENDDA",
'1000' AS "BUSCD",
nik AS "PERNR",
'2019-03-14' :: date AS "CHGDT",
'12345678' AS "CHUSR",
'5c8a5cf5ed684' AS "EVNCD"
FROM batman20190306.public."User"
WHERE level_id IN ('1', '2', '3', '4');
@ilhamarrouf
ilhamarrouf / default.vcl
Created March 12, 2019 14:04
Varnish Config
vcl 4.0;
import std;
backend default { # Define one backend
.host = "localhost"; # IP or Hostname of backend
.port = "8080"; # Port Apache or whatever is listening
}
acl ban {