This file contains hidden or 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
# replace in all xml files | |
find . -name "*.xml" | xargs sed -i 's/reg_exp/replace/g' |
This file contains hidden or 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
Defaults:nova !requiretty | |
Cmnd_Alias NOVACMDS = /bin/aoe-stat, \ | |
/bin/chmod, \ | |
/bin/chmod /var/lib/nova/tmp/*/root/.ssh, \ | |
/bin/chown, \ | |
/bin/chown /var/lib/nova/tmp/*/root/.ssh, \ | |
/bin/dd, \ | |
/bin/kill, \ | |
/bin/mkdir, \ | |
/bin/mount, \ |
This file contains hidden or 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
rem ------------------------------------------------------------------------------- | |
rem this file controls the error level returned by the tool robocopy in order to | |
rem be usable in a custom build step of Visual Studio | |
rem ------------------------------------------------------------------------------- | |
robocopy.exe /A-:R /NP /NJH /NJS /NDL /NFL /NS /NC %* | |
rem if errorlevel 16 echo Robocopy Exit Status: ***FATAL ERROR*** & exit /b 1 | |
rem if errorlevel 15 echo Robocopy Exit Status: FAIL MISM XTRA COPY & exit /b 1 | |
rem if errorlevel 14 echo Robocopy Exit Status: FAIL MISM XTRA & exit /b 1 |
This file contains hidden or 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
;; Make emacs open all files in last emacs session. | |
;; Taken from ergoemacs, credits go to ergoemacs authors. | |
;; This functionality is provided by desktop-save-mode | |
;; (“feature” name: “desktop”). | |
;; | |
;; The mode is not on by default in emacs 23.1, and has a lot options. | |
;; The following is init settings for the mode for ErgoEmacs. | |
;; Goal: have emacs always auto open the set of opened files in last session, | |
;; even if emacs crashed in last session or the OS crashed in last session. |
This file contains hidden or 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
export EDITOR='emacsclient -t -n -a ""' | |
alias ec='emacsclient -c -n -a ""' | |
alias et='emacsclient -t -a ""' | |
ecs() { emacsclient -c -n -a emacs "/sudo::$*" } | |
ets() { emacsclient -t -a emacs "/sudo::$*" } |
This file contains hidden or 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
;; evil-emacs-state is annoying, the following function and hook automatically | |
;; switch back to evil-normal-state whenever the evil-emacs-state is entered. | |
;; It allows a more consistent navigation experience among all mode maps. | |
;; To enter special commands of custom mode maps, just enter the insert mode :-) | |
(defun evil-emacs-state-2-evil-normal-state () | |
(evil-normal-state) | |
(remove-hook 'post-command-hook 'evil-emacs-state-2-evil-normal-state)) | |
(add-hook 'evil-emacs-state-entry-hook | |
(lambda () | |
(add-hook 'post-command-hook 'evil-emacs-state-2-evil-normal-state))) |
This file contains hidden or 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
;; adapted from https://groups.google.com/d/topic/mu-discuss/ZXB72TR5GL0/discussion | |
(defun mu4e-msgv-action-view-in-browser (msg) | |
"View the body of the message in a web browser." | |
(interactive) | |
(let ((html (mu4e-msg-field (mu4e-message-at-point t) :body-html)) | |
(tmpfile (format "%s/%d.html" temporary-file-directory (random)))) | |
(unless html (error "No html part for this message")) | |
(with-temp-file tmpfile | |
(insert | |
"<html>" |
This file contains hidden or 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
;; insert one or several line below without changing current evil state | |
(defun evil-insert-line-below (count) | |
"Insert one of several lines below the current point's line without changing | |
the current state and point position." | |
(interactive "p") | |
(save-excursion | |
(evil-save-state (evil-open-below count)))) | |
;; insert one or several line above without changing current evil state | |
(defun evil-insert-line-above (count) |
This file contains hidden or 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
# Always launch a ranger session | |
if [[ $RANGER == "" ]]; then | |
export RANGER=1 | |
ranger | |
fi |
This file contains hidden or 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
(require 'popwin) | |
(setq display-buffer-function 'popwin:display-buffer) | |
(push '("^\*helm .+\*$" :regexp t) popwin:special-display-config) | |
(push '("^\*helm-.+\*$" :regexp t) popwin:special-display-config) |
OlderNewer