Skip to content

Instantly share code, notes, and snippets.

View cvgellhorn's full-sized avatar
:electron:
This is the way

Christoph von Gellhorn cvgellhorn

:electron:
This is the way
View GitHub Profile
@coolaj86
coolaj86 / how-to-publish-to-npm.md
Last active July 29, 2025 11:23
How to publish packages to NPM

Getting Started with NPM (as a developer)

As easy as 1, 2, 3!

Updated:

  • Aug, 08, 2022 update config docs for npm 8+
  • Jul 27, 2021 add private scopes
  • Jul 22, 2021 add dist tags
  • Jun 20, 2021 update for --access=public
  • Sep 07, 2020 update docs for npm version
@isochronous
isochronous / Marionette.SubAppRouter.js
Created December 1, 2012 21:46
Backbone.SubRoute functionality for Marionette.AppRouter
// This is heavily based on Backbone.SubRoute (https://github.com/ModelN/backbone.subroute) by Dave Cadwallader, who
// helped me out in this discussion thread:
// https://groups.google.com/forum/?fromgroups=#!topic/backbone-marionette/KTw7USoA6Gs
;define([
'underscore',
'marionette'
],
/**
* A module that defines and adds Marionette.SubAppRouter to the Marionette object
@mxriverlynn
mxriverlynn / marionette.gauntlet.js
Last active September 25, 2018 18:13
Marionette.Gauntlet - an event based "state machine" of sorts, used for building wizard, breadcrumb and tab UI and navigation systems
// Marionette.Gauntlet v0.0.0
// --------------------------
//
// Build wizard-style workflows with an event-emitting state machine
// Requires Backbone.Picky (http://github.com/derickbailey/backbone.picky)
//
// Copyright (C) 2012 Muted Solutions, LLC.
// Distributed under MIT license
Marionette.Gauntlet = (function(Backbone, Picky, Marionette, $, _){
"use strict";
function jsonToSassVars (obj, indent) {
// Make object root properties into sass variables
var sass = "";
for (var key in obj) {
sass += "$" + key + ":" + JSON.stringify(obj[key], null, indent) + ";\n";
}
// Store string values (so they remain unaffected)
@misantronic
misantronic / Backbone.Model.js
Last active December 3, 2015 11:29
Functional attributes in Backbone
var Model = Backbone.Model.extend({
get: function (attribute) {
var value = Backbone.Model.prototype.get.call(this, attribute);
if(_.isFunction(value)) {
value = value.call(this);
}
return value;
@misantronic
misantronic / Backbone.Model.js
Last active December 3, 2015 17:37
Make Backbone.Model's fetch() return the model ifself
Backbone.Model.extend({
/**
* Return the model itself instead of fetched-data object
* @param {Object} [options]
* @returns {jQuery}
*/
fetch: function (options) {
options = options || {};
var self = this;
@rauchg
rauchg / README.md
Last active April 13, 2025 04:29
require-from-twitter
@cvgellhorn
cvgellhorn / setup.sh
Created June 17, 2024 10:09 — forked from bradp/setup.sh
New Mac Setup Script
echo "Creating an SSH key for you..."
ssh-keygen -t rsa
echo "Please add this public key to Github \n"
echo "https://github.com/account/ssh \n"
read -p "Press [Enter] key after this..."
echo "Installing xcode-stuff"
xcode-select --install