Skip to content

Instantly share code, notes, and snippets.

View dealingwith's full-sized avatar

Daniel Miller dealingwith

View GitHub Profile
#!/bin/sh
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Set the colours you can use
black='\033[0;30m'
white='\033[0;37m'
red='\033[0;31m'
@dealingwith
dealingwith / gist:f135e9883cb697063c8c
Last active August 29, 2015 14:14
functional if in Lua
function print_true()
print("true")
end
function print_false()
print("false")
end
function fif(val, a, b)
if val then a() else b() end
  • contact us removed
  • contact us added to footer
  • map added to "find" page
  • linked images across top of "find" page
  • text link list under map on "find" page
#ok
setTimeout(->
analytics.track 'Time on Site',
category: 'site',
label: 'seconds',
value: 60
, 60000)
#ok
setTimeout(
@dealingwith
dealingwith / gist:cb125ff7cc091ea9facb
Last active August 29, 2015 14:13
I think this is ugly, but it's the most readable way I can figure to write this. Suggestions?
setTimeout ->
analytics.track 'Time on Site',
category: 'site',
label: 'seconds',
value: 60
, 60000
Year Author Commits(%) Next top 5 Number of authors
2014 Sean Linsley 1103 (49.4% of 2233) Daniel Miller, Nathan Zorn, Mike Ivey, psaintgirons, Ichiro Yamamoto 13
@dealingwith
dealingwith / gist:92777ed5c0bf68d8d03d
Last active August 29, 2015 14:10
On a github ticket, show only comments with todos
$("div.timeline-comment-wrapper:not(.timeline-new-comment)").hide()
$("div.discussion-item").hide()
$("li.task-list-item").closest("div.timeline-comment-wrapper").show()
(function() {
var store = {};
store.products = ['John','Judy','Dijion'];
return {
sayHello: function(text) {
return "Factory says yo: " + text;
},
sayGoodbyeProduct: function() {
return "Factory says prodcucts are " + store.products[0] + ", " + store.products[1] + ", " + store.products[2];
// This will be the function that requests and stores data.
app.factory('dataFactory', function( ) {
var store = this;
store.products = ['John','Judy','Dijion'];
return {
sayHello: function(text) {
return "Factory says yo: " + text;
},
sayGoodbyeProduct: function() {
(function() {
return {
sayHello: function(text) {
return "Factory says yo: " + text;
}
}
})().sayHello("peace")