Skip to content

Instantly share code, notes, and snippets.

View roustem's full-sized avatar

Roustem Karimov roustem

View GitHub Profile
@roustem
roustem / TypeScript.sublime-settings
Last active August 29, 2015 14:20
Packages/User/TypeScript.sublime-settings
{
"translate_spaces_to_tabs": true,
"translate_tabs_to_spaces": false,
"use_tab_stops": true
}
@roustem
roustem / gist:3664276aed9fb7e8fc4d
Last active August 29, 2015 14:20
Sublime Text Key Bindings
[
{
"keys" : ["cmd+>"],
"command" : "nextBuildError"
},
{
"keys" : ["cmd+<"],
"command" : "prevBuildError"
},
{
"always_show_minimap_viewport": true,
"binary_file_patterns":
[
"*.d.ts"
],
"color_scheme": "Packages/Tomorrow Color Schemes/Tomorrow.tmTheme",
"detect_indentation": false,
"draw_minimap_border": true,
"folder_exclude_patterns":
@roustem
roustem / vm-setup.sh
Last active August 29, 2015 14:16 — forked from nf/vm-setup.sh
#!/bin/bash -e
echo '
PATH=$HOME/go/bin:$PATH
export GOPATH=$HOME
export CDPATH=.:$HOME/src/golang.org/x:$HOME/go/src:$HOME/src/github.com:$HOME/src/github.com/nf:$HOME/src/github.com/adg
export EDITOR=vim
' >> ~/.profile
sudo apt-get update
#include <stdio.h> // for fprintf, stderr, perror
#include <stdlib.h> // for exit() and EXIT_FAILURE
#include <errno.h> // for errno
#include <fts.h> // for fts
int main(int argc, const char *argv[]) {
char * const paths[] = {"/tmp", NULL};
FTS *tree = fts_open(paths, FTS_COMFOLLOW|FTS_NOCHDIR, NULL);
if (!tree) {
//
// NSObject+Blocks.h
// Filemator
//
// Created by Zachary Waldowski on 4/12/11.
// Copyright 2011 Dizzy Technology. All rights reserved.
//
@interface NSObject (Blocks)
@roustem
roustem / userstyle.css
Created May 31, 2013 16:27
userstyle.css for Flowdock (~/Library/Application Support/Flowdock/userstyle.css)
@media screen {
* {
font-family: "Helvetica Neue";
font-weight: 500;
}
#inbox * {
font-family: "Helvetica Neue";
font-size: 9pt;
line-height:12pt;
@roustem
roustem / gist:2138065
Created March 20, 2012 16:42
PBKDF2 based on OpenSSL implementation
static int PKCS5_PBKDF2_HMAC(CCHmacAlgorithm algorithm, int digestLength, const char *pass, int passlen,
const unsigned char *salt, int saltlen, int iter,
int keylen, unsigned char *out)
{
unsigned char digtmp[digestLength], *p, itmp[4];
int cplen, j, k, tkeylen;
unsigned long i = 1;
CCHmacContext ctx;
@roustem
roustem / gist:2022128
Created March 12, 2012 14:04 — forked from rcw3/gist:2018059
Self-contained WWDC Status Checker Hack
#!/bin/bash
#
# add to crontab
# */5 * * * * /Users/YOURNAME/bin/wwdc >/dev/null
#
# URL="http://www.cnn.com"
URL="http://developer.apple.com/wwdc/"
@roustem
roustem / run_onepassword_beta.rb
Created January 19, 2012 19:20
run_onepassword_beta.rb
#!/usr/bin/env ruby
BETA_URL = "http://i.agilebits.com/dist/1P/mas/1PasswordBeta.app.zip"
local_timestamp_filename = File.expand_path("~/.onepassword_beta_timestamp")
last_modified_local = ""
if File.exists?("/Applications/1PasswordBeta.app")
File.open(local_timestamp_filename, "r") { |f| last_modified_local = f.read() } rescue nil
end