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
-- TODO update start_time | |
drop table if exists test_current cascade; | |
create table test_current( | |
-- TODO - store lsn instead of dates? | |
-- flashback columns | |
start_date abstime not null default now(), | |
stop_date abstime not null default 'infinity', | |
-- user columns |
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
/* | |
Monkey-patches Backbone in so way that every model method logs its invocation | |
*/ | |
var mdl = Backbone.Model; | |
var ext = Backbone.Model.extend; | |
Backbone.Model.extend = function(attributes, options) { | |
for(var attr in attributes){ | |
if(attributes.hasOwnProperty(attr) && typeof(attributes[attr]) == 'function'){ | |
(function(func){ |
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 SimpleRegex | |
def parse(s) | |
@s = s | |
@s_idx = 0 | |
parsetree = parse_alternation [nil] | |
@states = [] | |
build_NFA parsetree | |
end | |
def matches(string) |
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
#~/.vimrc | |
set number | |
set tabstop=4 | |
set shiftwidth=4 | |
set expandtab | |
inoremap jj <Esc> | |
set hidden | |
set noswapfile | |
set autoindent |
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
syntax on | |
"screen magic - fix screen in oxs terminal | |
" http://stackoverflow.com/questions/14689925/vim-background-with-gnu-screen | |
set t_ut= | |
autocmd FileType text setlocal cc=1000 | |
autocmd FileType make setlocal noexpandtab | |
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
" -------------------- | |
" Alt tab over buffers | |
" -------------------- | |
"Stack of recently visited buffers | |
let g:alttab_buffer_stack = [] | |
"Number of consequently pressed alttab | |
let g:alttab_streak_length = 0 |
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
include = (mixins...) -> | |
to: (clazz)-> | |
result = class extends clazz | |
for mxn in mixins | |
for own k,v of mxn(clazz) | |
result::[k] = v | |
result | |
# This is mixin. It can access methods of the class it is mixed to | |
TestMixin = (target) -> |
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
drop table if exists user_course cascade; | |
drop table if exists users cascade; | |
drop table if exists courses cascade; | |
create table users(id serial,data text, primary key(id)); | |
insert into users(data) select lpad('',100,md5(id::text)) | |
from generate_series(1,1000000) t(id); | |
create table courses(id serial,data text,primary key(id)); | |
insert into courses(data) select lpad('',100,md5(id::text)) |
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
#!/usr/bin/env rdmd | |
// implementation of this function http://underscorejs.org/#debounce | |
// in D programming language (http://dlang.org) | |
import std.stdio; | |
import std.datetime; | |
void test(double a){ | |
writeln("Invoked debounced func with ", a); |
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
Тестовое задание: Frontend Web Developer | |
Надо реализовать веб-страницу для просмотра картинок из Flickr Public Feed. | |
Программный интерфейс Flick Public Feed описан тут: | |
https://www.flickr.com/services/feeds/docs/photos_public | |
Страница представляет из себя список фотографий с датой создания, названием и | |
списком тегов. |
OlderNewer