Skip to content

Instantly share code, notes, and snippets.

View dominik-hadl's full-sized avatar

Dominik Hádl dominik-hadl

  • Prague, Czech Republic
View GitHub Profile
@dominik-hadl
dominik-hadl / AddVersionInfoToAppIcon.sh
Created February 8, 2014 12:12
This gist is heavily based on this article (http://www.merowing.info/2013/03/overlaying-application-version-on-top-of-your-icon/), but with some modifications. Specifically, it support the icons stored in .xcassets and also there is now no need to have duplicate files (with _base extension). It just modifies the final copied files if the current…
branch=`git rev-parse --abbrev-ref HEAD`
version=`/usr/libexec/PlistBuddy -c "Print CFBundleShortVersionString" "${INFOPLIST_FILE}"`
build=`/usr/libexec/PlistBuddy -c "Print CFBundleVersion" "${INFOPLIST_FILE}"`
function processIcon()
{
export PATH=$PATH:/usr/local/bin
target_file="${1}"
if [[ ! -f ${target_file} || -z ${target_file} ]]; then
Apps
----
These are the apps I use most, either for fun or for developing. This list is basically a reference for me, if I reinstall or whatever I do, to know which apps I have used before and what were their names.
* Postbox
* Spotify
* Photoshop CC
* Skype
* Skala Preview
@dominik-hadl
dominik-hadl / Kellys Inconsolata.dvtcolortheme
Created April 19, 2014 07:48
Modified version of Kellys, with Inconsolata-dz as the main font.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>DVTConsoleDebuggerInputTextColor</key>
<string>1 1 1 1</string>
<key>DVTConsoleDebuggerInputTextFont</key>
<string>Menlo-Bold - 11.0</string>
<key>DVTConsoleDebuggerOutputTextColor</key>
<string>1 1 1 1</string>
#!/bin/bash
libs=( "/usr/local/lib/libmacfuse_i32.2.dylib" \
"/usr/local/lib/libosxfuse_i32.2.dylib" \
"/usr/local/lib/libosxfuse_i64.2.dylib" \
"/usr/local/lib/libmacfuse_i64.2.dylib" \
"/usr/local/lib/libosxfuse_i32.la" \
"/usr/local/lib/libosxfuse_i64.la" \
"/usr/local/lib/pkgconfig/osxfuse.pc" )
@dominik-hadl
dominik-hadl / BinaryConvertor.pas
Created November 8, 2014 19:44
Converts a decimal number in a string to binary (from input file CISLA.IN to output file CISLA.OUT, one number on each line).
program BinaryConvertor;
{ ----------------------------------------------------------- }
uses
Sysutils;
{ ----------------------------------------------------------- }
{ DIVIDE BY TWO }
@dominik-hadl
dominik-hadl / GCDSingleton.h
Last active December 16, 2015 23:59 — forked from lukeredpath/ExampleClass.m
GCDSingleton Macro + @ArvinB changes.
/*!
* @function Singleton GCD Macro
*/
#ifndef SINGLETON_GCD
#define SINGLETON_GCD(classname) \
\
+ (classname *)shared##classname { \
\
static dispatch_once_t pred; \
@dominik-hadl
dominik-hadl / JSONPrettyToUgly.py
Last active December 19, 2015 20:08
Automatically minifies all JSON files after building (release or debug).
#!/usr/bin/python
#-------------------------
# Import the dependencies
#-------------------------
import json, sys
#-------------------------
#-------------------------------------
# Get the file names from the argument
@dominik-hadl
dominik-hadl / gdbGetStrippedSymbols.sh
Last active December 20, 2015 06:08
This script automates the setup of gdb on a stripped applicaiton adds symbols. It uses objc-symbols to get the symbols, then SymTabCreator and finally creates a command that is automatically loaded into gdb on start.
#!/bin/sh
# gdbGetStrippedSymbols.sh
# @author Dominik Hadl (@dominikhadl)
# @description This script automates the setup of gdb on a stripped applicaiton adds symbols. It uses objc-symbols to get the symbols,
# then SymTabCreator and finally creates a command that is automatically loaded into gdb on start.
# @license Licensed under WTFPL license (see http://www.wtfpl.net/txt/copying/ for full license).
# @dependencies
# 1. objc-symbols
# 2. SymTabCreator
# 3. gdb (really non-obvious)
#!/bin/sh
# 7zJSON.sh
# @author Dominik Hadl
# @dependencies This script requires that you have p7zip package installed, prefferably through Homebrew.
#
# @description This script will automatically find all .json files in your $BUILT_PRODUCTS_DIR and will compress them to the LZMA (7z) format.
# In the process it will also delete the original .json files - but only in the build folder.
#
# @usage
# 1. Create a new build phase (Run script) in your target in Xcode
// Photoshop Script to Create iPhone Icons from iTunesArtwork
//
// WARNING!!! In the rare case that there are name collisions, this script will
// overwrite (delete perminently) files in the same folder in which the selected
// iTunesArtwork file is located. Therefore, to be safe, before running the
// script, it's best to make sure the selected iTuensArtwork file is the only
// file in its containing folder.
//
// Copyright (c) 2010 Matt Di Pasquale
//