Skip to content

Instantly share code, notes, and snippets.

View shouse's full-sized avatar

Steven shouse

  • SIVCI
  • Kansas City, MO
View GitHub Profile
/**
* Hyperloop Module
* Copyright (c) 2015 by Appcelerator, Inc. and subject to the
* Appcelerator Platform Subscription agreement.
*/
var Hyperloop = require('hyperloop');
var UIView = require('UIView');
var CGRect = require('CGRect');
var CGPoint = require('CGPoint');
@grantges
grantges / charts.js
Last active November 13, 2017 18:17
Hyperloop Donut Example using Alloy Custom Tags (charts.js should be put in the app/lib folder of your app)
var Hyperloop = require('hyperloop');
var UIView = require('UIView');
var CGRect = require('CGRect');
var CGPoint = require('CGPoint');
var UIColor = require('UIColor');
var UIBezierPath = require('UIBezierPath');
function DEGREES_TO_RADIANS(angle) { return (Number(angle) / 180.0 * Math.PI) };
@armcknight
armcknight / install_xcode.sh
Last active February 26, 2021 22:35
Install Xcode via command line
#!/bin/sh
#
# install_xcode.sh
#
# Created by Andrew McKnight on 9/24/15
#
# takes a downloaded .dmg containing Xcode and installs it to a specified location/name, or defaults to /Applications and the DMG's filename
#
@squarism
squarism / iterm2.md
Last active July 2, 2025 02:25
An iTerm2 Cheatsheet

Tabs and Windows

Function Shortcut
New Tab + T
Close Tab or Window + W (same as many mac apps)
Go to Tab + Number Key (ie: ⌘2 is 2nd tab)
Go to Split Pane by Direction + Option + Arrow Key
Cycle iTerm Windows + backtick (true of all mac apps and works with desktops/mission control)
^(?!dalvikvm|memalloc|Socket_Pool|libc|Trace|global|Socket_Alarm|AwContents|chromium|AudioManagerAndroid|eglCodecCommon)
@palkan
palkan / gist:d89757a90cfbeb047c63
Last active January 27, 2025 07:25
Rails debug cheat sheet

Setup

Replace IRB with Pry (in your Gemfile) and Byebug with pry-byebug.

gem 'pry-rails', group: [:development, :test]
gem 'pry-byebug', group: [:development, :test]

Using PRY

@giorgiopagnoni
giorgiopagnoni / page.indicator.js
Last active March 9, 2017 03:38
Page indicator (circles, lines, squares...) for scrollableViews for Appcelerator Titanium (Android)
/*
* Simple page indicator for scrollableViews for Appcelerator Titanium (Android).
* To be added after the views have been set.
*
* var p = require('page.indicator');
* var options = { color: 'red' };
* var indicator = p.pageIndicator(myScrollableView, options);
*/
@kosso
kosso / TiFTPSockets.js
Last active August 24, 2017 00:48
FTP binary data file uploader in Titanium using Sockets
/*
// Author : @kosso
// Date : May 10, 2015.
// FTP binary data file uploader. With notes etc. which I cobbled togethr while trying to work out this elusive dark art.
All examples I found were using the 'STOR' command incorrectly and wondering why they were getting empty files appear (if they were lucky).
Also, most if not all were using the deprecated Ti.Network.createTCPSocket() method instead of Ti.Network.Socket.createTCP().
eg : http://stackoverflow.com/questions/23971311/titanium-appcelerator-ftp-upload
@ttscoff
ttscoff / copy.bash
Last active February 20, 2025 09:33
Intelligently copy command results, text file, or raw input/arguments to OS X clipboard
copy() {
if [[ $1 =~ ^-?[hH] ]]; then
echo "Intelligently copies command results, text file, or raw text to"
echo "OS X clipboard"
echo
echo "Usage: copy [command or text]"
echo " or pipe a command: [command] | copy"
return
fi
@junegunn
junegunn / b.rb
Last active January 26, 2023 14:34
b - browse Chrome bookmarks with fzf
#!/usr/bin/env bash
# vim: set filetype=ruby:
# b - browse Chrome bookmarks with fzf
[ $(uname) = Darwin ] || exit 1
which fzf > /dev/null 2>&1 || brew reinstall --HEAD fzf || exit 1
/usr/bin/ruby -x "$0" |
fzf-tmux -u 30% --ansi --multi --no-hscroll --tiebreak=begin |
awk 'BEGIN { FS = "\t" } { print $2 }' |