Skip to content

Instantly share code, notes, and snippets.

View keybase.md

Keybase proof

I hereby claim:

  • I am vhbit on github.
  • I am vhbit (https://keybase.io/vhbit) on keybase.
  • I have a public key ASBCUJTmPCSHYxdsnUehqMnaR3k0Jy5L_sgERTWx_qYOlQo

To claim this, I am signing this object:

@vhbit
vhbit / KUtils.h
Last active Aug 29, 2015 — forked from ishaq/KUtils.h
iOS versioning from DVCS
View KUtils.h
#import <Foundation/Foundation.h>
@interface KUtils : NSObject
+ (NSString *)getVersionInfo;
@end
View gist:99df5a6b0fc0b01733f9
[28.10.2009, 21:13:44] Yurii Zotiev: хотел тебя попросить научить меня жить:)
[28.10.2009, 21:13:52] Yurii Zotiev: но не знаю с чего начать:)
[28.10.2009, 21:14:53] Valerii Hiora: ну ты начни с чего-нибудь :)
disclaimer: если вдруг перестану отвечать - это значит заказчик позвонил, у нас в 9-ть должен был быть звонок, но он чего-то опаздывает :)
[28.10.2009, 21:15:09] Yurii Zotiev: ща:)
[28.10.2009, 21:15:14] Yurii Zotiev: как начну:)
[28.10.2009, 21:18:46] Valerii Hiora: давай-давай :)
[28.10.2009, 21:26:58] Yurii Zotiev: Короче даже не знаю с чего начать
[28.10.2009, 21:27:07] Yurii Zotiev: Есть одна девушка
[28.10.2009, 21:27:09] Yurii Zotiev: Оля
@vhbit
vhbit / gist:7de43ef054966792ff7e
Created Oct 8, 2014
OpenSsl for iPhone best build
View gist:7de43ef054966792ff7e
https://github.com/x2on/OpenSSL-for-iPhone/pull/37
View osx-for-hackers.sh
#!/bin/sh
# Some things taken from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Set the colours you can use
black='\033[0;30m'
white='\033[0;37m'
red='\033[0;31m'
green='\033[0;32m'
@vhbit
vhbit / error_handling.rs
Created Jun 11, 2014
Comment on error handling example
View error_handling.rs
fn result_from_option<T, E>(a: Option<T>, f: || -> E) -> Result<T, E> {
match a {
Some(a) => Ok(a),
_ => Err(f())
}
}
fn slurp_file(file: &Path) -> Result<Vec<LabelPixel>, SlurpError> {
use std::{result, option};
let file: File = try!(File::open(file).map_err(|e| FailedIo(e)));
View NSPredicate2SQL.mm
static NSString *SQLNullValueString = [[NSString alloc] initWithString:@"NULL"];
/* Prototypes */
NSString *SQLWhereClauseForPredictate(NSPredicate *predicate);
NSString *SQLExpressionForNSExpression(NSExpression *expression);
/* Implementation */
@vhbit
vhbit / README.md
Last active Aug 29, 2015
Russian input method for Dvorak keyboard on Mac
View README.md

Put ru-mac-dv.el into $SHARE_DIR/emacs/$version/lisp/leim/quail

If Emacs is installed from Homebrew, SHARE_DIR will look like HOMEBREW_DIR/share, which in most cases is either /usr/local/share or ~/homebrew/share

For activation, put the following snippet into your custom.el:

(register-input-method 
   "russian-md" "Russian-Mac Dvorak" 'quail-use-package
   "RU-MD" "ЙЦУКЕН Russian Mac Dvorak layout"
   "quail/ru-mac-dv")
@vhbit
vhbit / cmd.sh
Last active Dec 17, 2015
Pallet plugin debug
View cmd.sh
lein pallet lift differ.pallet/fullstack
# -or-
lein pallet up
@vhbit
vhbit / gist:5167804
Created Mar 15, 2013
libxml & pkg-config on OS X under brew
View gist:5167804
from: https://github.com/moovweb/gokogiri/issues/14#issuecomment-12736547
Homebrew's libxml-2.0 2.8.0 has pkgconfig support. For anyone coming here for answers, you only need to do the final steps:
Create symbolic link.
sudo ln -s BREW_PATH/Cellar/libxml2/2.8.0/lib/pkgconfig/libxml-2.0.pc \
BREW_PATH/lib/pkgconfig/libxml-2.0.pc
Check with pkg-config:
You can’t perform that action at this time.