This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set -e | |
# Defaults to install where install.sh is located | |
INSTALL_DIR="$( cd "$(dirname "$0")" ; pwd -P )" | |
BUILD_DIR=${INSTALL_DIR}/BUILD | |
mkdir -p $BUILD_DIR | |
pushd $BUILD_DIR |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Use pygments highlighting for code | |
(defun pygmentize (lang code) | |
"Use Pygments to highlight the given code and return the output" | |
(with-temp-buffer | |
(insert code) | |
(let ((lang (or (cdr (assoc lang org-pygments-language-alist)) "text"))) | |
;; A crazy hack!! Why src-block have no info?!@!@# | |
(let* ((file-name (format "%s.png" (sha1 code))) | |
(output-path (format "%s" file-name)) | |
(url (format "%s" file-name))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" A simple script to search for GitHub users. """ | |
from __future__ import print_function | |
import json | |
from os.path import abspath, dirname, exists, join | |
import requests | |
from requests.utils import quote |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(if (org-clocking-p) | |
(message (concat "I am currently clocking into " org-clock-heading)) | |
(message "I am slacking off!")) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(org-defkey org-columns-map "N" 'pc/org-columns-new-row) | |
(defun pc/org-columns-new-row (&optional key) | |
"Allow adding a new row." | |
(interactive) | |
(save-excursion | |
(save-restriction | |
(org-beginning-of-line) | |
(org-with-silent-modifications | |
(org-insert-heading) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:(function(){ | |
var url_element = | |
document.querySelector('link[type="application/rss+xml"]') || | |
document.querySelector('link[type="application/atom+xml"]') || | |
location; | |
var url = url_element.href; | |
location.href = 'org-protocol://capture://L/'+ | |
encodeURIComponent(url)+'/'+ | |
encodeURIComponent(document.title); | |
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun my/org-drill (tag) | |
(interactive "MTag: ") | |
(let ((org-drill-tag tag)) | |
(call-interactively #'org-drill))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This way you can customize which branches should be skipped when | |
# prepending commit message. | |
if [ -z "$BRANCHES_TO_SKIP" ]; then | |
BRANCHES_TO_SKIP=(master develop test release/candidate) | |
fi | |
BRANCH_NAME=$(git symbolic-ref --short HEAD) | |
BRANCH_NAME="${BRANCH_NAME##*/}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Visit https://read.amazon.com/notebook | |
(function(){ | |
var highlights_markdown = function(){ | |
var markdown = ""; | |
for (var i=0; i < highlights.length; i++){ | |
markdown += "> " + highlights[i] + "\n\n"; | |
var note = notes[i]; | |
if (note !== "") { | |
markdown += note + "\n\n"; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
""" Script to convert a Nikola blog to Hugo | |
Requirements: | |
- toml | |
Usage: | |
./nikola-to-hugo.py /path/to/nikola/blog |