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
-- phpMyAdmin SQL Dump | |
-- version 3.4.9 | |
-- http://www.phpmyadmin.net | |
-- | |
-- Host: localhost | |
-- Generation Time: Jun 02, 2012 at 11:56 AM | |
-- Server version: 5.5.9 | |
-- PHP Version: 5.3.6 | |
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; |
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
#!/bin/sh -e | |
# Usage: license | |
# Prints an MIT license appropriate for totin' around. | |
# | |
# $ license > COPYING | |
#!/bin/sh | |
echo "Copyright (c) `date +%Y` Ben Evans | |
Permission is hereby granted, free of charge, to any person obtaining | |
a copy of this software and associated documentation files (the |
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
<?php | |
class log { | |
public $filename; | |
public $timestamp; | |
public $ip; | |
public $u_agent; | |
public $u_refer; | |
public $ub; |
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
<?php | |
backup_tables('MYSQL_HOST','MYSQL_USER','MYSQL_PASS','MYSQL_DB'); | |
/* backup the db OR just a table */ | |
function backup_tables($host,$user,$pass,$name,$tables = '*') | |
{ | |
$link = mysql_connect($host,$user,$pass); |
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
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script> | |
<script type="text/javascript" src="http://stats.bensbit.co.uk/javascripts/bbar.js"></script> | |
<header> | |
<div class=container> | |
<h1>StatsBox</h1> | |
</div> | |
</header> | |
<div id="content" class=container> |
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
{ | |
"ac":"whois.nic.ac", | |
"ae":"whois.nic.ae", | |
"af":"whois.nic.af", | |
"ag":"whois.nic.ag", | |
"al":"whois.ripe.net", | |
"am":"whois.amnic.net", | |
"as":"whois.nic.as", | |
"at":"whois.nic.at", | |
"au":"whois.aunic.net", |
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
# localisedEstimate: | |
# targetlngLat (Array|Object) = Containing the latLng you require a definition for | |
# Example: [9, 10] | |
# surroundinglngLats (Array) = Local LngLats (objects) to be used when finding the value of target. | |
# Example: [{lng:9.21, lat:10.23, value:34}, {lng:8.5, lat:9.78, value:10}] | |
# valueKey (String) = Key used for value in surroundinglngLats Objects. | |
# Example: 'NDWI' | |
localisedEstimate = (targetlngLat, surroundinglngLats, valueKey) -> |
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
mongoose = require 'mongoose' | |
db = mongoose.createConnection(config.mongo.host, config.mongo.db); | |
db.on 'error', console.error.bind(console, 'connection error:') | |
db.once 'open', () -> | |
console.log 'Connected to DB' | |
schemaFiles = fs.readdirSync './db/schemas' | |
for filename in schemaFiles |
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
/** | |
* SoundForcast | |
*/ | |
* { -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; } | |
body { | |
background: linear-gradient(180deg, #111, #000); |
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
function bubbleSort (sortingArray) { | |
var goto = sortingArray.length - 1; | |
for(var key in sortingArray) { | |
for(var i = 0; i <= goto - 1; i++) { | |
if(sortingArray[i] > sortingArray[i + 1]) { | |
// Swap | |
var temp = sortingArray[i]; | |
sortingArray[i] = sortingArray[i +1]; | |
sortingArray[i + 1] = temp; | |
} |
OlderNewer