Skip to content

Instantly share code, notes, and snippets.

View vgdub's full-sized avatar
💭
🤓

Vincent Williams vgdub

💭
🤓
View GitHub Profile
@vgdub
vgdub / FPError.txt
Last active September 15, 2015 18:39
FP Error: Error Domain=com.alamofire.error.serialization.response Code=-1011 "Request failed: not found (404)" UserInfo=0x7fa15e4bc490 {NSUnderlyingError=0x7fa15e440a00 "Request failed: unacceptable content-type: text/html", com.alamofire.serialization.response.error.response=<NSHTTPURLResponse: 0x7fa1608c00a0> { URL: https://dialog.filepicker.io/api/pathhttps%3A%2F%2Fmatchup-io-dev.s3.amazonaws.com%2Fuploads%2Fusers%2F2015-09-14%2F10103881160450198.jpg } { status code: 404, headers {
"Content-Encoding" = gzip;
"Content-Type" = "text/html; charset=utf-8";
Date = "Mon, 14 Sep 2015 23:30:01 GMT";
Server = nginx;
"Set-Cookie" = "session=\"Q0agqTmnI5EUlhFWI3l3kEPa9gk=?_expires=STE0NDQ5NTE4MDEKLg==&_fresh=STAwCi4=&_id=UyckXHgwZlx4Y2ZceDkzXHg5Mlx4ZjVceDBjXHg5Zlx4OWMsXHhkMXk0XHhjN1x4OWJceGZhJwpwMQou&_permanent=STAxCi4=&cmux_rd=Ti4=&facebook_request_token=UydlbXB0eScKcDEKLg==&recent_path=Vi9GYWNlYm9vay90YWdnZWQvCnAxCi4=&user_auth_id=STQ2MTMyMjIKLg==\"; Domain=dialog.filepicker.io; expires=Thu, 15-
@vgdub
vgdub / FPError.txt
Last active September 15, 2015 18:40
FP Error: Error Domain=com.alamofire.error.serialization.response Code=-1011 "Request failed: not found (404)" UserInfo=0x7fa15e4bc490 {NSUnderlyingError=0x7fa15e440a00 "Request failed: unacceptable content-type: text/html", com.alamofire.serialization.response.error.response=<NSHTTPURLResponse: 0x7fa1608c00a0> { URL: https://dialog.filepicker.io/api/pathhttps%3A%2F%2Fmatchup-io-dev.s3.amazonaws.com%2Fuploads%2Fusers%2F2015-09-14%2F10103881160450198.jpg } { status code: 404, headers {
"Content-Encoding" = gzip;
"Content-Type" = "text/html; charset=utf-8";
Date = "Mon, 14 Sep 2015 23:30:01 GMT";
Server = nginx;
"Set-Cookie" = "session=\"Q0agqTmnI5EUlhFWI3l3kEPa9gk=?_expires=STE0NDQ5NTE4MDEKLg==&_fresh=STAwCi4=&_id=UyckXHgwZlx4Y2ZceDkzXHg5Mlx4ZjVceDBjXHg5Zlx4OWMsXHhkMXk0XHhjN1x4OWJceGZhJwpwMQou&_permanent=STAxCi4=&cmux_rd=Ti4=&facebook_request_token=UydlbXB0eScKcDEKLg==&recent_path=Vi9GYWNlYm9vay90YWdnZWQvCnAxCi4=&user_auth_id=STQ2MTMyMjIKLg==\"; Domain=dialog.filepicker.io; expires=Thu, 15-
@vgdub
vgdub / share.js
Created July 12, 2014 19:30
example post signup share js/ui...simple and easy. from tap
$(function () {
var clicks = 0;
var twitClick = 0 , fbCLick = 0, playClick = 0;
function changeWidth() {
var percent = Math.min(Math.round(clicks / 3 * 100), 100);
var progress = $('#share-progress');
progress.width(percent + '%');
progress.find('.percent').html(percent+'%')
}
@vgdub
vgdub / httpInteceptor.coffee
Created June 25, 2014 17:08
http angular inteceptor for loading spinner
angular.module('matchupApp').config ['$httpProvider', ($httpProvider) ->
$httpProvider.interceptors.push ['$log', '$rootScope', ($log, $rootScope) ->
requestCount = 0
processIsLoading = (adjustment) ->
requestCount += adjustment
isStillLoading = requestCount > 0
$rootScope.loading = isStillLoading
isStillLoading
request = (config) ->
@vgdub
vgdub / templates.js.erb
Created May 27, 2014 18:53
template_cache_rails_assets_angular.js.erb
'use strict';
angular.module('templates', []).run([ '$templateCache', function($templateCache) {
<%
environment.context_class.instance_eval { include ActionView::Helpers::JavaScriptHelper }
app_root = File.expand_path('../', __FILE__)
html_templates = File.join(app_root, %w{templates ** ** *.html })
templates = Dir.glob(html_templates)
@vgdub
vgdub / ng-textcomplete.min.js
Created April 30, 2014 23:16
textcomplete angular
"use strict";angular.module("ngTextcomplete",[]).factory("utils",[function(){function lock(func){var free,locked;free=function(){locked=false};return function(){var args;if(locked)return;locked=true;args=toArray(arguments);args.unshift(free);func.apply(this,args)}}function toArray(args){return Array.prototype.slice.call(args)}function bind(func,context){return func.bind?func.bind(context):function(){func.apply(context,arguments)}}var getStyles=function(){var color;color=$("<div></div>").css(["color"]).color;if(typeof color!=="undefined"){return function($el,properties){return $el.css(properties)}}else{return function($el,properties){var styles;styles={};angular.forEach(properties,function(property,i){styles[property]=$el.css(property)});return styles}}}();function memoize(func){var memo={};return function(term,callback){if(memo[term]){callback(memo[term])}else{func.call(this,term,function(data){memo[term]=(memo[term]||[]).concat(data);callback.apply(null,arguments)})}}}function include(array,value){var i,l;if
@vgdub
vgdub / nav-toggle.css
Created March 31, 2014 01:03
Nav Toggle Icon
.nav_toggle{display:inline-block;position:absolute;top:0;left:0;padding:1.5em .75em;transition:.5s;cursor:pointer;-webkit-user-select:none;user-select:none;opacity:.9;}
.nav_toggle .nav_toggle__icon:before,.nav_toggle .nav_toggle__icon:after{transition:.25s}
.nav_toggle__icon{position:relative;width:2.5em;height:.25em;background:#fff;font-size:.75em;transition:.5s;border-radius:2.5em;}
.nav_toggle__icon:after,.nav_toggle__icon:before{display:block;content:"";height:.25em;width:2.5em;background:#fff;position:absolute;z-index:-1;transition:.5s .25s;border-radius:1em}
.nav_toggle__icon:after{top:-.825em}
.nav_toggle__icon:before{top:.825em}
.nav_toggle-active{left:13em;}
.nav_toggle-active:before{content:"";position:absolute;top:0;left:3.25em;width:40em;height:30em}
.nav_toggle-active .nav_toggle__icon:before,.nav_toggle-active .nav_toggle__icon:after{transition:.5s;top:0}
.nav_toggle-active .nav_toggle__icon{background:transparent;}

Keybase proof

I hereby claim:

  • I am vgdub on github.
  • I am vgdub (https://keybase.io/vgdub) on keybase.
  • I have a public key whose fingerprint is 2D12 A339 E6ED CEA3 4B52 2958 6CBD 916E B65E FF60

To claim this, I am signing this object:

@vgdub
vgdub / Gemfile
Created February 24, 2014 22:56 — forked from cblunt/Gemfile
# ...
gem 'carrierwave'
gem 'fog', '~> 1.0.0' # Need to specify version, as carrierwave references older (0.9.0) which doesn't allow configuration of Rackspace UK Auth URL
@vgdub
vgdub / 0_reuse_code.js
Created February 14, 2014 03:01
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console