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
/** | |
* Is Date A Business Day? | |
* @param cal | |
* @return boolean | |
*/ | |
public boolean isBusinessDay(Calendar cal){ | |
// check if weekend | |
if(cal.get(Calendar.DAY_OF_WEEK) == Calendar.SATURDAY || cal.get(Calendar.DAY_OF_WEEK) == Calendar.SUNDAY){ | |
return false; | |
} |
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
# Shows you where the app is coming from | |
which {app} | |
# Example... | |
which java | |
# returns: /usr/bin/java |
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
# Install NPM Module Globally | |
sudo npm install -g {module name} | |
# example | |
sudo npm install -g connect |
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
# Install Something (duh...) | |
apt-get install {package name} | |
# Search for Package in Repos | |
apt-cache search | |
# Get Package Info In Detail (including version) | |
apt-cache show {package name} | |
# Remove a Package |
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 | |
// SET YOUR USER/PASS STUFF HERE... | |
$auth = array( | |
'user1' => 'pass123', | |
'user2' => 'pass123', | |
'user3' => 'pass123', | |
'user4' => 'pass123', | |
'user5' => 'pass123', | |
); | |
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 | |
# ALIASES | |
alias editbash='vim ~/.bashrc' | |
alias updatebash='source ~/.bashrc' | |
alias rm='rm -i' | |
alias cp='cp -i' | |
alias mv='mv -i' | |
alias shutdown='shutdown -P now' |
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
# Just Change the port or hostname as needed | |
curl -IL http://localhost:8080 |
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
function not(){ | |
grep -v $1 | |
} | |
#usage | |
find . -name something* | not somethingelse |
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
new Date / 1000 |
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
// Restores Native console.log() | |
delete console.log |