Skip to content

Instantly share code, notes, and snippets.

@Fire-
Fire- / randemote.js
Last active August 29, 2015 14:13
Random emotes to part of the dom
'use strict';
var timeoutID;
function makeEmote(emoteWidth, emoteHeight, emoteImage) {
var $newdiv = $('<div>').css({
'width': emoteWidth + 'px',
'height': emoteHeight + 'px',
'background-image': 'url(' + emoteImage + ')'
});
@Fire-
Fire- / requestUpload.js
Last active July 12, 2017 10:20
example for uploading files to Hipchat with the v2 api with node.js and the Request package
var request = require('request'), //ezmode
fs = require('fs');
var uploadFileName = 'tit.jpg'; // this is a local file, but could be any file or data you want to read in
//ITS A BIRD I SWEAR
fs.readFile('./' + uploadFileName, function read(err, data) {
// hipchat appears to expect the file as a byte array
// and does not support Content-Transfer-Encoding at the time of this gist's creation
request.post({
@Fire-
Fire- / installDante.sh
Created October 3, 2014 19:53
Basic Dante Socks5 Server Setup and Configuration
# Basic Dante Socks5 Setup, Debian
apt-get update
apt-get install make gcc
cd /usr/src
# get newest from http://www.inet.no/dante/download.html
wget http://www.inet.no/dante/files/dante-1.4.1.tar.gz