Skip to content

Instantly share code, notes, and snippets.

View abdulhadad's full-sized avatar

Abdul Hadad abdulhadad

View GitHub Profile
@abdulhadad
abdulhadad / hyperv_onoff.bat
Created September 5, 2016 15:20
HyperV Switch On/Off for VMWare?Virtualbox or HyperV Environtment
@echo off
NET FILE 1>NUL 2>NUL
if '%errorlevel%' == '0' ( goto gotPrivileges
)
echo "Run this script as Administrator
pause
exit /b
:gotPrivileges
@abdulhadad
abdulhadad / jbdevstudio-gtk2
Created September 22, 2016 14:44
Start JBoss Dev Studio with gtk2
#!/bin/sh
# Start JBoss Dev Studio with gtk2
# based on https://developer.jboss.org/thread/269489
SWT_GTK3=0 $(dirname "$0")/studio/jbdevstudio
@abdulhadad
abdulhadad / nginx.conf
Last active March 18, 2019 09:05
Nginx PHP FastCGI
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
@abdulhadad
abdulhadad / php.ini
Created December 22, 2016 05:52
Partial php.ini for windows
extension=php_bz2.dll
extension=php_curl.dll
extension=php_fileinfo.dll
;extension=php_ftp.dll
extension=php_gd2.dll
extension=php_gettext.dll
;extension=php_gmp.dll
extension=php_intl.dll
extension=php_imap.dll
;extension=php_interbase.dll
@abdulhadad
abdulhadad / vi_basic_editing.txt
Last active February 6, 2017 02:01
Vi Basic Editing
# select, cut, copy, paste
select v+arrow
select line yy or Y
cut d
copy y
paste p
delete d
delete line dd or D
# undo redo
@abdulhadad
abdulhadad / httpd-proxy-jasperserver.conf
Created February 6, 2017 02:25
Apache Httpd Proxy for Jasperserver
# load http://<ip/host>:8080/jasperserver/ as /jasperserver/
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so
ProxyRequests Off
ProxyPreserveHost On
<Proxy *>
Order deny,allow
@abdulhadad
abdulhadad / shrink_lvm.txt
Last active March 8, 2017 17:25
Fedora LVM shrink /home for root partition
# Fedora LVM shrink /home for root partition
df -h
lvdisplay /dev/fedora/home /dev/fedora/root
lvresize -L -100G /dev/fedora/home # broken after restart, maybe using -r option, lvresize -r -L -100G /dev/fedora/home
lvresize -r -L +100G /dev/fedora/root
lvdisplay /dev/fedora/home /dev/fedora/root
df -h
@abdulhadad
abdulhadad / backup.ini
Last active March 27, 2017 05:06
Backup or sanpshot yout apache php application
[client]
password=your_pass
@abdulhadad
abdulhadad / other_server_app.conf
Last active March 8, 2017 17:22
Attached another app in apache based server
#
# enable proxy and proxy http first, ubuntu using a2enmod proxy_http
# open with http://server_host/attached_app/
ProxyRequests Off
ProxyPreserveHost On
<Proxy *>
Order deny,allow
Deny from all
@abdulhadad
abdulhadad / ttl.sql
Created July 11, 2017 09:07
MySQL Tempat Tanggal Lahir
SELECT CONCAT (tempatLahir, ', ', DATE_FORMAT(tglLahir, '%d-%m-%Y')) as ttl FROM tbl;