Skip to content

Instantly share code, notes, and snippets.

View kolszewskieu's full-sized avatar

Krzysztof Olszewski kolszewskieu

View GitHub Profile
python3.7 pipenv
'pip' has no attribute 'get_installed_distributions'
solution:
python -m pip install pip==9.0.3
sleep $(echo 3600*4.3 | bc) && pkill smplayer && systemctl suspend -i
@kolszewskieu
kolszewskieu / rsync_backup.py
Created August 9, 2018 11:32 — forked from seebk/rsync_backup.py
Python rsync backup script
#!/usr/bin/python3
#######################################################
# Python rsync Backup script
# Sebastian Kraft, 24.06.2013
#
#######################################################
#-----------------------------------------------------
# Config
@kolszewskieu
kolszewskieu / tutorial.md
Created July 20, 2018 17:14 — forked from swalkinshaw/tutorial.md
Designing a GraphQL API

Tutorial: Designing a GraphQL API

This tutorial was created by Shopify for internal purposes. We've created a public version of it since we think it's useful to anyone creating a GraphQL API.

It's based on lessons learned from creating and evolving production schemas at Shopify over almost 3 years. The tutorial has evolved and will continue to change in the future so nothing is set in stone.

@kolszewskieu
kolszewskieu / gist:2e2af6fb296e560013d7939bfe9fa82b
Created July 20, 2018 07:06 — forked from aht/gist:5097702
ansible postgres playbook with PostGIS on Ubuntu, setting up postgis_template and creating databases from this postgis_template
# Based on https://github.com/ansible/ansible/blob/devel/examples/playbooks/postgresql.yml
---
- hosts: postgres.vm
sudo: yes
tasks:
- name: ensure latest postgres & postgis packages are latest
action: apt pkg=$item update_cache=yes state=latest
with_items:
@kolszewskieu
kolszewskieu / fedora-install-nodejs.sh
Created May 10, 2017 07:13 — forked from trajakovic/fedora-install-nodejs.sh
Install node.js on fedora (23+).(v5.10.1)
#!/usr/bin/env bash
func_check_for_root() {
if [ ! $( id -u ) -eq 0 ]; then
echo "ERROR: $0 Must be run as root, Script terminating" ;exit 7
fi
}
func_check_for_root
#SETUP PARAMS
@kolszewskieu
kolszewskieu / fedora-install-nodejs.sh
Created May 10, 2017 07:13 — forked from bnielsen1965/fedora-install-nodejs.sh
Install node.js on fedora (23+).(v5.10.1)
#!/usr/bin/env bash
#
# NodeJS Installer based on https://gist.github.com/trajakovic/ad9f91776dea3b495db0
#
# Added version option and distinct commands for install, uninstall, path setting,
# and removepath setting.
#
# https://gist.github.com/bnielsen1965
#
# THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
@kolszewskieu
kolszewskieu / node watches
Created May 8, 2017 12:00
Error: watch /home/.../node_modules/node-notifier/ ENOSPC
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
sudo bash -c 'echo 524288 > /proc/sys/fs/inotify/max_user_watches'
By default, the style-loader inlines the compiled css into your bundle, which added to the head of the page with the output file e.g. bundle.js. Using the extract-text-webpack-plugin you can remove the compiled css from the bundle, and export it to a separate file.
loaders: [{
test: /\.scss$/,
loader: ExtractTextPlugin.extract(
"style",
"css!sass")
}]
One liner to stop / remove all of Docker containers:
docker stop $(docker ps -a -q)
docker rm $(docker ps -a -q)