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
# Disable SELinux | |
echo 0 > /selinux/enforce | |
perl -pi -e 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config | |
# Install required packages | |
yum install pdksh compat-libstdc++-33 compat-libstdc++-33.i686 libaio libaio.i686 \ | |
pam-1.1.1-17.el6.x86_64 pam-1.1.1-17.el6.i686 nfs-utils openssh-clients \ | |
numactl | |
# Update Kernel Parameters (http://ibm.co/1czEKb4) |
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
# Install Ruby | |
wget http://ftp.ruby-lang.org/pub/ruby/2.1/ruby-2.1.1.tar.gz | |
tar xvzf ruby-2.1.1.tar.gz | |
cd ruby-2.1.1 | |
./configure --prefix=/usr | |
make | |
make install | |
# remove "ruby-2.1.1" folder in /root |
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 org.json.simple.JSONObject; | |
import org.json.simple.parser.JSONParser; | |
import org.json.simple.parser.ParseException; | |
public class TestJSON { | |
public static void main(String[] args) { | |
JSONObject jObject = new JSONObject(); |
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
var fullDate = new Date() | |
console.log(fullDate); | |
//Thu Otc 15 2014 17:25:38 GMT+1000 {} | |
//convert month to 2 digits | |
var twoDigitMonth = ((fullDate.getMonth().length+1) === 1)? (fullDate.getMonth()+1) :(fullDate.getMonth()+1); | |
var currentDate = fullDate.getDate() + "/" + twoDigitMonth + "/" + fullDate.getFullYear(); | |
console.log(currentDate); | |
//15/10/2014 |
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
<?php | |
/* | |
* Mysql database class - only one connection alowed | |
*/ | |
class Database { | |
private $_connection; | |
private static $_instance; //The single instance | |
private $_host = "HOSTt"; | |
private $_username = "USERNAME"; | |
private $_password = "PASSWORd"; |
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 | |
SCRIPT_VERSION=0.4.60 | |
CHANGELOG="http://www.alsa-project.org/alsa-info.sh.changelog" | |
################################################################################# | |
#Copyright (C) 2007 Free Software Foundation. | |
#This program is free software; you can redistribute it and/or modify | |
#it under the terms of the GNU General Public License as published by |
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 -e | |
clear | |
echo "============================================" | |
echo "WordPress Install Script" | |
echo "============================================" | |
echo "Database Name: " | |
read -e dbname | |
echo "Database User: " | |
read -e dbuser | |
echo "Database Password: " |
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 | |
## uploading to google | |
## rev: 22 Aug 2012 16:07 | |
det=`date +%F` | |
browser="Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:13.0) Gecko/20100101 Firefox/13.0.1" | |
username="user@domain-apps.com" | |
password="password" | |
accountype="HOSTED" #gooApps = HOSTED , gmail=GOOGLE |
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 | |
TOMCAT=apache-tomcat-7.0.23 | |
TOMCAT_WEBAPPS=$TOMCAT/webapps | |
TOMCAT_CONFIG=$TOMCAT/conf/server.xml | |
TOMCAT_START=$TOMCAT/bin/startup.sh | |
TOMCAT_ARCHIVE=$TOMCAT.tar.gz | |
TOMCAT_URL=http://apache.mirrorcatalogs.com/tomcat/tomcat-7/v7.0.23/bin/$TOMCAT_ARCHIVE | |
WAR_FILE=whatever.war |
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 | |
# | |
# description: Apache Tomcat init script | |
# processname: tomcat | |
# chkconfig: 234 20 80 | |
# | |
# | |
# Copyright (C) 2014 Miglen Evlogiev | |
# | |
# This program is free software: you can redistribute it and/or modify it under |
OlderNewer