Skip to content

Instantly share code, notes, and snippets.

@walkingriver
walkingriver / app.component.ts
Last active October 7, 2022 05:28
Support files for the Ionic-Angular Workshop at DEVIntersection
import { Component, OnInit } from '@angular/core';
import { Platform } from '@ionic/angular';
import { StudentsService } from './students.service';
@Component({
selector: 'app-root',
templateUrl: 'app.component.html',
styleUrls: ['app.component.scss'],
})
export class AppComponent implements OnInit {
@walkingriver
walkingriver / camtasia-batch-export.scpt
Created November 7, 2017 23:04
AppleScript to batch-export an entire folder of Camtasia 3 projects with your default settings.
set projDir to choose folder with prompt "Choose a folder with .cmproj files in it" without invisibles
set myDirectory to POSIX path of projDir
tell application "Finder"
set fl to files of alias (projDir as text)
end tell
AngularJS Angular Notes
ui-sref [routerLink]
ng-if *ngIf
ng-show *ngIf It might make more sense to use *ngClass{hidden: condition})
ng-hide *ngIf It might make more sense to use *ngClass{hidden: condition})
ng-repeat *ngFor Requires additional syntax changes, see below.
ng-model [(ngModel)]
ng-class ngClass
ng-click (click)
@walkingriver
walkingriver / HEIC to JPEG
Created September 3, 2018 21:36
I needed a reminder on converting my iPhone HEIC files to JPEG so Windows users could use them.
for file in *.heic; do sips --setProperty format jpeg "$file" --out "${file%.heic}.jpg"; done
@walkingriver
walkingriver / settings.json
Last active September 12, 2017 16:31
My user.settings for Visual Studio Code
// Place your settings in this file to overwrite the default settings
{
"editor.fontFamily": "Roboto Mono, Consolas",
"editor.fontSize": 16,
"editor.minimap.enabled": false,
// The number of spaces a tab is equal to.
"editor.tabSize": 2,
"editor.wordWrapColumn": 120,
"editor.wordWrap": "bounded",
"editor.renderIndentGuides": false,
@walkingriver
walkingriver / dispatcher.jwt
Last active August 7, 2017 11:49
Use with my Pluralsight course on Ionic and Electron apps (https://goo.gl/aJ4Y8e). Import this file into ps-dispatcher to enable address provisioning.
Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJjdXN0b21lciI6IkdhdGVrZWVwZXIgUGx1cmFsc2lnaHQiLCJ0eXBlIjoiZGVtbyIsImV4cGlyZXNPbiI6IjIwMzAtMTItMzEiLCJzZXJpYWwiOm51bGwsInBob25lcyI6MCwiYmVhY29ucyI6MTAsImVzY2FsYXRpb24iOmZhbHNlLCJjYWxsU2VydmVycyI6MSwib2ZmaG9vayI6ZmFsc2UsIm5vdGlmaWNhdGlvbkRvbWFpbnMiOjIsImhhIjowLCJkaXNwYXRjaGVyU2VyaWFsIjpudWxsLCJlbmRwb2ludHMiOiIxMDAwMDAwMDAwIiwiZGlzcGF0Y2hlckhhIjowLCJpYXQiOjE0OTQ1MTg1ODQsImlzcyI6IkNvbnZleWFudCBTeXN0ZW1zLCBJbmMuIiwic3ViIjoicGx1cmFsc2lnaHQifQ.TWw2Rm03pjz-0yXwyFXOMZeh-JP2lwJj6Zpn4f7i46tvffSRSRZIZ19IDn1rrv34C3rSEcquMBqhjagP6TjxxnrVLiPh72smEG0ER6xjK6Ux9qZDJMQ1MlOg-CzJDJI8H6sjpEapxtb1-JtciokS7M07WR_X71_eln84Da8osWhOXGNgQQa1G07kWPr0KNvTPmHbGoVIrHL_SAc-BKDwzQVUmmbZUvusfsQ5cKu6G1BO_PYToBW9f_BkqyEYJ11a1tZEI8JHgtoBWkzE0_DAgIkh9VZVksBpyuP28pdEXEmFWRzXsG5sUU_WIL7rmP-RRaxVCMmS4DdJuWXYIOxwyg
@walkingriver
walkingriver / .git-completion.sh
Created August 18, 2016 20:02
Drop these two files in your home directory and source them from your .bashrc file. The first provides git repo and branch completion. The second displays your git branch as part of the prompt.
# bash/zsh completion support for core Git.
#
# Copyright (C) 2006,2007 Shawn O. Pearce <spearce@spearce.org>
# Conceptually based on gitcompletion (http://gitweb.hawaga.org.uk/).
# Distributed under the GNU General Public License, version 2.0.
#
# The contained completion routines provide support for completing:
#
# *) local and remote branch names
# *) local and remote tag names
/*
Copyright (c) 2011 Damien Antipa, http://www.nethead.at/, http://damien.antipa.at
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
@walkingriver
walkingriver / Startup.cs
Last active August 29, 2015 14:20
My Default Startup Class for OWIN WebAPI apps.
/// <summary>
/// Default Startup Class for OWIN WebAPI apps
/// </summary>
/// <remarks>
/// Requires the following NuGet Packages to be installed:
/// - Install-Package Microsoft.AspNet.WebApi.Owin
/// - Install-Package Microsoft.AspNet.WebApi.WebHost (If IIS-hosted)
/// </remarks>
public class Startup
{
@walkingriver
walkingriver / .bashrc
Last active August 29, 2015 14:08
The .bashrc from my MacBook Air.
#============================================================
#
# ALIASES AND FUNCTIONS
#
# Arguably, some functions defined here are quite big.
# If you want to make this file smaller, these functions can
#+ be converted into scripts and removed from here.
#
#============================================================