Skip to content

Instantly share code, notes, and snippets.

View daGrevis's full-sized avatar
⌨️
Keyboard operator

Raitis Stengrevics daGrevis

⌨️
Keyboard operator
View GitHub Profile
FROM postgres:10-alpine
RUN apk add --no-cache git make gcc g++ curl-dev && \
git clone --depth 1 https://github.com/zombodb/zombodb.git && \
cd zombodb && \
make install && \
cd .. && \
rm -rf zombodb && \
apk del git make gcc g++
CREATE EXTENSION zombodb;
CREATE TABLE "ircMessages" (
"id" uuid PRIMARY KEY,
"serverId" character varying NOT NULL,
"from" character varying NOT NULL,
"to" character varying NOT NULL,
"kind" character varying NOT NULL,
"createdAt" timestamptz NOT NULL,
"text" zdb.fulltext NOT NULL,
from multiprocessing import Process
from math import ceil
from time import sleep
from random import random
WORKERS = 4
URLS = [
"amazon.com",
"ebay.com",
set statusline=
" Path and line number.
set statusline+=%f\:%l
" Modified and readonly flags.
set statusline+=\ %m%r
" Right align.
set statusline+=%=
" Current tag.
set statusline+=%{tagbar#currenttag('[%s]\ ','\ ','f')}
" Filetype.
from time import sleep
from sys import argv
from pymouse import PyMouse
try:
seconds = int(argv[1])
except IndexError:
exit("Specify seconds!")
### Keybase proof
I hereby claim:
* I am daGrevis on github.
* I am dagrevis (https://keybase.io/dagrevis) on keybase.
* I have a public key whose fingerprint is 2177 F4D9 3FF0 44D7 9C06 B98D C9D2 E5ED 8C4E A01A
To claim this, I am signing this object:
@daGrevis
daGrevis / counter2.cljs
Created June 29, 2014 10:44
Counter #2 /w ClojureScript and Om
(ns counter.core
(:require [om.core :as om :include-macros true]
[om.dom :as dom :include-macros true]))
(enable-console-print!)
(def app-state (atom {:count 2}))
(defn square
([x] (* x x))
@daGrevis
daGrevis / counter.cljs
Last active August 29, 2015 14:02
Counter w/ ClojureScript and Om
(ns counter.core
(:require [om.core :as om :include-macros true]
[om.dom :as dom :include-macros true]))
(enable-console-print!)
(def app-state (atom {:count 42}))
(defn dec-button [counter owner]
(reify
@daGrevis
daGrevis / gist:11156962
Last active August 29, 2015 14:00
Decent HN (Stylish CSS)
@namespace url(http://www.w3.org/1999/xhtml);
@-moz-document domain("news.ycombinator.com") {
td[bgcolor="#ff6600"] {
background-color: #efefef !important;
border-radius: 4px;
}
a[href="news"] {
@daGrevis
daGrevis / url.regex
Last active August 29, 2015 13:57
Will match 99% URLs
/
(?:(\w+)\:?\/\/)? # Protocol
([^\/?]+) # Optional subdomains, domain and TLD
\/? # Traling slash
([^\?]*) # Path
([^\#]*) # Query
(\#?.*) # Fragment
/xu
# http://regex101.com/r/oV5tN9