THIS GIST WAS MOVED TO TERMSTANDARD/COLORS
REPOSITORY.
PLEASE ASK YOUR QUESTIONS OR ADD ANY SUGGESTIONS AS A REPOSITORY ISSUES OR PULL REQUESTS INSTEAD!
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Box Shadow</title> | |
<style> | |
.box { | |
height: 150px; | |
width: 300px; | |
margin: 20px; |
#!/usr/bin/env python | |
"""Simple HTTP Server With Upload. | |
This module builds on BaseHTTPServer by implementing the standard GET | |
and HEAD requests in a fairly straightforward manner. | |
""" |
[alias] | |
a = !git add . && git status | |
amend = commit --amend -C HEAD | |
ap = !git add -p && git status | |
au = !git add -u && git status | |
b = branch | |
ba = branch --all | |
bi = for-each-ref --sort=-committerdate refs/heads/ --format='%(HEAD) %(color:yellow)%(refname:short)%(color:reset) - %(authorname) (%(color:green)%(committerdate:relative)%(color:reset)) - %(color:magenta dim)%(contents:subject)%(color:reset)' | |
c = commit | |
ch = checkout |
THIS GIST WAS MOVED TO TERMSTANDARD/COLORS
REPOSITORY.
PLEASE ASK YOUR QUESTIONS OR ADD ANY SUGGESTIONS AS A REPOSITORY ISSUES OR PULL REQUESTS INSTEAD!
var aws = require('aws-sdk'), | |
fs = require('fs'), | |
crypt = require("crypto"); | |
function getMD5HashFromFile(file){ | |
var hash = crypt.createHash("md5") | |
.update(file) | |
.digest("base64"); | |
return hash; | |
} |
var buff = new Buffer(100); | |
fs.open(file, 'r', function(err, fd) { | |
fs.read(fd, buff, 0, 100, 0, function(err, bytesRead, buffer) { | |
var start = buffer.indexOf(new Buffer('mvhd')) + 17; | |
var timeScale = buffer.readUInt32BE(start, 4); | |
var duration = buffer.readUInt32BE(start + 4, 4); | |
var movieLength = Math.floor(duration/timeScale); | |
console.log('time scale: ' + timeScale); | |
console.log('duration: ' + duration); |