Install FFmpeg with homebrew. You'll need to install it with a couple flags for webm and the AAC audio codec.
brew install ffmpeg --with-libvpx --with-libvorbis --with-fdk-aac --with-opus
import React from 'react'; | |
jest.mock('react-native', () => { | |
const createMockComponent = (name) => { | |
const mockedComponent = ({ children }) => ( | |
<div>{children}</div> | |
); | |
mockedComponent.displayName = name; | |
return mockedComponent; | |
} |
FROM nginx | |
HEALTHCHECK --interval=3s --retries=20 CMD curl -fs http://localhost:${HTTP_PORT:-8000} |
Hello, visitors! If you want an updated version of this styleguide in repo form with tons of real-life examples… check out Trellisheets! https://github.com/trello/trellisheets
“I perfectly understand our CSS. I never have any issues with cascading rules. I never have to use !important
or inline styles. Even though somebody else wrote this bit of CSS, I know exactly how it works and how to extend it. Fixes are easy! I have a hard time breaking our CSS. I know exactly where to put new CSS. We use all of our CSS and it’s pretty small overall. When I delete a template, I know the exact corresponding CSS file and I can delete it all at once. Nothing gets left behind.”
You often hear updog saying stuff like this. Who’s updog? Not much, who is up with you?
#!/bin/env python | |
# m2crypt.py <mode> <key> <data> | |
import M2Crypto | |
import binascii | |
import sys | |
mode = sys.argv[1] | |
key = sys.argv[2] | |
data = sys.argv[3] |
""" | |
An alternative Django ``TEST_RUNNER`` which uses unittest2 test discovery from | |
a base path specified in settings, rather than requiring all tests to be in | |
``tests`` module of an app. | |
If you just run ``./manage.py test``, it'll discover and run all tests | |
underneath the ``TEST_DISCOVERY_ROOT`` setting (a path). If you run | |
``./manage.py test full.dotted.path.to.test_module``, it'll run the tests in | |
that module (you can also pass multiple modules). |
#!/usr/bin/env ruby | |
## disconnect | |
# ./disconnect.rb -u yourusername | |
# | |
# This is a command-line utility for the bulk-downloading of run data from | |
# the connect.garmin.com web application, which has lackluster export | |
# capabilities. | |
# |
# Upgrade to OS X Lion, notice your virtualenvs are all hosed. | |
# Install Xcode 4.1 from the app store (or //fs2/IT/Apple/). | |
# Make sure to actually *run* the install, it's an app inside Applications. Throw it away afterwards, if you want the space back. | |
sudo easy_install pip | |
sudo pip install virtualenv virtualenvwrapper ipython | |
# blow the old one(s) away | |
rmvirtualenv playdoh |
class MockResponse(object): | |
def __init__(self, resp_data, code=200, msg='OK'): | |
self.resp_data = resp_data | |
self.code = code | |
self.msg = msg | |
self.headers = {'content-type': 'text/plain; charset=utf-8'} | |
def read(self): | |
return self.resp_data |