Updates from March, 2016 Toggle Comment Threads | Keyboard Shortcuts

  • tediscript 9:39 pm on March 31, 2016 Permalink | Reply  

    How to determine if a bash variable is empty 

    This will return true if a variable is unset or set to the empty string (“”).

    if [ -z "$VAR" ];
    

    Source: scripting – How to determine if a bash variable is empty? – Server Fault

     
  • tediscript 5:36 pm on March 31, 2016 Permalink | Reply  

    Bash Scripting Tutorial 

    Learn Bash Scripting with our 8 part beginners tutorial including clear descriptions, ample examples and challenges.

    Source: Bash Scripting Tutorial – Ryans Tutorials

     
  • tediscript 8:40 am on March 31, 2016 Permalink | Reply  

    Simple EasyEngine for Mac 

    #!/bin/bash
    
    # ee site create domain.com --php
    
    #get params
    DOMAIN=$2;
    
    #write to sites-available
    #cat >${DOMAIN}.conf <<EOF
    cat >/usr/local/etc/nginx/sites-available/${DOMAIN}.conf <<EOF
    server {
            listen 80;
            server_name ${DOMAIN};
    
            root /Users/$SUDO_USER/Sites/${DOMAIN}/htdocs;
            index index.php index.html index.htm;
    
            location / {
                try_files \$uri \$uri/ /index.php\$is_args\$args;
            }
    
            location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
                expires 1y;
                log_not_found off;
            }
    
            location ~ \.php$ {
                try_files $uri /index.php =404;
                fastcgi_pass   127.0.0.1:9000;
                fastcgi_index index.php;
                fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;
                include fastcgi_params;
            }
    }
    EOF
    
    #change file ownership
    chown $SUDO_USER:wheel /usr/local/etc/nginx/sites-available/${DOMAIN}.conf
    
    #link to sites-enabled
    ln -s /usr/local/etc/nginx/sites-available/${DOMAIN}.conf /usr/local/etc/nginx/sites-enabled/${DOMAIN}.conf
    
    #make home directory
    mkdir -p /Users/$SUDO_USER/Sites/${DOMAIN}/conf
    mkdir -p /Users/$SUDO_USER/Sites/${DOMAIN}/logs
    mkdir -p /Users/$SUDO_USER/Sites/${DOMAIN}/htdocs
    
    #make index file
    #printf "<h1>It Works!</h1>" >> /Users/$SUDO_USER/Sites/${DOMAIN}/htdocs/index.php
    
    #change home ownership
    chown -Rf $SUDO_USER:staff /Users/$SUDO_USER/Sites/${DOMAIN}
    
    #add domain to /etc/hosts
    printf "\n127.0.0.1 ${DOMAIN}" >> /etc/hosts
    
    #reload nginx
    nginx -s reload
    
    
     
  • tediscript 5:45 am on March 31, 2016 Permalink | Reply  

    Stopping “php-fpm” ( homebrew installation ) Mac OSX 10.8.2  

    brew services restart php56
    

    Source: Stopping “php-fpm” ( homebrew installation ) Mac OSX 10.8.2 – Stack Overflow

     
  • tediscript 9:10 am on March 30, 2016 Permalink | Reply  

    Google BigQuery Public Datasets 

    None

    Source: Google BigQuery Public Datasets — Google Cloud Platform

     
  • tediscript 5:17 pm on March 29, 2016 Permalink | Reply  

    Embed Youtube in Android 

    Using the YouTube API to Embed Video in an Android App

    Embed Video in your Android Application Using YouTube Android Player API v1.2.1

     
  • tediscript 7:17 am on March 28, 2016 Permalink | Reply  

    Gurihnya Duit dari Web Wallpaper 

    Source: Facebook

     
  • tediscript 6:06 am on March 28, 2016 Permalink | Reply  

    Top 10 Machine Learning Algorithms 

    Source: Top 10 Machine Learning Algorithms

     
  • tediscript 5:31 pm on March 27, 2016 Permalink | Reply  

    Gambaran hari tua Anda tanpa tabungan 

    Menurut penghitungan keuangan, paling tidak, ketika nanti Anda pensiun, Anda membutuhkan 70 persen dari pendapatan terakhir Anda di setiap bulannya.

    Source: Gambaran hari tua Anda tanpa tabungan – Merawat Indonesia

     
  • tediscript 4:47 pm on March 27, 2016 Permalink | Reply  

    Cara MUDAH dan GRATIS Untuk Menemukan Interest Tersembunyi Facebook Ads 

    Source: Facebook

     
c
Compose new post
j
Next post/Next comment
k
Previous post/Previous comment
r
Reply
e
Edit
o
Show/Hide comments
t
Go to top
l
Go to login
h
Show/Hide help
shift + esc
Cancel