Skip to content

Instantly share code, notes, and snippets.

View Uznick's full-sized avatar

Pavel Shvedov Uznick

View GitHub Profile
#!/usr/bin/env python
USAGE = '''
Incremental backup program
Usage: python "prog_name" destination_dir path1/source1 ... pathN/sourceN'
Copied result will be in the destination_dir/DATE_TIME/source1 ... destination_dir/DATE_TIME/sourceN'
Also there will be created files pathN/sourceN/hash_dir_info.txt (write access to source is needed now)'
When backup is complete, destination_dir/DATE_TIME/backup.complete is created, with timestamp info.

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"
@Uznick
Uznick / tmux-cheatsheet.markdown
Created April 4, 2016 08:35 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
INFO 2018-08-14 20:35:11,077 /home/velobike/.virtualenvs/velobike-web/local/lib/python2.7/site-packages/velobike/apps/push/tasks.py line: 205 RENTAL_START. Customer 269, Departure from: 0443, full data: {'departure_date': u'2018-08-14 19:34:19', 'rental_start_id': 3722731, 'departure_station_id': u'0443', 'type': 'rental_start', 'bike_id': u'6054'}
INFO 2018-08-14 20:35:11,487 /home/velobike/.virtualenvs/velobike-web/local/lib/python2.7/site-packages/velobike/apps/push/tasks.py line: 212 RENTAL_START. Customer 269, Departure from: 0443, Results: {'multicast_ids': [5925824794390587342], 'canonical_ids': 0, 'success': 1, 'topic_message_id': None, 'results': [{u'message_id': u'0:1534264495410986%8f0b71cf8f0b71cf'}], 'failure': 0}
INFO 2018-08-14 20:38:05,246 /home/velobike/.virtualenvs/velobike-web/local/lib/python2.7/site-packages/velobike/apps/push/tasks.py line: 306 RENTAL_END. Customer 269, Departure to: 0443, full data: {'return_slot_number': None, 'rental_start_id': 3722731, 'rental_id': u'0623204a-180c-4c
@Uznick
Uznick / GIF-Screencast-OSX.md
Created September 21, 2018 15:55 — forked from dergachev/GIF-Screencast-OSX.md
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@Uznick
Uznick / debug_requests.py
Created January 25, 2021 11:54 — forked from Daenyth/debug_requests.py
Enable debug logging for python requests
import requests
import logging
import httplib
# Debug logging
httplib.HTTPConnection.debuglevel = 1
logging.basicConfig()
logging.getLogger().setLevel(logging.DEBUG)
req_log = logging.getLogger('requests.packages.urllib3')
req_log.setLevel(logging.DEBUG)