Skip to content

Instantly share code, notes, and snippets.

Working from home

Miron miron

Working from home
View GitHub Profile
russjones /
Last active Feb 11, 2021
A script to demonstrate Teleport Enhanced Session Recording.
set -euo pipefail
if [[ $EUID -ne 0 ]]; then
echo "--> Please run this script as root or sudo."
exit 1
awesomebytes /
Created Mar 16, 2016
Save iPython session to a python file as code

Save an iPython session commands/code to a file

You must use the magic method %save:

In [1]: %save?
Type:       Magic function
String Form:<bound method of <IPython.core.magics.code.CodeMagics object at 0x7fb5d25bb1d0>>
Namespace:  IPython internal
File:       /usr/lib/python2.7/dist-packages/IPython/core/magics/
ywangd /
Last active Apr 10, 2020
Proof-of-Concept Client for Pythonista-Script-Index
Basic client for Pythonista Script Index (
See also:
import platform
import sys
import os
import urllib2
import json
View custom.js
// add this to <profile>/static/custom/custom.js to load vim keybindings:
$.getScript("/static/components/codemirror/keymap/vim.js", function() {
if (! IPython.Cell) return;
IPython.Cell.options_default.cm_config.keyMap = "vim";
anonymous /
Created Mar 26, 2013
import urllib
import tarfile
import shutil
import console
import os
class Installer(object):
name = None
version = None
firstLetter = None
View README.rst

Markdown and reStructuredText

GitHub supports several lightweight markup languages for documentation; the most popular ones (generally, not just at GitHub) are Markdown and reStructuredText. Markdown is sometimes considered easier to use, and is often preferred when the purpose is simply to generate HTML. On the other hand, reStructuredText is more extensible and powerful, with native support (not just embedded HTML) for tables, as well as things like automatic generation of tables of contents.

silverkors /
Created Nov 27, 2012
Useful filemanager for Pythonista, move files, delete and create files and directories
# -*- coding: utf-8 -*-
import os, sys, editor, shutil
from glob import glob
from scene import *
from time import time
from copy import deepcopy
from PIL import Image, ImageDraw, ImageFont
pudquick /
Last active Nov 15, 2020
Advanced shell for Pythonista
import os, cmd, sys, re, glob, os.path, shutil, zipfile, tarfile, gzip
# Credits
# The python code here was written by pudquick@github
# License
# This code is released under a standard MIT license.
pudquick /
Created Nov 20, 2012
pipista - pip module (for installing other modules) for Pythonista
import os, os.path, sys, urllib2, requests
class PyPiError(Exception):
def __init__(self, value):
self.value = value
def __str__(self):
return repr(self.value)
def _chunk_report(bytes_so_far, chunk_size, total_size):
if (total_size != None):
# Example for sending an email with an attached image using smtplib
# IMPORTANT: You need to enter your email login in the main() function.
# The example is prepared for GMail, but other providers
# should be possible by changing the mail server.
import smtplib
from email.mime.base import MIMEBase
from email.mime.multipart import MIMEMultipart
from email import encoders