Skip to content

Instantly share code, notes, and snippets.

@mwermuth
mwermuth / update_build_number_watch_ext.sh
Created June 2, 2015 08:01
Update Build Number for Apple Watch Extension + App
branch=${1:-'master'}
buildNumber=$(expr $(git rev-list $branch --count) - $(git rev-list HEAD..$branch --count))
appPlistFile=$(echo "${INFOPLIST_FILE}" | sed 's/Extension/App/g')
echo "Updating build number to $buildNumber using branch '$branch' for Watch Extension Target."
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $buildNumber" "${SRCROOT}/${INFOPLIST_FILE}"
echo "Updating build number to $buildNumber using branch '$branch' for Watch App Target."
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $buildNumber" "${SRCROOT}/$appPlistFile"
@mwermuth
mwermuth / update_build_number.sh
Created June 2, 2015 07:56
Updating Xcode Build number for iOS App Target
branch=${1:-'master'}
buildNumber=$(expr $(git rev-list $branch --count) - $(git rev-list HEAD..$branch --count))
echo "Updating build number to $buildNumber using branch '$branch' for App Target."
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $buildNumber" "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}"
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $buildNumber" "${BUILT_PRODUCTS_DIR}/${WRAPPER_NAME}.dSYM/Contents/Info.plist"
This file has been truncated, but you can view the full file.
__SSTOKENSTRING = "@generated SignedSource<<dbe928e1275c495c1922c1bf063ffb70>>";
! function(e) {
function t(e) {
function t() {
var t = Array.prototype.map.call(arguments, function(e) {
if (null == e) return null === e ? "null" : "undefined";
if ("string" == typeof e) return '"' + e + '"';
try {
return JSON.stringify(e)
} catch (t) {
@mwermuth
mwermuth / bootstrap_override.html
Last active August 29, 2015 14:11
Bootstrap 3 change Mobile Breakpoint
@media (max-width: 990px) {
.navbar-header {
float: none;
}
.navbar-toggle {
display: block;
}
.navbar-collapse {
border-top: 1px solid transparent;
box-shadow: inset 0 1px 0 rgba(255,255,255,0.1);

Keybase proof

I hereby claim:

  • I am mwermuth on github.
  • I am mwermuth (https://keybase.io/mwermuth) on keybase.
  • I have a public key whose fingerprint is 7B3C 1579 B176 8A5F 06C6 2798 893C 74B7 BEAF D2E9

To claim this, I am signing this object:

@mwermuth
mwermuth / UIBezier+Arrow.swift
Created September 11, 2014 14:01
Drawing an Arrow with Swift
extension UIBezierPath {
class func getAxisAlignedArrowPoints(inout points: Array<CGPoint>, forLength: CGFloat, tailWidth: CGFloat, headWidth: CGFloat, headLength: CGFloat ) {
let tailLength = forLength - headLength
points.append(CGPointMake(0, tailWidth/2))
points.append(CGPointMake(tailLength, tailWidth/2))
points.append(CGPointMake(tailLength, headWidth/2))
points.append(CGPointMake(forLength, 0))
points.append(CGPointMake(tailLength, -headWidth/2))
I, [2014-05-14T15:34:47.035994 #7360] INFO -- : [SKYLIGHT] fetching native ext; curr-platform=x86_64-linux; requested-arch=linux-x86_64; version=f2a0e15
I, [2014-05-14T15:34:47.036103 #7360] INFO -- : [SKYLIGHT] attempting to fetch from remote; uri=https://github.com/skylightio/skylight-rust/releases/download/f2a0e15/libskylight.f2a0e15.linux-x86_64.a.gz
I, [2014-05-14T15:34:47.530917 #7360] INFO -- : [SKYLIGHT] fetching native ext; uri=https://github.com/skylightio/skylight-rust/releases/download/f2a0e15/libskylight.f2a0e15.linux-x86_64.a.gz; redirected=https://s3.amazonaws.com/github-cloud/releases/14909411/49b04afa-ba30-11e3-9273-77f2bd7cd8ce.gz?response-content-disposition=attachment%3B%20filename%3Dlibskylight.f2a0e15.linux-x86_64.a.gz&AWSAccessKeyId=AKIAISTNZFOVBIJMK3TQ&Expires=1400081747&Signature=tO7ozClJA4pRfqewKayAKjC%2BxXo%3D
I, [2014-05-14T15:34:47.531040 #7360] INFO -- : [SKYLIGHT] attempting to fetch from remote; uri=https://s3.amazonaws.com/github-cloud/releases/14909411/49b04afa-ba30-11e3-
@mwermuth
mwermuth / find_duplicates_and_delete.rb
Created March 16, 2014 08:59
Find duplicate Files and delete all except one
require 'digest/md5'
hash = {}
Dir.glob("**/*").each do |filename|
next if File.directory?(filename)
key = Digest::MD5.hexdigest(IO.read(filename)).to_sym
if hash.has_key? key
## app/models/custom_calculator.rb
class CustomCalculator < Spree::Calculator
def self.description
"foobar"
end
def compute(object=nil)
return 10.00
@mwermuth
mwermuth / git
Created May 16, 2013 06:04
Bash Aliases
alias gpd="git push -u origin develop"
alias gpm="git push -u origin master"
alias ungit="find . -name '.git' -exec rm -rf {} \;"