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
sudo nano /etc/iptables.up.rules | |
sudo iptables-restore /etc/iptables.up.rules | |
sudo nano /etc/webmin/miniserv.conf | |
sudo service webmin restart |
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
Repeat the previous line: !! |
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
<item> | |
<name>Swap Control and Command keys</name> | |
<identifier>private.swap_control_and_command</identifier> | |
<autogen>__KeyToKey__KeyCode::CONTROL_L,KeyCode::COMMAND_R</autogen> | |
<autogen>__KeyToKey__KeyCode::TAB, ModifierFlag::COMMAND_R,KeyCode::TAB, ModifierFlag::CONTROL_L</autogen> | |
</item> |
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
<html> | |
<head> | |
</head> | |
<body> | |
<form name="search" action="loadWeb.php" method="post"> | |
<input type="text" name="search" /> | |
<input type="submit" value="Go!" /> | |
</body> | |
</html> |
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
#SSAS snippet | |
=dateadd("q",datepart("q",today())-1,CDate("1/1/" & today().year)) |
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
apt-get install logwatch | |
vim /etc/cron.daily/00logwatch | |
add this line: | |
/usr/sbin/logwatch --output mail --mailto test@gmail.com --detail high |
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
# list all open network connections by PID | |
lsof -i | grep -E "(LISTEN|ESTABLISHED)" |
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
require 'socket' | |
def tcpconnect(username, password) | |
temp_data = '' | |
begin | |
s = TCPSocket.new($host, 21) | |
temp_data = s.gets | |
s.puts("USER #{username}\r\n") |
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
virtualenv --distribute venv | |
source venv/bin/activate | |
pip install scrapy-redis | |
git clone https://github.com/darkrho/scrapy-redis.git | |
cd scrapy-redis | |
python setup.py install |
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
function transform(data) { | |
// filter functions are passed the whole API response object | |
// you may manipulate or add to this data as you want | |
// query parameters exist in the global scope, for example: | |
// http://www.kimonolabs.com/apis/<API_ID>/?apikey=<API_KEY>&myparam=test | |
// query.myparam == 'test'; // true | |
function removeWord(text, wordToRemove) { | |
text = text.replace(wordToRemove, '') |
OlderNewer