Skip to content

Instantly share code, notes, and snippets.

🏗
Building awesome teams, software, and systems architecture

Victor Quinn victorquinn

🏗
Building awesome teams, software, and systems architecture
Block or report user

Report or block victorquinn

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View ipad-view-source-bookmarklet
javascript:(function(){
/* Bookmarklet for viewing source in iPad Safari */
var pageHTML = document.documentElement.innerHTML;
var otherlib = false;
var jQueryLoaded = false;
document.documentElement.innerHTML = '<!DOCTYPE html><html><head><title>Source of ' + location.href + '</title><meta name="viewport" content="width=device-width" /></head><body><div id="editor" style="height:' + window.innerHeight + 'px;width:' + window.innerWidth + 'px;"></div></body></html>';
/* Load jQuery */
if(typeof jQuery != 'undefined') {
console.log('This page already using jQuery v' + jQuery.fn.jquery);
@victorquinn
victorquinn / VolumeAdjust.applescript
Last active Feb 10, 2018
Alfred Adjust Volume Applescript
View VolumeAdjust.applescript
on alfred_script(q)
set tmp to splitString(q, " ")
set q to item 1 of tmp
if length of tmp is 2 then
set change to item 2 of tmp
else
set change to 10
end if
set current to output volume of (get volume settings)
@victorquinn
victorquinn / gist:2252458
Created Mar 30, 2012
cache_set() not getting hit?
View gist:2252458
$form_id = "test1234";
$form = array('nthnth' => "NNnthnthnt");
$form_state = array('sntssss' => "NTHNTHNTHNTH");
form_set_cache($form_id, $form, $form_state);
watchdog('vcache', 'Cache about to be called!');
cache_set('form_' . $form_id, $form, 'cache_form', time());
@victorquinn
victorquinn / Fibonacci Ratio
Last active Dec 26, 2015
Fibonacci approaching Golden Ratio
View Fibonacci Ratio
var _ = require('lodash');
// Helper function for generating the nth Fibonacci number
var fibonacci = _.memoize(function(n) {
return n < 2 ? n : fibonacci(n - 1) + fibonacci(n - 2);
});
var fibonacci_ratio = function(n) {
return fibonacci(n) / fibonacci(n - 1);
};
@victorquinn
victorquinn / promise_while_loop.js
Last active Nov 6, 2018
Promise "loop" using the Bluebird library
View promise_while_loop.js
var Promise = require('bluebird');
var promiseWhile = function(condition, action) {
var resolver = Promise.defer();
var loop = function() {
if (!condition()) return resolver.resolve();
return Promise.cast(action())
.then(loop)
.catch(resolver.reject);
@victorquinn
victorquinn / .gitignore
Last active Aug 29, 2015
Bluebird memory leak
View .gitignore
node_modules
View keybase.md

Keybase proof

I hereby claim:

  • I am victorquinn on github.
  • I am victorquinn (https://keybase.io/victorquinn) on keybase.
  • I have a public key whose fingerprint is 0C78 5D78 CCCF 28C3 9841 222F EF30 4CDD 429F 5478

To claim this, I am signing this object:

View gist:974023dc07cc3dcfa96a
You can now send me #bitcoin here: https://onename.io/victor
Verifying that +victor is my Bitcoin username
@victorquinn
victorquinn / InfoPlist.strings
Created May 27, 2015
LocationKit Permissions Configuration
View InfoPlist.strings
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>NSLocationAlwaysUsageDescription</key>
<string>Change this line to inform consumer about how location is being used in the background</string>
</dict>
</plist>
@victorquinn
victorquinn / AppDelegate.m
Last active Aug 29, 2015
Start LocationKit
View AppDelegate.m
// Add the following line above the @implementation section in AppDelegate.m
#import <LocationKit/LocationKit.h>
// From within AppDelegate.m’s application:didFinishLaunchingWithOptions: method,
// add the following lines to initialize and launch LocationKit:
[LocationKit startWithApiToken:@"<yourApiTokenHere>" andDelegate:nil];
You can’t perform that action at this time.