This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
CLEAR='\033[0m' | |
RED='\033[38;5;160m' | |
ORANGE='\033[38;5;202m' | |
YELLOW='\033[38;5;220m' | |
GREEN='\033[0;32m' | |
BLUE='\033[0;36m' | |
GREY='\033[38;5;237m' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
CLEAR='\033[0m' | |
RED='\033[38;5;160m' | |
ORANGE='\033[38;5;202m' | |
YELLOW='\033[38;5;220m' | |
GREEN='\033[0;32m' | |
BLUE='\033[0;36m' | |
GREY='\033[38;5;237m' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
BASEDIR="$( cd "$(dirname "$0/")" ; pwd -P )" | |
BUILD_DIR="$BASEDIR/Builds" | |
PROJECT_FILE="Butterfly.xcodeproj" | |
PRODUCT_NAME="Butterfly" | |
TARGET_NAME="Butterfly-iOS" | |
CONFIGURATION="Release" | |
CLEAR='\033[0m' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
first_is_earlier() { | |
y1=$(date -jf '%d.%m.%y%y' "$1" +'%Y' 2> /dev/null) | |
y2=$(date -jf '%d.%m.%y%y' "$2" +'%Y' 2> /dev/null) | |
m1=$(date -jf '%d.%m.%y%y' "$1" +'%m' 2> /dev/null) | |
m2=$(date -jf '%d.%m.%y%y' "$2" +'%m' 2> /dev/null) | |
d1=$(date -jf '%d.%m.%y%y' "$1" +'%d' 2> /dev/null) | |
d2=$(date -jf '%d.%m.%y%y' "$2" +'%d' 2> /dev/null) | |
if [ $y2 -gt $y1 ] ; then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
CLEAR='\033[0m' | |
RED='\033[0;31m' | |
function usage() { | |
if [ -n "$1" ]; then | |
echo -e "${RED}👉 $1${CLEAR}\n"; | |
fi | |
echo "Usage: $0 [-n number-of-people] [-s section-id] [-c cache-file]" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// MIT License | |
// | |
// Copyright (c) 2016 Thane Gill <me@thanegill.com> | |
// Copyright (c) 2014-2017 Art.sy, Inc. | |
// | |
// Permission is hereby granted, free of charge, to any person obtaining a copy of | |
// this software and associated documentation files (the "Software"), to deal in | |
// the Software without restriction, including without limitation the rights to | |
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies | |
// of the Software, and to permit persons to whom the Software is furnished to do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <CommonCrypto/CommonCrypto.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This is a heavily altered version of SHA2.swift found in CryptoSwift. | |
// I tried to remove everything that is not about SHA256. | |
// | |
// --========================================================================-- | |
// | |
// SHA2.swift | |
// CryptoSwift | |
// | |
// Created by Marcin Krzyzanowski on 24/08/14. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class AppDelegate: UIResponder, UIApplicationDelegate { | |
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { | |
AppVersion.activateAndSaveCurrentVersion() | |
application.onFirstLaunch { | |
showWelcomeMessage() | |
} | |
application.onUpgrade { (previousVersion, currentVersion) in | |
migrateData(from: previousVersion, to: currentVersion) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
public enum DisplayType { | |
case unknown | |
case iphone4 | |
case iphone5 | |
case iphone6 | |
case iphone6plus | |
static let iphone7 = iphone6 | |
static let iphone7plus = iphone6plus |