Skip to content

Instantly share code, notes, and snippets.

Avatar
🏔️

Terribili aterribili

🏔️
  • Brazil
View GitHub Profile
@aterribili
aterribili / bst.swift
Last active May 13, 2017
BST in swift *Binary Search Tree*
View bst.swift
enum BinarySearchTree<T: Comparable> {
case Leaf(T?)
indirect case Node(T, BinarySearchTree, BinarySearchTree)
}
func search<T: Comparable>(in tree: BinarySearchTree<T>, for item: T) -> Bool {
switch tree {
case .Leaf(let value):
return item == value
case .Node(let selfValue, let left, let right):
@aterribili
aterribili / .travis.yml
Last active Mar 5, 2020
iOS + Travis + Fastlane continuous delivery
View .travis.yml
language: objective-c
os: osx
xcode_workspace: {workspace-name}.xcworkspace
xcode_scheme: {workspace-name}
xcode_sdk: iphonesimulator9.0
osx_image: xcode8
before_install:
- |
brew update
gem install xcpretty -N --no-ri --no-doc
View BNG_Pong_basicsphere
// ---------------------------------
// Based on Aerotwist's cool tutorial - http://www.aerotwist.com/tutorials/getting-started-with-three-js/
// ---------------------------------
// set up the sphere vars
// lower 'segment' and 'ring' values will increase performance
var radius = 5,
segments = 6,
rings = 6;
View YouTubeUploader-ios.js
(function() {
if (Cordova.hasResource("youtubeUploader")) return;
Cordova.addResource("youtubeUploader");
function YouTubeUploader() {
}
YouTubeUploader.prototype.uploadVideo = function(file, success, fail) {
You can’t perform that action at this time.