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
Server { | |
Type=fastcgi | |
Port=9000 | |
PathDebug = true | |
FixPathInfo = true | |
} | |
VirtualHost { | |
* { | |
Pattern = .* |
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/bash | |
# Save script to ~/.irssi.sh | |
# Creates a screen and starts irssi in it. | |
# If the screen already exists, it simply attaches it. | |
# Create an alias in your ~/.bashrc to access it simply. | |
# alias irc='~/.irssi.sh' | |
if screen -list | grep -q "irssi"; then | |
screen -x irssi | |
else |
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
# I had a LOT of trouble finding working examples of the ZAutomation API for RaZberry API. I eventually figured out what exactly to use by combining information from multiple sources and sniffing requests from the 'Expert UI'. Some areas I found information: | |
- http://docs.zwayhomeautomation.apiary.io/ | |
- http://wiki.micasaverde.com/index.php/ZWave_Command_Classes | |
- https://www.npmjs.org/package/mqtt-zway | |
- The included PDFs | |
- The expert API area on the device web UI | |
- https://chrome.google.com/webstore/detail/postman-interceptor/aicmkgpgakddgnaphhhpliifpcfhicfo?hl=en (Postman POST/GET sniffer) | |
# Some general RaZberry API commands: |
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/bash | |
# Took me awhile to figure out how to install utserver on Centos 7 x86_64... Especially with the new systemd subsystem. None of the builds I saw support it - but it will work with a couple symlinks and compatibility packages. | |
yum install glibc libgcc openssl krb5-libs libcom_err zlib keyutils-libs libselinux glibc glibc.i[36]86 libgcc libgcc.i[36]86 openssl openssl.i[36]86 krb5-libs krb5-libs.i[36]86 libcom_err libcom_err.i[36]86 zlib zlib.i[36]86 keyutils-libs keyutils-libs.i[36]86 libselinux libselinux.i[36]86 openssl098e-0.9.8e-29.el7.centos.2.i686 -y | |
ln -s /usr/lib/libssl.so.0.9.8e /lib/libssl.so.0.9.8 | |
ln -s /usr/lib/libcrypto.so.0.9.8e /lib/libcrypto.so.0.9.8 | |
mkdir /var/utserver | |
wget -O /var/utserver/utorrent-server-3.0-25053.tar.gz http://download.utorrent.com/linux/utorrent-server-3.0-25053.tar.gz | |
cd /var/utserver/ | |
tar zxf utorrent-server-3.0-25053.tar.gz | |
mv /var/utserver/utorrent-server-v3_0/* /var/utserver/ |
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
[Unit] | |
Description=Teamspeak Server | |
After=network.target | |
[Service] | |
ExecStart=/root/teamspeak/ts3server_startscript.sh start | |
ExecStop=/root/teamspeak/ts3server_startscript.sh stop | |
Watchdog=1 | |
Restart=on-watchdog | |
User=root |
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/python | |
# Be sure to run this as root! | |
import subprocess | |
def runcmd(command, timeout): | |
command = command + " & pid=$!;sleep " + str(timeout) + "; kill -9 $pid" | |
#print(command) | |
process = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True) | |
return process.stdout.read() |
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
URL apiUrl = null; | |
int statusCode = 0; | |
String responseData = ""; | |
try { | |
// setup new web request parameters | |
apiUrl = new URL("http://api.site.com"); | |
HttpURLConnection connection = null; | |
connection = (HttpURLConnection) apiUrl.openConnection(); |
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
# setup password file | |
sudo htdigest -c /etc/squid/passwords local username |
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
# ~/.tmux.conf | |
# | |
# See the following files: | |
# | |
# /opt/local/share/doc/tmux/t-williams.conf | |
# /opt/local/share/doc/tmux/screen-keys.conf | |
# /opt/local/share/doc/tmux/vim-keys.conf | |
# | |
# URLs to read: | |
# |
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
ssh -D 8123 -f -C -q -N [email protected] | |
Explanation of arguments | |
-D: Tells SSH that we want a SOCKS tunnel on the specified port number (you can choose a number between 1025-65536) | |
-f: Forks the process to the background | |
-C: Compresses the data before sending it | |
-q: Uses quiet mode | |
-N: Tells SSH that no command will be sent once the tunnel is up |
OlderNewer