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
<style> | |
#mask-demo { | |
background: #d0d0d0; | |
height: 100px; | |
width: 500px; | |
padding: 10px; | |
position: relative; | |
overflow: hidden; | |
} | |
.fade-right .mask { |
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.path | |
import json | |
import logging | |
from django.conf import settings | |
from django.contrib.staticfiles.storage import CachedFilesMixin | |
from storages.backends.s3boto import S3BotoStorage | |
INDEX_FILENAME = os.path.join(os.path.dirname(__file__), 'static-index.json') |
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
INFO_PLIST="$BUILT_PRODUCTS_DIR/$INFOPLIST_PATH" | |
# Copy from this key to the DisplayName key so we don't have to | |
# worry about re-reading from the same plist later. | |
SOURCE_NAME_KEY="CFBundleName" | |
DISPLAY_NAME_KEY="CFBundleDisplayName" | |
DISPLAY_NAME=`defaults read $INFO_PLIST $SOURCE_NAME_KEY` | |
if [ "$CONFIGURATION" = "Debug" ] | |
then | |
DEBUG_DISPLAY_NAME="$DISPLAY_NAME ☢" | |
else |
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
define(['cluster/util'], function(util) { | |
var PubSub = function() { | |
this.listeners_ = []; | |
this.listenersById_ = {}; | |
this.lastId_ = 0; | |
}; | |
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
package main | |
import ( | |
"log" | |
"net/http" | |
"net/http/httputil" | |
"net/url" | |
"os" | |
) |
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
### Keybase proof | |
I hereby claim: | |
* I am taylorhughes on github. | |
* I am taylorhughes (https://keybase.io/taylorhughes) on keybase. | |
* I have a public key whose fingerprint is 7D46 ECF4 DADE BBED 1540 9C79 F40B 2664 6BE8 555D | |
To claim this, I am signing this object: |
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
func EncodeStreamingVideo(streamingFile io.Reader, request ShouldCanceler) (*os.File, error) { | |
outputFilename := generateFilename("mp4") | |
// Actually start the command. | |
cmd := exec.Command("ffmpeg", | |
// Read input from stdin. | |
"-i", "-", | |
// ... environment-specific ffmpeg options ... | |
"-y", outputFilename) |
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
// | |
// ImgixURL.h | |
// Cluster | |
// | |
// Created by Taylor Hughes on 12/18/12. | |
// Copyright (c) 2012 Taylor Hughes. All rights reserved. | |
// | |
#import "NSDictionary+FormEncoded.h" |
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
[self.apiClient retrieveConnectedServicesWithSuccessBlock:^(NSDictionary *services) { | |
NSArray *facebookTokens = services[@"facebook"]; | |
if (facebookTokens.count == 0) { | |
return; | |
} | |
NSDictionary *mostRecentFacebookTokenDict = facebookTokens[0]; | |
NSNumber *refreshTimeNumber = mostRecentFacebookTokenDict[@"refreshTime"]; | |
NSDate *refreshDate = [NSDate dateWithTimeIntervalSince1970:[refreshTimeNumber doubleValue]]; |
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
# tested with celery[redis]==3.1.17 | |
# to run with default configuration -- tasks will take 14 seconds to complete the 20 tasks in start_all() below | |
celery worker -A cluster_project.celery_app -Q tester -lINFO --concurrency=4 | |
# to run with -Ofair -- tasks will take 10 seconds to complete | |
celery worker -A cluster_project.celery_app -Q tester -lINFO --concurrency=4 -Ofair |
OlderNewer