Skip to content

Instantly share code, notes, and snippets.

View delqn's full-sized avatar
👓
Reviewing your code...

Delyan Raychev delqn

👓
Reviewing your code...
View GitHub Profile
@delqn
delqn / on_stateful_code.txt
Created March 8, 2016 21:08 — forked from josteink/on_stateful_code.txt
On why stateful code is bad
On why stateful code is bad
===========================
STUDENT: Sir, can I ask a question?
TEACHER: Yes!
STUDENT: How do you put an elephant inside a fridge?
TEACHER: I don't know.
STUDENT: It's easy, you just open the fridge and put it in. I have another question!
TEACHER: Ok, ask.
STUDENT: How to put a donkey inside the fridge?
@delqn
delqn / beautiful_idiomatic_python.md
Created March 22, 2016 19:02 — 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]:
@delqn
delqn / gist:d3d172aefa4d3e6098d8215bb3451358
Created May 3, 2016 10:31 — forked from sgergely/gist:3793166
Midnight Commander Keyboard Shortcuts for Mac OSX
----- Esc -----
Quick change directory: Esc + c
Quick change directory history: Esc + c and then Esc + h
Quick change directory previous entry: Esc + c and then Esc + p
Command line history: Esc + h
Command line previous command: Esc + p
View change: Esc + t (each time you do this shortcut a new directory view will appear)
Print current working directory in command line: Esc + a
Switch between background command line and MC: Ctrl + o
Search/Go to directory in active panel: Esc + s / Ctrl + s then start typing directory name
@delqn
delqn / postgres_queries_and_commands.sql
Created March 10, 2017 08:00 — forked from rgreenjr/postgres_queries_and_commands.sql
Useful PostgreSQL Queries and Commands
-- show running queries (pre 9.2)
SELECT procpid, age(query_start, clock_timestamp()), usename, current_query
FROM pg_stat_activity
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%'
ORDER BY query_start desc;
-- show running queries (9.2)
SELECT pid, age(query_start, clock_timestamp()), usename, query
FROM pg_stat_activity
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'
// Modified from: http://www.labnol.org/internet/gmail-auto-purge/27605/
// Labels to support
// Delete after 15 days
// Delete after 30 days
// Delete after 90 days
var days = [15,30,90];
function Intialize() {
return;
@delqn
delqn / eds1.yaml
Last active August 16, 2019 20:44 — forked from salrashid123/eds1.yaml
eds1
- name: listener_0
address:
socket_address: { address: 0.0.0.0, port_value: 10000 }
filter_chains:
- filters:
- name: envoy.http_connection_manager
config:
stat_prefix: ingress_http
...
...
@delqn
delqn / installing_cuda_on_azure_nc_tesla_k80_ubuntu.md
Created August 25, 2019 16:03 — forked from bzamecnik/installing_cuda_on_azure_nc_tesla_k80_ubuntu.md
Installing NVIDIA CUDA on Azure NC with Tesla K80 and Ubuntu 16.04
@delqn
delqn / far-Manager hotkey
Created October 25, 2019 02:58 — forked from ezhov-da/far-Manager hotkey
far manager hotkey
==> https://lifehacker.ru/2013/05/16/15-poleznyx-funkcij-far-manager/
CTRL + 1..9 - отображение файлов в панели
ALT + стрелка влева/вправо - промотать длинные названия файлов
CTRL + F3..F11 - режимы сортировки
CTRL + F12 - список сортировок
F3 на папке - размер папки
ALT + F7 - посик файлов/по файлу
ALT + F1/F2 - панели
F5 - копирование на временную панель
@delqn
delqn / twittermute.txt
Created January 26, 2020 20:03 — forked from IanColdwater/twittermute.txt
Here are some terms to mute on Twitter to clean your timeline up a bit.
Mute these words in your settings here: https://twitter.com/settings/muted_keywords
ActivityTweet
generic_activity_highlights
generic_activity_momentsbreaking
RankedOrganicTweet
suggest_activity
suggest_activity_feed
suggest_activity_highlights
suggest_activity_tweet