This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am waynehoover on github. | |
* I am wayneph (https://keybase.io/wayneph) on keybase. | |
* I have a public key ASBjMPcsLVe6n-LMw2Q50D592bKmaOpzy4W41Vr4UfWC2Qo | |
To claim this, I am signing this object: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vmap('<ArrowRight>', 'l') | |
vmap('<ArrowLeft>', 'h'); | |
vmap('<ArrowUp>', 'k'); | |
vmap('<ArrowDown>', 'j'); | |
// cvim shortcuts | |
map('K', 'R'); | |
map('J', 'E'); | |
map('H', 'S'); | |
map('L', 'D'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const production = { | |
plugins: [ | |
require('tailwindcss')('./tailwind.js'), | |
require('postcss-nested'), | |
require('@fullhuman/postcss-purgecss')({ | |
content: ['./src/**/*.pug'], | |
}) | |
] | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
App.config([ | |
'$routeProvider' | |
'$locationProvider' | |
'$httpProvider' | |
($routeProvider, $locationProvider, $httpProvider, config) -> | |
$httpProvider.defaults.headers.common['X-CSRF-Token'] = $('meta[name=csrf-token]').attr('content'); | |
$routeProvider |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Order < ActiveRecord::Base | |
DOWNLOAD_EXPIRY = 10.days | |
def secure_download_link | |
time = (Time.now + DOWNLOAD_EXPIRY).to_i | |
hmac = Digest::MD5.base64digest("#{time}#{self.file_path} #{ENV['DOWNLOAD_SECRET']}").tr("+/","-_").gsub("==",'') | |
"http://files.domain.com/downloads/#{file_path}?md5=#{hmac}&expires=#{time}" | |
end | |
... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Downloads server | |
server { | |
listen 80; | |
server_name files.domain.com; | |
root /some/path/files.domain; | |
location /downloads { | |
secure_link $arg_md5,$arg_expires; | |
secure_link_md5 "$secure_link_expires$uri DOWNLOAD_SECRET"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"SELECT \"worksheets\".* FROM \"worksheets\" INNER JOIN \"plans\" ON \"plans\".\"id\" = \"worksheets\".\"plan_id\" WHERE \"plan\".\"student_id\" IS NULL" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
angular.module('hyveServices', ['ngResource']). | |
factory('HyvePost', function($resource){ | |
return $resource('/hyves/'+gon.current_hyve.id+'/posts/:id', {}, { | |
update: { method: 'PUT'}, | |
query: {method: 'GET', isArray:true} | |
}); | |
}).factory('Comment', function($resource){ | |
return $resource('/posts/:post_id', {}, { | |
update: { method: 'PUT'}, | |
query: {method: 'GET', isArray:true} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DOM: | |
<div ng-repeat="post in posts"> | |
... | |
abbr.created-at.arial.timeago title="{{post.created_at}}" | |
</div> | |
Script: | |
.directive('postTile', function($timeout){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(jQuery), function (a) { | |
a.fn.autosaveField = function (b) { | |
var c = a.extend({}, a.fn.autosaveField.defaults, b); | |
return this.each(function () { | |
var b = a(this); | |
if (b.data("autosaved-init")) return; | |
var d = b.attr("data-field-type") || ":text", | |
e = b.find(d), | |
f = b.attr("data-action"), | |
g = b.attr("data-name"), |
NewerOlder