Skip to content

Instantly share code, notes, and snippets.

View tebriel's full-sized avatar

Chris M tebriel

View GitHub Profile
@tebriel
tebriel / convert-vc1.sh
Created May 4, 2023 13:14
Script to convert .vc1 files using ffmpeg
#!/usr/bin/env bash
set -euo pipefail
FILENAME=${1?"Must specify filename"}
OUTPUT=${2?"Must specify output file"}
TYPE=$(ffprobe -v error -select_streams v:0 -show_entries stream=codec_name -of default=noprint_wrappers=1:nokey=1 "${FILENAME}")
if [ "${TYPE}" == "vc1" ]; then
@tebriel
tebriel / dad.sh
Last active December 25, 2018 15:54
#!/usr/bin/env bash
set -euo pipefail
FILENAME=${1?"Must specify filename as first arg"}
if od -A x -t x1 -v "$FILENAME" | grep -Eqe " 0[1-8bcef]| 1[0-9a-f]"; then
echo "$FILENAME: data"
fi
+-------------------------+
| | +-------------------+
| | +---^+ HAWT |
| http://asciiflow.com/ | | | |
| | | +-------------------+
| +----+
+-------------------------+
var insert = "INSERT OR IGNORE INTO searchIndex(name, type, path) VALUES ";
var docs = "polymaps.org/docs/";
var type='Method'
var sections = []
$('a', $('ul', $('.sidebar'))).each(function(index, link) {
atag = $(link)
var path=docs+atag.attr('href')
var name=atag.text()
sections.push("('"+name+"', 'Section', '"+path+"')");
@tebriel
tebriel / example.coffee
Created August 28, 2013 17:04
Assigning things to window to help them understand stuff.
myFunc = ->
console.log "No one knows how to call me, this makes me sad"
@myFunc2 = ->
console.log "I'm on the window scope"
window.myFunc3 = ->
console.log "I'm on the window scope, as well."
@tebriel
tebriel / output.txt
Last active December 19, 2015 14:09
cmoultrie@Sauron~/G/jasmine-node (master) $ jasmine-node --coffee --nocolor spec/ > output.txt
FF...FF.....F....................F..............................
Failures:
1) async should be timed out
Message:
timeout: timed out after 500 msec waiting for MIRACLE
Stacktrace:
describe "Query Builder", ->
beforeEach module 'EG.QueryBuilder', ($provide) ->
$provide.value 'rawSourcesApi', []
it "Checks the provider", inject (rawSourcesApi) ->
expect(rawSourcesApi).toEqual []
request = require 'request'
_ = require 'underscore'
regx = require 'xregexp'
Array::unique = ->
output = {}
output[@[key]] = @[key] for key in [0...@length]
value for key, value of output
class Anagram2
@tebriel
tebriel / ping.spec.js
Created March 20, 2013 13:17
Test Case for Issue #211
var request = require('http'),
url = 'http://localhost:1337/';
describe('webservice', function() {
it('should respond to /ping', function(done) {
request.get(url + 'ping', function(res) {
expect(res.statusCode).toBe(200);
res.on('data', function(body) {
var json = JSON.parse(body);