Skip to content

Instantly share code, notes, and snippets.

View fotiDim's full-sized avatar

Foti Dim fotiDim

View GitHub Profile
void main() {
final thankYou = ['E','F','C','H','A','R','I','S','T','O'];
final title = ['F','I','L','T','A','T','E'];
final name = ['P','A','P','V','E','T'];
final emoji = '🥳';
print("${thankYou.join()} ${title.join()} ${name.join()}! $emoji");
}
@fotiDim
fotiDim / libjpeg.sh
Last active June 28, 2017 15:08 — forked from dulacp/libjpeg.sh
Download & Compile Libjpeg for iOS (all architectures)
# Builds a Libjpeg framework for the iPhone and the iPhone Simulator.
# Creates a set of universal libraries that can be used on an iPhone and in the
# iPhone simulator. Then creates a pseudo-framework to make using libjpeg in Xcode
# less painful.
#
# To configure the script, define:
# IPHONE_SDKVERSION: iPhone SDK version (e.g. 8.1)
#
# Then go get the source tar.bz of the libjpeg you want to build, shove it in the
# same directory as this script, and run "./libjpeg.sh". Grab a cuppa. And voila.
@fotiDim
fotiDim / SanitizeChangelog.rb
Last active November 2, 2016 14:38
A Ruby method to sanitize a changelog generated from commit messages
#
# Extracts ticket numbers (e.g. #ZLA-132) from a changelog generated from commit messages
#
def sanitize_changelog(changelog,hashtag,project_ID,delimiter)
# Convert text to an array
changelog_array = changelog.split(/\n+/)
# Clear rows that start with #ZLA-000 aka. version bumps
changelog_array.delete_if do |row|
row.start_with?('#ZLA-000')
@fotiDim
fotiDim / gist:d18dd0f0ddb91ee3babc
Last active April 16, 2018 13:14
Using Azure Notification Hubs in Swift
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
// Override point for customization after application launch.
var types: UIUserNotificationType = UIUserNotificationType.Badge |
UIUserNotificationType.Alert |
UIUserNotificationType.Sound
var settings: UIUserNotificationSettings = UIUserNotificationSettings( forTypes: types, categories: nil )
application.registerUserNotificationSettings( settings )
application.registerForRemoteNotifications()
return true
@fotiDim
fotiDim / gist:b4d7d32e5e5775bb26c5
Last active August 29, 2015 14:15
Find all working Spotify genres.
//Set these properties
@property NSMutableArray *genres;
@property int counter;
@property NSMutableArray *workingGenres;
//Set counter to 0
_counter=0
//Populate the "genres" array with the NSStrings of your genres
@fotiDim
fotiDim / contentpush.php
Last active December 11, 2015 07:18
GIST of a Joomla plugin that tries to send APNS push message whenever someone publishes an article
<?php
// no direct access
defined( '_JEXEC' ) or die( 'Restricted access' );
define( 'YOURBASEPATH', dirname(__FILE__) );
require_once YOURBASEPATH . '/push.php';
class plgSystemContentpush extends JPlugin
{