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
var list = document.getElementsByClassName('pl-video-time'); | |
var time = 0; | |
function toS(hms) { | |
var a = hms.split(':'); | |
while (a.length < 3) { | |
a.unshift(0); | |
} | |
var seconds = (+a[0]) * 60 * 60 + (+a[1]) * 60 + (+a[2]); | |
return seconds; |
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
DtHIqH18R0IqH13R1K0FbjH2=+K-4b)RtKJsmtdr1QJ-QJ | |
DtH Define method t with argument H | |
IqH18 If H is equal to 18 | |
R0 Return 0 (implicitly ends If block) | |
IqH13 If H is equal to 13 | |
R1 Return 1 | |
K0 Set variable K to 0 | |
Fb For every value in 'jH2', set variable b to that value and execute block | |
jH2 Convert H to base 2 as an array of integers | |
=+K Set K to K + '-4b' |
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
# WARNING: VERY UGLY CODE AHEAD | |
# | |
# Documentation of sorts: | |
# This is a library, so you have to require it eg require 'parker-chainfinder2.rb' | |
# The functions are: | |
# | |
# - translate(number) | |
# This translates from an integer to its english representation | |
# translate(5) #=> "Five" | |
# translate(5352) #=> "Five Thousand Three Hundred Fifty Two" |
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
.data | |
msg: | |
.ascii "hello, world!" | |
.text | |
.globl _start | |
_start: | |
movq $1, %rax | |
movq $1, %rdi | |
movq $msg, %rsi | |
movq $13, %rdx |
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 'cinch' | |
$channels = ARGV | |
$votes = {} | |
$username = "shelvacubot" | |
$password = "oauth:XXXXXXXX" |
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
feedly.com##div#discoverModule_part | |
feedly.com##div#herculePanel | |
//s3.feedly.com/production/head/images/icon-action-markasread.png | |
! Main page ad-carousel, recommendations, and ad-grid | |
amazon.com##div#gw-desktop-herotator | |
amazon.com##div#rhf-container | |
amazon.com##div#gw-content-grid | |
! Title bar department-menu and middle-ads |
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
a = [] | |
a.append(a) | |
b = [] | |
b.append(b) | |
print(a == b) #=> RecursionError: maximum recursion depth exceeded in comparison |
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
["awesome","cool","rad"].each do |word| | |
define_method(word.to_sym) do | |
word | |
end | |
end | |
puts awesome, cool, rad |
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
//to clear all purchases: | |
Game.ObjectsById.forEach(function(o){for(var i=0;i<200;i++){o.sell()}}) | |
var mostProfitable = -1; | |
var price = -1; | |
var interval = -1; | |
function determineBest(){ | |
price = -1; | |
Game.ObjectsById.forEach(function(o){ |
NewerOlder