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
| ;; pip install jedi-language-server | |
| (use-package lsp-mode | |
| :init | |
| (setq lsp-keymap-prefix "C-c l") | |
| :config | |
| (setq lsp-idle-delay 0.5 | |
| lsp-enable-symbol-highlighting t | |
| lsp-warn-no-matched-clients t) | |
| :hook ((python-mode . lsp) |
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
| ./mplayer.exe -demuxer rawvideo -rawvideo w=640:h=320 $file | |
| # Limiting time with -t 10 for big files, remove for full | |
| ffmpeg -f rawvideo -pixel_format yuv420p -video_size 640x320 -i $file -c:v libx264 -preset slow -crf 22 -t 10 `basename $file`.mp4 |
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
| (sort (directory-files "C:\\") #'string>) |
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
| ;; delete all backup files in the current directory - starting with .# or ending with ~ | |
| ;; use file-expand-wildcards for *~ | |
| (defun get-backup-files () | |
| (append (file-expand-wildcards "./*~") | |
| (file-expand-wildcards "./#*#") | |
| (file-expand-wildcards "./.#*"))) ; | |
| ;; print backup files interactively | |
| (defun print-backup-files () |
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
| (use-package polymode | |
| :config) | |
| (define-innermode poly-js-glsl-innermode | |
| :mode 'glsl-mode | |
| :head-matcher (rx "\`" (+ alnum)) | |
| :tail-matcher (rx (* alnum) "\`") | |
| :head-mode 'host | |
| :tail-mode 'host) |
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
| git clone https://github.com/rbenv/rbenv.git ~/.rbenv | |
| echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc | |
| echo 'eval "$(rbenv init -)"' >> ~/.bashrc | |
| exec $SHELL | |
| git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build | |
| echo 'export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"' >> ~/.bashrc | |
| exec $SHELL |
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 asdasd-popup-describe-function () | |
| (interactive) | |
| (popup-tip (documentation (symbol-at-point)) :around t)) | |
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
| ;; I prepend functions defined myself with asdasd-* to fuzzy search them then - keep forgetting what I've already developed :) | |
| (defun asdasd-var-value () | |
| (interactive) | |
| (pp (symbol-value (car (read-from-string (thing-at-point 'symbol)))))) | |
| (global-set-key (kbd "C-c C-v") 'asdasd-var-value) |
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
| # sender | |
| # you can find device name via `pactl list short sources`: | |
| ffmpeg -f pulse -i "alsa_output.pci-0000_00_1f.3.analog-stereo.monitor" -ac 2 -acodec pcm_u8 -ar 48000 -f u8 "udp://10.0.0.8:18181" | |
| # on reciever does: | |
| ffplay.exe -nodisp -ac 2 -acodec pcm_u8 -ar 48000 -analyzeduration 0 -probesize 32 -f u8 -i udp://0.0.0.0:18181?listen=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
| import time | |
| time.strftime('%H:%M:%S', time.gmtime(120)) |
NewerOlder