Skip to content

Instantly share code, notes, and snippets.

View dcrystalj's full-sized avatar

Tomaz dcrystalj

View GitHub Profile
### Sample Settings
# aliases
# in this example you can open extensions page by the command ':ext'
# and Chrome's option page by the command ':option'
alias ext TabOpenNew chrome://extensions/
alias option TabOpenNew chrome://settings/browser
alias downloads TabOpenNew chrome://downloads
alias history TabOpenNew chrome://history
v=(
"https://fast.wistia.com/embed/medias/s9wjrade3.m3u8 2-intro"
"https://fast.wistia.com/embed/medias/hu7ykwiqh.m3u8?start_position=1408 2.1-adding-dependencies"
"https://fast.wistia.com/embed/medias/gigpykg5t.m3u8 2.2-module-mirrors"
"https://fast.wistia.com/embed/medias/ult4p3810.m3u8 2.3-checksum-database"
"https://fast.wistia.com/embed/medias/kbfxk63kh.m3u8?start_position=327 2.4-vendoring"
"https://fast.wistia.com/embed/medias/gglksai2r.m3u8 2.5-mvs-algorithm"
)
for i in $v
WITH city AS (
SELECT user_id, name, moved_on,
row_number() over (partition by user_id order by moved_on desc) city_freshness
FROM location
),
latest_location AS (SELECT * FROM city where city_freshness=1)
SELECT
"user".id,
CREATE DATABASE subquery
\c subquery
CREATE TABLE IF NOT EXISTS "user" (
id INT PRIMARY KEY,
name VARCHAR (50) NOT NULL
);
CREATE TABLE IF NOT EXISTS "location" (
CREATE SCHEMA subquery;
USE subquery;
CREATE TABLE IF NOT EXISTS "user" (
id INT,
name VARCHAR (50)
);
CREATE TABLE IF NOT EXISTS "location" (
id INT,
SELECT
"user".id,
"user".name,
(
SELECT l.name
FROM location l
WHERE location.user_id=l.user_id
ORDER BY l.moved_on DESC
LIMIT 1
) current_location,
@dcrystalj
dcrystalj / startup.bat
Created December 12, 2013 11:12
windows conEmu startup aliases
doskey subl="C:\Program Files\Sublime Text 2\sublime_text.exe" $*
doskey ls=ls $1 --color
doskey ll=ls -la --color
doskey sbl = sublime $*
doskey sshs = ssh tom@188.230.237.133
doskey oocd = openocd-x64-0.6.1 -f .\stm32f4discovery.cfg
doskey oocd7 = openocd-x64-0.7.0 -f .\stm32f4discovery.cfg
doskey sshkey = type C:\Users\dcrystalj\.ssh\id_rsa.pub | clip & echo "ssh key in clipboard"
:: Git
@dcrystalj
dcrystalj / .fonts.conf
Created January 7, 2016 23:08 — forked from odony/.fonts.conf
Updated version of the fonts.conf file mentioned in http://www.binarytides.com/gorgeous-looking-fonts-ubuntu-linux/ in order to get rid of most of the fontconfig warnings (mostly the "Having multiple values in <test> isn't supported and may not work as expected")
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<!--
Documented at
http://linux.die.net/man/5/fonts-conf
To check font mapping run the command at terminal
$ fc-match 'helvetica Neue'
@dcrystalj
dcrystalj / promise queue
Created April 25, 2019 15:09
simple promise queue framework
export const PromiseQueue = function() {
let defered = Promise.resolve();
return {
push(fn) {
defered = defered.then(fn, fn);
return this;
}
};
};
@dcrystalj
dcrystalj / testing-vue-tree
Last active November 11, 2018 08:12
Testing vue tree
TESTING VUE:
education
Testing Vue.js Applications https://www.manning.com/books/testing-vue-js-applications
vue-test-utils docs https://vue-test-utils.vuejs.org/
vue docs https://vuejs.org/v2/guide/unit-testing.html
vuex docs https://vuex.vuejs.org/guide/testing.html
testing