Skip to content

Instantly share code, notes, and snippets.

Avatar

Stephen Feather stephenfeather

View GitHub Profile
@stephenfeather
stephenfeather / bitbucket-to-github.rb
Created Apr 26, 2019 — forked from rbellamy/bitbucket-to-github.rb
Bulk import Bitbucket repos to Github
View bitbucket-to-github.rb
#!/usr/bin/env ruby
require 'fileutils'
# Originally -- Dave Deriso -- deriso@gmail.com
# Contributor -- G. Richard Bellamy -- rbellamy@terradatum.com
# If you contribute, put your name here!
# To get your team ID:
# 1. Go to your GitHub profile, select 'Personal Access Tokens', and create an Access token
# 2. curl -H "Authorization: token <very-long-access-token>" https://api.github.com/orgs/<org-name>/teams
# 3. Find the team name, and grabulate the Team ID
@stephenfeather
stephenfeather / cleanup.zsh
Created Apr 21, 2019
Clean Up wasted space on osx
View cleanup.zsh
#!/usr/local/bin/zsh
echo "Updating Homebrew"
brew update
brew upgrade
brew cask upgrade
brew cleanup -s
brew doctor
brew missing
echo "Updating App Store Items"
mas outdated
View genesis_public_key
04d13ee4564f01142758f002d6b3069e7bfccf6d6ed92b8352e4782c9ceedddac7a38ed4109da157c27888d4318552a3738a07ef9910ebc9e8c1bbdfc56aea4e4a
View index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>Switch vs if..else</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script>
<script src="./suite.js"></script>
</head>
<body>
<h1>Open the console to view the results</h1>
@stephenfeather
stephenfeather / Timings.js
Last active Dec 19, 2016
Quick and dirty timings libary, most definitely should not be used for engineering, medical, safety related usages.
View Timings.js
/*
Requires Underscore
Basic Usage:
var Timing = require('Timing');
Timing.start('myLabel');
Timing.stop('myLabel');
Timing.getTime('myLabel');
@stephenfeather
stephenfeather / slackLogger.js
Last active Oct 27, 2016
Small library for Titanium to send info to a Slack webhook for 'remote logging' during development/testing
View slackLogger.js
// Copyright 2016 Stephen Feather
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
View UIModule.m
-(NSString*)TEXT_STYLE_TITLE1
{
if ([TiUtils isIOS9OrGreater]) {
return UIFontTextStyleTitle1;
} else {
return UIFontTextStyleBody;
}
}
-(NSString*)TEXT_STYLE_TITLE2
@stephenfeather
stephenfeather / strong-pm-install.sh
Created Apr 14, 2016
Strong-PM install script for new Digital Ocean droplet Ubuntu 14.x w/ node x
View strong-pm-install.sh
# install system pre-req
sudo apt-get install build-essential sqlite git
# install strong-pm
sudo npm install -g strong-pm --unsafe-perm
# install strong-pm as a service
sl-pm-install
# start strong-pm
/sbin/initctl start strong-pm
# be sure you secure your strong-pm!
@stephenfeather
stephenfeather / gist:2ac42b8544c995f7b7ff
Created Jan 3, 2016
OSX command line for tool to test your android library for text relocations
View gist:2ac42b8544c995f7b7ff
/sdks/android-ndk-r10e/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-readelf -a yourlib.so | grep TEXTREL
View gist:62544008b819ca256661
$ appc config
Appcelerator Command-Line Interface, version 5.1.0
Copyright (c) 2014-2015, Appcelerator, Inc. All Rights Reserved.
{
"dashboard": "https://platform.appcelerator.com",
"environmentName": "production",
"soastaUrl": "https://appctest-2.appcelerator.com/concerto",
"lastUpdateCheck": 1449648202029,
"lastUpdateCheckTiDownloads": 1445821224185,