Skip to content

Instantly share code, notes, and snippets.

@exdeniz
exdeniz / migrate_from_exist_hitory.sh
Created June 6, 2020 21:17
Remove Duplicate zsh History
cat -n .zsh_history | sort -t ';' -uk2 | sort -nk1 | cut -f2- > .zhistory
@dashed
dashed / github-pandoc.css
Created September 26, 2013 13:42
GitHub-like CSS for pandoc standalone HTML files (perfect for HTML5 output). Based on Marked.app's GitHub CSS. Added normalize.css (v2.1.3) in the prior to GitHub css.
/*! normalize.css v2.1.3 | MIT License | git.io/normalize */
/* ==========================================================================
HTML5 display definitions
========================================================================== */
/**
* Correct `block` display not defined in IE 8/9.
*/
(defun vulpea-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)
@nonducor
nonducor / clocktable-by-tag.el
Last active December 18, 2023 20:59 — forked from ironchicken/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))
@zabbarob
zabbarob / anki.css
Created May 7, 2013 22:45
Anki cards, CSS and HTML templates.
@font-face {
font-family: junicode;
src: url('_junicode.ttf');
}
.card, table {
font-family: Helvetica, sans-serif, junicode;
font-size: 20px;
text-align: center;
color: #d03030;
background-color: #fafaf5;
@patik
patik / how-to-squash-commits-in-git.md
Last active October 17, 2023 02:19
How to squash commits in git

Squashing Git Commits

The easy and flexible way

This method avoids merge conflicts if you have periodically pulled master into your branch. It also gives you the opportunity to squash into more than 1 commit, or to re-arrange your code into completely different commits (e.g. if you ended up working on three different features but the commits were not consecutive).

Note: You cannot use this method if you intend to open a pull request to merge your feature branch. This method requires committing directly to master.

Switch to the master branch and make sure you are up to date:

@zer4tul
zer4tul / hacker-howto.md
Last active October 11, 2023 07:15
Simplified Chinese edition of ESR's How To Become A Hacker
@brenopacheco
brenopacheco / howto.md
Last active September 8, 2023 02:11
storing git credentials with gpg and .netrc

storing git credentials with gpg and .netrc

  1. set up git credential helper in .gitconfig
    [credential]
        helper = /usr/share/git/credential/netrc/git-credential-netrc.perl
  1. add login configuration to .netrc
@tony-jones
tony-jones / package.json
Last active August 27, 2023 13:48
jekyll site: asset building using npm run-scripts
{
"name": "jekyll-starter-kit",
"version": "1.0.0",
"description": "jekyll, asset build using npm scripts",
"main": "src/scripts/main.js",
"scripts": {
"eslint:dist": "eslint src/scripts/*.js",
"eslint": "npm run eslint:dist",
"uglify:dist": "uglify -s src/scripts/*.js -o dist/scripts/main.min.js",
"uglify:_site": "uglify -s src/scripts/*.js -o _site/dist/scripts/main.min.js",
@bollwyvl
bollwyvl / README.md
Last active July 20, 2023 18:38
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.