This file contains hidden or 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 java.sql.Connection; | |
import java.sql.PreparedStatement; | |
import java.sql.ResultSet; | |
import java.sql.SQLException; | |
import java.sql.Statement; | |
import java.sql.Timestamp; | |
import java.util.HashMap; | |
import java.util.LinkedList; | |
import java.util.List; | |
import java.util.Map; |
This file contains hidden or 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
find . \( -name "*.php" -o -name "*.phtml" \) -exec php -l {} \; |
This file contains hidden or 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
/** | |
/* Add the option below in GUI_JAVA_OPTS quotes, | |
/* -Dorg.eclipse.swt.browser.DefaultType=mozilla | |
/* like the sample | |
**/ | |
SRV_JAVA_OPTS="-Dfile.encoding=UTF-8 -Dapp=CrashPlanService -DappBaseName=CrashPlan -Xms20m -Xmx512m -Djava.net.preferIPv4Stack=true -Dsun.net.inetaddr.ttl=300 -Dnetworkaddress.cache.ttl=300 -Dsun.net.inetaddr.negative.ttl=0 -Dnetworkaddress.cache.negative.ttl=0 -Dc42.native.md5.enabled=false" | |
GUI_JAVA_OPTS="-Dfile.encoding=UTF-8 -Dapp=CrashPlanDesktop -DappBaseName=CrashPlan -Xms20m -Xmx512m -Djava.net.preferIPv4Stack=true -Dsun.net.inetaddr.ttl=300 -Dnetworkaddress.cache.ttl=300 -Dsun.net.inetaddr.negative.ttl=0 -Dnetworkaddress.cache.negative.ttl=0 -Dc42.native.md5.enabled=false -Dorg.eclipse.swt.browser.DefaultType=mozilla" |
This file contains hidden or 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 | |
interface SubscriberInterface { | |
public static function getSubscribedEvents(); | |
} | |
class BlogSubscriber implements SubscriberInterface { | |
public static function getSubscribedEvents() { | |
return array( | |
'blog_update' => 'Listener' | |
); |
This file contains hidden or 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 | |
/* Initializing client */ | |
require_once "client/JasperClient.php"; | |
$client = new Jasper\JasperClient('localhost', // Hostname | |
8080, // Port | |
'jasperadmin', // Username | |
'jasperadmin', // Password |
This file contains hidden or 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 | |
function getMaxFileUpload() { | |
$max_upload = (int)(ini_get('upload_max_filesize')); | |
$max_post = (int)(ini_get('post_max_size')); | |
$memory_limit = (int)(ini_get('memory_limit')); | |
$upload_mb = min($max_upload, $max_post, $memory_limit); | |
} |
This file contains hidden or 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 | |
define('DB_DRIVER', 'mysql'); | |
define('DB_HOST', 'localhost'); | |
define('DB_USER', 'root'); | |
define('DB_PWD', 'minhasenha'); | |
define('DB_DATABASE', 'meubancodedados'); | |
try { | |
$pdo = new PDO(DB_DRIVER.':host='.DB_HOST.';dbname='.DB_DATABASE, DB_USER, DB_PWD); |
This file contains hidden or 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 | |
cd ~/Downloads | |
# adding getdeb repository | |
#sudo add-apt-repository 'deb http://archive.getdeb.net/ubuntu precise-getdeb apps' | |
#sudo wget -q -O- http://archive.getdeb.net/getdeb-archive.key | sudo apt-key add - | |
# adding classic menu repository | |
#sudo add-apt-repository ppa:diesch/testing |
This file contains hidden or 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
sudo apt-get purge openjdk* | |
sudo add-apt-repository ppa:webupd8team/java | |
sudo apt-get update | |
sudo apt-get install oracle-java7-installer |
This file contains hidden or 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
# Generated by Conky GUI | |
# Check http://conkygui.sourceforge.net/ | |
# For the latest version of Conky GUI | |
#24-Nov-10 02:38:22 PM | |
#author: conky | |
# Conky | |
background yes | |
no_buffers yes |