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
;; Created: 2021-03-14 13:03:11 | |
;; Time-stamp: <2021-03-27 15:35:47> | |
;; Win+m | |
#m:: | |
SysGet, monitor, Monitor ; get resolution, etc | |
WinGet, winlist, List ; get list of windows | |
Loop % winlist { | |
me := % "ahk_id " winlist%A_Index% |
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
;; Mind your file encoding when saving this. | |
; right alt + [ | |
>!SC01A::Send, å | |
; right alt + ' | |
>!SC028::Send, ä | |
; right alt + ; | |
>!SC027::Send, ö |
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
hardware: | |
cpu: AMD Ryzen 7 1700 | |
mb: Gigabyte AX370-GAMING K3 | |
raid: ST Lab A-590 PCIe SATA 6G 8channel | |
- lspci: SATA controller: ASMedia Technology Inc. ASM1062 Serial ATA Controller (rev 02) | |
problem 1: | |
ata13: SATA link up 6.0 Gbps (SStatus 133 SControl 300) | |
ata13.00: link online but device misclassified | |
ata13: link online but 1 devices misclassified, retrying |
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
; enable options -> player -> title bar -> display full path to use this | |
#IfWinActive ahk_class MPC-BE | |
Delete:: | |
WinGetTitle, filePath ; filename | |
file := RegExReplace(filePath, " - MPC-BE.*", "") ; remove junk | |
Send, {Space} ; pause | |
MsgBox, 4388, , Do you want to delete %file%? | |
IfMsgBox No | |
{ |
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
(defun darrik/remove-background-from-font-locks () | |
"Remove background from font-lock-*." | |
(mapc | |
(lambda (face) | |
(when (string-prefix-p "font-lock-" (symbol-name face)) | |
(set-face-attribute face nil :background nil))) | |
(face-list))) |
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
(defun darrik/package-install-unmark-regexp (pattern) | |
"Unmark packages matching REGEXP from being upgraded." | |
(interactive "sPattern: ") | |
(let* ((_prefix "^\\(I\\|D\\)\\\s+.*") | |
(_re (concat _prefix pattern))) | |
(while (re-search-forward _re nil t) | |
(beginning-of-line) | |
;; (message "%s" "I unmarked something!") | |
(package-menu-mark-unmark))) | |
(message "%s" "Finished unmarking packages.")) |
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
// ==UserScript== | |
// @name Auto expand t.co links on Tweetdeck website | |
// @namespace https://github.com/lgp171188 | |
// @include https://tweetdeck.twitter.com/* | |
// @version 2 | |
// @grant none | |
// ==/UserScript== | |
function expandTwitterShortlinks() { | |
var twitter_shortlinks = document.getElementsByClassName('url-ext'); | |
for (var i = 0; i < twitter_shortlinks.length; i++) { |
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
#!/bin/bash | |
for file in $(/bin/ls *.jpg); do | |
size=$(/bin/ls -l $file | awk '{printf $5}') | |
dusize=$(du --block-size=1 $file | awk '{print $1}') | |
verify=$(echo $size*1.5/1 | bc) | |
if [ $dusize -gt $verify ]; then | |
dusize=$(printf "%'d" $dusize) | |
size=$(printf "%'d" $size) | |
echo "$file has copies>1 ($dusize > $size)" |
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
(defun darrik/org-copy-field () | |
"Copy current field to system clipboard." | |
(interactive) | |
(save-excursion | |
(call-interactively 'org-table-copy-region) | |
(let* ((contents (caar org-table-clip)) | |
(trim1 (replace-regexp-in-string " +" "" contents)) | |
(trim2 (replace-regexp-in-string "^ " "" trim1))) | |
(kill-new trim2)))) |
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
(defun darrik/isrunning-p (argv) | |
"Return `t' if `argv' is running." | |
(or (listp argv) | |
(setq argv (list argv))) | |
(dolist (pid (list-system-processes)) | |
(let* ((pdata (process-attributes pid)) | |
(x (assoc 'comm pdata)) | |
(exe (cdr x))) | |
(when (member exe argv) | |
(return t))))) |
NewerOlder