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 Car { | |
this.engine; | |
ignite() { | |
this.engine.turnOn(); | |
} | |
accelerate() {} | |
getPostiion() {} | |
turnLeft() {} | |
turnOff() { |
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
// 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 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
<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 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
#!/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 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
#!/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 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
2015-10-15 10:13:35 [twisted] CRITICAL Unhandled error in Deferred: | |
Traceback (most recent call last): | |
File "/usr/share/python/pixelated-user-agent/lib/python2.7/site-packages/twisted/internet/defer.py", line 1274, in unwindGenerator | |
return _inlineCallbacks(None, gen, Deferred()) | |
File "/usr/share/python/pixelated-user-agent/lib/python2.7/site-packages/twisted/internet/defer.py", line 1128, in _inlineCallbacks | |
result = g.send(result) | |
File "/usr/share/python/pixelated-user-agent/lib/python2.7/site-packages/pixelated_user_agent-0.1-py2.7.egg/pixelated/adapter/mailstore/leap_mailstore.py", line 348, in _leap_message_to_leap_mail | |
body = yield self._raw_message_body(message) |
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 InviteCode < CouchRest::Model::Base | |
use_database :invite_codes | |
design do | |
view :by__id | |
end | |
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
require 'gosu' | |
# The game skeleton we built on 16.6. - A ball moving right to left and back, slowly invading the bottom of the screen... | |
class GameWindow < Gosu::Window | |
def initialize | |
super(640, 480) | |
self.caption = "Gosu Tutorial Game (Interval: #{self.update_interval})" | |
@ball = Gosu::Image.new('media/ball.png') |
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
#!/usr/bin/env bash | |
git reflog | grep -A 1 "pull --rebase: checkout" | ruby -e 'puts STDIN.each_slice(3).map {|a| a.take(2).reverse.map {|l| l.split(" ").first}.join("..") }' |
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
global.assert = require('assert'); |
NewerOlder