Skip to content

Instantly share code, notes, and snippets.

Avatar

SirVon Thomas sirvon

  • XNA Inc.
  • California, USA
View GitHub Profile
@sirvon
sirvon / FTS4.swift
Created Nov 22, 2017
snipped from FTS4 for HYPERTRACK pod
View FTS4.swift
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 Nov 14, 2017 — forked from cwurld/finale_api.py
Python for Accessing Finale Inventory REST API
View finale_api.py
import requests
import json
import base64
import pprint
import unittest
import time
import datetime
# Put this in contactMechList
ADDRESS_TEMPLATE = {
View S3FS on Mac OS X
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
View jsonrpoint
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:
View gist:bf98c693ca21df65c240
@ParseClass
Public class AuthToken {
String token;
String provider;
}
//put this part after u get the linkedin token.
@sirvon
sirvon / TwitterVideoApiClient.class
Created Jan 10, 2016
upload video to twitter via android client
View TwitterVideoApiClient.class
public class TwitterVideoApiClient extends TwitterApiClient{
private static final String TWITTER_UPLOAD_URL = "https://upload.twitter.com";
private RestAdapter twitterVideoApiClientAdapter;
public TwitterVideoApiClient(TwitterSession session) {
View .travis.yml
language: android
jdk:
- oraclejdk7
branches:
only:
- INHOUSE
sudo: required
View osx-10-10-virtualbox.md
View docker_install.sh
#!/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)
View gist:95a11e5431eda849a26f
Verifying that +sirvon is my openname (Bitcoin username). https://onename.com/sirvon