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
# set build number only for release (Product|Archive) | |
if [ "$CONFIGURATION" == "Release" ]; then | |
# get GIT revision number | |
buildNumber=`git rev-list --count HEAD` | |
# if not git, then get SVN revision number | |
if [[ -z "$buildNumber" ]]; then | |
buildNumber=`svn info | grep "Revision" | awk '{print $2}'` | |
fi |
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 | |
# Get espeak PID if it is running | |
PID=`pgrep -x espeak` | |
echo Process ID: $PID | |
if [ -z $PID ]; | |
then | |
# Not runnning |
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
# paster this into the end of your ~/.bashrc file | |
# 256 color by default for X | |
if [ -n "$DISPLAY" -a "$TERM" == "xterm" ]; then | |
export TERM=xterm-256color | |
fi |
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
[Desktop Entry] | |
Name=Viber | |
Comment=Viber VoIP and messenger | |
Exec=env XDG_CURRENT_DESKTOP=Unity /opt/viber/Viber | |
Icon=/usr/share/pixmaps/viber.png | |
Terminal=false | |
Type=Application | |
Encoding=UTF-8 | |
Categories=Network;Application; | |
Path= |
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
- (void)validateRenewablePurchases:(NSArray<NSString *> *)products callback:(void (^)(NSDictionary *values, NSString *errorMessage))callback | |
{ | |
// Sending into background | |
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_BACKGROUND, 0), ^{ @autoreleasepool{ | |
void (^callbackOnMainThread)(NSDictionary *values, NSString *errorMessage) = ^(NSDictionary *values, NSString *errorMessage) { | |
dispatch_async(dispatch_get_main_queue(), ^{ | |
callback(values, errorMessage); | |
}); | |
}; |
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 | |
dbus-launch dropbox start -i |
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/sh | |
PS3='Type the number of your choice (1, 2 or 3) and press Enter: ' | |
options=("List Devices" "Run Simulator" "Quit") | |
select opt in "${options[@]}" | |
do | |
case $opt in | |
"List Devices") | |
xcrun simctl list devices | |
echo "\033[1m\n\nCopy the UDID in parentheses of the device which you want run and launch option 2 (Run Simulator)\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
import UIKit | |
open class ZoomImageView: UIScrollView, UIScrollViewDelegate { | |
// MARK: Publics | |
public enum ZoomMode { | |
case fit | |
case fill |
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 protocol DynamicContentTransitinable { | |
func layoutContentOnscreen() | |
func layoutContentOffscreen() | |
} | |
public class DynamicContentTransitioner: NSObject, UIViewControllerAnimatedTransitioning { | |
var animationDuration: TimeInterval |
OlderNewer