Skip to content

Instantly share code, notes, and snippets.

@jsntn
jsntn / README.md
Created July 20, 2016 16:18 — forked from bollwyvl/README.md
A fishbone editor
  • Make a bulleted Markdown list in the top left to update the list
  • Press edit to hide the editor
  • Press save to use [SVG Crowbar][crowbar] to save a copy
  • Click to drag nodes

This is an integration of [this implementation][orig] of a [Fishbone or Ishikawa][ish] diagram, which shows contributions of different levels of a hierarchy to a main concept, with a Markdown editor for making quick diagrams.

The diagram is implemented in [d3.js][d3], while rich-text editing is provided by [CodeMirror][cm], and [marked][mkd] handles Markdown processing.

@jsntn
jsntn / _config.yml
Created October 21, 2017 06:29 — forked from agarrharr/feed.rss
Jekyll Podcast Feed
author:
email:
name:
url:
# PODCAST
license: CC-BY-SA
podcast:
title:
subtitle:
@jsntn
jsntn / howto-install-jekyll_homebrew-rbenv.txt
Created January 10, 2018 23:21 — forked from r-brown/howto-install-jekyll_homebrew-rbenv.txt
How to install Jekyll using Homebrew and rbenv
# install Homebrew: https://wheat.at/mac/2017/12/09/homebrew.html
$ su ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# show brew commands
$ brew help
# check current user
$ echo $(whoami)
# grant access to the folders
@jsntn
jsntn / anki_mobile_card.html
Created June 6, 2018 06:31 — forked from sartak/1-anki_mobile_card.html
HTML used by AnkiMobile to render card templates; a reference for creating advanced Anki card templates with special HTML/CSS. When used by AnkiMobile, the card's HTML replaces the `<!-- (Card contents) -->` comment in this gist, with the shared styles dropped inline inside a `<style>` tag.
<!doctype html>
<html class=" webkit safari mobile iphone js">
<head>
<meta name="viewport" content="width=device-width;">
<style id="ss"></style>
<style>
body {
text-align: center;
font-size: 1em;
-webkit-transform: translate3d(0,0,0);
@jsntn
jsntn / diff2html.sh
Created February 25, 2020 09:54 — forked from stopyoukid/diff2html.sh
Script that takes a git diff and outputs an html file in GitHub style
#!/bin/bash
#
# Convert diff output to colorized HTML.
# (C) Mitch Frazier, 2008-08-27
# http://www.linuxjournal.com/content/convert-diff-output-colorized-html
# Modified by stopyoukid
#
html="<html><head><meta charset=\"utf-8\"><title>Pretty Diff</title><style>body {text-align: center;}#wrapper {display: inline-block;margin-top: 1em;min-width: 800px;text-align: left;}h2 {background: #fafafa;background: -moz-linear-gradient(#fafafa, #eaeaea);background: -webkit-linear-gradient(#fafafa, #eaeaea);-ms-filter: \"progid:DXImageTransform.Microsoft.gradient(startColorstr='#fafafa',endColorstr='#eaeaea')\";border: 1px solid #d8d8d8;border-bottom: 0;color: #555;font: 14px sans-serif;overflow: hidden;padding: 10px 6px;text-shadow: 0 1px 0 white;margin: 0;}.file-diff {border: 1px solid #d8d8d8;margin-bottom: 1em;overflow: auto;padding: 0.5em 0;}.file-diff > div {width: 100%:}pre {margin: 0;font-family: \"Bitstream Vera Sans Mono\", Courier, monospace;font-size: 12px;line-height: 1.4em;text-indent: 0.5em;}.file {color:
(defun +org-notes-project-p ()
"Return non-nil if current buffer has any todo entry.
TODO entries marked as done are ignored, meaning the this
function returns nil if current buffer contains only completed
tasks."
(seq-find ; (3)
(lambda (type)
(eq type 'todo))
(org-element-map ; (2)
#!/bin/bash
BASE_DIR=$(dirname $0)
BUILD_SCRIPT_NAME="build-git.sh"
BUILD_SCRIPT="${BASE_DIR}/${BUILD_SCRIPT_NAME}"
if [ ! -d /share/Public/toolchain ]; then
mkdir /share/Public/toolchain
fi
#!/bin/bash
GIT_VERSION="2.23.0"
yum install -y gcc wget make curl-devel expat-devel \
gettext-devel openssl-devel perl-devel zlib-devel
cd ~
if [ ! -f git-${GIT_VERSION}.tar.gz ]; then
wget https://mirrors.edge.kernel.org/pub/software/scm/git/git-${GIT_VERSION}.tar.gz
@jsntn
jsntn / Build Emacs for Windows 64bit with Native Compilation.md
Created November 18, 2022 12:58 — forked from nauhygon/Build Emacs for Windows 64bit with Native Compilation.md
Step-by-step instructions to build Emacs for Windows 64 bit with MSYS2 and MinGW-w64. Now `native-comp` supported.

Build Emacs-w64 with MSYS2/MinGW-w64 with Native Compilation

Instructions are modified from emacs-w64 Wiki page by zklhp. Many thanks for sharing!

  1. Download the latest MSYS2 from this download page.

  2. Install MSYS2 to, for example, C:\msys2 (make sure no space in path to avoid unwanted problems).

  3. Optionally prettify the MSYS2 console mintty with ~/.minttyrc to make it more pleasing to eyes. Thanks to this awesome theme!

@jsntn
jsntn / clocktable-by-tag.el
Created April 3, 2023 09:31 — forked from nonducor/clocktable-by-tag.el
Emacs org-mode dynamic block similar to clocktable, but grouped by tag. See: https://stackoverflow.com/questions/70568361/org-mode-review-clocked-time-by-multiple-tags
(require 'org-clock)
(defun clocktable-by-tag/shift-cell (n)
(let ((str ""))
(dotimes (i n)
(setq str (concat str "| ")))
str))
(defun clocktable-by-tag/insert-tag (files params)
(let ((tag (plist-get params :tags))