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 | |
$options = array('http' => array('user_agent' => 'JanusVR random site (v0.1)')); | |
$context = stream_context_create($options); | |
if (isset($_GET['refresh'])){ | |
$rvrsites1 = file_get_contents('http://reddit.com/r/vrsites/.json?limit=100', false, $context); | |
$rvrsites2 = file_get_contents('http://reddit.com/r/vrsites/.json?count=100&after=t3_2akppo&limit=100', false, $context); | |
if ($rvrsites1 === false) { | |
die(); |
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
/** | |
* Using Google Apps Script to enhance my gmail filters. | |
* | |
* I constantly receive email that are important for a short period of time (When I order food online!!!!) but after | |
* the email is no longer relative (When I get my food!) I have no need for this email. Sadly they tend to pile up on me | |
* (I eat a lot). | |
* | |
* Anyways you can add this 8hrDelete.gs file to https://script.google.com and set it up on a "Time Driven" trigger at what | |
* ever time you'll like. I run it at midnight | |
*/ |
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
<html> | |
<head> | |
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script> | |
<script type="text/javascript" charset="utf-8"> | |
$(function () { | |
var extractToken = function(hash) { | |
var match = hash.match(/access_token=(\w+)/); | |
return !!match && match[1]; | |
}; |
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
#!/usr/bin/env sh | |
# https://gist.github.com/4088499 | |
FIND="^monosnap.com\/image\/\([a-zA-Z0-9]*\)" | |
REPLACE="![](https:\/\/api.monosnap.com\/image\/download\?id=\1)" | |
pbpaste | | |
# Different versions of monosnap have this formatted differently, so we grep | |
# first for just what we need. | |
grep -o monosnap.com/image/[a-zA-Z0-9]* | | |
# Grab the current cliboard contents and do our replacement. |
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 | |
$options['shell-aliases']['syncdb'] = '!drush --verbose --yes sql-sync --create-db @pac12.prod @self'; |
Since password managers are big and complicated and I currently am pretty bored since I am sitting in a car for a few hours, here is a simple algorithm to generate resource-specific, unique passwords using a master password and no password database.
As pointed out here: http://news.ycombinator.com/item?id=4374888 this method is broken.
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
<? | |
require_once('basecamp/Basecamp.class.php'); // see http://code.google.com/p/basecamp-php-api/ | |
$bc = new Basecamp('https://[subdomain].basecamphq.com/','[username]','[password]', 'simplexml'); | |
$people = $bc->getPeopleForCompany([company ID]); | |
$person_id = array(); | |
foreach ($people['body']->person as $person) { |
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
// | |
// @file | |
// Sitewide imports, variables and mixins. | |
// | |
@import "compass/css3"; | |
@import "compass/typography"; | |
@import "sassy-buttons"; | |
@import "utilities"; | |
@import "grids"; |
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
#!/usr/bin/env sh | |
## | |
# This is script with usefull tips taken from: | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# | |
# install it: | |
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
# |
NewerOlder