Skip to content

Instantly share code, notes, and snippets.

@canabady
canabady / devtools.py
Created December 3, 2019 15:03 — forked from hellricer/devtools.py
ELinks hooks providing a framework for manipulating DOM
import os
import re
import subprocess
from bs4 import BeautifulSoup
import rules
def replacer(url, html):
new = html
reload(rules)
@canabady
canabady / import_issues_from_github_to_taiga.ruby
Created December 19, 2017 09:53 — forked from roalcantara/import_issues_from_github_to_taiga.ruby
Importing issues from github to taiga via API
require 'json'
require 'rest-client'
puts 'Creating User Stories from github issutes.. STARTED!'
#getting github's token: https://help.github.com/articles/creating-an-access-token-for-command-line-use
github_token = "token foo"
#github params
github = {:url => 'https://api.github.com/repos/foo/foo/issues', :token => github_token}
@canabady
canabady / vimtips.txt
Created December 12, 2017 06:14 — forked from kenorb/vimtips.txt
Vim Tips
__BEGIN__
*vimtips.txt* For Vim version 7.3.
------------------------------------------------------------------------------
" new items marked [N] , corrected items marked [C]
" *best-searching*
/joe/e : cursor set to End of match
3/joe/e+1 : find 3rd joe cursor set to End of match plus 1 [C]
/joe/s-2 : cursor set to Start of match minus 2
/joe/+3 : find joe move cursor 3 lines down
/^joe.*fred.*bill/ : find joe AND fred AND Bill (Joe at start of line)
@canabady
canabady / Test.py
Created November 17, 2017 14:29 — forked from tuxmartin/Test.py
Python ORM example (Python + SQLAlchemy + SQlite/MySQL)
from sqlalchemy.ext.declarative import declarative_base
#from sqlalchemy import *
#from sqlalchemy.orm import *
# Pro entity v podadresari. Podaresar *musi* obsahovat prazdny soubor __init__.py !
#from entity.User import User
'''
Zavislosti:
# apt-get install python-sqlalchemy
MPlayer play files recursively in a directory.
I wanted to have my files played in alphabetical order and only avi files (since a couple .srt subtitle files were in there…), so I came up with this :
mplayer -playlist <(find "$PWD" -name "*.avi" -type f | sort)
@canabady
canabady / tmux.md
Created July 5, 2017 05:05 — forked from Bekbolatov/tmux.md
Clean tmux cheat-sheet

Clean tmux cheat-sheet

By resources

sessions

list-sessions        ls         -- List sessions managed by server
new-session          new        -- Create a new session
@canabady
canabady / duptools-gdrive.sh
Created January 1, 2017 12:06 — forked from vibragiel/duptools-gdrive.sh
An example on how to use duplicity to perform encrypted incremental backups on Google Drive. Changes over tileo's original script: Google Drive instead of S3 as backend storage. Zenity dialogs to ask for credentials. IGNORE variable to exclude a list of directories from the backup. Verbosity raised to level 8. Activated asynchronous uploads.
#!/bin/bash
# directories to be included, space separated
SOURCE="/home/chewie /etc"
# directories to be excluded, space separated
IGNORE="/home/chewie/Downloads /home/chewie/Steam"
DRIVE_FOLDER="duplicity-backup"
LOGFILE=/home/chewie/duplicity.log
# set email to receive a backup report
EMAIL=""