Skip to content

Instantly share code, notes, and snippets.

View bmccallion's full-sized avatar

Brian McCallion bmccallion

View GitHub Profile
@bmccallion
bmccallion / gist:36d5edea722f428fb3f1
Created August 13, 2014 15:36
Create symbolic link in linux
#I always need to do this, often forget the syntax
ln -s TARGET LINK_NAME
@bmccallion
bmccallion / file.rb
Created October 12, 2016 13:33
Arrow functions - JavaScript | MDN
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions
@bmccallion
bmccallion / SymbolCompanyMapper
Created November 20, 2016 18:39
Practical mapping in an Alexa skill. Use same for Symbol to Company, Conpany to Symbol validation
// example city to NOAA station mapping. Can be found on: http://tidesandcurrents.noaa.gov/map/
var STATIONS = {
'seattle': 9447130,
'san francisco': 9414290,
'monterey': 9413450,
'los angeles': 9410660,
'san diego': 9410170,
'boston': 8443970,
'new york': 8518750,
@bmccallion
bmccallion / async.js
Created February 13, 2017 12:39
async function for generator function and promises
function async(makeGenerator){
return function () {
var generator = makeGenerator.apply(this, arguments);
function handle(result){
// result => { done: [Boolean], value: [Object] }
if (result.done) return Promise.resolve(result.value);
return Promise.resolve(result.value).then(function (res){
return handle(generator.next(res));
# How to create an RPM repository
# This is for Redhat 64 bit versions of Linux. You can create your own RPM repository # to host your custom RPM packages.
#
# See "How to create an RPM from source with spec file" for more information.
# https://gist.github.com/1376973
# Step: 1
# Install createrepo