Skip to content

Instantly share code, notes, and snippets.

View daniel-williams's full-sized avatar

Daniel Williams daniel-williams

  • Seattle, WA
View GitHub Profile
@daniel-williams
daniel-williams / MasonryGrid.cs
Created November 6, 2017 23:11
Masonry: XAML
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
namespace GridTesting
{
@daniel-williams
daniel-williams / Cmder Bash
Last active January 23, 2018 18:19
verbatim command, w/no parameters. Add "cd ~" to .bashrc to open in users directory.
*"%ConEmuDrive%\Program Files\Git\git-cmd.exe "--no-cd --command=usr/bin/bash.exe -l -i
@daniel-williams
daniel-williams / typescript.json
Created November 6, 2017 23:13
My Angular Snippets
{
"Angular Component": {
"prefix": "ngc",
"body": [
"import { Component } from '@angular/core';",
"",
"@Component({",
" selector: '${2:$TM_FILENAME_BASE}',",
" templateUrl: './${2:$TM_FILENAME_BASE}.component.html',",
" styleUrls: ['./${2:$TM_FILENAME_BASE}.component.scss']",
// Place your key bindings in this file to overwrite the defaults
[
{ "key": "ctrl+shift+\\", "command": "workbench.action.splitEditor" },
{ "key": "ctrl+\\", "command": "workbench.action.toggleSidebarVisibility" },
{ "key": "ctrl+shift+c", "command": "csscomb.execute" },
{ "key": "ctrl+n", "command": "workbench.action.files.newFile" },
{ "key": "ctrl+shift+n", "command": "workbench.action.files.newFolder" }
]
@daniel-williams
daniel-williams / Delete remote branch
Last active November 26, 2016 22:19
Gokking the Git
# deletes the local remote-tracking branch, but not the actual remote branch
git branch -rd origin/[branch name]
# To delete the actual remote branch
git push origin --delete [branch name]
{
"always-semicolon": true,
"block-indent": 2,
"color-case": "lower",
"color-shorthand": false,
"quotes": "single",
"space-after-colon": 1,
"space-before-opening-brace": 1,
"space-after-opening-brace": "\n",
"space-before-selector-delimiter": 0,
@daniel-williams
daniel-williams / ComposeAndSequence
Created October 27, 2015 00:57
Compose and Sequence
var compose = function () {
var fns = arguments;
return function (result) {
for (var i = fns.length - 1; i > -1; i--) {
result = fns[i].call(this, result);
}
return result;
};
<link rel="stylesheet" href="//code.cdn.mozilla.net/fonts/fira.css">
@daniel-williams
daniel-williams / React.Comp.Tmpl.js
Last active August 29, 2015 14:25
React Component Template
var _debug = true;
var XXXXXX = React.createClass({
displayName: 'XXXXXX',
// Mixins
mixins: [],
// Props
propTypes: {
npm install --save-dev gulp gulp-cli gulp-concat gulp-jshint gulp-less gulp-load-plugins gulp-minify-css gulp-rename gulp-uglify