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
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
(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
(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
""" 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
;; 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
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
# Copy of http://stackoverflow.com/a/20104705 | |
from flask import Flask, render_template | |
from flask_sockets import Sockets | |
app = Flask(__name__) | |
app.debug = True | |
sockets = Sockets(app) | |
@sockets.route('/echo') |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 | |
MODULE=v4l2loopback | |
if grep -q $MODULE /proc/modules; | |
then | |
echo $MODULE already loaded | |
else | |
echo loading $MODULE | |
sudo modprobe $MODULE |