Skip to content

Instantly share code, notes, and snippets.

Jörg Bühmann orkoden

Block or report user

Report or block orkoden

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@orkoden
orkoden / brewpdate.sh
Last active Dec 17, 2015
A little script to update all currently installed programs with homebrew. Also removes old versions.
View brewpdate.sh
#!/bin/sh
echo "searching for updates..."
brewoutput=`brew update`
if [ "$brewoutput" == "Already up-to-date." ]
then
echo "nothing to update"
else
echo "updating..."
brewoutput=`brew upgrade --all`
if [[ "$brewoutput" == *".app bundles were installed."* ]]
@orkoden
orkoden / easyReleaseNotesWithGit.sh
Last active Dec 21, 2015
easy release notes with git.gets all commit messages since the last tag. useful when preparing release notes.cut is there to get rid of the commit hashes, sort is there because then all commits starting with "fix: bug 9001" or "change: will be next to each other.put into .bashrc, .profile, .zshrc depending on your shell.only works if you tag you…
View easyReleaseNotesWithGit.sh
# replace mate with editor of your choice
alias releasenotes="git log --oneline --no-merges `git describe --abbrev=0 --tags`..HEAD | cut -c 9- | sort | mate"
View reallyCleanXcode.rb
# run with
# ruby reallyCleanXcode.rb
derivedDataFolder = Dir.glob(Dir.home + "/Library/Developer/Xcode/DerivedData/*")
moduleCache = Dir.glob("/var/folders/**/com.apple.DeveloperTools*")
FileUtils.rm_rf derivedDataFolder + moduleCache
@orkoden
orkoden / tddberlin_iOS_notes.md
Last active May 7, 2019
Notes from TDD iOS Notes
View tddberlin_iOS_notes.md

TDD Workshop Notes

http://tdd-workshop.uikonf.com

Twitter hashtag #tddberlin

Mobile Central Europe Conference in Warsaw in Feb 2015

Resources

Reading

@orkoden
orkoden / find and replace incorrectly escaped characters for a localized string.sh
Last active Aug 29, 2015
Incorrectly escaped string in my localized strings files: \\"%@\\" should have been \"%@\" as it should display as "foo".
View find and replace incorrectly escaped characters for a localized string.sh
find Resources/Localizable.strings -name "*.strings" -type f -exec gsed -i 's/\\\\\"%@\\\\\"/\\\"%@\\\"/g' {} ";" -exec plutil -lint {} ";"
# needs gnu-sed to be installed for -i parameter
@orkoden
orkoden / allthecows.rb
Last active Aug 29, 2015
Get all the cows cowsay has to offer to say a random quote
View allthecows.rb
Dir.foreach("/usr/local/Cellar/cowsay/3.03/share/cows") {|cow| puts cow; system "fortune | cowsay -f /usr/local/Cellar/cowsay/3.03/share/cows/#{cow}" }
@orkoden
orkoden / HackerrankObjectiveCBoilerplate.m
Last active Dec 2, 2016
Hackerrank.com Boilerplate template for reading from STDIN and writing to STDOUT for Objective-C
View HackerrankObjectiveCBoilerplate.m
#import <Foundation/Foundation.h>
@interface HRSTDIOReadWriter : NSObject
@end
@implementation HRSTDIOReadWriter
+(NSString*) readFromSTDIN
{
NSFileHandle *kbd = [NSFileHandle fileHandleWithStandardInput];
@orkoden
orkoden / FizzBuzz in Haskell.hs
Last active Aug 29, 2015
FizzBuzz in Haskell that I live coded as part of a demo for hackership
View FizzBuzz in Haskell.hs
data Fizzbuzz = FizzBuzz
| Fizz
| Buzz
deriving Show
fizzbuzz :: [Integer] -> String
fizzbuzz x = unlines (map fizzbuzzline x)
fizzbuzzline :: Integer -> String
fizzbuzzline x = fizzBuzzToString x (fizzBuzzFromNum x)
@orkoden
orkoden / lettermix.rb
Created Mar 3, 2015
Lettermix randomizes the letters in words, that are passed as arguments.
View lettermix.rb
#!/usr/bin/env ruby
ARGV.each do|a|
puts "#{a}".split("").shuffle.join
end
@orkoden
orkoden / hide or show desktop icons.applescript
Last active Sep 27, 2018
AppleScript to hide your messy desktop icons during presentations for Mac OS X.
View hide or show desktop icons.applescript
display dialog "Desktop icons visible or hidden?" buttons {"Visible", "Hidden"} with icon 2 with title "Switch to presentation mode" default button 1
set switch to button returned of result
if switch is "Hidden" then
do shell script "defaults write com.apple.finder CreateDesktop -bool FALSE;killall Finder"
else
do shell script "defaults delete com.apple.finder CreateDesktop;killall Finder"
end if
You can’t perform that action at this time.