Skip to content

Instantly share code, notes, and snippets.

@yegappan
yegappan / VimScriptForPythonDevelopers.MD
Last active Sep 6, 2021
Vim script for Python Developers
View VimScriptForPythonDevelopers.MD

Vim Script for Python Developers

A guide to Vim Script development for Python developers. Sample code for the various expressions, statements, functions and programming constructs is shown in both Python and Vim Script. This is not intended to be a tutorial for developing Vim scripts. It is assumed that the reader is familiar with Python programming.

For an introduction to Vim Script development, refer to usr_41.txt, eval.txt and Learn Vimscript the Hard Way

For a guide similar to this one for JavaScript developers, refer to Vim Script for the JavaScripter

This guide only describes the programming constructs that are present in both Python and Vim. The constructs that are unique to Vim (e.g. autocommands, key-mapping,

View pypi.md

Most downloaded projects

SELECT
  file.project,
  COUNT(*) as total_downloads,
FROM
  TABLE_DATE_RANGE(
    [the-psf:pypi.downloads],
    TIMESTAMP("20160114"),
@eliangcs
eliangcs / shortcuts.sh
Last active Jan 18, 2016
Shell shortcuts
View shortcuts.sh
# Clear local merged branches
function clearbranches(){
cur_branch=`git rev-parse --abbrev-ref HEAD`
if [[ "$cur_branch" == "master" ]]; then
git branch --merged | grep -v "\*" | xargs -n 1 git branch -d
else
echo "Not on master branch!"
fi
}
@eliangcs
eliangcs / ipython_startup.py
Created Dec 1, 2014
Common imports for IPython startup
View ipython_startup.py
# ~/.ipython/profile_default/startup/00_common.py
import base64
import codecs
import cPickle as pickle
import cStringIO as StringIO
import csv
import hashlib
import importlib
import json
import math
@eliangcs
eliangcs / vim_cheatsheet.md
Last active Aug 29, 2015
My Vim cheatsheet
View vim_cheatsheet.md

Insert

  • a: after cursor
  • i: before cursor
  • A: after line
  • I: before line
  • o: add a new line below
  • O: add a new line above

Select

@eliangcs
eliangcs / pyenv+virtualenv.md
Last active Sep 15, 2021
Cheatsheet: pyenv, virtualenvwrapper, and pip
View pyenv+virtualenv.md

Cheatsheet: pyenv, virtualenvwrapper, and pip

Installation (for Mac OS)

Install pyenv with brew

brew update
brew install pyenv
@eliangcs
eliangcs / linode-security.md
Last active Jul 23, 2021
Basic security setup for a brand new Linode
View linode-security.md

Basic Security Setup for a Brand New Linode

Why

When you start a clean Linode, it isn't secured in the following aspects:

  • Allows root SSH login
  • Uses password authentication on SSH
  • Doesn't have a firewall
@TSiege
TSiege / The Technical Interview Cheat Sheet.md
Last active Sep 15, 2021
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.
View The Technical Interview Cheat Sheet.md

ANNOUNCEMENT

I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!






\

@eliangcs
eliangcs / secure-django-admin.rst
Last active Jun 8, 2021
Secure Django admin with self-signed SSL client certificate in Nginx.
View secure-django-admin.rst
@FZambia
FZambia / sub.py
Last active Oct 21, 2019
tornado's Subprocess class usage example. Minimal Tornado's version required - 3.1
View sub.py
from __future__ import print_function
from tornado.gen import Task, Return, coroutine
import tornado.process
from tornado.ioloop import IOLoop
import subprocess
import time
STREAM = tornado.process.Subprocess.STREAM