Skip to content

Instantly share code, notes, and snippets.

View JeppeLeth's full-sized avatar

Jeppe Leth JeppeLeth

View GitHub Profile
@JeppeLeth
JeppeLeth / happy_git_on_osx.md
Created January 2, 2017 13:06 — forked from trey/happy_git_on_osx.md
Creating a Happy Git Environment on OS X

Creating a Happy Git Environment on OS X

Step 1: Install Git

brew install git bash-completion

Configure things:

git config --global user.name "Your Name"

git config --global user.email "you@example.com"

@JeppeLeth
JeppeLeth / gist:224e75abe56160a1f0e31ede0b807804
Last active April 15, 2017 07:56 — forked from paour/gist:11291062
Android String Weblate, Replacing values in arrays.xml with @string/ links
#! /usr/bin/python
import argparse
import os.path
import glob
parser = argparse.ArgumentParser(
formatter_class=argparse.RawDescriptionHelpFormatter,
description='''\
Replacing values in arrays.xml with @string/ links. Generates three new files for each locale:
@JeppeLeth
JeppeLeth / convertLocalizable.rb
Created April 15, 2017 09:03 — forked from florianmski/convertLocalizable.rb
Convert your Localizable.strings (iOS) to strings.xml (Android)
#!/usr/bin/ruby
# based on https://github.com/tmurakam/cashflow/blob/0a01ac9e0350dfb04979986444244f8daf4cb5a8/android/convertStrings.rb
# support comments and Converter such as "%@", "%d", "%0.1f"...
# in your directory : ./main.rb Localizable.strings
file = File.open("strings.xml", "w");
file.puts "<?xml version=\"1.0\" encoding=\"utf-8\"?>"
file.puts "<resources>"
@JeppeLeth
JeppeLeth / LocalizeStringsFromAndroid.rb
Created April 15, 2017 09:24 — forked from ebaker355/LocalizeStringsFromAndroid.rb
Translate Android strings.xml files to iOS Localizable.strings files
#!/usr/bin/env ruby
# gist: https://gist.github.com/3217498
# This script can be called from an Xcode 'Run Script' build phase at the
# beginning of the build process, like this:
#
# ${PROJECT_DIR}/LocalizeStringsFromAndroid.rb ${PROJECT_NAME}
#
# This script should be placed in the same directory as your .xcodeproj
@JeppeLeth
JeppeLeth / clear-android-things-apps.sh
Created April 18, 2017 18:28 — forked from blundell/clear-android-things-apps.sh
Uninstall all apps on an Android Device that have the intent-filter category IOT_LAUNCHER
#!/bin/bash
sp="/-\|"
sc=0
spin() {
printf "\b${sp:sc++:1}"
((sc==${#sp})) && sc=0
}
endspin() {
printf "\r"
}
@JeppeLeth
JeppeLeth / fix_strings.md
Created June 9, 2017 07:01 — forked from Superbil/fix_strings.md
Fix *.strings can't diff in git