Demo of multipart form/file uploading with hapi.js
.
npm install
npm run setup
npm run server
Then ...
(function(d) { | |
var dl = d.createElement('a'); | |
dl.innerText = 'Download MP3'; | |
dl.href = "http://media.soundcloud.com/stream/"+d.querySelector('#main-content-inner img[class=waveform]').src.match(/\.com\/(.+)\_/)[1]; | |
dl.download = d.querySelector('em').innerText+".mp3"; | |
d.querySelector('.primary').appendChild(dl); | |
dl.style.marginLeft = '10px'; | |
dl.style.color = 'red'; | |
dl.style.fontWeight = 700; | |
})(document); |
/* | |
* Inspired by: http://stackoverflow.com/questions/4360060/video-streaming-with-html-5-via-node-js | |
*/ | |
var http = require('http'), | |
fs = require('fs'), | |
util = require('util'); | |
http.createServer(function (req, res) { | |
var path = 'video.mp4'; |
#!/home/roger/.virtualenvs/lastfm/bin/python -u | |
""" | |
File: lastmatchwithnums.py | |
Author: Roger Barnes | |
A simple program for using acoustid to fingerprint and look up metadata (esp. play counts) | |
for MP3 files via lastfm. Usage: | |
$ python lastmatchwithnums.py [folder] ... | |
#!/bin/bash | |
# copyrights this guy http://ubuntuforums.org/showthread.php?t=1544346 | |
# ripdvd.sh | |
# input must be: | |
# - <devicename> (which can be anything lsdvd takes) | |
# - <outputfolder> where do you want the ripped series | |
# - <outputname> the base name of the output | |
# - <startsfrom> where to start counting if you use 0 it starts at 1 | |
# (useful for seasons spanning over multiple disks) |
var svg = document.getElementById('graph'), | |
xml = new XMLSerializer().serializeToString(svg), | |
data = "data:image/svg+xml;base64," + btoa(xml), | |
img = new Image() | |
img.setAttribute('src', data) | |
document.body.appendChild(img) |
--- | |
language: objective-c | |
before_script: | |
- ./scripts/travis/add-key.sh | |
after_script: | |
- ./scripts/travis/remove-key.sh | |
after_success: | |
- ./scripts/travis/testflight.sh | |
env: | |
global: |
// | |
// AppDelegate.m | |
// sourceList | |
// | |
// Created by Dr.Kameleon on 9/14/14. | |
// Copyright (c) 2014 InSili.co. All rights reserved. | |
// | |
#import "AppDelegate.h" |
All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.
Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.
elem.offsetLeft
, elem.offsetTop
, elem.offsetWidth
, elem.offsetHeight
, elem.offsetParent
mkdir /tmp/picblast; cd ~/Pictures/Photos\ Library.photoslibrary; for i in `find . | grep jpegvideocompl`;do ffmpeg -i $i /tmp/picblast/${i:(-8)}.wav; done; cd /tmp/picblast; ffmpeg -safe 0 -f concat -i <( for f in *.wav; do echo "file '$(pwd)/$f'"; done ) ~/Desktop/picblast.wav; rm -rf /tmp/picblast |