Skip to content

Instantly share code, notes, and snippets.

View korulis's full-sized avatar
💭
🏔️

Karolis Blazevicius korulis

💭
🏔️
View GitHub Profile
[alias]
lg1 = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all
lg2 = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)' --all
lg = !"git lg1"
cpb = "!f() { git rev-parse --abbrev-ref HEAD | tr -d '\n' | xclip -selection clipboard; }; f"
wtf = log --graph -p -C1 --follow
# shortcuts fix
gsettings list-recursively | grep "<Control>"
gsettings set org.freedesktop.ibus.panel.emoji hotkey "[]"
# gsettings set org.freedesktop.ibus.panel.emoji unicode-hotkey ['<Control><Shift>u']
# chrome - from webside .deb
# vscode - download .deb with link : https://go.microsoft.com/fwlink/?LinkID=760868
# slack - download .deb from https://slack.com/intl/en-gb/downloads/instructions/ubuntu (https://downloads.slack-edge.com/releases/linux/4.29.149/prod/x64/slack-desktop-4.29.149-amd64.deb)
# viber - download .deb from https://download.cdn.viber.com/cdn/desktop/Linux/viber.deb
@korulis
korulis / docker-entrypoint-core-system-tests.sh
Created December 3, 2019 11:32
initial version for docker entrypoint script to create host.docker.internal and launch dotnet app.
#!/bin/sh
set -e
# Ensure we have the host.docker.internal hostname available to linux as well
fix_linux_internal_host()
{
DOCKER_INTERNAL_HOST="host.docker.internal"
if ! grep $DOCKER_INTERNAL_HOST /etc/hosts > /dev/null ; then
-- number of orders without summary
select count(*)
from cart_order o
left join cart_ordersummary os on os.order_id = o.id
where os.id is null
and o.status = 'CONFIRMED'
-- latest orders without summary
select o.id, o.created_at, os.id as sum_id, c.email, o.widget_version, o.account_slug, o.status
Request URL: http://localhost:5000/orders/
Request Method: GET
Status Code: 200 OK
Remote Address: 127.0.0.1:5000
Referrer Policy: no-referrer-when-downgrade
Access-Control-Allow-Origin: http://localhost:3000
Content-Length: 213
Content-Type: application/json
Date: Sat, 14 Jul 2018 12:11:40 GMT
Server: Werkzeug/0.14.1 Python/3.6.5
cors = CORS(app, resources={r"*": {"origins": "*"}})