Skip to content

Instantly share code, notes, and snippets.

@pd95
pd95 / AppIcons.command
Last active November 21, 2024 09:11
A ZSH command file to produce the various PNG files required for iOS and macOS app Icons using `sips` (scriptable image processing system) available on any macOS. The resulting PNGs in the "AppIcons" folder can then be dragged into Xcode's `Assets.xcassets` onto a placeholder for an AppIcon.
#!/bin/zsh
# Shell Script to create all relevant icons from an high resolution artwork
if [ "x$1" != "x" -a -f "$1" ] ; then
INPUT=$1
else
INPUT="Artwork.png"
fi
if [ ! -f "$INPUT" ]; then
import QtQuick 2.6
import QtQuick.Window 2.2
import QuickPromise 1.0 // It muse use QuickPromise v1.0.7
Window {
visible: true
width: 640
height: 480
title: qsTr("Hello World")
import QtQuick 2.0
import QuickPromise 1.0
Item {
id: item;
width: 640
height: 480
@leif81
leif81 / nuget.pri
Last active October 31, 2018 10:05
Poor man's way of adding NuGet packages to your QMake project
# Automatically adds all nuget packages to project file
NUGET_REPOSITORY_PATH = packages
NUGET_PACKAGES = $$system(dir $${NUGET_REPOSITORY_PATH} /B)
for (NUGET_PACKAGE, NUGET_PACKAGES) {
INCLUDEPATH += $$PWD/$${NUGET_REPOSITORY_PATH}/$${NUGET_PACKAGE}/build/native/include
CONFIG(debug, debug | release) {
LIBS += $$PWD/$${NUGET_REPOSITORY_PATH}/$${NUGET_PACKAGE}/build/native/lib/x64/v120/Debug/*.lib
} else {
LIBS += $$PWD/$${NUGET_REPOSITORY_PATH}/$${NUGET_PACKAGE}/build/native/lib/x64/v120/Release/*.lib
@mculp
mculp / voices.txt
Created December 3, 2014 00:14
List of voices available by the `say` command on OS X
Agnes en_US # Isn't it nice to have a computer that will talk to you?
Albert en_US # I have a frog in my throat. No, I mean a real frog!
Alex en_US # Most people recognize me by my voice.
Alice it_IT # Salve, mi chiamo Alice e sono una voce italiana.
Alva sv_SE # Hej, jag heter Alva. Jag är en svensk röst.
Amelie fr_CA # Bonjour, je m’appelle Amelie. Je suis une voix canadienne.
Anna de_DE # Hallo, ich heiße Anna und ich bin eine deutsche Stimme.
Bad News en_US # The light you see at the end of the tunnel is the headlamp of a fast approaching train.
Bahh en_US # Do not pull the wool over my eyes.
Bells en_US # Time flies when you are having fun.
@stuart11n
stuart11n / gist:9628955
Created March 18, 2014 20:34
rename git branch locally and remotely
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote
@adamawolf
adamawolf / Apple_mobile_device_types.txt
Last active December 11, 2025 16:30
List of Apple's mobile device codes types a.k.a. machine ids (e.g. `iPhone1,1`, `Watch1,1`, etc.) and their matching product names
i386 : iPhone Simulator
x86_64 : iPhone Simulator
arm64 : iPhone Simulator
iPhone1,1 : iPhone
iPhone1,2 : iPhone 3G
iPhone2,1 : iPhone 3GS
iPhone3,1 : iPhone 4
iPhone3,2 : iPhone 4 GSM Rev A
iPhone3,3 : iPhone 4 CDMA
iPhone4,1 : iPhone 4S
@Jaybles
Jaybles / UIDeviceHardware.h
Created October 28, 2011 19:33
UIDeviceHardware - Determine iOS device being used
//
// UIDeviceHardware.h
//
// Used to determine EXACT version of device software is running on.
#import <Foundation/Foundation.h>
@interface UIDeviceHardware : NSObject
- (NSString *) platform;