Skip to content

Instantly share code, notes, and snippets.

@ti0ma
ti0ma / my-ys.zsh-theme
Created April 4, 2018 20:10
My oh-my-zsh theme
# Clean, simple, compatible and meaningful.
# Tested on Linux, Unix and Windows under ANSI colors.
# It is recommended to use with a dark background and the font Inconsolata.
# Colors: black, red, green, yellow, *blue, magenta, cyan, and white.
#
# http://ysmood.org/wp/2013/03/my-ys-terminal-theme/
# Mar 2013 ys
# Machine name.
function box_name {

Keybase proof

I hereby claim:

  • I am ti0ma on github.
  • I am ti0ma (https://keybase.io/ti0ma) on keybase.
  • I have a public key whose fingerprint is 827E 9AB0 8683 A393 C09F 0973 314B 36D0 D8D4 DF8C

To claim this, I am signing this object:

@ti0ma
ti0ma / contacts-hackerrank.js
Created September 26, 2016 14:24
Trie solution of Contacts problem in Hackerrank
function find(trie, str) {
str = str.split('');
var node = trie[str[0]];
if(!node) {
return 0;
}
var count = (str.length === 1) ? node._cnt : 0;
for(var i = 1; i < str.length; i++) {
node = node[str[i]];
import time
from datetime import timedelta
class Metrics(object):
def __init__(self, bot):
self.bot = bot
self.start_time = time.time()
self.dust = {'start': None, 'latest': None}
{"answers":["function(console) {\n\tvar names = [\"Ben\", \"Jafar\", \"Matt\", \"Priya\", \"Brian\"],\n\t\tcounter;\n\n\tfor(counter = 0; counter < names.length; counter++) {\n\t\tconsole.log(names[counter]);\n\t}\n}\n\t\t","function(console) {\n\tvar names = [\"Ben\", \"Jafar\", \"Matt\", \"Priya\", \"Brian\"];\n\n\tnames.forEach(function(name) {\n\t\tconsole.log(name);\n\t});\n}\n\t\t","function() {\n\tvar newReleases = [\n\t\t{\n\t\t\t\"id\": 70111470,\n\t\t\t\"title\": \"Die Hard\",\n\t\t\t\"boxart\": \"http://cdn-0.nflximg.com/images/2891/DieHard.jpg\",\n\t\t\t\"uri\": \"http://api.netflix.com/catalog/titles/movies/70111470\",\n\t\t\t\"rating\": [4.0],\n\t\t\t\"bookmark\": []\n\t\t},\n\t\t{\n\t\t\t\"id\": 654356453,\n\t\t\t\"title\": \"Bad Boys\",\n\t\t\t\"boxart\": \"http://cdn-0.nflximg.com/images/2891/BadBoys.jpg\",\n\t\t\t\"uri\": \"http://api.netflix.com/catalog/titles/movies/70111470\",\n\t\t\t\"rating\": [5.0],\n\t\t\t\"bookmark\": [{ id: 432534, time: 65876586 }]\n\t\t},\n\t\t{\n\t\t\t\"id\": 654
@ti0ma
ti0ma / Default.sublime-keymap
Last active August 29, 2015 14:23
Sublime plugins
[
{ "keys": ["ctrl+7"], "command": "toggle_comment", "args": { "block": false } },
{ "keys": ["ctrl+shift+7"], "command": "toggle_comment", "args": { "block": true } },
{ "keys": ["ctrl+alt+up"], "command": "select_lines", "args": {"forward": false} },
{ "keys": ["ctrl+alt+down"], "command": "select_lines", "args": {"forward": true} },
{ "keys": ["alt+m"], "command": "markdown_preview", "args": {"target": "browser", "parser":"markdown"} },
{ "keys": ["alt+d"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete Line.sublime-macro"} },
]