Skip to content

Instantly share code, notes, and snippets.

View wmfairuz's full-sized avatar

Fairuz Wan Ismail wmfairuz

  • TrizIT Lab Sdn Bhd
  • Malaysia
View GitHub Profile
@wmfairuz
wmfairuz / Installing OCI8 for PHP on MAC OS X.md
Created February 17, 2020 03:15 — forked from heineck/Installing OCI8 for PHP on MAC OS X.md
Installing OCI8 module for PHP on MAC OS X
@wmfairuz
wmfairuz / rules.md
Last active October 3, 2019 03:31 — forked from machuga/rules.md
General rules

Asking for help in DevHub Malaysia on Telegram

Please behave in a polite, considerate, and inclusive manner in the channel at all times. People volunteer their time in the channel to help people like you with your problems and some respect (in both directions) will go an extremely long way.

When asking questions in the DevHub Malaysia channel, please follow these 10 simple rules.

  1. Do your research before hand. Your question may be answerable with a quick Google search or by simply experimenting. If it's a concept you're confused about, first check the official documentation.
  2. If you've tried Googling, explain what terms you've tried to use so people can better help you.
  3. Clearly explain what is happening and create a Paste (http://laravel.io/bin), (http://kopy.io), or (http://gist.github.com) to better explain yourself
  4. Saying that something "doesn't work" is completely useless to the people who are trying to help you. Please show all available information you have that indicates to you t
@wmfairuz
wmfairuz / installation.sh
Last active October 2, 2019 13:18
PHP 7.3 on Ubuntu 18.04
apt update
apt install -y software-properties-common language-pack-en-base
add-apt-repository ppa:ondrej/php
apt update
apt install -y nginx curl git unzip composer mysql-client supervisor
apt install -y php7.3 php7.3-fpm php7.3-cli php7.3-common php7.3-json php7.3-opcache php7.3-mysql php7.3-mbstring php7.3-soap php7.3-zip php7.3-gd php7.3-intl php7.3-xml php7.3-curl php7.3-ldap php7.3-sybase
apt install -y php-dev libmcrypt-dev php-pear
pecl channel-update pecl.php.net
mkdir /root/tmp
pear config-set temp_dir /root/tmp
@wmfairuz
wmfairuz / iterm2.md
Created December 16, 2018 17:27 — forked from squarism/iterm2.md
iterm2 cheatsheet

Tabs and Windows

Function Shortcut
New Tab + T
Close Tab or Window + W (same as many mac apps)
Go to Tab + Number Key (ie: ⌘2 is 2nd tab)
Go to Split Pane by Direction + Option + Arrow Key
Cycle iTerm Windows + backtick (true of all mac apps and works with desktops/mission control)
@wmfairuz
wmfairuz / nginx.conf
Created May 24, 2018 04:23 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@wmfairuz
wmfairuz / new_gist_file_0
Last active September 10, 2016 08:59
testing gist
You can embed your program sources from gist by simply pasting the URL like below.
https://gist.github.com/973153
https://gist.github.com/973153#file_select_media.html
[alias]
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %C(bold blue)<%an>%Creset' --abbrev-commit
lg2 = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
lgl = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit -10
d = diff
dc = diff --cached
a = add
g = grep --break --heading --line-number
st = status
ci = commit -s -m
function abc(z) { for(y in z) { console.log(y, typeof z[y], z[y]); if(typeof z[y] === 'object') { abc(z[y]); } } }
function abc(z, prop) { for(y in z) { if(typeof prop === 'undefined') { console.log(y, typeof z[y], z[y]); } else { if(y === prop) { console.log('FOUND'); } } if(typeof z[y] === 'object') { abc(z[y], prop); } } }
2016-01-12 03:59:34.679 DEBUG 1 --- [nio-8020-exec-4] o.s.c.n.zuul.web.ZuulHandlerMapping : Matching patterns for request [/media/upload] are [/media/**]
2016-01-12 03:59:34.679 DEBUG 1 --- [nio-8020-exec-4] o.s.c.n.zuul.web.ZuulHandlerMapping : URI Template variables for request [/media/upload] are {}
2016-01-12 03:59:34.680 DEBUG 1 --- [nio-8020-exec-4] o.s.c.n.zuul.web.ZuulHandlerMapping : Mapping [/media/upload] to HandlerExecutionChain with handler [org.springframework.cloud.netflix.zuul.web.ZuulController@4d5c26a2] and 1 interceptor
2016-01-12 03:59:34.680 DEBUG 1 --- [nio-8020-exec-4] o.s.web.cors.DefaultCorsProcessor : Skip CORS processing, response already contains "Access-Control-Allow-Origin" header
2016-01-12 03:59:34.715 DEBUG 1 --- [nio-8020-exec-4] o.s.c.n.zuul.filters.ProxyRouteLocator : Finding route for path: /media/upload
2016-01-12 03:59:34.715 DEBUG 1 --- [nio-8020-exec-4] o.s.c.n.zuul.filters.ProxyRouteLocator : servletPath=/zuul
2016-01-12 03:59:34.716 DEBUG 1
...
2015-12-22 18:18:39.514 INFO 8824 --- [ost-startStop-1] o.s.b.c.e.ServletRegistrationBean : Mapping servlet: 'dispatcherServlet' to [/]
2015-12-22 18:18:39.527 INFO 8824 --- [ost-startStop-1] o.s.b.c.embedded.FilterRegistrationBean : Mapping filter: 'metricFilter' to: [/*]
2015-12-22 18:18:39.533 INFO 8824 --- [ost-startStop-1] o.s.b.c.embedded.FilterRegistrationBean : Mapping filter: 'characterEncodingFilter' to: [/*]
2015-12-22 18:18:39.534 INFO 8824 --- [ost-startStop-1] o.s.b.c.embedded.FilterRegistrationBean : Mapping filter: 'hiddenHttpMethodFilter' to: [/*]
2015-12-22 18:18:39.544 INFO 8824 --- [ost-startStop-1] o.s.b.c.embedded.FilterRegistrationBean : Mapping filter: 'httpPutFormContentFilter' to: [/*]
2015-12-22 18:18:39.545 INFO 8824 --- [ost-startStop-1] o.s.b.c.embedded.FilterRegistrationBean : Mapping filter: 'requestContextFilter' to: [/*]
2015-12-22 18:18:39.547 INFO 8824 --- [ost-startStop-1] o.s.b.c.embedded.FilterRegistrationBean : Mapping