This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [[ $EUID -ne 0 ]]; then | |
echo "Please run as root" | |
exit | |
fi | |
# update package | |
apt update -y | |
apt upgrade -y |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [[ $EUID -ne 0 ]]; then | |
echo "Please run as root" | |
exit | |
fi | |
wget https://nodejs.org/dist/v8.9.0/node-v8.9.0-linux-x64.tar.xz | |
mv node-v8.9.0-linux-x64.tar.xz /opt/node-v8.9.0-linux-x64.tar.xz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [[ $EUID -ne 0 ]]; then | |
echo "Please run as root" | |
exit | |
fi | |
MAILHOG_URL=github.com/mailhog/MailHog | |
MHSENDMAIL_URL=github.com/mailhog/mhsendmail | |
MAILHOG_EXECUTABLE=/usr/local/bin/mailhog |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [[ $EUID -ne 0 ]]; then | |
echo "Please run as root" | |
exit 100 | |
fi | |
# script dir location | |
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [[ $EUID -ne 0 ]]; then | |
echo "Please run as root" | |
exit 100 | |
fi | |
yum update -y | |
yum install -y epel-release yum-utils git wget localinstall mysql57-community-release-el7-7.noarch.rpm \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# run => bash <script> | |
if [[ $EUID -ne 0 ]]; then | |
echo "Please run as root" | |
exit 100 | |
fi | |
# updating package & upgrade security |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.racheats.sigoes.splash; | |
import android.Manifest; | |
import android.content.DialogInterface; | |
import android.content.Intent; | |
import android.content.pm.PackageManager; | |
import android.graphics.Typeface; | |
import android.os.Build; | |
import android.os.Handler; | |
import android.support.v4.app.ActivityCompat; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.util.Log; | |
import android.widget.Toast; | |
import java.io.File; | |
import java.io.IOException; | |
import android.net.Uri; | |
import android.database.Cursor; | |
import android.provider.MediaStore; | |
import android.os.AsyncTask; | |
import org.apache.http.HttpEntity; | |
import org.apache.http.HttpResponse; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// for detailed comments and demo, see my SO answer here http://stackoverflow.com/questions/8853396/logical-operator-in-a-handlebars-js-if-conditional/21915381#21915381 | |
/* a helper to execute an IF statement with any expression | |
USAGE: | |
-- Yes you NEED to properly escape the string literals, or just alternate single and double quotes | |
-- to access any global function or property you should use window.functionName() instead of just functionName() | |
-- this example assumes you passed this context to your handlebars template( {name: 'Sam', age: '20' } ), notice age is a string, just for so I can demo parseInt later | |
<p> | |
{{#xif " name == 'Sam' && age === '12' " }} | |
BOOM |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This script will boot app.js with the number of workers | |
// specified in WORKER_COUNT. | |
// | |
// The master will respond to SIGHUP, which will trigger | |
// restarting all the workers and reloading the app. | |
var cluster = require('cluster'); | |
var workerCount = process.env.WORKER_COUNT || 2; | |
// Defines what each worker needs to run |