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 / HTMLPrettify.sublime-settings
Last active August 26, 2016 13:50
Sublime Text 3 Configuration
{
"node_path": {
"linux": "/usr/bin/node",
},
"format_on_save": false,
"format_selection_only": true,
"print_diagnostics": true
@Lh4cKg
Lh4cKg / .bashrc
Last active March 13, 2016 07:33
remove completely python3.3 from linux, usage: sh delpy.sh or add .bashrc command alias
# add remove command in .bashrc
# remove python
alias remove-python="sudo rm -rf /usr/local/lib/python3.3 && sudo rm -rf /usr/local/lib/libpython3.3m.a && sudo rm -rf /usr/local/lib/pkgconfig/python-3.3.pc && sudo rm -rf /usr/local/bin/python3.3 && sudo rm -rf /usr/local/bin/python3.3m && sudo rm -rf /usr/local/bin/python3.3m-config"
# remove pip
alias remove-pypi="sudo python3.3 -m pip uninstall pip"
# or
alias remove-pip="sudo rm -rf /usr/lib/python3.3/site-packages/pip && sudo rm -rf /usr/lib/python3.3/site-packages/pip-8.1.0.dist-info"
@Lh4cKg
Lh4cKg / install.conf
Created February 29, 2016 19:29
arch linux install configuration
1. select keymap
2. disk partitions
3. configure mirror list
4. base system install
5. configure fstab
6. configure hostname
7. configure locale | configure timezone
8. configure hardclock
9. configure network
10. configure pacman
@Lh4cKg
Lh4cKg / Sublime Text 3 License key
Last active October 13, 2016 14:46
Sublime text 3 license key v3103 and installation script
—— BEGIN LICENSE ——
Michael Barnes
Single User License
EA7E-821385
8A353C41 872A0D5C DF9B2950 AFF6F667
C458EA6D 8EA3C286 98D1D650 131A97AB
AA919AEC EF20E143 B361B1E7 4C8B7F04
B085E65E 2F5F5360 8489D422 FB8FC1AA
93F6323C FD7F7544 3F39C318 D95E6480
FCCC7561 8A4A1741 68FA4223 ADCEDE07
@Lh4cKg
Lh4cKg / bobp-python.md
Created February 14, 2016 06:09 — forked from sloria/bobp-python.md
A "Best of the Best Practices" (BOBP) guide to developing in Python.

The Best of the Best Practices (BOBP) Guide for Python

A "Best of the Best Practices" (BOBP) guide to developing in Python.

In General

Values

  • "Build tools for others that you want to be built for you." - Kenneth Reitz
  • "Simplicity is alway better than functionality." - Pieter Hintjens
@Lh4cKg
Lh4cKg / spin.py
Created January 20, 2016 19:02 — forked from arindampradhan/spin.py
Spinners for python | python
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
import signal
from os import system
### MENU ###
# Here are all the elements you can import
# Box elements
@Lh4cKg
Lh4cKg / migrator.sh
Created November 19, 2015 16:59 — forked from vigneshwaranr/migrator.sh
Script to convert SQLITE dumps into PostgreSQL compatible dumps
#! /bin/sh
usage_error () {
echo 'Usage: sh migrator.sh <path to sqlite_to_postgres.py> <path to sqlite db file> <an empty dir to output dump files>'
echo
echo 'Example:'
echo '>sh migrator.sh sqlite_to_postgres.py ~/reviewboard.db /tmp/dumps'
echo
echo 'Tested on:'
echo 'Python 2.7.3'
@Lh4cKg
Lh4cKg / task_update_json.html
Created November 15, 2015 20:13 — forked from goldhand/task_update_json.html
Updates any Task model without reloading using ajax
#views.py
class TaskUpdateView(generic.UpdateView):
model = Task
form_class = TaskForm
@json_view
def dispatch(self, *args, **kwargs):
return super(TaskUpdateView, self).dispatch(*args, **kwargs)
#!/bin/bash
# This script will migrate schema and data from a SQLite3 database to PostgreSQL.
# Schema translation based on http://stackoverflow.com/a/4581921/1303625.
# Some column types are not handled (e.g blobs).
#
# See also:
# - http://stackoverflow.com/questions/4581727/convert-sqlite-sql-dump-file-to-postgresql
# - https://gist.github.com/bittner/7368128
@Lh4cKg
Lh4cKg / sqlite2pg.sh
Created November 11, 2015 12:32 — forked from eclubb/sqlite2pg.sh
Script to import SQLite3 database into PostgreSQL
#!/bin/sh
# This script will migrate schema and data from a SQLite3 database to PostgreSQL.
# Schema translation based on http://stackoverflow.com/a/4581921/1303625.
# Some column types are not handled (e.g blobs).
SQLITE_DB_PATH=$1
PG_DB_NAME=$2
PG_USER_NAME=$3