Skip to content

Instantly share code, notes, and snippets.

View reconbot's full-sized avatar
🏴‍☠️
Building at @github

Francis Gulotta reconbot

🏴‍☠️
Building at @github
View GitHub Profile
@reconbot
reconbot / gist:80240
Created March 17, 2009 02:38
local edit .htaccess
<html>
<head>
<title>.htaccess Editor</title>
</head>
<body>
<center>
<br /><br />
<h1>.htaccess Editor</h1>
<br />
<b>This is a php based .htaccess editor. Its probably a bad idea. but at least you have to be from localhost.</b>
// ==UserScript==
// @include http://www.google.*/
// @include http://www.google.*/search*
// @include http://www.bing.com/
// @include http://www.bing.com/search*
// @include http://www.yahoo.com/
// @include http://search.yahoo.com/search*
// ==/UserScript==
document.querySelector('input[name=q], input[name=p]').value = " -w3schools";
@reconbot
reconbot / Cloning objects
Created February 15, 2011 23:21
How would I create a constructor factory?
// http://oranlooney.com/functional-javascript/
function Clone() { }
function clone(obj) {
Clone.prototype = obj;
return new Clone();
}
Food = function(type, slices){
this.type = type;
this.slices= slices;
@reconbot
reconbot / gist:1003863
Created June 2, 2011 03:14
samsung chromebook
With your Chromebook order from Gilt, you'll also receive a limited-edition Chromebook sleeve designed by Rickshaw. Sleeve will be shipped separately.
• 12.1" (1280x800) Display
• 3.26 lbs / 1.48 kg
• Up to 8.5 hours of continuous usage*
• Intel Dual-Core Processor
• Built in dual-band Wi-Fi and World-mode 3G**
• HD Webcam
• 2 USB 2.0 ports
• 4-in-1 memory card slot
@reconbot
reconbot / deamontask.php
Created June 29, 2011 00:16
daemontaks
<?php
// http://bakery.cakephp.org/articles/reconbot/2008/08/26/daemontask
class DaemonTask extends Shell {
function execute($prefix = '') {
//the key the pid is stored with - default to just 'pid'
$pidstring = $prefix . 'pid';
if(!Cache::read($pidstring)){
Cache::write($pidstring, getmypid(), 3600);
}else{
@reconbot
reconbot / gist:1183409
Created August 31, 2011 12:18
vimrc stuff
" Make home more useful
map <Home> ^
imap <Home> <Esc>^i
" stupid hack to make screen a little friendlier on systems where it wont autodetect what's running
let &titlestring = "vim"
if &term == "screen"
set t_ts=^[k
set t_fs=^[\
endif
@reconbot
reconbot / relayUPD.js
Created November 4, 2011 17:27
udp relaying machine
var dgram = require('dgram');
var relay = function(port, dest){
var server = dgram.createSocket('udp4');
var client = dgram.createSocket('udp4');
var clients = [];
if(!Array.isArray(dest)){
dest = [ dest ];
@reconbot
reconbot / index.html
Created March 28, 2012 13:52 — forked from mbostock/.block
Mobile Patent Suits
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<title>Mobile Patent Suits</title>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.js"></script>
<style type="text/css">
path.link {
fill: none;
@reconbot
reconbot / node.conf
Created June 20, 2012 01:17
somethings wrong!
description "node server"
start on filesystem or runlevel [2345]
stop on runlevel [!2345]
respawn
respawn limit 10 5
umask 022
script
@reconbot
reconbot / camera.js
Created July 3, 2012 03:42
Prototype Camera.js
// jquery and underdscore and backbone.js for now anyway
function(){
Camera = function(opt){
opt = opt || {};
this.x = opt.x || 640;
this.y = opt.y || 480;