_____/\\\______________________________________________________
__/\\\\\\\\\\\____/\\\\\__/\\\\\____/\\\____/\\\__/\\\____/\\\_
_\////\\\////___/\\\///\\\\\///\\\_\/\\\___\/\\\_\///\\\/\\\/__
____\/\\\______\/\\\_\//\\\__\/\\\_\/\\\___\/\\\___\///\\\/____
____\/\\\_/\\__\/\\\__\/\\\__\/\\\_\/\\\___\/\\\____/\\\/\\\___
____\//\\\\\___\/\\\__\/\\\__\/\\\_\//\\\\\\\\\___/\\\/\///\\\_
_____\/////____\///___\///___\///___\/////////___\///____\///__
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
""" | |
Pre-commit hook for git written in Python. | |
Check if there is any migration number used more than one in each | |
migrations folder of South or Django >= 1.7. | |
You can install this pre-hook by executing the command: | |
ln -s ./git-pre-commit-hook .git/hooks/pre-commit | |
chmod +x .git/hooks/pre-commit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Cache sudo password | |
sudo -v | |
# Get latest OpenSSL 1.0.2 version from https://openssl.org/source/ | |
# v1.1.0 seems to have removed SSLv2/3 support | |
openssl_version=1.0.2k | |
# Install build dependencies |
-
Create a one-off Heroku app (or use an existing one) for the compilation.
-
Set the app to use the Python buildpack with OpenSSL 1.0.2g
heroku buildpacks:set https://github.com/yuvadm/heroku-buildpack-python-openssl-1.0.2.git -a myapp
-
Run a one-off dyno to do the compilation:
Here is the looks and feel of your terminal once the tutorial has been applied on your system:
Using Homebrew:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mkdir ~/vim | |
cd ~/vim | |
# Staically linked vim version compiled from https://github.com/ericpruitt/static-vim | |
# Compiled on Jul 20 2017 | |
curl 'https://s3.amazonaws.com/bengoa/vim-static.tar.gz' | tar -xz | |
export VIMRUNTIME="$HOME/vim/runtime" | |
export PATH="$HOME/vim:$PATH" | |
cd - |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.db.models import Aggregate, FloatField | |
class Median(Aggregate): | |
function = 'PERCENTILE_CONT' | |
name = 'median' | |
output_field = FloatField() | |
template = '%(function)s(0.5) WITHIN GROUP (ORDER BY %(expressions)s)' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# path on linux /usr/share/dbeaver/dbeaver.ini | |
# path on macos /Applications/DBeaverEE.app/Contents/Eclipse/dbeaver.ini | |
-vm | |
/usr/bin/java | |
-startup | |
plugins/org.eclipse.equinox.launcher_1.5.600.v20191014-2022.jar | |
--launcher.library | |
plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.1100.v20190907-0426 | |
-vmargs | |
-javaagent:/home/tunknown/.apps/dbeaver/dbeaver-agent.jar |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Data Structures | |
- Stacks | |
- Queues | |
- Linked lists | |
- Graphs | |
- Trees | |
- Tries | |
Concepts | |
- Big O Notation |
This script makes it easier to copy Gnome settings and extensions from one pc to the other. It supports python>=3.5.
To use it, download it, then run python3 migrate_gnome_settings.py --export-settings
to create a tar.gz file with all the settings.
Then, on your new system, copy the script and the gzip to your user's home directory and run python3 migrate_gnome_settings.py --import-settings
.
For now, the script migrates: