Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env bash
#from https://gist.github.com/dvishniakov/86c83ef891d200674522c791589d42b3
# Provides stack trace when error occurs or when manually called
# $1 is message
# $2 is command
# ${ContinueOnErrors} controls whether to continue or stop script if error is catched.
# it helps during batch processing. -o errexit/errtrace also affects this
errexit() {
local errno=$? # non-zero when this function is called via trap
@CsBigDataHub
CsBigDataHub / hey_notmuch!
Created June 21, 2020 22:32 — forked from vedang/hey_notmuch!
Notmuch configuration for Hey.com Style workflows.
- Specific Notmuch filters (and saved-searches) for:
+ The Feed (newsletters, blogs)
+ The Paper trail (receipts, ledger)
+ Screened Inbox (mail from folks you actually want to read)
+ Previously Seen (important mail that you've already read)
+ Unscreened Inbox (potential spam / stuff you don't want)
- Elisp Functions to move / categorize emails from a particular sender.
+ Adds tags needed by filters defined above to all email sent by a particular sender
+ Creates an entry in a DB file, which is used by the Notmuch post-new script when indexing new email, to auto-add the relevant tags.
@CsBigDataHub
CsBigDataHub / register_schema.py
Created May 21, 2020 21:00 — forked from aseigneurin/register_schema.py
Register an Avro schema against the Confluent Schema Registry
#!/usr/bin/python
import os
import sys
import requests
schema_registry_url = sys.argv[1]
topic = sys.argv[2]
schema_file = sys.argv[3]

Answer to SO question 48693420

Demonstrates substitution in properties file with system variables.

Execute with

username=user1 password=pass1 mvn resources:resources && cat target/classes/development.properties

Expected output:

@CsBigDataHub
CsBigDataHub / dvd.rst
Created March 23, 2020 18:31 — forked from kuenishi/dvd.rst
How to rip your dvd to backup

Howto

  1. install brasero (gnome automatically installs it)
  2. install libdvdcss
  3. start brasero
  4. install disk
  5. set region code
@CsBigDataHub
CsBigDataHub / install-universal-ctags-with-gtags-osx.md
Created February 13, 2020 04:58 — forked from alexshagov/install-universal-ctags-with-gtags-osx.md
How to install GNU Global with universall ctags support on mac OS

Unfortunately, homebrew does not support --with-universal-ctags option for global (on the state of April 2018) The reason is that universal-ctags is not officially released yet.

Install universal ctags

Run brew install --HEAD universal-ctags/universal-ctags/universal-ctags (See https://github.com/universal-ctags/homebrew-universal-ctags repo)

If you're on macOS, you might have an old ctags installed with command line tools for XCode. To fix this, simply run alias ctags="brew --prefix/bin/ctags"

;; -*- coding: utf-8; lexical-binding: t; -*-
;;
;; My frequently used commands are listed here
;; enable evil-mode
(evil-mode 1)
(defvar my-use-m-for-matchit nil
"If t, use \"m\" key for `evil-matchit-mode'.
And \"%\" key is also retored to `evil-jump-item'.")
@CsBigDataHub
CsBigDataHub / exporting-formatted-code-snippets-from-emacs
Created December 9, 2019 16:16 — forked from rayortigas/exporting-formatted-code-snippets-from-emacs
Stuff for exporting formatted code snippets from Emacs using Pygments.
;; Stuff for exporting formatted code snippets using Pygments
;; <http://pygments.org/>. Install pygments (e.g. pip install
;; pygments) to use.
(setq pygmentize-lexers (make-hash-table))
(puthash 'emacs-lisp-mode "common-lisp" pygmentize-lexers)
(puthash 'scala-mode "scala" pygmentize-lexers)
(puthash 'java-mode "java" pygmentize-lexers)
(puthash 'ruby-mode "rb" pygmentize-lexers)
(puthash 'python-mode "py" pygmentize-lexers)
@CsBigDataHub
CsBigDataHub / gist:209bd14035a08e88b6d710655cb723e8
Created August 27, 2019 14:29 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@CsBigDataHub
CsBigDataHub / presentation.org
Created August 15, 2019 16:14 — forked from abrochard/presentation.org
Notes from the "Conquering Kubernetes with Emacs" presentation

Conquering Kubernetes with Emacs

Specific Annoying workflow

Listing pods with kubectl get pods, then select a pod name and copy paste it into kubectl logs [pod name]

Why?

  • I want to streamline my workflow and stop using the terminal
  • learn more about kubernetes
  • main kubernetes extension for Emacs out there is greedy for permissions