Skip to content

Instantly share code, notes, and snippets.

@enisozgen
enisozgen / n8n-error.js
Created August 3, 2020 07:21
Share n8n error file related with issue.
{
"name": "ReportError",
"nodes": [
{
"parameters": {},
"name": "Start",
"type": "n8n-nodes-base.start",
"typeVersion": 1,
"position": [
-480,
@enisozgen
enisozgen / turengSearch.el
Created December 1, 2015 10:01
Easy Tureng english<=>turkish search from emacs
(defun TurengSearch ()
"Tureng search"
(interactive)
(browse-url
(concat
"http://tureng.com/en/turkish-english/"
(url-hexify-string (if mark-active
(buffer-substring (region-beginning) (region-end))
(read-string "Search Tureng: "))))))
@enisozgen
enisozgen / smart-shift-hydra.el
Created February 3, 2020 22:48
move text or region
;; https://github.com/hbin/smart-shift
;; Another text moving package which works well.
;; Easily you can shift region or current line.
;; Usage 1: Go to line call the function move it with h,j,k,l
;; Usage 2: Select the region than move them via h,j,k,l
;; Known bug If you select via V command it behaves so weird.
# Create pull request from your branch to target branch
# USAGE
# Switch for branch you want to make Pull request
# bash create_pr_from_cli.sh <target_branch> <OPTIONAL_pr_message>
# Limitation one script allows you to make PR for one repository.
# You can change this easily.
# TODO
PROJECTNAME="ProjectName"
# Works as famous command which is exist in simple.el
# https://github.com/emacs-mirror/emacs/blob/cbc10ec71e9f189e8d6fd5c6927aec4872e0fd96/lisp/simple.el#L957
# + Feature that I implement for function is you can select text as region than it will delete spaces if it's more than 1.
# - Feature: Base function allows you leave (n)Space I don't need this, so it is not exist.
(defun just-one-space-region (begin end)
"Deletes whitespaces for selected region if they more than one"
(interactive "r")
(if (use-region-p)
(save-excursion
# Works as famous command which is exist in simple.el
# https://github.com/emacs-mirror/emacs/blob/cbc10ec71e9f189e8d6fd5c6927aec4872e0fd96/lisp/simple.el#L957
# + Feature that I implement for function is you can select text as region than it will delete spaces if it's more than 1.
# - Feature: Base function allows you leave (n)Space I don't need this, so it is not exist.
(defun just-one-space-region (begin end)
"Deletes whitespaces for selected region if they more than one"
(interactive "r")
(if (use-region-p)
(save-excursion
@enisozgen
enisozgen / auto-upper-case-aws-acronyms.el
Last active January 28, 2019 10:54
Emacs lisp code that automaticaly uppercase acronyms
;; Auto upper case or camel case AWS related acronyms and words
;; stop asking whether to save newly added abbrev when quitting emacs
(setq save-abbrevs nil)
;; org-hook
(add-hook 'org-mode-hook (lambda () (abbrev-mode 1)))
# https://github.com/jhawthorn/fzy
# I have just discovered what is fzy. I created helpful functions that helps to edit or navigte directories at the light of speed
# I'm agree with you that function could be more simple :)
# Use the force wisely
alias git-root='cd $(git rev-parse --show-toplevel)'
# Change directory and don't show hidden directories like .git in the git repository
function cdinproject() {
@enisozgen
enisozgen / fast-highlight.el
Created October 21, 2017 18:34
Fast highlight options that I use
(setq enis-highlight-symbol-packages
'(
highlight-symbol
))
(defun enis-highlight-symbol/init-highlight-symbol ()
(use-package highlight-symbol
:config
(setq highlight-symbol-idle-delay 0.01)
@enisozgen
enisozgen / hydra-git-gutter.el
Created April 22, 2017 10:34
Nice diff's gonna save your time
;; Few changes to https://github.com/abo-abo/hydra/wiki/Git-gutter
(defhydra hydra-git-gutter (:body-pre
(save-buffer)
(git-gutter-mode 1)
:hint nil
:color blue)
"
Git gutter:
_n_: next hunk _s_tage hunk _u_ndo _r_edo _q_uit
_p_: previous hunk _R_evert hunk ^ ^ _Q_uit and deactivate git-gutter