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
#!/bin/zsh | |
cd "${0%/*}/../conf/url/" | |
for user in $(cat ../users.list); do | |
TWEETS=$(t search timeline -d -l user "#Periscope:" | grep -v " RT @") | |
OLDIFS=$IFS; IFS=$'\n' | |
for tweet in $(echo $TWEETS); do | |
DATE=$(echo $tweet | cut -d\ -f2-6) | |
OLD_LC_ALL=$LC_ALL; export LC_ALL="POSIX" | |
SEC=$(($(date +%s) - $(date -j -f ' %b %e %H:%M ' "$DATE" +%s))) |
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
@interface DismissGravity : NSObject <UIViewControllerAnimatedTransitioning> | |
@property (strong, nonatomic) UIDynamicAnimator *animator; |
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
console.log('Loading event'); | |
var AWS = require('aws-sdk'); | |
exports.handler = function(event, context) { | |
console.log('Received event:'); | |
console.log(JSON.stringify(event, null, ' ')); | |
// Get the object from the event and show its content type | |
var bucket = event.Records[0].s3.bucket.name; | |
var key = event.Records[0].s3.object.key; | |
var output = Math.random().toString(36).substring(7) + ".webm"; |
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
// | |
// ABSpringDemoViewController.m | |
// Springy | |
// | |
#import "ABSpringDemoViewController.h" | |
@interface ABSpringDemoViewController () <UITableViewDataSource, UITableViewDelegate> { | |
UITableView *_tableView; | |
CADisplayLink *_displayLink; |
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
@interface YourViewController : UIViewController <UITableViewDelegate, UITableViewDataSource> { | |
UIImageOrientation scrollOrientation; | |
CGPoint lastPos; | |
} | |
- (void) tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath { | |
if (tableView.isDragging) { | |
UIView *myView = cell.contentView; | |
CALayer *layer = myView.layer; | |
CATransform3D rotationAndPerspectiveTransform = CATransform3DIdentity; |
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
// View controller is a subclass of GLKViewController | |
- (void)viewDidLoad | |
{ | |
[super viewDidLoad]; | |
self.eaglContext = [[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES2]; | |
self.ciContext = [CIContext | |
contextWithEAGLContext:self.eaglContext |
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
http://pm2.keymetrics.io/docs/usage/use-pm2-with-cloud-providers/ |
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
// | |
// Copyright © 2016 Tanner Bennett. All rights reserved. | |
// | |
import Foundation | |
typealias ResponseParserBlock = (ResponseParser) -> Void | |
class ResponseParser { | |
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
'use strict'; | |
/* | |
* Usage: | |
* | |
* const gracefulShutdown = require('./app/utils/gracefulShutdown'); | |
* | |
* const server = app.listen(port, callback) | |
* | |
* gracefulShutdown.init(server, logger); |
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
######################### | |
# .gitignore file for Xcode5 | |
# | |
# NB: if you are storing "built" products, this WILL NOT WORK, | |
# and you should use a different .gitignore (or none at all) | |
# This file is for SOURCE projects, where there are many extra | |
# files that we want to exclude | |
# | |
# For updates, see: http://stackoverflow.com/questions/49478/git-ignore-file-for-xcode-projects | |
# and https://gist.github.com/adamgit/3786883 |