Skip to content

Instantly share code, notes, and snippets.

Working from home

Jason loktar00

Working from home
View GitHub Profile
loktar00 /
Last active August 29, 2015 14:15
Javascript Room Meeting

Conclusions to the JS meeting held Feb 21st 2015

  1. Room stars in the meeting room
  2. Do not unstar previous messages upon starting a new meeting
  3. Room Challenges
  4. No more organized room challenges, instead a list of resources that are refreshed weekly hosted at
  5. Job postings within the room
  6. If it's a regular they can pin it. If it's just some programmer can pin/star for a few hours and that's it. If it gets spammy, too out of hand we can readdress.
  7. Room owners promotions/demotions
  8. Jhawins - keep as is
loktar00 / gist:06ee311ac63106d7d044
Last active August 29, 2015 14:15
JavaScript room meeting
View gist:06ee311ac63106d7d044

Topics for the upcoming meeting February 21st 1pm (-6 Central)

Comment and bring up any topics and Ill add them to the list.

#Topic List

  1. Room Challenges, should we continue having them, change the way we do them, or just consider it a good but complete experiment?
  2. Discuss our policy on job postings within the chat.
  3. Discuss adding and removing room owners
  4. Room sponsored/hosted game jam?
loktar00 / headache.js
Created January 15, 2015 22:15
headache inducer
View headache.js
loktar00 / TFSCheckout.js
Created October 17, 2014 16:23
Checkout only changed files from TFS using gulp and gulp-changed.
View TFSCheckout.js
var fs = require('fs');
// ignore missing file error
function fsOperationFailed(stream, sourceFile, err) {
if (err) {
if (err.code !== 'ENOENT') {
stream.emit('error', new gutil.PluginError('gulp-changed', err, {
fileName: sourceFile.path
loktar00 / chatfavicon userscript
Last active August 29, 2015 14:02
User script for animated favicon on the SO Chatrooms
View chatfavicon userscript
// ==UserScript==
// @name Favicon update for pinned chat
// @version 0.1
// @description Updates the favicon with the message count
// @match*
// ==/UserScript==
var canvas = document.createElement('canvas'),
ctx = canvas.getContext('2d'),
origFav = document.querySelector('[rel="shortcut icon"]'),
View gist:63d85b445ccd0ba6c254

So, you want to send a motherfucking XMLHttpRequest (XHR, or commonly and falsly known as AJAX.) Too bad, just ran out of motherfucking XMLHttpRequests; but I still have one regular. XHR is not magic. It does not autofuckinmagically send things the way you want them do be sent. It does not do the thinking for you. It just sends an Http Request.

You get a hold on such a prime beast like this:

View gist:9233624
// perf improvement for answer
var $scrollParent = m[i].element.closest("html,body");
m[i] -= $scrollParent.scrollTop();
m[i].offset.left -= $scrollParent.scrollLeft();
// iframe positioning
if (this.current.options.iframeOffset) {
m[i] +=;
m[i].offset.left += this.current.options.iframeOffset.left;
loktar00 / Swimming-snakes.markdown
Created January 16, 2014 01:24
A Pen by Jason Brown.
View Swimming-snakes.markdown

Swimming snakes

Havent done a pen in the longest time, decided to put this demo together after playing around with IK, the effect turned out pretty cool! (in my biased opinion of course)

A Pen by Jason Brown on CodePen.


loktar00 / reoccurringtimer.js
Last active December 21, 2015 11:09
Simple reoccurring timer
View reoccurringtimer.js
var timer = function (waitTime, callBack, forever, start) {
this.lastTime =;
this.waitTime = waitTime;
this.forever = forever;
this.running = start;
this.callBack = callBack;
this.tick = function () {
if (this.running) {
if ( > this.lastTime + this.waitTime) {
loktar00 / gist:5427189
Last active December 16, 2015 11:28
What is the best way to do this?
View gist:5427189
* What Im trying to get to work
function playersGameName(options){
// stuff in here to init whatevs.