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
# '-t' is the number of frames we want to capture. '-r' is frames per second. So this should grab one frame every second. | |
streamer -o 0000.jpeg -s 300x200 -j 100 -t 2000 -r 1 |
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 ".svn" -exec rm -rf {} \; |
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
tar -czf backup.tar.gz * | split -d -b 5000m - backup.tar.gz.part |
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
//You need to use the Pattern.DOTALL flag to say that the dot should match newlines. e.g. | |
Pattern.compile(regex, Pattern.DOTALL); | |
//or specify the flag in the pattern using (?s) e.g. | |
String regex = "(?s)([a-zA-Z0-9]+)"; |
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
# Files | |
find ./ -type f -exec COMMAND "{}" \; | |
# Directories | |
find . -type d -exec COMMAND "{}" \; |
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
var obj = { | |
attr : 'some string', | |
attr1 : 'some other string' | |
} | |
var objSize = Object.keys(obj).length; |
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 | |
$config = array( | |
'ssl' => 'tls', | |
'port' => 587, | |
'auth' => 'login', | |
'username' => '[email protected]', | |
'password' => 'myPassword' | |
); | |
$transport = new Zend_Mail_Transport_Smtp('smtp.gmail.com', $config); |
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 | |
$mail = new Zend_Mail(); | |
$attach_view = new Zend_view(); | |
$attach_view->setScriptPath('/path/to/views/directory/'); | |
$attach_view->name = 'Lucas'; | |
$attach_view->lastName = 'Mezencio'; | |
$attachment = $attach_view->render('view.phtml'); |
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 var_dump snippet for NetBeans | |
echo '<pre>'; | |
die(var_dump(${VARIABLE variableFromPreviousAssignment default="$variable"})); |
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
<snippet> | |
<content><![CDATA[ | |
<!doctype html> | |
<!-- paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ --> | |
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]--> | |
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8" lang="en"> <![endif]--> | |
<!--[if IE 8]> <html class="no-js lt-ie9" lang="en"> <![endif]--> | |
<!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]--> | |
<head> | |
<meta charset="utf-8"> |