Skip to content

Instantly share code, notes, and snippets.

View ajorgensen's full-sized avatar

Andrew Jorgensen ajorgensen

View GitHub Profile
@ajorgensen
ajorgensen / gist:5033c007362690d0ec03
Created May 21, 2014 21:21
Automagically run bundle exec
for fname in 'rspec' 'rails'
do
eval "${fname}() { bundle exec ${fname} }"
eval "${fname}!() { ${fname} }"
done
@ajorgensen
ajorgensen / gist:daba080a250ad7b27cf6
Created June 3, 2014 03:53
Simple example of react and coffeescript
data = [
{ first: 'Bruce', last: 'Wayne' },
{ first: 'Peter', last: 'Parker' },
{ first: 'Foo', last: 'Bar' }]
person = React.createClass
render: ->
(
(React.DOM.div {}, [
(React.DOM.h2 {}, [ "#{@props.last}, #{@props.first}" ])
### Keybase proof
I hereby claim:
* I am ajorgensen on github.
* I am ajorgensen (https://keybase.io/ajorgensen) on keybase.
* I have a public key whose fingerprint is D155 725D F971 E4D4 3CA0 3C9D B104 24F3 7FA5 6977
To claim this, I am signing this object:
@ajorgensen
ajorgensen / javascript-cheat-sheet.md
Last active April 6, 2017 01:03
Javascript Cheat Sheet

Javascript Cheat Sheet

Variables

// Define a variable
var person = "John"

// Log the value of the variable person out to the console
console.log(person)
@ajorgensen
ajorgensen / popup.html.diff
Last active June 5, 2018 19:01
popup.html.diff
diff --git a/popup.html b/popup.html
index 748ce1d..9599946 100644
--- a/popup.html
+++ b/popup.html
@@ -30,7 +30,7 @@
</div>
<div class="flex-container">
<div class="u-quiet" id="attach-current-tab-container">
- <input type="checkbox" id="attach-current-tab"> Attach <span id="attach-current-tab-url"></span>
+ <label><input type="checkbox" id="attach-current-tab"> Attach <span id="attach-current-tab-url"></span></label>
@ajorgensen
ajorgensen / index.html
Last active October 5, 2020 22:21
DAS Playback error Chromium 87.0.4276.0
<html>
<head>
<meta name="viewport" content="width=device-width">
</head>
<body>
<video preload="none" controls="">
<source src="https://www.destroyallsoftware.com/screencasts/catalog/functional-core-imperative-shell/download?resolution=4k">
</video>
<video preload="none" controls="">
@ajorgensen
ajorgensen / diff
Last active August 25, 2021 04:51
Todoist Right Click Context Fix
diff --git a/background.js b/background.js
index 6584934..a660a74 100644
--- a/background.js
+++ b/background.js
@@ -232,7 +232,7 @@ function addTabAsTask(contentToAdd) {
}
function addToTodoistFromMenu(ev, tab) {
- const url = ev.pageUrl
+ const url = (ev.linkUrl !== undefined) ? ev.linkUrl : ev.pageUrl