Skip to content

Instantly share code, notes, and snippets.

View bradenpowers's full-sized avatar

Braden Powers bradenpowers

View GitHub Profile
@bradenpowers
bradenpowers / git-overwrite-branch.sh
Created December 30, 2021 16:20 — forked from ummahusla/git-overwrite-branch.sh
Git overwrite branch with another branch
# overwrite master with contents of feature branch (feature > master)
git checkout feature # source name
git merge -s ours master # target name
git checkout master # target name
git merge feature # source name
@bradenpowers
bradenpowers / gist:4072be12aff5da5a32e5e4a21ea2943d
Created April 15, 2020 22:56 — forked from 480/gist:3b41f449686a089f34edb45d00672f28
MacOS X + oh my zsh + powerline fonts + visual studio code terminal settings

MacOS X + oh my zsh + powerline fonts + visual studio code (vscode) terminal settings

Thank you everybody, Your comments makes it better

Install oh my zsh

http://ohmyz.sh/

sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
@bradenpowers
bradenpowers / alloy.py
Last active August 29, 2015 14:07 — forked from joshjensen/alloy.py
# Put me in: ~/Library/Application Support/Sublime Text 2/Packages/User/
# Set your layout to Grid 4 - Go to view > layout > Grid: 4
# Based on this Gist from Fokke - https://gist.github.com/FokkeZB/6218345
# Alloy lay-out for Sublime Text http://withtitanium.com/2013/08/titanium-alloy-optimized-sublime-text-2-layout/
# Put me in: ~/Library/Application Support/Sublime Text 2/Packages/User/
import sublime, sublime_plugin, inspect
from os.path import splitext

Keybase proof

I hereby claim:

  • I am bradenpowers on github.
  • I am bradenpowers (https://keybase.io/bradenpowers) on keybase.
  • I have a public key whose fingerprint is 86B2 5447 DBDB 5C08 8241 F20C BF90 43B9 CEDA A537

To claim this, I am signing this object:

@bradenpowers
bradenpowers / gist:4127556
Created November 21, 2012 20:46 — forked from zhendershot/gist:3607211
REST API Upload to S3 in Titanium
function upload(name, file, callback) {
Ti.include('lib/sha-aws.js'); // file comes from this URL's project: http://aws.amazon.com/code/Amazon-S3/3236824658053653
Ti.include('lib/webtoolkit.utf8.js'); // code for this file from this URL: http://www.webtoolkit.info/javascript-utf8.html
Ti.include('lib/date.js'); // file comes from this URL: http://www.mattkruse.com/javascript/date/source.html
var AWSAccessKeyID = appGlobal.config.s3AccessKey;
var AWSSecretAccessKey = appGlobal.config.s3SecretKey;
var AWSBucketName = appGlobal.config.s3BucketName;
var AWSHost = appGlobal.config.s3Host;
@bradenpowers
bradenpowers / DialogWindow.js
Created November 15, 2012 20:42 — forked from raulriera/DialogWindow.js
CustomAlertDialog commonJS module for Titanium Appcelerator. Similar to the "Tweetbot" (but will need more makeup of course) where the information is displayed below the title bar instead of an intrusive popup
DialogWindow = function(message, type){
// Default params
var message = message || "How about you add some message to this? :)";
var type = type || "error";
var window = Titanium.UI.createWindow({
width: 320,
height: 44,
top: 44,
<?xml version="1.0" encoding="utf-8"?>
<TabHost xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@android:id/tabhost"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<LinearLayout
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
@bradenpowers
bradenpowers / gist:3484062
Created August 26, 2012 22:49 — forked from lucasfais/gist:1207002
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
@bradenpowers
bradenpowers / MyObject.js
Created September 9, 2011 22:45 — forked from kwhinnery/Person.js
Monkey patch for require in Titanium Mobile
exports.Person = function(firstName,lastName) {
this.firstName = firstName;
this.lastName = lastName;
};
var mapview = Titanium.Map.createView({
mapType: Titanium.Map.STANDARD_TYPE,
region:{latitude:-33.8642194, longitude:151.2095497},
animate:true,
regionFit:true,
annotations:[]
});
var getShops = Ti.Network.createHTTPClient();