These commands allow you to generate CSRs, Certificates, Private Keys and do other miscellaneous tasks.
Generate a new private key and Certificate Signing Request
openssl req -out CSR.csr -new -newkey rsa:2048 -nodes -keyout privateKey.key
| package main | |
| import ( | |
| "encoding/json" | |
| "fmt" | |
| ) | |
| type Nullable[T any] struct { | |
| val *T | |
| } |
| # create a clean reboot without the windows you don't want to have | |
| # by rebooting your mac (uncheck the reopen windows checkbox in the reboot dialog | |
| # take over this file | |
| sudo chown root ~/Library/Preferences/ByHost/com.apple.loginwindow* | |
| # and prevent further changes (checkbox in reboot dialog doesn't matter) | |
| sudo chmod 000 ~/Library/Preferences/ByHost/com.apple.loginwindow* | |
| # to undo it, simply delete the file. It will be recreated automatically |
| ;; in your init.el | |
| (defun ace/org-export-insert-export-date(&optional backend) | |
| "Searches for %%DATE_EXPORTED%% in the buffer and replaces all occurrences | |
| Just put the keyword somewhere in your org buffer and the time stamp of the | |
| export is inserted in the exported buffer. The original buffer is untouched." | |
| (goto-char (point-min)) | |
| (while (search-forward "%%DATE_EXPORTED%%" nil t) | |
| (replace-match (format-time-string "%0e.%0m.%Y %R")))) |
| git config --global alias.lg "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit" |
| #!/usr/bin/env perl | |
| ## uncolor — remove terminal escape sequences such as color changes | |
| while (<>) { | |
| s/ \e[ #%()*+\-.\/]. | | |
| \e\[ [ -?]* [@-~] | # CSI ... Cmd | |
| \e\] .*? (?:\e\\|[\a\x9c]) | # OSC ... (ST|BEL) | |
| \e[P^_] .*? (?:\e\\|\x9c) | # (DCS|PM|APC) ... ST | |
| \e. //xg; | |
| print; | |
| } |
| // ==UserScript== | |
| // @name Amazon Prevent language switch away from German | |
| // @description Some amazon urls will change your language settings. Only use german versions | |
| // @namespace https://sahlbach.com/misc/greasemonkey/ | |
| // @match https://*.amazon.de/-/*/dp/* | |
| // @exclude https://*.amazon.de/-/de/dp/* | |
| // @run-at document-start | |
| // @version 1 | |
| // @grant none | |
| // @icon https://www.amazon.com/favicon.ico |
emacs --daemon to run in the background.
emacsclient.emacs24 <filename/dirname> to open in terminal
NOTE: "M-m and SPC can be used interchangeably".
C-/C-?M-c
2. Upper Case : M-uM-l| #!/usr/bin/env bash | |
| # Shamelessly taken from http://mjwall.com/blog/2013/10/04/how-i-use-emacs/ | |
| # This script starts emacs daemon if it is not running, opens whatever file | |
| # you pass in and changes the focus to emacs. Without any arguments, it just | |
| # opens the current buffer or *scratch* if nothing else is open. The following | |
| # example will open ~/.bashrc | |
| # ec ~/.bashrc |
| ### editor | |
| export ALTERNATE_EDITOR=emacs | |
| export EDITOR="emacsclient -tc -a emacs" | |
| export VISUAL="emacsclient -c -a emacs" | |
| # emacsclient as difftool | |
| function ediff () { | |
| if [ "X${2}" = "X" ]; then | |
| echo "USAGE: ediff <FILE 1> <FILE 2>" | |
| else | |
| quoted1=${1//\\/\\\\}; quoted1=${quoted1//\"/\\\"} |