This file contains hidden or 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
//more info on https://stackoverflow.com/questions/24215117/how-to-recognize-swipe-in-all-4-directions | |
class BaseViewController: UIViewController { | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
let swipeRight = UISwipeGestureRecognizer(target: self, action: #selector(swiped)) | |
swipeRight.direction = UISwipeGestureRecognizerDirection.right | |
self.view.addGestureRecognizer(swipeRight) | |
let swipeLeft = UISwipeGestureRecognizer(target: self, action: #selector(swiped)) | |
swipeLeft.direction = UISwipeGestureRecognizerDirection.left |
This file contains hidden or 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 UIShowHideTextField: UnderlinedTextField { | |
let rightButton = UIButton(type: .custom) | |
required init?(coder aDecoder: NSCoder) { | |
super.init(coder: aDecoder) | |
commonInit() | |
} | |
required override init(frame: CGRect) { |
This file contains hidden or 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 UIShowHideTextField: UnderlinedTextField { | |
let rightButton = UIButton(type: .custom) | |
required init?(coder aDecoder: NSCoder) { | |
super.init(coder: aDecoder) | |
commonInit() | |
} | |
required override init(frame: CGRect) { |
This file contains hidden or 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 stable|kernel | |
// | |
// 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 so, subject to the following conditions: |
This file contains hidden or 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
@echo off | |
rem batch file which starts video recording | |
for /f "skip=1" %%x in ('wmic os get localdatetime') do if not defined MyDate set MyDate=%%x | |
rem echo %MyDate% | |
set today=%MyDate:~0,4%-%MyDate:~4,2%-%MyDate:~6,2% | |
set time=%MyDate:~8,2%-%MyDate:~10,2% | |
set filename=%today%_%time%.mp4 | |
echo %today% |
This file contains hidden or 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 | |
#slice mp3 file to 30 sec or less starting from the passed begginning | |
if [ "$#" -eq 2 ] && [ -n "$1" ] | |
then | |
DURATION=30 | |
ffmpeg -ss $2 -i "$1" -t $DURATION -acodec copy "$1.output.mp3" | |
else | |
echo | |
echo |
This file contains hidden or 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
AT Austria | |
BE Belgium | |
BG Bulgaria | |
HR Croatia (Hrvatska) | |
CZ Czech Republic | |
DK Denmark | |
FI Finland | |
FR France | |
DE Germany | |
GB Great Britain (UK) |
This file contains hidden or 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
#target Illustrator | |
// script.name = exportLayersAsCSS_PNGs.jsx; | |
// script.description = mimics the Save for Web, export images as CSS Layers (images only); | |
// script.requirements = an open document; tested with CS5 on Windows. | |
// script.parent = carlos canto // 05/24/13; All rights reseved | |
// script.elegant = false; | |
/** |
This file contains hidden or 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
<inputsourcedef> | |
<name>MY_BULGARIAN_PHONETIC</name> | |
<inputsourceid_prefix>com.apple.keylayout.Bulgarian-Phonetic</inputsourceid_prefix> | |
</inputsourcedef> | |
<item> | |
<name>Bulgarian Phonetic map 'ч' to ± </name> | |
<appendix>Bulgarian Phonetic map 'ч' from '`' to ±. This is valid when you get used with US layout and then switch to UK</appendix> | |
<identifier>private.bulgarina.phonetic</identifier> | |
<inputsource_only><MY_BULGARIAN_PHONETIC<name /></MY_BULGARIAN_PHONETIC></inputsource_only> |
This file contains hidden or 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
ln -s /usr/local/lib/node_modules/nodewebkit/nodewebkit/node-webkit.app/Contents/MacOS/node-webkit /usr/local/bin/nw |