Skip to content

Instantly share code, notes, and snippets.

View Lh4cKg's full-sized avatar
🐍
Working

Lasha Gogua Lh4cKg

🐍
Working
View GitHub Profile
@Lh4cKg
Lh4cKg / pyreq.sh
Last active June 25, 2016 12:30
requirements python installation on ubuntu / debian
# ubutnu/debian Python installation requirements
sudo apt -y install build-essential checkinstall
sudo apt -y install libreadline-gplv2-dev libncursesw5-dev \
libsqlite3-dev tk-dev libgdbm-dev libc6-dev
sudo apt -y install libjpeg-dev libpng-dev
sudo apt -y install zlib1g-dev libbz2-dev
sudo apt -y install krb5-multidev
sudo apt -y install openssl libssl-dev
sudo apt -y install libffi-dev
sudo apt -y install libgmp-dev
@Lh4cKg
Lh4cKg / beautiful_idiomatic_python.md
Created May 30, 2016 20:19 — forked from JeffPaine/beautiful_idiomatic_python.md
Transforming Code into Beautiful, Idiomatic Python: notes from Raymond Hettinger's talk at pycon US 2013. The code examples and direct quotes are all from Raymond's talk. I've reproduced them here for my own edification and the hopes that others will find them as handy as I have!

Transforming Code into Beautiful, Idiomatic Python

Notes from Raymond Hettinger's talk at pycon US 2013 video, slides.

The code examples and direct quotes are all from Raymond's talk. I've reproduced them here for my own edification and the hopes that others will find them as handy as I have!

Looping over a range of numbers

for i in [0, 1, 2, 3, 4, 5]:
@Lh4cKg
Lh4cKg / kill python processes
Last active December 7, 2018 12:29
kill all python process
[innotec@innotec ~]$ ps aux | grep 'manage.py' | awk '{print $2}' | xargs kill -9
# add alias in .bashrc
# kill python processes
alias ppsk="pkill -f manage.py"
# or
[innotec@innotec ~]$ killall python
# or
alias pk="ps aux | grep 'manage.py' | awk '{print $2}' | xargs kill -9"
@Lh4cKg
Lh4cKg / cmd.sh
Created April 27, 2016 08:58
Fedora 24/Centos 7 set locale LANG configuration in terminal output non-ASCII character
[innotec@innotec ~]$ export LANG=en_US.UTF-8
[innotec@innotec ~]$ sudo localectl set-locale LANG=en_US.UTF-8
[innotec@innotec ~]$ locale
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
@Lh4cKg
Lh4cKg / teamviewer
Last active May 10, 2021 13:41
Howto Fix TeamViewer Daemon is not running | start teamviewerd on Fedora 24
[innotec@innotec ~]$ locate teamviewerd
/etc/init/teamviewerd.conf
/opt/teamviewer8/logfiles/install_teamviewerd.log
/opt/teamviewer8/tv_bin/teamviewerd
/opt/teamviewer8/tv_bin/script/teamviewerd.conf
/opt/teamviewer8/tv_bin/script/teamviewerd.service
/opt/teamviewer8/tv_bin/script/teamviewerd.sysv
/opt/teamviewer8/tv_bin/script/teamviewerdMint.conf
[innotec@innotec ~]$ sudo /opt/teamviewer/tv_bin/teamviewerd start
[innotec@innotec ~]$ teamviewer
@Lh4cKg
Lh4cKg / subl-shortcuts
Last active April 9, 2016 17:07
Sublime Text 3 Keyboard Shortcuts
# Sublime Text 3 Keyboard Shortcuts
## Text
CTRL-L: Select Entire Line
CTRL-D: Select Word
CTRL-SHIFT-A: Select text inside HTML Tags
CTRL-SHIFT-J: Select code that's indented to same level
CTRL-] / CTRL-[: Increase Indent / Decrease Indent
CTRL-SHIFT-V: Paste matching indentation
CTRL-CTRL-UP / CTRL-CTRL-DOWN: Move line up / Move Line down
@Lh4cKg
Lh4cKg / multi-git.md
Created April 9, 2016 16:47 — forked from rosswd/multi-git-win.md
Setting up a Github and Bitbucket account on the same computer.

Setting up github and bitbucket on the same computer

Github will be the main account and bitbucket the secondary.

Create SSH Keys

ssh-keygen -t rsa -C "github email"

Enter passphrase when prompted. If you see an option to save the passphrase in your keychain, do it for an easier life.

@Lh4cKg
Lh4cKg / install.sh
Last active May 21, 2021 17:39
Install and Configuration Python/Django/Virtualenv/Postgres/Nginx/uWSGI On CentOS 7
#!/bin/sh
# -*- MAINTAINER -*- Lasha Gogua [email protected]
# -*- RUN -*- $ bash install.sh
# system update and install epel package
yum install epel-release
# or
wget http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm
snake="""
.-=-. .--.
__ .' '. / " )
_ .' '. / .-. \ / .-'\
( \ / .-. \ / / \ \ / / ^
\ `-` / \ `-' / \ `-` /
\---` '.____.' `.____.'
2016
"""
@Lh4cKg
Lh4cKg / tmux-cheatsheet.markdown
Created March 31, 2016 18:20 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname