Skip to content

Instantly share code, notes, and snippets.

View dgleba's full-sized avatar
😁
.

dgleba dgleba

😁
.
View GitHub Profile
@dgleba
dgleba / _vue-material-vuetify.markdown
Last active February 8, 2019 04:19
vue material autocomplete won't select, vuetify works, but css is off a little. 2019-02-07
@dgleba
dgleba / _vuetify-autocomplete-dg-works.markdown
Last active February 5, 2019 19:30
vuetify autocomplete dg-works
# FoxUSA/OpenNote Offline Progressive Web App
https://github.com/FoxUSA/OpenNote/blob/master/docs/Install.md
_____________
@dgleba
dgleba / ubuntu-cli-install-android-sdk.sh
Created October 15, 2018 03:33 — forked from zhy0/ubuntu-cli-install-android-sdk.sh
Install Android SDK on headless Ubuntu linux machine via command line, so that you can compile open source Android apps.
#!/bin/bash
# Thanks to https://gist.github.com/wenzhixin/43cf3ce909c24948c6e7
# Execute this script in your home directory. Lines 17 and 21 will prompt you for a y/n
# Install Oracle JDK 8
add-apt-repository ppa:webupd8team/java
apt-get update
apt-get install -y oracle-java8-installer
apt-get install -y unzip make # NDK stuff
@dgleba
dgleba / git-download.sh
Last active October 4, 2018 17:13
Download a folder from a github repo.
#! /bin/bash
#
# from: wget https://raw.githubusercontent.com/ojbc/docker/master/java8-karaf3/files/git-download.sh
# modified by David Gleba 2018-10-04
# rev-7
#
#set -x
if [ $# -ne 1 ]; then
@dgleba
dgleba / add-rsync-to-git-bash.md
Last active August 23, 2021 08:25 — forked from hisplan/add-rsync-to-git-bash.md
Add rsync to git bash for windows
@dgleba
dgleba / 01-venv-tutorial.md
Created September 25, 2018 19:13 — forked from ccaspers/01-venv-tutorial.md
Virtualenv Tutorial

Virtual Environments

A Virtual Environment is a tool to keep the dependencies required by different projects in separate places, by creating virtual Python environments for them. It solves the “Project X depends on version 1.x but, Project Y needs 4.x” dilemma, and keeps your global site-packages directory clean and manageable. - The Hitchhiker’s Guide to Python!

Virtual Environments werden also dazu genutzt um verschiedene Softwareprojekte und ihre Abhängigkeiten voneinander zu isolieren. Ein netter nebeneffekt ist, das Installation aus dem Python Package Index (pip) ohne Administratorrechte erfolgen können, weil die Pakete im Verzeichnis des Virtual Environments installiert werden.

Jedes Virtual Environment hat seine eigenen site-packages sowie pip- und python-Kommandos. Dabei wird der Interpreter nicht jedes neu installiert, sondern über Symlinks verknüpft.

Ein Virtual Environment erzeugen

@dgleba
dgleba / mysql-docker.sh
Created September 4, 2018 19:58 — forked from spalladino/mysql-docker.sh
Backup and restore a mysql database from a running Docker mysql container
# Backup
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql
# Restore
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE
@dgleba
dgleba / Makefile
Created July 26, 2018 02:58 — forked from mpneuried/Makefile
Simple Makefile to build, run, tag and publish a docker containier to AWS-ECR
# import config.
# You can change the default config with `make cnf="config_special.env" build`
cnf ?= config.env
include $(cnf)
export $(shell sed 's/=.*//' $(cnf))
# import deploy config
# You can change the default deploy config with `make cnf="deploy_special.env" release`
dpl ?= deploy.env
include $(dpl)
1. Make folder tree like these
mi_project
├── src
│ ├── midjangoapp
│ ├── manage.py
├── config
│ ├── requirements.pip
│ ├── nginx
│ ├── midjangoapp.conf
├── Dockerfile