Skip to content

Instantly share code, notes, and snippets.

View sirvon's full-sized avatar

SirVon Thomas sirvon

  • XNA Inc.
  • California, USA
View GitHub Profile
@sirvon
sirvon / FTS4.swift
Created November 22, 2017 18:06
snipped from FTS4 for HYPERTRACK pod
let view:String.UTF8View = string.utf8
if let from = range.lowerBound.samePosition(in: view),
let to = range.upperBound.samePosition(in: view) {
offset.pointee += Int32(string[string.startIndex..<range.lowerBound].utf8.count)
length.pointee = Int32(view.distance(from: from, to: to))
return token
} else {
return nil
}
@sirvon
sirvon / finale_api.py
Created November 14, 2017 17:22 — forked from cwurld/finale_api.py
Python for Accessing Finale Inventory REST API
import requests
import json
import base64
import pprint
import unittest
import time
import datetime
# Put this in contactMechList
ADDRESS_TEMPLATE = {
Install s3fs on Mac OS X
1 - Install Homebrew - http://brew.sh/
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
2 - Use Homebrew to install s3fs + dependencies
brew install s3fs
3 - Do some custom stuff. I only used the first step from here -> https://gist.github.com/fukayatsu/3910097
sudo /bin/cp -rfX /usr/local/Cellar/fuse4x-kext/0.9.2/Library/Extensions/fuse4x.kext /Library/Extensions
try:
r.table('marketplaces').insert(
r.http('https://raw.githubusercontent.com/sirvon/fourthScreen/master/marketplaces_only_RETHINKDB.json', result_format='json').merge(lambda marketplace:
{"location": r.point(
marketplace["location"][0],
marketplace["location"][1])
}
)
).run(conn)
except Exception as e:
@sirvon
sirvon / gist:bf98c693ca21df65c240
Last active February 10, 2016 08:40
AuthToken pojo
@ParseClass
Public class AuthToken {
String token;
String provider;
}
//put this part after u get the linkedin token.
@sirvon
sirvon / TwitterVideoApiClient.class
Created January 10, 2016 17:51
upload video to twitter via android client
public class TwitterVideoApiClient extends TwitterApiClient{
private static final String TWITTER_UPLOAD_URL = "https://upload.twitter.com";
private RestAdapter twitterVideoApiClientAdapter;
public TwitterVideoApiClient(TwitterSession session) {
language: android
jdk:
- oraclejdk7
branches:
only:
- INHOUSE
sudo: required
#!/bin/sh
# This Script aims to setup a docker environment for Linux or OSX with docker client, docker-machine and docker-compose
# All binaries are install in /usr/local/bin/ directory.
RED='\033[0;31m'
GREEN='\033[0;32m'
NC='\033[0m' # No Color
os=$(uname -s)
arch=$(uname -m)
Verifying that +sirvon is my openname (Bitcoin username). https://onename.com/sirvon