Skip to content

Instantly share code, notes, and snippets.

View MiniCodeMonkey's full-sized avatar

Mathias Hansen MiniCodeMonkey

View GitHub Profile
<?php
$query = trim($query, " \t\n\r\0\x0B,.:|?!+=()[]{}@#$%^&_-");
{
"name": "Geocodio",
"description": "Ridiculously cheap bulk geocoding",
"image": "http://geocod.io/img/logo_inv_original.png",
"url": "https://geocod.io",
"type": "default",
"version": "1.0",
"apis": [
{

Keybase proof

I hereby claim:

  • I am MiniCodeMonkey on github.
  • I am codemonkey (https://keybase.io/codemonkey) on keybase.
  • I have a public key whose fingerprint is 0A47 EC1B 192E 0C3D D8F9 F664 662E C10B A1F5 A3A9

To claim this, I am signing this object:

@MiniCodeMonkey
MiniCodeMonkey / bootswatch-picker.js
Last active February 1, 2016 18:02
Paste this in your JavaScript console to easily switch between Bootswatch styles to help pick the right one for your site
var themes = [
'//netdna.bootstrapcdn.com/bootswatch/3.3.6/cerulean/bootstrap.min.css',
'//netdna.bootstrapcdn.com/bootswatch/3.3.6/cosmo/bootstrap.min.css',
'//netdna.bootstrapcdn.com/bootswatch/3.3.6/cyborg/bootstrap.min.css',
'//netdna.bootstrapcdn.com/bootswatch/3.3.6/darkly/bootstrap.min.css',
'//netdna.bootstrapcdn.com/bootswatch/3.3.6/flatly/bootstrap.min.css',
'//netdna.bootstrapcdn.com/bootswatch/3.3.6/journal/bootstrap.min.css',
'//netdna.bootstrapcdn.com/bootswatch/3.3.6/lumen/bootstrap.min.css',
'//netdna.bootstrapcdn.com/bootswatch/3.3.6/paper/bootstrap.min.css',
'//netdna.bootstrapcdn.com/bootswatch/3.3.6/readable/bootstrap.min.css',
<?php
$aws_key = '<key>';
$s3_secret = '<secret>';
$bucket_name = '<bucket>';
// Duration before request expires
$duration = (60 * 5); // 5 minutes
$objectName = $_GET['name'];
@MiniCodeMonkey
MiniCodeMonkey / gist:5729249
Last active December 18, 2015 04:59
.io not responding with name servers
mini@codemonkey:~$ nslookup filepicker.io
Server: 8.8.4.4
Address: 8.8.4.4#53
** server can't find filepicker.io: NXDOMAIN
mini@codemonkey:~$ nslookup www.filepicker.io
Server: 8.8.4.4
Address: 8.8.4.4#53
@MiniCodeMonkey
MiniCodeMonkey / fdsafds
Created January 23, 2013 14:46
fdsafdsaf
fdsa
function goToPage(pageIndex)
{
// Ny side
var newPage = $("#page" + pageIndex);
// Tjek om ny side eksisterer
if (newPage.length != 0)
{
// Skjul nuværende side
$("#page" + currentPage).hide();
var currentPage = 1;
function nextPage()
{
// Næste side
var nextPage = $("#page" + (currentPage + 1));
// Tjek om næste side eksisterer
if (nextPage.length != 0)
{
@MiniCodeMonkey
MiniCodeMonkey / gist:4497704
Created January 9, 2013 22:44
Bikeshare Rentals API Output
[
{
"start_station": "14th & Rhode Island Ave NW",
"start_date": "01-09-2013 8:28 am",
"end_station": "8th & Eye St SE / Barracks Row",
"end_date": "01-09-2013 8:54 am",
"duration_seconds": 1547,
"duration": "25 minutes, 47 seconds",
"cost": 0
},