Couldn't find the text of this for a while...
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
(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); |
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
{ | |
"ANDROID_VERSION": 1.5, | |
"APP_VERSION_CODE": 8, | |
"APP_VERSION_NAME": 1.3, | |
"AVAILABLE_MEM_SIZE": 181972992, | |
"BRAND": "generic", | |
"BUILD": { | |
"BOARD": "unknown", | |
"BRAND": "generic", | |
"DEVICE": "generic", |
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
YUI.add('logismo', function(Y) { | |
/** | |
* Logismo | |
*/ | |
var Logismo, | |
LOGISMO = 'logismo', | |
EVENTS_RESOURCE_PATH = 'eventsResourcePath', |
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
<!DOCTYPE HTML> | |
<html> | |
<head> | |
<script src="http://yui.yahooapis.com/3.5.1/build/yui/yui-min.js"></script> | |
</head> | |
<body class="yui3-skin-sam"> | |
<div id="app"></div> | |
<script> |
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
this.before(function(){ | |
var res = this.response; | |
if ('OPTIONS' == this.request.method) { | |
res.setHeaders(200,{ | |
'Content-Type': 'text/plain', | |
'Access-Control-Allow-Origin': '*', | |
'Access-Control-Allow-Methods': 'GET, PUT, POST, DELETE, OPTIONS', | |
'Access-Control-Allow-Headers': 'Content-Type, Authorization, X-Requested-With', | |
'Access-Control-Max-Age': 5184000 //2 months |
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
@With(Compress.class) | |
public class Application extends Controller { | |
public static void index() { | |
render();//response will be gzipped | |
} | |
} |
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
sudo apt-get install build-essential libssl-dev curl | |
# The install script | |
# Adapted from https://gist.github.com/579814 | |
echo '# Added by install script for node.js and npm in 30s' >> ~/.bashrc | |
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc | |
echo 'export NODE_PATH=$HOME/local/lib/node_modules' >> ~/.bashrc | |
. ~/.bashrc |
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
<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../config/ehcache.xsd" updateCheck="false"> | |
<!-- This is a default configuration for 256Mb of cached data using the JVM's heap, but it must be adjusted | |
according to specific requirement and heap sizes --> | |
<defaultCache | |
maxBytesLocalHeap="256000000" | |
eternal="false" | |
timeToIdleSeconds="120" | |
timeToLiveSeconds="120" |
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
// JavaScript `this` examples from http://stackoverflow.com/a/12371105/477168 | |
// The value of this in a function is sometimes called the "context" in which | |
// the function runs. The most important thing to understand is that a function | |
// object does not have a fixed context -- the value of this changes depending | |
// on how the function is called. | |
// If the function is called as a "raw" function (e.g., just do someFunc()), | |
// this will be window (or undefined if the function runs in strict mode). |
OlderNewer