Skip to content

Instantly share code, notes, and snippets.

View sebskuse's full-sized avatar

Seb Skuse sebskuse

View GitHub Profile
@sebskuse
sebskuse / hunspell.class.php
Created September 27, 2011 09:21
Hunspell-PHP: A hunspell PHP wrapper
<?php
class hunspell {
private $language = "en_US"; // en_US, ar, etc
private $encoding = "en_US.utf-8";
private $raw;
private $hunspellVersion;
@sebskuse
sebskuse / appstore.php
Created May 21, 2012 15:32
Simple PHP-CLI script to get number of ratings & stars of an app in the AppStore. Takes args from commandline & preset array.
<?php
error_reporting(0);
// Array of appstore ID's to always look up
$idArray = array(
"428243918",
"442713833"
);
$arguments = array_merge($idArray, array_slice($argv, 1) );
@sebskuse
sebskuse / aliases
Created November 24, 2014 09:29
Generate app icon files from a highres source. Put in your bash aliases then call generate_app_icons source.png
function generate_app_icons {
icons=(29 40 50 57 58 72 76 80 87 100 120 114 120 144 152 180)
for i in "${icons[@]}"
do
resize_image $1 $i
done
}
function resize_image {
@sebskuse
sebskuse / Style.swift
Created December 15, 2017 09:30
Allows combining multiple view styles in Swift
struct Style<View: UIView> {
let styles: [(View) -> Void]
init(_ style: @escaping (View) -> Void) {
self.styles = [style]
}
init(_ styles: [(View) -> Void]) {
self.styles = styles