lspci | grep -i nvidia
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
kernel vec4 coreImageKernel(__color startColor, __color endColor) | |
{ | |
vec2 point = destCoord(); | |
float angle = atan(point.y, point.x) + radians(180.0); | |
//Start from the upper middle, not the left middle | |
angle += radians(90.0); | |
angle = mod(angle, radians(360.0)); | |
float fraction = angle / radians(360.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
# http://artsy.github.io/blog/2016/03/02/Lazily-Automation/ | |
function git_branch_info | |
git branch ^/dev/null | grep \* | sed 's/* //' | |
end | |
function branch | |
git checkout master; | |
git pull upstream master; | |
git checkout -b $argv[1] |
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
// | |
// HudlHlsAvPlayerCache.m | |
// Hudl | |
// | |
// Created by Brian Clymer on 3/6/15. | |
// Copyright (c) 2015 Agile Sports Technologies, Inc. All rights reserved. | |
// | |
#import "HudlHlsAvPlayerCache.h" |
Let's use Terraform to easily get a CoreOS cluster up on Digital Ocean. In this example we will get a 5 node CoreOS cluster up and running on the Digital Ocean 8GB size.
Grab a copy of Terraform for your platform from http://www.terraform.io/downloads.html. Follow the instructions at http://www.terraform.io/intro/getting-started/install.html by getting Terraform in your PATH
and testing that it works.
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/bash | |
############################################################################################################## | |
### 1. Name your profiles with the convention of ProjectName_TargetName_ConfigurationName.mobileprovision ### | |
### 2. Create a directory called CodeSign in your project directory ### | |
### 3. Move all your project's provisioning profiles into the CodeSign directory ### | |
### ### | |
### Running this script will update your project file to point to the correct UUIDs of each corresponding ### | |
### profile in your CodeSign directory. ### | |
############################################################################################################## |
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/bash | |
# Automatically configure a VM download Coursera courses. | |
# This script works as a user data file for use with a cloud VM. | |
# This script will resume downloading if the VM is restarted. | |
# This script works with Debian jessie (or possibly Ubuntu with systemd). | |
# You must enroll in each course and accept the Honor of Code of each course | |
# before you can download them. |
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 UIKit | |
enum Direction { | |
case Left, Right, Up, Down | |
var pointVector: CGPoint { | |
switch self { | |
case Left: return CGPoint(x: -1, y: 0) | |
case Right: return CGPoint(x: 1, y: 0) | |
case Up: return CGPoint(x: 0, y: -1) |
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 UIKit; | |
NS_ASSUME_NONNULL_BEGIN | |
@protocol MFBPreviewableCollectionView | |
- (nullable NSIndexPath *)mfb_previewableCollectionIndexPathForItemAtPoint:(CGPoint)point; | |
- (CGRect)mfb_previewableCollectionItemRectForIndexPath:(NSIndexPath *)indexPath; |