Skip to content

Instantly share code, notes, and snippets.

@rudylattae
rudylattae / hi-bootstrap.ps1
Created October 14, 2024 07:04
hi-bootstrap
# Create ${HOME}/bin and add to $PATH
# Copy this file to that bin dir and run it
# BOOTSTRAP
# Install these apps to get things rolling
# After the installation, there is some manual steps to perform
$apps = @(
"Microsoft.PowerShell",
"Git.Git",
"GitHub.cli",
@rudylattae
rudylattae / Basic-Powershell-Profile.ps1
Last active February 16, 2020 02:18
Powershell Profile
function Edit-Profile {
code $profile.CurrentUserAllHosts
}
function Edit-GitConfig {
code $HOME/.gitconfig
}
Function Touch-File
{
@rudylattae
rudylattae / gist:490790ad49931498f45a
Last active August 29, 2015 14:06
Git workflow - 1

Remote branch

git push origin master:refs/heads/next
git co --track origin/next

Start new feature

git co -b newfeat

var MicroEvent = function(){};
MicroEvent.prototype = {
bind : function(event, fct){
this._events = this._events || {};
this._events[event] = this._events[event] || [];
this._events[event].push(fct);
},
once: function(event, fct){
var wrapped = function() {
this.unbind(event, fct);
var ourl = (function () {
function ourl(url) {
url = url || window.location.href;
return new ObjectifiedUrl(url);
};
ourl.parse = parseUrl;
@rudylattae
rudylattae / npm-debug.log
Created November 4, 2013 16:25
Log output of failed attempt to install grunt-contrib-testem
0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\\\node.exe',
1 verbose cli 'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'install',
1 verbose cli 'grunt-contrib-testem' ]
2 info using [email protected]
3 info using [email protected]
4 verbose node symlink C:\Program Files\nodejs\\node.exe
5 warn package.json [email protected] No repository field.
6 warn package.json [email protected] No README data
@rudylattae
rudylattae / polychrome.sh
Created November 24, 2012 20:57
polychrome.sh
#!/bin/sh
if [ -z "$1" ]; then
echo "Usage: $0 profile_name"
exit 1
fi
PROFILE_NAME="$1"
GOOGLE_CHROME="/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"
USER_DIR="/Users/$USER/Library/Application Support/Google/Chrome/${PROFILE_NAME}"
exec "$GOOGLE_CHROME" \
@rudylattae
rudylattae / Bunch.js
Created November 24, 2012 03:16
Bunch.js
var Bunch = (function () {
// internals
var defaults = {
IDENTITY_FIELD: 'id',
SEQUENCE_START: 0,
hasIdentity: function hasIdentity( item ) {
return item[ this._identityField ];
},
ensureIdentity: function ensureIdentity( item ) {
@rudylattae
rudylattae / story.json
Created November 21, 2012 04:49
Example of a BlankStage story
{
"version": "1.0",
"title": "A dirt simple example of a BlankStage story",
"summary": "This really is nothing but a collection of links as chapters. A proper story would most likely take you through some chapters that have a linear (or user-directed) set of actions.",
"synopsis": "",
"copyright": "Copyright © 2012 Me/You/Who?",
"license": "DRMed -- OMG!!!",
"chapters": [
{
"title": "This is chapter 1.",
@rudylattae
rudylattae / index.html
Created October 21, 2012 05:56
html5 - hello
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="" />
<script type="text/javascript" src=""></script>
</head>
<body>
<div>
<p>Hello</p>