Skip to content

Instantly share code, notes, and snippets.

View michaellee's full-sized avatar

Michael Lee michaellee

View GitHub Profile
@michaellee
michaellee / shortcuts-txt-specification.md
Created March 25, 2022 04:14
This is the shortcuts.txt specification document

shortcuts.txt specification

The purpose of this document is to outline the specifications of shortcuts.txt -- a plain-text file used by web applications that indicates what keyboard shortcuts are provided to the user.

Location

In order to support shortcuts.txt, a web application should provide a plain text file located at the root of its application.

Example:

@michaellee
michaellee / jekyll-post-page.md
Created June 12, 2016 03:22
Jekyll 101: Creating a new post and page

One of the features that made me fall in love with Jekyll was how super simple it was to start a new project. With one command jekyll new project_name you've got a brand new Jekyll project to start working on.

Posts

If your new Jekyll project is going to be used for blogging, you'll want to create posts for your new blog.

Jekyll by default provides a folder in which all your posts live. Within the Jekyll project, you'll find a folder called _posts. To create a new post you'll need to create a new markdown file with a file name in this format:

YYYY-MM-DD-title.markdown
import Ember from 'ember';
export default Ember.Controller.extend({
appName:'Ember Twiddle',
actions: {
save(){
alert(this.get('book'));
}
}
});
@michaellee
michaellee / launch_macvim_from_terminal.md
Last active August 29, 2015 14:03
Launch MacVim from the Mac OS X Terminal

Launch MacVim from the Mac OS X Terminal

MacVim is a great complement to Vim for the Mac. One of the reasons why I started using MacVim was its built in support for the yank command to copy to the system's clipboard.

To get a copy of MacVim, you can grab the latest snapshot here.

When you download a snapshot of MacVim, you'll find a compressed file that includes MacVim.app, mvim (a command-line tool) and a README file.

One of the great things about using vim is that you can simply type vim filename.md to open a file in vim from within the terminal. The mvim cli enables us to do the samething.

@michaellee
michaellee / dasherize.m
Last active August 29, 2015 14:03
A Simple Dasherize Method in Objective-C
- (NSString *)dasherize:(NSString *)string{
NSString *dasherized = [[NSString alloc] initWithString:[string lowerCaseString]];
dasherized = [dasherized stringByReplacingOccurrencesOfString:@" " withString:@"-"];
return dasherized;
}