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 App; | |
function App() { | |
this.panda = "sad"; | |
} | |
module.exports = App; |
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
# Assignment: | |
number = 42 | |
opposite = true | |
# Conditions: | |
number = -42 if opposite | |
# Functions: | |
square = (x) -> x * x |
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
#!/usr/bin/expect | |
set password "thepassword" | |
set login "yourlogin" | |
set host "199.199.199.199" | |
set remotepath "/var/www/html/yoursite.com" | |
spawn ssh $host -l $login | |
expect "$login@$host's password: " | |
send "$password\n" |
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
RewriteRule ^/test /test?var=val [QSA] |
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 xcodebuild -license | |
xcode-select --install # There will be a GUI prompt | |
sudo cpan SVN::Core # use the "sudo" method when prompted | |
# Then add this to your ~/.profile: | |
# export PATH=/Library/Developer/CommandLineTools/usr/bin:$PATH | |
# Then probably: | |
brew reinstall git | |
brew reinstall subversion |
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
# npm install and save dev | |
function ni() { | |
npm install --save-dev "$@" | |
} | |
# npm install grunt package, and save dev. | |
function gi() { | |
npm install --save-dev grunt-"$@" | |
} | |
# npm install grunt contrib package, and save dev. |
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
<VirtualHost *:80> | |
ServerAdmin [email protected] | |
DocumentRoot "" | |
ServerName server.dev | |
<Directory ""> | |
Options Indexes MultiViews FollowSymLinks | |
AllowOverride All | |
Order allow,deny | |
Allow from all | |
DirectoryIndex index.html index.php |
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 | |
/* NEW DYNAMIC FUNCTION */ | |
define( 'OAM_DYNAMIC_YOUR_FUNCTION', 'CACHE_OAM_YOUR_TAG'); | |
function OAM_your_function_filter( &$cachedata = 0) { | |
if (defined('OAM_DYNAMIC_YOUR_FUNCTION_TEXT')) | |
return str_replace( OAM_DYNAMIC_YOUR_FUNCTION, OAM_DYNAMIC_YOUR_FUNCTION_TEXT, $cachedata); | |
$text = OAM_your_function_filter_output(); | |
if ( $cachedata === 0 ) | |
define('OAM_DYNAMIC_YOUR_FUNCTION_TEXT', $text); |
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 if (OAM_isCaching('OAM_your_function_filter')){ | |
OAM_your_function_filter(); | |
?> | |
CACHE_OAM_YOUR_TAG | |
<?php } else { | |
echo OAM_your_function_filter_output(); | |
} | |
?> |
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
<ifmodule mod_expires.c> | |
ExpiresActive On | |
ExpiresDefault "access plus 1 second" | |
ExpiresByType text/html "access plus 7200 seconds" | |
ExpiresByType image/gif "access plus 518400 seconds" | |
ExpiresByType image/jpeg "access plus 518400 seconds" | |
ExpiresByType image/png "access plus 518400 seconds" | |
ExpiresByType text/css "access plus 1 month" | |
ExpiresByType text/javascript "access plus 216000 | |
seconds" |