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
import UIKit | |
public protocol KeyboardChangeDelegate { | |
func doKeyboardAnimateTo(toValue: CGFloat) | |
} | |
open class KeyboardChangeViewController: UIViewController { | |
override open func viewWillAppear(_ animated: Bool) { |
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
protected static void setCursorDrawableColor(EditText editText, int color) { | |
try { | |
Field fCursorDrawableRes = TextView.class.getDeclaredField("mCursorDrawableRes"); | |
fCursorDrawableRes.setAccessible(true); | |
int mCursorDrawableRes = fCursorDrawableRes.getInt(editText); | |
Field fEditor = TextView.class.getDeclaredField("mEditor"); | |
fEditor.setAccessible(true); | |
Object editor = fEditor.get(editText); | |
Class<?> clazz = editor.getClass(); | |
Field fCursorDrawable = clazz.getDeclaredField("mCursorDrawable"); |
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
// | |
// Threading.swift | |
// | |
import Foundation | |
private let priority = DISPATCH_QUEUE_PRIORITY_DEFAULT | |
func async(closure: () -> ()) { | |
dispatch_async(dispatch_get_global_queue(priority, 0), closure) | |
} |
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
# Mac files | |
.DS_Store | |
# Xcode | |
build/ | |
*.pbxuser | |
!default.pbxuser | |
*.mode1v3 | |
!default.mode1v3 | |
*.mode2v3 |
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
- (void)viewWillAppear:(BOOL)animated | |
{ | |
[super viewWillAppear:animated]; | |
[[NSNotificationCenter defaultCenter] addObserver:self | |
selector:@selector(keyboardWillChange:) | |
name:UIKeyboardWillChangeFrameNotification | |
object:nil]; | |
} | |
- (void)viewWillDisappear:(BOOL)animated |
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
[mysqld] | |
bind-address = 127.0.0.1 | |
skip-name-resolve | |
default_storage_engine = InnoDB | |
innodb_buffer_pool_size = 256M | |
innodb_log_buffer_size = 8M | |
innodb_file_per_table = 1 | |
innodb_open_files = 400 | |
innodb_io_capacity = 400 | |
innodb_flush_method = O_DIRECT |
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
<?php | |
class Box | |
{ | |
private $_private_data; | |
private $_changed_keys = array(); | |
public function __construct(Array $data) | |
{ | |
$this->_private_data = $data; |
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
set nocp noswapfile | |
syn on | |
set ai bs=indent,eol,start et sm is ic scs ruler | |
set ts=2 sts=2 sw=2 | |
set guioptions-=T | |
set mouse= | |
set number | |
autocmd FileType php set ts=4 sts=4 sw=4 |
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
description "start and stop play framework" | |
version "1.0" | |
author "Joseph J. Piché" | |
start on runlevel [2345] | |
stop on runlevel [06] | |
env USER=site | |
env GROUP=nginx | |
env PLAY_HOME="/home/site/appname" |
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
# remap prefix to Control + a | |
set -g prefix C-a | |
unbind C-b | |
bind C-a send-prefix | |
# force a reload of the config file | |
unbind r | |
bind r source-file ~/.tmux.conf | |
# quick pane cycling |