Skip to content

Instantly share code, notes, and snippets.

View EvanLovely's full-sized avatar

Evan Lovely EvanLovely

View GitHub Profile
@EvanLovely
EvanLovely / LICENSE.txt
Created July 12, 2018 22:22 — forked from jed/LICENSE.txt
generate random UUIDs
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Jed Schmidt <http://jed.is>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@EvanLovely
EvanLovely / .vimrc
Created May 24, 2017 21:09 — forked from crittermike/.vimrc
A .vimrc with the bare minimum baseline defaults
set backspace=2 " backspace in insert mode works like normal editor
set shiftwidth=2 " indent by 2 spaces when auto-indenting
set softtabstop=2 " indent by 2 spaces when hitting tab
syntax on " syntax highlighting
filetype indent on " activates indenting for files
set autoindent " auto indenting
set number " line numbers
colorscheme desert " colorscheme desert
set nobackup " get rid of anoying ~file
@EvanLovely
EvanLovely / Checkout github pull requests locally.md
Created May 1, 2017 17:05 — forked from piscisaureus/pr.md
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@EvanLovely
EvanLovely / Linking to external resources from the Drupal appearance page.md
Last active April 12, 2017 20:29 — forked from grayside/Instructions.md
Linking to external resources from the Drupal appearance page

Adding links to Pattern Lab on Drupal Appearance page

Add this to THEME-NAME.info.yml:

resources:
  pattern-lab: /themes/custom/THEME_NAME/pattern-lab/public/
  sassdoc: /themes/custom/THEME_NAME/dest/sassdoc/
@EvanLovely
EvanLovely / get_title_and_url.applescript
Created March 28, 2017 00:26 — forked from vitorgalvao/Get Title and URL.applescript
AppleScript and JavaScript for Automation to get frontmost tab’s url and title of various browsers.
-- AppleScript --
-- This example is meant as a simple starting point to show how to get the information in the simplest available way.
-- Keep in mind that when asking for a `return` after another, only the first one will be output.
-- This method is as good as its JXA counterpart.
-- Google Chrome
tell application "Google Chrome" to return title of active tab of front window
tell application "Google Chrome" to return URL of active tab of front window
-- Google Chrome Canary
@EvanLovely
EvanLovely / gulpfile.js
Last active September 14, 2016 18:54 — forked from febbraro/-
var jsonFiles = ['*.theme.json'];
// Setup the linting
function lintJson() {
return gulp.src(jsonFiles)
.pipe(jsonlint())
.pipe(jsonlint.reporter());
}
// Add a validate task that will fail on lint error
@EvanLovely
EvanLovely / gulpfile.js
Last active September 14, 2016 18:46 — forked from febbraro/-
function lintJson() {
return gulp.src('*.theme.json')
.pipe(jsonlint())
.pipe(jsonlint.reporter());
}
gulp.task('validate:json', 'Test JSON', function() {
return lintJson().pipe(jsonlint.failAfterError());
});
tasks.validate.push('validate:json');

Event Name:

Location:

Date:


Talk topic:

-- Quite a lot modified to input text into a plain text file like used by taskpaper. Originally based somewhere back in time on Efficient Computing's AppleScript: http://efficientcomputing.commons.gc.cuny.edu/2012/03/17/copy-email-message-in-mail-app-to-evernote-applescript/
tell application "Mail"
--get selected messages
set theSelection to selection
--loop through all selected messages
repeat with theMessage in theSelection
--get information from message
set theMessageDate to the date received of theMessage
cd ~/active-project/site_root && git log --abbrev-commit --date=relative -1