Skip to content

Instantly share code, notes, and snippets.

Dan McGrady dmix

Block or report user

Report or block dmix

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:7bc336d7ceaf486f329d8e8270640088
<template>
<p>{{ hello }}</p>
</template>
<script>
export default {
data() {
return {
hello: 'Hello World!'
}
@dmix
dmix / aliases.ev
Last active Jul 17, 2017
elvish aliases
View aliases.ev
# ==============================================================================
# Elvish Aliases
# ==============================================================================
# Aliases
# -----------------------------------------------------------------------------
# Git
git-aliases = [
&prefix= "g"
@dmix
dmix / gist:7abfe3f0f9c4d79f751b
Last active Oct 28, 2015
Sort Archlinux AUR packages by votes when querying with Yaourt
View gist:7abfe3f0f9c4d79f751b
yaourt vim > vim.log
cat vim.log | awk '/aur/{print $1 $2 " " $4}' | sed -r 's/\(Out of date\)//g' | sed -r 's/([0-9]*)(\S+)\s\(([0-9]*)\)/\3 - \2/g' | sort -n
OR
yaourt vim | awk '/aur/{print $1 $2 " " $4}' | sed -r 's/\(Out of date\)//g' | sed -r 's/([0-9]*)(\S+)\s\(([0-9]*)\)/\3 - \2/g' | sort -n
[press enter when asked to enter a package number to install]
View gist:be824817540886989ef3
Host *
PasswordAuthentication no
ChallengeResponseAuthentication no
PubkeyAuthentication yes
HostKeyAlgorithms ssh-ed25519-cert-v01@openssh.com,ssh-rsa-cert-v01@openssh.com,ssh-ed25519,ssh-rsa
Ciphers chacha20-poly1305@openssh.com,aes256-gcm@openssh.com,aes128-gcm@openssh.com,aes256-ctr,aes192-ctr,aes128-ctr
@dmix
dmix / cookies.coffee
Created Mar 28, 2012
coffeescript to read/write to cookies
View cookies.coffee
App.Functions.readCookie = (name) ->
nameEQ = name + "="
ca = document.cookie.split(";")
i = 0
while i < ca.length
c = ca[i]
c = c.substring(1, c.length) while c.charAt(0) is " "
return c.substring(nameEQ.length, c.length).replace(/"/g, '') if c.indexOf(nameEQ) is 0
i++
ca
View gist:1842439
2012-02-16T05:46:19+00:00 heroku[api]: Release v25 created by dan@dmix.ca
2012-02-16T05:46:19+00:00 heroku[api]: Deploy f9a9f12 by dan@dmix.ca
2012-02-16T05:46:20+00:00 heroku[slugc]: Slug compilation finished
2012-02-16T05:47:02+00:00 heroku[web.1]: State changed from created to starting
2012-02-16T05:47:02+00:00 heroku[api]: Scale to web=1 by dan@dmix.ca
2012-02-16T05:47:07+00:00 heroku[web.1]: Starting process with command `lein run`
2012-02-16T05:48:07+00:00 heroku[web.1]: Stopping process with SIGKILL
2012-02-16T05:48:07+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
2012-02-16T05:48:08+00:00 heroku[web.1]: Process exited with status 137
2012-02-16T05:48:08+00:00 heroku[web.1]: State changed from starting to crashed
View gist:1840261
(ns documeds.server
(:require [noir.server :as server]
[clojure.contrib.string :as contrib]))
(server/load-views "src/documeds/views/")
(defn https-url [request-url]
(str "https://" (:server-name request-url) ":" (:server-port request-url) (:uri request-url)))
(defn require-https
View gist:1475674
class TweetView extends Backbone.View
render: ->
tweet = this
dust.render("tweet", @model.toJSON(), (err, output) ->
$(tweet.el).html(output)
)
return this
Tweet = new TweetView({
model: {
View gist:1475676
<div class="tweet"><h3>dmix</h3><p>blah blah</p></div>
View gist:1475679
(function() {
dust.register("tweet", body_0);
function body_0(chk, ctx) {
return chk.write("<div class=\"tweet\"><h3>").reference(ctx.get("user_name"), ctx, "h").write("</h3><p>").reference(ctx.get("tweet"), ctx, "h").write("</p></div>");
}
return body_0;
})();
You can’t perform that action at this time.