Skip to content

Instantly share code, notes, and snippets.

View zQueal's full-sized avatar
🦍

Zach Queal zQueal

🦍
View GitHub Profile
@zQueal
zQueal / jabber.rb
Created April 21, 2012 22:40 — forked from lukeledet/jabber_bot.rb
Minecraft Jabber Bot
# Simple jabber bot to let me talk to users of my minecraft server from gtalk
# (c) Luke Ledet: https://github.com/lukeledet
require 'xmpp4r-simple'
BOT_USERNAME = '...' #Jabber Bot Username
BOT_PASSWORD = '...' #Jabber Bot Password
ADMIN_USERNAME = '...' #Jabber Admin Account Username
SCREEN_NAME = 'minecraft' #screen -list
@zQueal
zQueal / YSlow.js
Created April 24, 2012 01:13
YSlow Bookmarklet
/* Bookmarklet, runs Yahoo! YSlow on the current page. Excellent for debugging */
javascript:(function(y,p,o){p=y.body.appendChild(y.createElement('iframe'));p.id='YSLOW-bookmarklet';p.style.cssText='display:none';o=p.contentWindow.document;o.open().write('<head><body%20onload="YUI_config={win:window.parent,doc:window.parent.document};var%20d=document;d.getElementsByTagName(\'head\')[0].appendChild(d.createElement(\'script\')).src=\'http://d.yimg.com/jc/yslow-bookmarklet.js\'">');o.close()}(document))
@zQueal
zQueal / sprites.js
Created April 24, 2012 01:15
Sprites Bookmarklet
/* Useful for any web developer that has trouble with Sprites. Pretty idiot proof. */
javascript:(function(){var spritemejs=document.createElement('SCRIPT');spritemejs.type='text/javascript';spritemejs.src='http://spriteme.org/spriteme.js';document.getElementsByTagName('head')[0].appendChild(spritemejs);})();
@zQueal
zQueal / editpage.js
Created April 24, 2012 01:16
EditPage Bookmarklet
/* Useful for any webDevs looking for a way to preview changes before pushing code */
javascript:document.body.contentEditable = 'true'; document.designMode='on'; void 0
@zQueal
zQueal / check.php
Created May 9, 2012 15:18
PHP Website Online Script
<?php
// (C) 2012 Zach Queal - Usage: $status = ServerStatus('domain.com',80);
// Icons (C) 2012 @designkindle http://www.designkindle.com/
function siteCheck($site, $port){
$check = @fsockopen($site, $port, $errno, $errstr, 30);
if($check){
echo "<img alt='Online!' src='http://i.imgur.com.nyud.net/QXgTw.png' />";
} else {
@zQueal
zQueal / twoi.rb
Created September 15, 2012 20:24
Twitter Words of Interest Scrape
#!/usr/bin/env ruby
#
# This script takes a list of twitter usernames or search terms and generates a
# word list based on them. For usernames it requests the last 500 tweets from
# that user, for a search term it requests 500 tweets including that term.
#
# The script is based on an original idea from the
# "7 Habits of Highly Effective Hackers" blog
# http://7habitsofhighlyeffectivehackers.blogspot.com.au/2012/05/using-twitter-to-build-password.html
@zQueal
zQueal / rotate.php
Created December 28, 2012 06:37
Randomly rotates images for display in current directory.
<?php
$extList = array();
$extList['gif'] = 'image/gif';
$extList['jpg'] = 'image/jpg';
$extList['jpeg'] = 'image/jpeg';
$extList['png'] = 'image/png';
$fileList = array();
$handle = opendir("./");
@zQueal
zQueal / issues.php
Last active December 12, 2015 09:49
PHP/cURL github API to return repositories open issue count.
<?php
function openIssues(){
$c = curl_init();
curl_setopt($c, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($c, CURLOPT_HTTPHEADER, array('Accept: application/json', 'Content-Type: application/json'));
curl_setopt($c, CURLOPT_URL, 'https://api.github.com/repos/xanza/xanza.github.com');
$content = curl_exec($c);
curl_close($c);
@zQueal
zQueal / ddos.php
Last active December 17, 2015 20:09
DDoS Detection & Packet Capture Script
<?php
# DDoS Detection & Packet Capture Script
# Written by Robert 'xnite' Whitney
# Website: http://xnite.org
# Email: [email protected]
# Run script as root via crontab every 5 to 10 minutes
# Ensure all dependences are satisfied before running this script (ifstat, tcpdump, php)
# This script will only allow a single tcpdump process to run at once
@zQueal
zQueal / BTSync.md
Last active November 9, 2016 05:58
Debian and Ubuntu Server Packages for BitTorrent Sync client. Credit goes to Tuxpoldo (https://github.com/Tuxpoldo). Original Thread: http://forum.bittorrent.com/topic/18974-debian-and-ubuntu-server-packages-for-bittorrent-sync/

Since I was one of the alfa-testers, I was able to develop a deployment concept for linux servers which permits to deploy BitTorrent Sync as single or multiple daemons with specific configurations. There are now ready-to-use deb packages available both for Ubuntu or Debian with full debconf-support for automated creation of an optional default configuration. If you are searching for a version more suitable for personal desktop use, please look here. Update: User @tuxpoldo has opened a repository, and keeps it current. Follow those instructions instead!

#INSTALLATION IN UBUNTU

Currently there are packages available for Ubuntu precise, quantal, raring and saucy supporting both i386 and amd64. The packages can be easily installed by adding the PPA and then installing as usual:

sudo add-apt-repository ppa:tuxpoldo/btsync
sudo apt-get update
sudo apt-get instal