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
# This is to be added after the standard AppDaemon configuration | |
[switch_reset] | |
module = switch_reset | |
class = SwitchReset | |
# Choose where to store the states across restarts | |
file = /home/hass/preserved_states | |
delay = 0 | |
# Change to whatever name you've given the alarm panel, you can experiment adding extra entities and see whether they work. I've tested successfully with switches and generic_thermostat | |
additional_entities = alarm_control_panel.alarm |
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
# Add this content at the very end of config/initializers/comfortable_mexican_sofa.rb | |
# Monkey patch the fixture exporter | |
module ComfortableMexicanSofa::Fixture::File | |
class Exporter < ComfortableMexicanSofa::Fixture::Exporter | |
def export! | |
prepare_folder!(self.path) | |
self.site.files.each do |file| | |
file_path = File.join(self.path, file.file_file_name) | |
block = file.block |
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
1/1 - ON | |
hardware: 433gpio | |
pulse: 3 | |
rawlen: 50 | |
binlen: 12 | |
pulselen: 391 | |
Raw code: | |
391 1173 391 1173 391 1173 1173 391 391 1173 1173 391 391 1173 1173 391 391 1173 391 1173 391 1173 1173 391 391 1173 1173 391 391 1173 1173 391 391 1173 1173 391 391 1173 1173 391 391 1173 1173 391 391 1173 1173 391 391 13294 | |
Binary code: |
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
grep -RPl --include=*.{php,txt,asp} "(passthru|shell_exec|system|phpinfo|base64_decode|chmod|mkdir|fopen|fclose|readfile) *\(" . |
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
# Throttle all incoming and outgoing data to port 3000 at 48KB/s | |
sudo ipfw pipe 1 config bw 48KByte/s | |
sudo ipfw add 101 pipe 1 src-port 3000 | |
sudo ipfw add 102 pipe 1 dst-port 3000 | |
# Delete | |
sudo ipfw delete 101 pipe 1 | |
sudo ipfw delete 102 pipe 1 |
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
%Y-%m-%d_%H-%M |
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
traceroute to 216.81.59.173 (216.81.59.173), 64 hops max, 52 byte packets | |
1 pathfinder (10.20.31.1) 1.639 ms 1.032 ms 0.794 ms | |
2 asr-1001.nbis.net (87.120.131.7) 1.322 ms 1.847 ms 1.848 ms | |
3 46.107.27.133 (46.107.27.133) 8.780 ms 8.980 ms 8.756 ms | |
4 81.183.0.79 (81.183.0.79) 22.275 ms | |
81.183.0.73 (81.183.0.73) 22.061 ms 22.394 ms | |
5 30gigabitethernet4-3.core1.fra1.he.net (80.81.192.172) 41.999 ms 49.115 ms 41.045 ms | |
6 10gigabitethernet2-2.core1.par2.he.net (72.52.92.26) 62.535 ms 58.886 ms | |
10gigabitethernet1-4.core1.par2.he.net (184.105.213.162) 59.168 ms | |
7 10gigabitethernet7-1.core1.ash1.he.net (184.105.213.93) 137.223 ms 137.235 ms 141.452 ms |
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
date +"%y-%m-%d_%H-%M" |
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
cat -n FILE | sort -nr | cut -c 8- > NEWFILE |
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
ls -1 | while read filename; do echo "<li><a href=\"/uploads/$filename\" target=\"_blank\">"; echo `basename $filename .pdf` | sed 's/_/ /g'; echo "</a></li>"; done |