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
#!/bin/bash | |
while true ; do | |
clear | |
echo "Press enter to break loop. Script will loop every 3 seconds" | |
echo "If loop freezes press CTRL+C" | |
echo "" | |
echo -e " \033[31mdownloaded\e[0m/\033[32mavailable\e[0m" | |
echo -e " \033[31m"`bitcoind getblockcount 2>&1`"\e[0m"/"\033[32m"`wget -O - http://blockchain.info/q/getblockcount 2>/dev/null`"\e[0m" | |
read -t 3 -n 3 && break | |
done |
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
Shader "Custom/BaseShader" { | |
Properties { | |
_MainTex ("MainTexture", 2D) = "white" {} | |
_PlateTex ("PlateTexture", 2D) = "white" {} | |
} | |
SubShader { | |
Pass{ | |
CGPROGRAM | |
#pragma vertex vert |
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
$frame.css({ | |
backgroundImage: 'url("' + imgPath + '")', | |
backgroundSize: numFrames*100 + '% ' + '100%' | |
}); | |
var tl = new TimelineMax.to($frame, numFrames/frameRate, { | |
backgroundPosition: -(numFrames-1)*100+ '% 0', | |
ease: SteppedEase.config(numFrames-1), | |
delay: startDelay, | |
}); |
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
/* | |
@param originx, originy - percentage values | |
*/ | |
function drawImageRot(ctx, img, x, y, width, height, radians, originx, originy) { | |
ctx.save(); | |
ctx.translate(x, y); | |
ctx.rotate(radians); | |
ctx.drawImage(img, -originx * width, -originy * width, width, height); | |
ctx.restore(); | |
} |
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
#!/usr/bin/env python | |
# @author - positlabs | |
# @github - https://github.com/positlabs/ | |
# @blog - http://pixel-fiend.positlabs.com/ | |
# | |
# Debugger for Android running Chrome. | |
# | |
# First, set up your device and computer to work with adb: http://developer.android.com/tools/help/adb.html | |
# |
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
# Add this to your .htaccess file to enable gzip compression. Should speed up load times by ~70% | |
# BEGIN GZIP | |
<ifmodule mod_deflate.c> | |
AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css text/json application/x-javascript application/javascript | |
</ifmodule> | |
# END GZIP |
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
.stitches-icon(@x: 0, @y: 0) { | |
@origUnit: 200px; | |
@xUnits: 8; | |
@yUnits: 7; | |
@width: 1632px; | |
@height: 1428px; | |
@pWidth: @width - @origUnit; | |
@pHeight: @height - @origUnit; | |
background-size: percentage(@xUnits) percentage(@yUnits); |
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 | |
import shutil | |
def renameByType(type, toType, dir): | |
for root, dirs, files in os.walk(dir): | |
for f in files: | |
filename, filetype = os.path.splitext(f) | |
if(f.find(type) != -1): | |
print os.path.join(root, f), " -> ", f.replace(type, toType) | |
shutil.move(os.path.join(root, f), os.path.join(root, f.replace(type, toType))) |
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
/** | |
* Simple Java logger | |
* | |
* new Log("hey", "guys"); | |
* >>> hey guys | |
* | |
* Separator defaults to a space, but you can specify a new separator | |
* Log.separator(" you "); | |
* new Log("hey", "guys"); | |
* >>> hey you guys |
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
/* | |
// mapping cues to methods | |
var cuepointMethods = { | |
"1": function(){}, | |
"2.82": function(){}, | |
"3.31": function(){} | |
}; | |
// instantiate with <video>, and an array of cuepoint times => [1, 2.82, 3.31] |
OlderNewer