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
(defproject bug-proof "1.0.0-SNAPSHOT" | |
:description "Figwheel can't be used with resource" | |
:plugins [[lein-figwheel "0.3.7"] | |
[lein-resource "14.10.2"]] | |
:resource {:resource-paths ["pages"] | |
:target-path "release" | |
:skip-stencil [#".*"]}) |
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
(fn find-latins | |
[vectors] | |
(let [height (count vectors) | |
width (->> vectors (map count) (apply max)) | |
spaces (for [line vectors] | |
(-> (- width (count line)) | |
inc | |
range)) | |
alignments (reduce #(for [cur % up %2] | |
(conj cur up)) |
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
try | |
Array::sum = -> | |
sum = 0 | |
for x in @ | |
sum += x | |
sum | |
now = -> new Date().getTime() | |
time = (f, takes = 100000) -> |
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
{ | |
"bid": { | |
"id": "5142f2dae4b0a3bd1f93bf91", | |
"videos": [{ | |
"videoId": "5134b0d6e4b08b2859636545", | |
"name": "Masha's video 222", | |
"videoUrls": ["http://cdn.vidible.tv/stage/2013-06/17/5134b0d6e4b08b2859636545_300x250_v5.mp4?bid=5142f2dae4b0a3bd1f93bf91&pid=52270e6ee4b023e3657c51b6&bcid=50e403a2c1321e0931a07af4&vid=5134b0d6e4b08b2859636545"], | |
"fullsizeThumbnail": "http://cdn.vidible.tv/stage/2013-10/17/5134b0d6e4b08b2859636545_o_U_v8.jpg?bid=5142f2dae4b0a3bd1f93bf91&pid=52270e6ee4b023e3657c51b6&bcid=50e403a2c1321e0931a07af4&vid=5134b0d6e4b08b2859636545" | |
}] | |
}, |
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
objects = document.getElementsByTagName "object" | |
for param in objects[0].childNodes | |
flashvars = param.value if param.name == "flashvars" | |
for kv in flashvars.split("&") | |
[name, value] = kv.split("=") | |
console.log(decodeURIComponent(name), decodeURIComponent(value)) |
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
{ | |
"id": "51a8fc0ae4b091530c2bccff", | |
"bid": { | |
"id": "51a8fb91e4b091530c2bccfe", | |
"videos": [{ | |
"videoId": "516323e1e4b0b3222821b4c8", | |
"name": "Fashion Theater", | |
"description": "Ever wonder what it's like inside the mind of a runway model at Fashion Week? Get a sneak peak at our brand new series, with model Anna Lungard at the Angel Sanchez show at this year's NY Fashion Week, and stay tuned for tons of behind-the-scenes interviews and backstage footage. Coming soon!", | |
"videoUrl": "http://cdn.vidible.tv/prod/2013-04/08/516323e1e4b0b3222821b4c8_640x360_v1.mp4?bid=51a8fb91e4b091530c2bccfe&pid=51a8fc0ae4b091530c2bccff&vid=516323e1e4b0b3222821b4c8", | |
"thumbnail": "http://cdn.vidible.tv/prod/2013-04/08/516323e1e4b0b3222821b4c8_l_v1.jpg?bid=51a8fb91e4b091530c2bccfe&pid=51a8fc0ae4b091530c2bccff&vid=516323e1e4b0b3222821b4c8" |
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
target | |
.idea* | |
project/target |
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
<?xml version="1.0"?> | |
<settings> | |
<console change_refresh="10" refresh="100" rows="40" columns="120" buffer_rows="1000" buffer_columns="0" shell="" init_dir="" start_hidden="0" save_size="0"> | |
<colors> | |
<color id="0" r="238" g="232" b="213"/> | |
<color id="1" r="38" g="139" b="210"/> | |
<color id="2" r="133" g="153" b="0"/> | |
<color id="3" r="42" g="161" b="152"/> | |
<color id="4" r="220" g="50" b="47"/> | |
<color id="5" r="211" g="54" b="130"/> |
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
import java.io.{UnsupportedEncodingException, InputStreamReader, IOException} | |
import java.net.{ProtocolException, MalformedURLException, HttpURLConnection, URL} | |
import util.control.Exception._ | |
object URLPrinter extends App { | |
val defaultEncoding = "CP1251" | |
val targetURL = "http://google.com" | |
var readerOpt = Option.empty[InputStreamReader] | |
val catchingErrors = Seq( |