Skip to content

Instantly share code, notes, and snippets.

View LongLiveCHIEF's full-sized avatar

Brian Vanderbusch LongLiveCHIEF

View GitHub Profile
@LongLiveCHIEF
LongLiveCHIEF / .gitignore
Last active December 29, 2015 05:29
An essential electronics reference guide for beginning hackers and makers
.idea/
@LongLiveCHIEF
LongLiveCHIEF / xmas2013.md
Created November 29, 2013 00:58
Christmas Wish Lists and Ideas - 2013
@LongLiveCHIEF
LongLiveCHIEF / form.html
Last active December 30, 2015 20:19
dynamic select boxes
<head>
<script src="jquery.js"></script><!-- use .js for easier DOM manipulation, can be done without, using the native DOM api -->
<script src="selection-map.js"></script>
</head>
<body>
<!-- select name="" values will be used inside the map object to initialize watch -->
<!-- the custom data-selmap-cascade="" property initializes the dynamic functionality, and the value should be an
#!/usr/bin/env python
"""
This script helps migrating issues from Bitbucket to GitHub.
It currently ignores milestones completly and doesn't care whether an issue is
open, new or on hold. As long as it's not closed it's considered open.
To use it, install python-bitbucket, PyGithub and ipdb.
@LongLiveCHIEF
LongLiveCHIEF / module.service.md
Last active August 29, 2015 13:56
A walkthrough of AngularJS service/factory/provider injenction into a module.config object using deferred promise
var app = angular.module('app',['ui.router']);

app.service('api',function($http){
    var user,autherror, apihost, requestpath;
    return {
        authorize:function(){
            var deferred = $q.defer();

            deferred.promise = $http.get(apihost+'/'+requestpath) //$http returns a promise object

.success(function(data){

@LongLiveCHIEF
LongLiveCHIEF / config.js
Last active August 29, 2015 13:56
SharePoint site provider factory
.config(['spSiteProvider',function(spSiteProvider){
spSiteProvider.siteSvcUrl('https://myspsite.com/_vti_bin/listdata.svc')
}])
@LongLiveCHIEF
LongLiveCHIEF / app.js
Created August 3, 2014 21:32
Module Pattern for creating a "step" and passing it handler functions
var step1 = new Step($elem);
// an example handler funciton
var highlightStep = function(){
this.$elem.addClass('highlight');
}
step1.addHandler(highlightStep);
@LongLiveCHIEF
LongLiveCHIEF / BetterIntro.md
Last active August 29, 2015 14:04
Promises - A Better Tutorial

Resolve a promise from a custom promise

Or: Turning a function into a promise

What most Angular Promise Tutorials Fail to teach You: Creating the promise

So many times while learning how to use promises, or trying to use them in my Angular applications, I would discover pieces of functionality that needed to be a promise, but weren't a $resource (or one of it's derivates).

Most tutorials show a final result of something like this:

@LongLiveCHIEF
LongLiveCHIEF / workbench.md
Last active August 29, 2015 14:13
Maker's Workbench

Maker's Workbench Plans

Name it!

-Maybe a cool acronym? some keywords: Workbench, bench, *bench, Make*, Hack, elec*, enginer*, pro, elite, deluxe, super, lab, static, voltage, variable voltage, linux, arduino, internet enabled

  • WBMHEIPDSLVA
  • (LEW/LEWb) Loaded Engineer's Workbench

Requirements

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname