Skip to content

Instantly share code, notes, and snippets.

View karolzlot's full-sized avatar
🏠
Working from home

Karol Zlot karolzlot

🏠
Working from home
View GitHub Profile
# MIT LICENSE
import datetime
import plotly.graph_objs as go
from plotly.subplots import make_subplots
import numpy as np
import dash_core_components as dcc
import dash_html_components as html
import dash
@rudolfschmidt
rudolfschmidt / free-3-letter-domains.sh
Created June 2, 2020 21:04
Check Free 3 Letter Domains
#!/usr/bin/env bash
array=( a b c d e f g h i j k l m n o p q r s t u v w x y z )
for a in "${array[@]}"
do
for b in "${array[@]}"
do
for c in "${array[@]}"
do
@stevecondylios
stevecondylios / resize-image-in-github-issue-github-flavored-markdown.md
Last active July 25, 2024 17:54
How to Resize an Image in a Github Issue (e.g. Github flavored Markdown)

How to Resize an Image in Github README.md (i.e. Github Flavored Markdown)

Percentage:

<img src="https://user-images.githubusercontent.com/16319829/81180309-2b51f000-8fee-11ea-8a78-ddfe8c3412a7.png" width=50% height=50%>

Pixels:

<img src="https://user-images.githubusercontent.com/16319829/81180309-2b51f000-8fee-11ea-8a78-ddfe8c3412a7.png" width="150" height="280">

@lig
lig / commit.py
Created March 30, 2020 09:15
pygit2 create commit simple
import pygit2
repo = pygit2.Repository(path='.')
repo.index.add_all()
repo.index.write()
tree = repo.index.write_tree()
parent, ref = repo.resolve_refish(refish=repo.head.name)
repo.create_commit(
@GavinRay97
GavinRay97 / index.md
Last active April 12, 2024 18:31
Hasura organization permissions

Introduction

This document outlines how to model a common organization-based permission system in Hasura. Let's assume that you have some table structure like the following:

Table Name Columns Foreign Keys
User id, name, email
Organization User id, user_id, organization_id user_id -> user.id, organization_id -> organization.id
Organization id, name
@JacobDB
JacobDB / focus-assist-toggle.ahk
Last active February 13, 2022 12:57
Focus assist toggle with WIN+SHIFT+F
active := false
+#F::
SendInput, {LWin down}b{LWinUp}{Left}
SendInput, {APPSKEY}{Down}{Down}{Enter}
if (active = false) {
SendInput, {Down}{Down}
active := true
} else {
@karolzlot
karolzlot / bwa, samtools, bcftools on WSL.txt
Last active February 23, 2021 07:35
Install bwa, samtools & bcftools on Windows WSL (Ubuntu)
# tested on WSL 2, Ubuntu 18.04 LTS
# needed for bwa & samtools
sudo apt-get install build-essential make libz-dev -y
# needed for samtools
sudo apt-get install cwltool libc-ares2 libhttp-parser2.7.1 libjs-bootstrap nodejs nodejs-doc python python-asn1crypto python-avro python-cachecontrol python-certifi python-cffi-backend python-chardet python-cryptography python-enum34 python-html5lib python-idna python-ipaddress python-isodate python-lockfile python-mistune python-openssl python-pkg-resources python-pyparsing python-rdflib python-rdflib-jsonld python-requests python-ruamel.yaml python-schema-salad python-shellescape python-six python-sparqlwrapper python-typing python-urllib3 python-webencodings -y
sudo apt-get install libncurses5-dev -y
# sudo apt-get remove zlib1g-dev -y
sudo apt-get install zlib1g-dev -y
@pangyuteng
pangyuteng / Dockerfile
Last active April 25, 2024 02:16
docker miniconda ubuntu
#
# ref https://github.com/tebeka/pythonwise/blob/master/docker-miniconda/Dockerfile
#
# miniconda vers: http://repo.continuum.io/miniconda
# sample variations:
# Miniconda3-latest-Linux-armv7l.sh
# Miniconda3-latest-Linux-x86_64.sh
# Miniconda3-py38_4.10.3-Linux-x86_64.sh
# Miniconda3-py37_4.10.3-Linux-x86_64.sh
#
@det-peralta
det-peralta / hassio_jetson_nano.sh
Created May 6, 2019 14:22
Install Hassio on Nvidia Jetson Nano
sudo -i
apt-get install software-properties-common
add-apt-repository universe
apt-get update
apt-get install -y apparmor-utils apt-transport-https avahi-daemon ca-certificates curl dbus jq network-manager socat
#The jetson already has docker installed
#curl -fsSL get.docker.com | sh
curl -sL "https://raw.githubusercontent.com/home-assistant/hassio-installer/master/hassio_install.sh" | bash -s -- -m qemuarm-64
@SeppPenner
SeppPenner / Installing Python 3.7.4 on Raspbian.rst
Last active May 9, 2024 21:52
Installing Python 3.7.4 on Raspbian

Installing Python 3.7.4 on Raspbian

As of July 2018, Raspbian does not yet include the latest Python release, Python 3.7.4. This means we will have to build it ourselves, and here is how to do it.

  1. Install the required build-tools (some might already be installed on your system).