Skip to content

Instantly share code, notes, and snippets.

View dedenf's full-sized avatar

Deden Fathurahman dedenf

View GitHub Profile
server {
listen 80;
server_name api.erafone.com;
root /home/www-data/srv/api/public;
index index.php index.html index.htm;
location / {
try_files $uri $uri/ @rewrites;
autoindex on;
tomorrow is your big day, i'm happy for you, genuinely very much.
you are one of the few person that i look upon,
you are one person that i'll take the risk if it's rewarding
you taught me a lot of things, remember you taught me regex in my small room?
altough i still cant master it...., but i do remember all of it.
you always wanna push me into my limit, and i did.
$xml->{“a-tag”}
function directory_map($source_dir, $directory_depth = 0, $hidden = FALSE)
{
if ($fp = @opendir($source_dir))
{
$filedata = array();
$new_depth = $directory_depth - 1;
$source_dir = rtrim($source_dir, DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR;
while (FALSE !== ($file = readdir($fp)))
{
Fetching: i18n-0.6.1.gem (100%)
Fetching: multi_json-1.5.0.gem (100%)
Fetching: activesupport-3.2.11.gem (100%)
Fetching: json-1.5.4.gem (100%)
Building native extensions.  This could take a while…
Fetching: hashie-1.2.0.gem (100%)
Fetching: chozo-0.4.2.gem (100%)
Fetching: addressable-2.3.2.gem (100%)
Fetching: multipart-post-1.1.5.gem (100%)

Fetching: faraday-0.8.4.gem (100%)

/* H5BP image replacement: http://nicolasgallagher.com/another-css-image-replacement-technique/ */
.ir {
border: 0;
font: 0/0 a;
text-shadow: none;
color: transparent;
background-color: transparent;
}
#!/bin/bash
echo "Enter a domain (e.g. example.com):";
read domain;
echo ""
echo "Enter a virtual host name (e.g. dev, as in dev.example.com
Just enter only the virtual host name)"
read vhname
echo ""

Keybase proof

I hereby claim:

  • I am dedenf on github.
  • I am dedenf (https://keybase.io/dedenf) on keybase.
  • I have a public key ASA_wSekWdTNUSs6J7UA2OMurDV60WctzL2oL-YAzdfziQo

To claim this, I am signing this object:

MariaDB [dprms1]> show engine innodb status\G
*************************** 1. row ***************************
Type: InnoDB
Name:
Status:
=====================================
140110 7:06:10 INNODB MONITOR OUTPUT
=====================================
Per second averages calculated from the last 14 seconds
-----------------
@dedenf
dedenf / ssh-tmux.md
Last active May 3, 2016 07:37
ssh to server and beam up tmux automatically

Basic Command

ssh -t user@server "tmux attach-session -t session_name || tmux new-session -s new_session_name"

full .sh

    #!/bin/bash
    set -e

server=$1