Skip to content

Instantly share code, notes, and snippets.

View eddie's full-sized avatar

Eddie Blundell eddie

View GitHub Profile
$httpBackend.when('GET', 'http://test.com/api/v1/test', function(){
expect(1).toEqual(2);
return false;
}).respond(200, respData, respHeaders);
for file in *.mp4; do out=`basename "$file" .mp4`.jpg; ffmpeg -ss 00:10:10 -i ./"$file" -vcodec mjpeg -vframes 1 -an -f rawvideo "$out"; done
@eddie
eddie / API.md
Last active August 29, 2015 14:18 — forked from iros/API.md

Title

<Additional information about your API call. Try to use verbs that match both request type (fetching vs modifying) and plurality (one vs multiple).>

  • URL

    <The URL Structure (path only, no root url)>

  • Method:

@eddie
eddie / wercker.yml
Created February 24, 2015 15:43
Fix npm cache issues
box: wercker/nodejs
# Build definition
build:
# The steps that will be executed on build
steps:
- script:
name: Reduce NPM cache time
code: npm config set cache-lock-stale 10000
Binary is fine; exiting
npm ERR! EEXIST, open '/home/ubuntu/.npm/c2407a7f-ntu-npm-lodash-2-4-1-package-tgz.lock'
File exists: /home/ubuntu/.npm/c2407a7f-ntu-npm-lodash-2-4-1-package-tgz.lock
Move it away, and try again.
npm ERR! System Linux 3.2.0-54-virtual
npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "install"
npm ERR! cwd /pipeline/build
npm ERR! node -v v0.10.33
npm ERR! npm -v 1.4.28
Binary is fine; exiting
npm ERR! EEXIST, open '/cache/wercker/npm/865fdf0a-ker-npm-lodash-2-4-1-package-tgz.lock'
File exists: /cache/wercker/npm/865fdf0a-ker-npm-lodash-2-4-1-package-tgz.lock
Move it away, and try again.
@eddie
eddie / login.js
Last active August 29, 2015 14:15
Angular Mock State Provider
Error: [$injector:modulerr] Failed to instantiate module myapp.login due to:
TypeError: 'undefined' is not a function (evaluating '$stateProvider.state')
@eddie
eddie / gist:565559e14323fde22393
Created December 22, 2014 16:36
pip mrq issue
rq==0.0.46 (from -r requirements.txt (line 60))
Downloading mrq-0.0.46.tar.gz (429kB)
ost recent call last):
File "<string>", line 20, in <module>
File "/tmp/pip-build-OGwJvk/mrq/setup.py", line 47, in <module>
install_requires=get_requirements(),
File "/tmp/pip-build-OGwJvk/mrq/setup.py", line 11, in get_requirements
reqs += [str(ir.req) for ir in install_reqs]
File "/usr/local/lib/python2.7/dist-packages/pip-6.0-py2.7.egg/pip/req/req_file.py", line 19, in parse_requirements
"parse_requirements() missing 1 required keyword argument: "
@eddie
eddie / kanji_meaning_lookup.py
Created October 19, 2014 19:15
Kanji Meaning Anki Addon
# -*- coding: utf-8 -*-
# LookupKanji 0.2
# Anki1 Version based on jmrGloss
# Ported to Anki2 with help of AwesomeTTS
# By shufps.wordpress.com (shufps80@gmail.com)
# Fixes (eblundell@gmail.com)
import subprocess, re, urllib, urllib2
from PyQt4.QtCore import *
@eddie
eddie / gist:e7ca0bca89a9168840db
Created August 7, 2014 09:06
brew install node
==> make install
scripts/doc-build.sh doc/api/npm-bin.md man/man3/npm-bin.3
node cli.js install ronn --no-global
bash: node: command not found
make[1]: *** [node_modules/.bin/ronn] Error 127
make: *** [man/man3/npm-bin.3] Error 2
Warning: The post-install step did not complete successfully