This file contains 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 Car { | |
this.engine; | |
ignite() { | |
this.engine.turnOn(); | |
} | |
accelerate() {} | |
getPostiion() {} | |
turnLeft() {} | |
turnOff() { |
This file contains 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
// Snippets to be copy/pasted in the JS console on Amazon's "my content and devices" page | |
// Do this once | |
NodeList.prototype.forEach = Array.prototype.forEach; | |
// Paste this to select the entries. Then click "delete" and confirm | |
document.querySelectorAll("*[title='Readability.']").forEach((el) => el.closest(".contentTableListRow_myx").querySelector("i.listViewIconPosition_myx").click()) |
This file contains 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
<html><head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0"> | |
<title></title> | |
<style type="text/css"> | |
ReadMsgBody { | |
width: 100%; | |
} |
This file contains 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
#!/bin/bash | |
# Usage: dl-lession.sh https://egghead.io/courses/react-fundamentals | |
let n=1 | |
for link in $(curl -s $1 | pup '.series-lessons-list a attr{href}'); do | |
filename=$(echo $link | sed "s/https:\/\/egghead.io\/lessons\///g" | sed "s/\?.*$//g") | |
filename_numbered=$(echo "$n $filename" | awk '{ printf "%02i-%s.mp4\n", $1, $2 }') | |
youtube-dl -o "$filename_numbered" "$link" | |
let n++ | |
done |
This file contains 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
#!/bin/bash | |
brew cask list | sed 's/ +/\n/g' | sort > apps-cask.txt | |
ls -l /Applications | cut -c 55- | grep -v '\->' | sed 's/ /-/g' | sed 's/\.app//g' | awk '{print tolower($0)}' | sort > apps.txt | |
comm -23 apps.txt apps-cask.txt > apps-not-installed-by-brew.txt | |
ls /usr/local/Homebrew/Library/Taps/caskroom/homebrew-cask/Casks | sed 's/\.rb//' > all-casks.txt | |
comm -12 apps-not-installed-by-brew.txt all-casks.txt > apps-missing-from-brew.txt | |
cat apps-missing-from-brew.txt |
This file contains 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
var ReadabilityDeleter = function () { | |
var readabilityColumnOnly = function(el) { | |
return el.innerHTML.indexOf("@readability.com") > 0; | |
}; | |
var queryReadabilityRows = function () { | |
var candidates = document.querySelectorAll("#orderList td.greyed"); | |
return Array.prototype.slice.call(candidates).filter(readabilityColumnOnly); | |
}; |
This file contains 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
module RentARoleModel | |
class Application < Rails::Application | |
config.action_mailer.default_options = { from: "rent-a-role-model@kaeff.net" } | |
end | |
end |
This file contains 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
" Settings for vim-json | |
au! BufRead,BufNewFile *.json set filetype=json | |
au FileType json setlocal foldmethod=syntax | |
" Use jsonpp for auto-indendting | |
au FileType json setlocal equalprg=jsonpp\ - |
This file contains 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
guard 'rspec', cli: '--drb', all_on_start: false, all_after_pass: false do | |
watch(%r{^spec/.+_spec\.rb$}) | |
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" } | |
watch('spec/spec_helper.rb') { "spec" } | |
# Rails example | |
watch(%r{^app/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" } | |
watch(%r{^app/(.*)(\.erb|\.haml)$}) { |m| "spec/#{m[1]}#{m[2]}_spec.rb" } | |
watch(%r{^app/controllers/(.+)_(controller)\.rb$}) { |m| ["spec/routing/#{m[1]}_routing_spec.rb", "spec/#{m[2]}s/#{m[1]}_#{m[2]}_spec.rb", "spec/acceptance/#{m[1]}_spec.rb"] } | |
watch(%r{^spec/support/(.+)\.rb$}) { "spec" } |
This file contains 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
{ | |
"directory" : "vendor/assets/components" | |
} |
NewerOlder