Skip to content

Instantly share code, notes, and snippets.

Kaushal Modi kaushalmodi

Block or report user

Report or block kaushalmodi

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View worg-setup.el
;; Time-stamp: <2018-01-05 21:10:39 kmodi>
;; https://web.archive.org/web/20160815085513/http://orgmode.org/worg/sources/emacs.el
;; (setq custom-file "~/.emacs-custom.el")
;; (load custom-file)
(defconst orgmode-org-base "~/temp/orgmode.org/"
"Path to Orgmode.org base directory.")
(defconst orgweb-base (concat orgmode-org-base "orgweb/")
"Path to Orgweb source directory.")
@kaushalmodi
kaushalmodi / debugprint.html
Last active Aug 26, 2018
Pretty printing Hugo variables for debug
View debugprint.html
Thanks for stopping by.
This code has been moved to https://github.com/kaushalmodi/hugo-debugprint as a Hugo theme component.
View hugo_mybuild.sh
#!/usr/bin/env bash
# Time-stamp: <2017-10-23 12:14:47 kmodi>
# Hugo build script.. for hugo version build after switching to Go dep.
# (v0.31-DEV+)
# Usage: ./hugo_mybuild.sh # Installs using origin/master
# ./hugo_mybuild.sh --rev v0.30.2
#${GOPATH}/src/github.com/gohugoio/hugo/README.md
View github_chroma.css
/* Background */ .chroma { background-color: #ffffff }
/* Error */ .chroma .err { color: #a61717; background-color: #e3d2d2 }
/* LineTableTD */ .chroma .lntd { ; vertical-align: top; padding: 0; margin: 0; border: 0; }
/* LineTable */ .chroma .lntable { ; border-spacing: 0; padding: 0; margin: 0; border: 0; width: 100%; overflow: auto; display: block; }
/* LineHighlight */ .chroma .hl { background-color: #ffffcc; display: block; width: 100% }
/* LineNumbersTable */ .chroma .lnt { ; margin-right: 0.4em; padding: 0 0.4em 0 0.4em; display: block; }
/* LineNumbers */ .chroma .ln { ; margin-right: 0.4em; padding: 0 0.4em 0 0.4em; }
/* Keyword */ .chroma .k { color: #000000; font-weight: bold }
/* KeywordConstant */ .chroma .kc { color: #000000; font-weight: bold }
/* KeywordDeclaration */ .chroma .kd { color: #000000; font-weight: bold }
View trac_chroma.css
/* Background */ .chroma { background-color: #ffffff }
/* Error */ .chroma .err { color: #a61717; background-color: #e3d2d2 }
/* LineHighlight */ .chroma .hl { background-color: #ffffcc; display: block; width: 100% }
/* LineNumbers */ .chroma .ln { ; margin-right: 0.4em; padding: 0 0.4em 0 0.4em; }
/* Keyword */ .chroma .k { font-weight: bold }
/* KeywordType */ .chroma .kt { color: #445588; font-weight: bold }
/* NameAttribute */ .chroma .na { color: #008080 }
/* NameBuiltin */ .chroma .nb { color: #999999 }
/* NameClass */ .chroma .nc { color: #445588; font-weight: bold }
/* NameConstant */ .chroma .no { color: #008080 }
View trac_pygments.css
.highlight .hll { background-color: #ffffcc }
.highlight { background: #ffffff; }
.highlight .c { color: #999988; font-style: italic } /* Comment */
.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */
.highlight .k { font-weight: bold } /* Keyword */
.highlight .o { font-weight: bold } /* Operator */
.highlight .ch { color: #999988; font-style: italic } /* Comment.Hashbang */
.highlight .cm { color: #999988; font-style: italic } /* Comment.Multiline */
.highlight .cp { color: #999999; font-weight: bold } /* Comment.Preproc */
.highlight .cpf { color: #999988; font-style: italic } /* Comment.PreprocFile */
View hugo_update.sh
#!/usr/bin/env bash
# /home/kmodi/go.apps/src/github.com/gohugoio/hugo/README.md
# http://matthewkwilliams.com/index.php/2014/09/28/go-executables-are-statically-linked-except-when-they-are-not/
here=$(pwd)
hugo_src="github.com/gohugoio/hugo"
chroma_src="github.com/alecthomas/chroma"
View odt-template.org

Template Org document for ODT export

Example

View hugo_new_post.sh
#!/usr/bin/env bash
# Time-stamp: <2017-04-21 17:44:04 kmodi>
# https://discuss.gohugo.io/t/auto-generate-file-name-based-on-title/4648/2?u=kaushalmodi
# This script uses the unofficial strict mode as explained in
# http://redsymbol.net/articles/unofficial-bash-strict-mode
#
# Also checks have been done with www.shellcheck.net to have a level of
# confidence that this script will be free of loopholes.. or is it? :)
You can’t perform that action at this time.