Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Alper Alimoglu avatar-lavventura

🎯
Focusing
View GitHub Profile
View zprofile
## History file configuration
[ -z "$HISTFILE" ] && HISTFILE="$HOME/.zsh_history"
[ "$HISTSIZE" -lt 50000 ] && HISTSIZE=50000
[ "$SAVEHIST" -lt 10000 ] && SAVEHIST=10000
## History command configuration
setopt extended_history # record timestamp of command in HISTFILE
setopt hist_expire_dups_first # delete duplicates first when HISTFILE size exceeds HISTSIZE
setopt hist_ignore_dups # ignore duplicated commands history list
setopt hist_ignore_space # ignore commands that start with space
View debug
❯ unset ALTERNATE_EDITOR
❯ echo $ALTERNATE_EDITOR
❯ rm -f /tmp/emacs1002/server
❯ cat /tmp/emacs1002/server
cat: /tmp/emacs1002/server: No such file or directory
❯ emacsclient -t
emacsclient: can't find socket; have you started the server?
emacsclient: To start the server in Emacs, type "M-x server-start".
emacsclient: No socket or alternate editor. Please use:
View debug_error
Debugger entered: nil
(progn (debug))
(if (equal (car (last (split-string filename "[/\\]") 2)) "obsolete") (progn (debug)))
debug-on-load-obsolete("/usr/share/emacs/26.3/lisp/obsolete/yow.elc")
run-hook-with-args(debug-on-load-obsolete "/usr/share/emacs/26.3/lisp/obsolete/yow.elc")
do-after-load-evaluation("/usr/share/emacs/26.3/lisp/obsolete/yow.elc")
require(yow nil t)
eval-buffer(#<buffer *load*-487072> nil "/home/alper/.emacs.d/lisp/icicles/icicles-cmd1.el" nil t) ; Reading
at buffer position 21
load-with-code-conversion("/home/alper/.emacs.d/lisp/icicles/icicles-cmd1.el"
View gist:bc262bcd8fefa746fe6eb84e0e5aa194
#!/bin/bash
# https://stackoverflow.com/questions/35800082/how-to-trap-err-when-using-set-e-in-bash
RED="\033[1;31m"
GREEN="\033[1;32m"
NC="\033[0m" # No Color
function func(){
View git_commit_template.txt
# 1. `Separate subject from body with a blank line`
# 2. `Limit the subject line to 50 characters`
# 3. `Capitalize the subject line`
# 4. `Do not end the subject line with a period`
# 5. `Use the imperative mood in the subject line`
# 6. `Wrap the body at 72 characters`
# 7. `Use the body to explain what and why vs. how`
View flycheck_config.txt
(require 'flycheck)
(require 'flycheck-mypy)
(add-hook 'solidity-mode-hook 'flycheck-mode)
(add-hook 'solidity-mode-hook
(lambda ()
(set-fill-column 80)))
(setq-default flycheck-flake8-maximum-line-length 200)
; (setq-default flycheck-disabled-checkers '(emacs-lisp-checkdoc))
View model_summary
================ Model Summary =================
== ==
== Model name: a_SAEHD ==
== ==
== Current iteration: 918503 ==
== ==
==-------------- Model Options ---------------==
== ==
== resolution: 128 ==
== face_type: f ==
View example
```
$ gpg --with-colons --fingerprint
tru::1:1591017178:1654089118:3:1:5
pub:u:3072:1:1D522F92EFA2F330:1591017118:1654089118::u:::scESC::::::23::0:
fpr:::::::::0359190A05DF2B72729344221D522F92EFA2F330:
uid:u::::1591017118::CF04990D5C5821318F5E10DDBABEB0DDB587CFD6::user <user@gmail.com>::::::::::0:
sub:u:3072:1:5F84BCA08952C2D6:1591017118:1654089118:::::e::::::23:
fpr:::::::::7E901B9121A0B36243F425B65F84BCA08952C2D6:
```
---
View thread_log_ex.py
from config import ThreadFilter, IgnoreThreadsFilter # noqa: F401
import logging
import threading
import time
logging.basicConfig(filename="/home/alper/log.txt",
filemode='a',
format='%(asctime)s,%(msecs)d %(name)s %(levelname)s %(message)s',
datefmt='%H:%M:%S',
View input_source_if_example
{
"manipulators": [
{
"conditions": [
{
"input_sources": [
{
"language": "en"
}
],