This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; ClipHist4 - ClipBoard History using AutoHotkey | |
;; | |
;; From: | |
;; https://tinyurl.com/cliphist4 | |
;; | |
;; Based on: | |
;; https://www.autohotkey.com/board/topic/87650-clipboard-history-menu-decrementing-numbered-circular-buckets/ | |
;; with customizations and modernization | |
;; | |
;; About ClipHist4: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if [[ -n $EMACS ]]; then | |
# inside emacs | |
echo ".bashrc: inside emacs" | |
alias e='emacsclient -a "" -n "$@"' | |
elif [[ -n $SSH_TTY ]]; then | |
# ssh/remote, use terminal mode | |
alias e='emacsclient -a "" -t "$@"' | |
else | |
# local/gui | |
alias e='emacsclient -a "" -n "$@"' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; .emacs | |
(custom-set-variables | |
;; custom-set-variables was added by Custom. | |
;; If you edit it by hand, you could mess it up, so be careful. | |
;; Your init file should contain only one such instance. | |
;; If there is more than one, they won't work right. | |
'(diff-switches "-u") | |
'(menu-bar-mode -1) | |
'(tool-bar-mode nil)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Added by Package.el. This must come before configurations of | |
;; installed packages. Don't delete this line. If you don't want it, | |
;; just comment it out by adding a semicolon to the start of the line. | |
;; You may delete these explanatory comments. | |
(package-initialize) | |
(custom-set-variables | |
;; custom-set-variables was added by Custom. | |
;; If you edit it by hand, you could mess it up, so be careful. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# with difftool, choose which files to diff | |
git difftool --dir-diff |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# use --global or --system options to specify other configuration locations | |
# -- global is per user, --system is for all users | |
git config status.showUntrackedFiles no | |
# https://chodounsky.net/2013/05/01/compare-files-with-git-diff-tool/ | |
git config color.status.added "cyan normal bold" | |
git config color.status.changed "cyan normal bold" | |
git config color.status.untracked "cyan normal bold" | |
git config color.diff.old "red normal bold" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowProtectedOSFiles -EnableShowFileExtensions -EnableShowFullPathInTitleBar | |
Set-StartScreenOptions -EnableBootToDesktop -EnableDesktopBackgroundOnStart -EnableShowStartOnActiveScreen -EnableShowAppsViewOnStartScreen -EnableSearchEverywhereInAppsView -EnableListDesktopAppsFirst | |
Disable-UAC | |
cinst bitdefenderavfree | |
cinst googlechrome | |
cinst sublimetext3 | |
cinst classic-shell | |
cinst sysinternals |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Console module provide `copen` method for opening interactive python shell in | |
the runtime. | |
http://sys-exit.blogspot.com/2013/12/python-open-interactive-console.html | |
Usage: | |
import console | |
console.copen(globals(), locals()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off & python -x "%~f0" %* & goto :eof | |
# ========================================================== | |
# one way to place python script in a batch file | |
# place python code below (no need for .py file) | |
# ========================================================== | |
import sys | |
print "Hello World!" | |
for i,a in enumerate(sys.argv): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Convert an input source (file, string, or file descriptor) | |
into a generator that provides a line at a time. | |
Online challenges provide input on stdin, but for testing, | |
it can be useful to provide input via a file or a string. | |
This wrapper takes any of these formats and returns an | |
iterator that will provide the input a line at a time. | |
""" | |
def input_from_string(data): |
NewerOlder