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
curl -sS https://getcomposer.org/installer | php | |
sudo mv composer.phar /usr/local/bin/composer |
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
#setup first your info | |
git config --global user.name "your name" | |
git config --global user.email "your email" | |
# OPTIONAL use with caution! | |
# store your user/pass in .git-credentials in clear text when you enter it in your first push to github | |
git config credential.helper store |
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 | |
class Member{ | |
function getAccountID(){ | |
return "123456"; | |
} | |
} |
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 | |
require "member.php"; | |
var $m = new Member(); | |
echo $m->getAccountID(); | |
// outputs "123456" |
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 | |
$file = 'monkey.gif'; | |
if (file_exists($file)) { | |
header('Content-Description: File Transfer'); | |
header('Content-Type: application/octet-stream'); | |
header('Content-Disposition: attachment; filename='.basename($file)); | |
header('Expires: 0'); | |
header('Cache-Control: must-revalidate'); | |
header('Pragma: public'); |
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 | |
$file = 'monkey.gif'; | |
if (file_exists($file)) { | |
//show the download dialog to the browser | |
header('Content-Type: application/octet-stream'); | |
header('Content-Disposition: attachment; filename='.$file); | |
//send away and exit the script, Apache will handle the outputting of file contents |
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 jdk first | |
yum install java-1.7.0-openjdk-devel | |
#download glassfish | |
wget http://download.java.net/glassfish/4.0/release/glassfish-4.0.zip | |
# start the application server | |
bin/asadmin start-domain | |
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
# download schemaspy in here http://schemaspy.sourceforge.net/ | |
java -jar schemaSpy_5.0.0.jar -t mysql -db mydb -host localhost -u root -o output -dp driver/mysql-connector-java-5.1.30-bin.jar |
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/sh | |
# | |
# This script will be executed *after* all the other init scripts. | |
# You can put your own initialization stuff in here if you don't | |
# want to do the full Sys V style init stuff. | |
touch /var/lock/subsys/local | |
# add this two lines to overwrite the nameserver value | |
echo "nameserver 8.8.8.8" > /etc/resolv.conf |
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
{ | |
"name":"Darwin Biler", | |
"id": "123", | |
"date_created": "2009-12-12" | |
} |