Skip to content

Commit

Permalink
Initial configuration commit.
Browse files Browse the repository at this point in the history
  • Loading branch information
Narendra Joshi authored and Narendra Joshi committed Mar 5, 2020
0 parents commit 6eb81b0
Show file tree
Hide file tree
Showing 151 changed files with 72,605 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.el diff
56 changes: 56 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
*
!.gitignore
!init.el
!abbrev_defs

!README.md
!.travis.yml
!test-startup.sh
!update-subtrees.sh

!etc/
!etc/*
!etc/*/*

!themes/
!themes/*

!lib/
!lib/*

!snippets/
!snippets/*
!snippets/*/*

!packages/
!packages/rest/
!packages/rest/*
!packages/rest/*/
!packages/rest/*/*
!packages/rest/*/*/
!packages/rest/*/*/*

!packages/lisp/
!packages/lisp/*
!packages/lisp/*/
!packages/lisp/*/*
!packages/lisp/*/*/
!packages/lisp/*/*/*


*.elc
epdfinfo
.yas-compiled-snippets.el

packages/elpa/*
packages/elpa/*/*/
!.emacs.d/packages/elpa/.gitkeep

!tmp/backups/
tmp/backups/*
!tmp/backups/.gitkeep

!MANIFEST
!.gitattributes

!calc.el
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
narendraj9's dot-emacs
=====================================

My Emacs configuration.


Setup
-----

If you would like to try it, use the following commands:

```bash
$ git clone "https://github.com/narendraj9/dot-emacs.git" "~/Downloads/dot-emacs"
$ emacs -Q -l "~/Downloads/dot-emacs/init.el"

```

The above commands should not affect your existing Emacs
configuration.

The first time you start Emacs with this configuration, it would try
to install all the packages from Melpa, which will take some time.


17 changes: 17 additions & 0 deletions calc.el
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@

;;; Mode settings stored by Calc on Sun Oct 20 20:40:32 2019
(setq calc-incomplete-algebraic-mode t)
;;; End of mode settings

;;; Custom units stored by Calc on Thu Nov 7 22:22:54 2019
(setq math-additional-units '(
(GiB "1024 * MiB" "Giga Byte")
(MiB "1024 * KiB" "Mega Byte")
(KiB "1024 * B" "Kilo Byte")
(B nil "Byte")
(Gib "1024 * Mib" "Giga Bit")
(Mib "1024 * Kib" "Mega Bit")
(Kib "1024 * b" "Kilo Bit")
(b "B / 8" "Bit")
))
;;; End of custom units
44 changes: 44 additions & 0 deletions etc/bpfcc-tools.el
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
;;; bpfcc-tools.el --- Helper functions for using or learning about eBPF tools -*- lexical-binding: t; -*-

;; Copyright (C) 2019 Narendra Joshi

;; Author: Narendra Joshi <[email protected]>
;; Keywords: convenience, data

;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.

;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.

;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <https://www.gnu.org/licenses/>.

;;; Commentary:

;;

;;; Code:

(defvar bfcc-tools '(argdist-bpfcc bashreadline-bpfcc biolatency-bpfcc biosnoop-bpfcc biotop-bpfcc bitesize-bpfcc bpflist-bpfcc btrfsdist-bpfcc btrfsslower-bpfcc cachestat-bpfcc cachetop-bpfcc capable-bpfcc cobjnew-bpfcc cpudist-bpfcc cpuunclaimed-bpfcc criticalstat-bpfcc dbslower-bpfcc dbstat-bpfcc dcsnoop-bpfcc dcstat-bpfcc deadlock_detector-bpfcc deadlock_detector.c-bpfcc execsnoop-bpfcc ext4dist-bpfcc ext4slower-bpfcc filelife-bpfcc fileslower-bpfcc filetop-bpfcc funccount-bpfcc funclatency-bpfcc funcslower-bpfcc gethostlatency-bpfcc hardirqs-bpfcc inject-bpfcc javacalls-bpfcc javaflow-bpfcc javagc-bpfcc javaobjnew-bpfcc javastat-bpfcc javathreads-bpfcc killsnoop-bpfcc llcstat-bpfcc mdflush-bpfcc memleak-bpfcc mountsnoop-bpfcc mysqld_qslower-bpfcc nfsdist-bpfcc nfsslower-bpfcc nodegc-bpfcc nodestat-bpfcc offcputime-bpfcc offwaketime-bpfcc oomkill-bpfcc opensnoop-bpfcc perlcalls-bpfcc perlflow-bpfcc perlstat-bpfcc phpcalls-bpfcc phpflow-bpfcc phpstat-bpfcc pidpersec-bpfcc profile-bpfcc pythoncalls-bpfcc pythonflow-bpfcc pythongc-bpfcc pythonstat-bpfcc reset-trace-bpfcc rubycalls-bpfcc rubyflow-bpfcc rubygc-bpfcc rubyobjnew-bpfcc rubystat-bpfcc runqlat-bpfcc runqlen-bpfcc runqslower-bpfcc shmsnoop-bpfcc slabratetop-bpfcc sofdsnoop-bpfcc softirqs-bpfcc solisten-bpfcc sslsniff-bpfcc stackcount-bpfcc statsnoop-bpfcc syncsnoop-bpfcc syscount-bpfcc tclcalls-bpfcc tclflow-bpfcc tclobjnew-bpfcc tclstat-bpfcc tcpaccept-bpfcc tcpconnect-bpfcc tcpconnlat-bpfcc tcpdrop-bpfcc tcplife-bpfcc tcpretrans-bpfcc tcpstates-bpfcc tcpsubnet-bpfcc tcptop-bpfcc tcptracer-bpfcc tplist-bpfcc trace-bpfcc ttysnoop-bpfcc vfscount-bpfcc vfsstat-bpfcc wakeuptime-bpfcc xfsdist-bpfcc xfsslower-bpfcc zfsdist-bpfcc zfsslower-bpfcc))

(defvar bpfcc-tools-with-descriptions
(mapcar (lambda (tname)
(propertize (symbol-name tname)
'display
(s-trim (shell-command-to-string (format "whatis %s" tname)))))
bfcc-tools))


(defun bpfcc-tools-man-page ()
"Open `man' page for a bpfcc tool."
(interactive)
(man (completing-read "man: " bpfcc-tools-with-descriptions)))


(provide 'bpfcc-tools)
;;; bpfcc-tools.el ends here
72 changes: 72 additions & 0 deletions etc/cc-config.el
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
;;; custom-c-style.el --- Custom c style -*- lexical-binding: t; -*-

;; Copyright (C) 2017 Narendra Joshi

;; Author: Narendra Joshi <[email protected]>
;; Keywords: c, c

;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.

;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.

;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <http://www.gnu.org/licenses/>.

;;; Commentary:

;;

;;; Code:
(require 'cc-vars)
(require 'cc-styles)
(require 'cc-cmds)

(setq c-offsets-alist
'((member-init-intro . ++)))

(defconst custom-c-style
'((c-tab-always-indent . t)
(c-comment-only-line-offset . 4)
(c-hanging-braces-alist . ((substatement-open after)
(brace-list-open)))
(c-hanging-semi&comma-criteria
. (c-semi&comma-no-newlines-for-oneline-inliners
c-semi&comma-no-newlines-before-nonblanks
c-semi&comma-inside-parenlist))
(c-hanging-colons-alist
. ((member-init-intro before)
(inher-intro)
(case-label after)
(label after)
(access-label after)))
(c-cleanup-list
. (scope-operator
empty-defun-braces
defun-close-semi))
(c-offsets-alist
. ((arglist-close . c-lineup-arglist)
(substatement-open . 0)
(comment-intro . 0)
(case-label . 4)
(block-open . 0)
(knr-argdecl-intro . -)))
(c-echo-syntactic-information-p . t))
"Custom C Programming Style.")
(c-add-style "PERSONAL" custom-c-style)

(defun custom-c-mode-common-hook ()
"Hook common to all CC-derived modes."
(c-set-style "PERSONAL")
(setq tab-width 4
indent-tabs-mode nil)
;; we like auto-newline, but not hungry-delete
(c-toggle-auto-newline 1))

(provide 'cc-config)
;;; cc-config.el ends here
155 changes: 155 additions & 0 deletions etc/elfeed-config.el
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
;;; elfeed-config.el --- My elfeed config -*- lexical-binding: t; -*-

;; Copyright (C) 2017 Narendra Joshi

;; Author: Narendra Joshi(require 'cl-lib) <[email protected]>
;; Keywords: convenience

;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.

;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.

;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <https://www.gnu.org/licenses/>.

;;; Commentary:

;;

;;; Code:

(require 'elfeed)
(require 'youtube-dl)

(setq-default elfeed-search-filter "-junk @1-week-ago +unread")

;; More keybindings
(define-key elfeed-search-mode-map (kbd "j") #'next-line)
(define-key elfeed-search-mode-map (kbd "k") #'previous-line)
(define-key elfeed-show-mode-map (kbd "j") #'next-line)
(define-key elfeed-show-mode-map (kbd "k") #'previous-line)

(setq elfeed-feeds
'(("https://googleprojectzero.blogspot.com/feeds/posts/default" blog security)
("https://peteris.rocks/rss.xml" blog dev systems)
("https://overreacted.io/rss.xml" blog dev ui)
("http://clojure-goes-fast.com/blog/atom.xml" blog dev clojure)
("https://www.bennettnotes.com/index.xml" blog dev)
("https://hackattic.com/changelog.rss" challenges dev)
("http://pragmaticemacs.com/feed/" blog emacs)
("https://www.tedinski.com/feed.xml" blog dev design)
("https://www.microsoft.com/en-us/research/feed/" blog dev research)
("https://vvvvalvalval.github.io/feed.xml" blog dev clojure)
("https://www.pvk.ca/atom.xml" blog dev lisp)
("https://kubernetespodcast.com/feeds/audio.xml" blog dev k8s)
("http://insideclojure.org/archive/" blog dev clojure)
("https://www.joelonsoftware.com/feed/" blog dev)
("https://themonadreader.wordpress.com/feed/" blog haskell dev)
("https://8thlight.com/blog/feed/rss.xml" blog dev)
("https://karl-voit.at/feeds/lazyblorg-all.atom_1.0.links-and-content.xml" emacs blog)
("http://blog.ioactive.com/feeds/posts/default" blog security)
("http://blog.plover.com/index.atom" blog dev)
("http://blog.reverberate.org/feeds/posts/default" dev blog)
("http://blog.twonegatives.com/rss" blog) ; Two negatives
("http://cachestocaches.com/feed/" emacs blog)
("http://cestlaz.github.io/rss.xml" emacs blog)
("http://emacshorrors.com/feed.atom" blog emacs)
("http://feeds.exploringbinary.com/ExploringBinary" blog dev)
("http://feeds.wnyc.org/radiolab" audio)
("http://firefly.nu/feeds/all.atom.xml" blog dev)
("http://gottwurfelt.wordpress.com/feed/" blog math)
("http://irreal.org/blog/?feed=rss2" blog)
("http://mortoray.com/feed/" blog dev)
("http://nullprogram.com/feed/" blog dev nullprogram)
("http://planet.emacsen.org/atom.xml" emacs planet)
("http://possiblywrong.wordpress.com/feed/" blog math puzzle)
("http://slatestarcodex.com/feed/" blog philosophy)
("http://steve-yegge.blogspot.com/atom.xml" blog dev)
("http://use-the-index-luke.com/blog/feed" blog dev databases)
("http://what-if.xkcd.com/feed.atom" blog)
("http://www.aaronsw.com/2002/feeds/pgessays.rss" blog) ; Paul Graham's essays
("http://www.allthingsdistributed.com/atom.xml" distributed)
("http://www.howstuffworks.com/podcasts/stuff-you-should-know.rss" audio)
("http://www.mazelog.com/rss" math puzzle)
("http://www.reddit.com/r/dailyprogrammer/.rss" subreddit)
("http://www.tedunangst.com/flak/rss" dev blog)
("https://apfelmus.nfshost.com/rss.xml" blog haskell)
("https://blogs.msdn.microsoft.com/oldnewthing/feed" blog dev)
("https://github.com/blog/all.atom" blog dev product)
("https://martinfowler.com/feed.atom" blog design)
("https://nickdesaulniers.github.io/atom.xml" blog dev)
("https://vicarie.in/archive.xml")
("https://www.debian.org/News/news" debian list)
("https://www.masteringemacs.org/feed" blog emacs)
("https://www.schneier.com/blog/atom.xml" blog security)
("https://www.schneier.com/blog/atom.xml" security)
("https://www.snellman.net/blog/rss-index.xml" dev networking)
;; ("https://news.ycombinator.com/rss" hn)
;; ("http://feeds.feedburner.com/Explosm" comic)
;; ("http://feeds.feedburner.com/InvisibleBread" comic)
;; ("http://feeds.feedburner.com/LoadingArtist" comic)
;; ("http://feeds.feedburner.com/Pidjin" comic)
;; ("http://feeds.feedburner.com/lefthandedtoons/awesome" comic)
;; ("http://nedroid.com/feed/" comic)
;; ("http://piecomic.tumblr.com/rss" comic)
;; ("http://www.businesscat.happyjar.com/feed/" comic)
;; ("http://www.exocomics.com/feed" comic)
;; ("http://www.extrafabulouscomics.com/1/feed" comic)
;; ("http://www.goneintorapture.com/rss" comic)
;; ("http://www.mrlovenstein.com/rss.xml" comic)
;; ("http://www.optipess.com/feed/" comic)
;; ("http://www.safelyendangered.com/feed/" comic)
;; ("http://www.reddit.com/user/JimKB/submitted.rss" comic)
;; ("http://www.smbc-comics.com/rss.php" comic)
;; ("http://www.thingsinsquares.com/feed/" comic)
;; ("http://www.whompcomic.com/rss.php" comic)
;; ("http://xkcd.com/atom.xml" comic)
;; ("1veritasium" youtube)
;; ("UCO8DQrSp5yEP937qNqTooOw" youtube) ; Strange Parts
;; ("UCQvdU25Eqk3YS9-QnILhKKQ" youtube)
;; ("UCXNxwOuuR7LT-SkEfOJiwgA" youtube) ; Long Plays
;; ("UCYO_jab_esuFRV4b17AJtAw" youtube) ; 3Blue1Brown
;; ("UCsXVk37bltHxD1rDPwtNM8Q" youtube))) ; Kurzgesagt – In a
;; ("UCwRqWnW5ZkVaP_lZF7caZ-g" youtube) ; Retro Game Mechanics
;; ("adric22" youtube) ; The 8-bit Guy
;; ("http://accidental-art.tumblr.com/rss" image math)
;; ("http://amitp.blogspot.com/feeds/posts/default" blog dev)
;; ("http://backtracks.fm/ycombinator/ycombinator/feed" blog)
;; ("http://bit-player.org/feed" blog math)
;; ("http://blog.carlosgaldino.com/atom.xml" blog dev)
;; ("http://blog.cryptographyengineering.com/feeds/posts/default" blog)
;; ("http://chainsawsuit.com/feed/" comic)
;; ("http://deep-dark-fears.tumblr.com/rss" comic)
;; ("http://dvdp.tumblr.com/rss" image)
;; ("http://eli.thegreenplace.net/feeds/all.atom.xml" blog dev)
;; ("http://english.bouletcorp.com/feed/" comic)
;; ("http://feeds.feedburner.com/Buttersafe" comic)
;; ("http://feeds.feedburner.com/CatVersusHuman" comic)
;; ("http://feeds.feedburner.com/channelATE" comic)
;; ("http://simblob.blogspot.com/feeds/posts/default" blog dev)
;; ("http://www.bitercomics.com/feed/" comic)
;; ("http://www.commitstrip.com/en/feed/" comic dev)
;; ("https://blog.coinbase.com/rss/" product bitcoin)
;; ("https://utcc.utoronto.ca/~cks/space/blog/?atom" blog dev)
;; ("https://www.blogger.com/feeds/19727420/posts/default" blog)
;; ("https://www.debian.org/security/dsa" debian list security important)
;; ("https://www.digitalocean.com/blog/feed" blog product)
;; ("whoisjimmy" youtube) ; How Ridiculous
;; Nutshell
))

;; Strike-through all read articles
(set-face-attribute 'elfeed-search-title-face nil :strike-through t)
(set-face-attribute 'elfeed-search-unread-title-face nil :strike-through nil)

;; With 16 connections, my Emacs slows down a bit.
(elfeed-set-max-connections 8)

(provide 'elfeed-config)
;;; elfeed-config.el ends here
Loading

0 comments on commit 6eb81b0

Please sign in to comment.