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
// run this in the javascript console, hit play on the vimeo video. | |
// when it's finished playing, the entire transcript should be in the "transcript" variable | |
var transcript = ""; | |
var lastCaption = ""; | |
function appendCaption() { | |
var cap = $(".vp-captions").text(); | |
if(cap != lastCaption) { | |
transcript += " " + lastCaption; |
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
// https://www.codewars.com/kata/complete-the-pattern-number-13/python | |
object Pattern { | |
def spaces(size: Int) = Seq.fill(size)(" ").mkString | |
// line is 0-indexed | |
def pattern(n: Int, xArg: Int = 1, line: Int = 0, acc: Seq[String] = Seq[String]()): String = { | |
val x = if(xArg <= 1) 1 else xArg | |
if(line < n) { | |
val numToPrint = (line + 1) % 10 |
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
# illustrates interesting effects of #extend | |
module Mixin | |
def testo | |
"in mixin" | |
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
# run this with LC_ALL and LANG env vars set to "en_US.utf8" | |
import ipfsApi | |
utf8_filename = u"clich\xe9.txt".encode('utf8') | |
with open(utf8_filename, "w") as f: | |
f.write("this is just a test") | |
c = ipfsApi.Client('127.0.0.1', 5001) |
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
# rbx -Xprofile -Xprofiler.graph -Xprofiler.full_report read_csv.rb | |
Finished in 50.60307312011719s, at rate of 195.04744260435427 rows/sec | |
===== Thread 1 ===== | |
Total running time: 50.874820736000004s | |
index % time self children called name | |
---------------------------------------------------------- | |
[1] 100.0 0.00 50.87 1 Rubinius::Loader#script [1] | |
0.00 50.87 1 Rubinius::CodeLoader.load_script [2] | |
------------------------------------------------------- | |
0.00 50.87 1 Rubinius::Loader#script [1] |
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
import codecs | |
import subprocess | |
import sys | |
teststr = u'This is a block character: \u2588' | |
#### try #1: reproduce the problem | |
# demonstration of http://bugs.python.org/issue6135 |
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 | |
# run this in a dir with some .zip files | |
# note that we do NOT escape glob patterns here | |
opts="-iname *.zip" | |
# normally, bash will expand *.zip and find will complain about arguments | |
echo "find will complain:" | |
find $opts | |
echo "========================================" |
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
<?php | |
function twentytwelve_jeff_body_class( $classes ) { | |
if(isset($_SERVER['HTTP_USER_AGENT'])) { | |
if(strpos($_SERVER['HTTP_USER_AGENT'], "Chrome") !== false) { | |
$classes = array_diff($classes, array('custom-font-enabled')); | |
} | |
} | |
return $classes; | |
} |
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
/* | |
Theme Name: Twenty Twelve Child | |
Theme URI: http://codefork.com/ | |
Description: Jeff's Tweaked Twenty Twelve | |
Author: Jeff | |
Author URI: http://codefork.com/ | |
Template: twentytwelve | |
Version: 0.1.0 |
NewerOlder