Skip to content

Instantly share code, notes, and snippets.

@ironchicken
ironchicken / clocktable-by-tag.el
Last active June 16, 2022 12:43 — forked from ffevotte/clocktable-by-tag.el
Emacs org-mode dynamic block similar to clocktable, but grouped by tagSee: http://stackoverflow.com/q/17353591/1225607
(defun clocktable-by-tag/shift-cell (n)
(let ((str ""))
(dotimes (i n)
(setq str (concat str "| ")))
str))
(defun clocktable-by-tag/insert-tag (params)
(let ((tag (plist-get params :tags)))
(insert "|--\n")
(insert (format "| %s | *Tag time* |\n" tag))
@manuelbl
manuelbl / README.md
Created August 3, 2019 09:12
ESP32 as Bluetooth Keyboard

ESP32 as Bluetooth Keyboard

With its built-in Bluetooth capabilities, the ESP32 can act as a Bluetooth keyboard. The below code is a minimal example of how to achieve it. It will generate the key strokes for a message whenever a button attached to the ESP32 is pressed.

For the example setup, a momentary button should be connected to pin 2 and to ground. Pin 2 will be configured as an input with pull-up.

In order to receive the message, add the ESP32 as a Bluetooth keyboard of your computer or mobile phone:

  1. Go to your computers/phones settings
  2. Ensure Bluetooth is turned on
@ezgoodnight
ezgoodnight / hubot.conf
Last active August 29, 2015 14:18 — forked from DavidWittman/hubot.conf
Hubot - Default 8080 http port
# hubot
description "Hubot Campfire bot"
author "David Wittman <david@wittman.com>"
start on filesystem or runlevel [2345]
stop on runlevel [!2345]
# Path to Hubot installation
env HUBOT_DIR='/home/user/hubot/'
@weeksie
weeksie / copy-yank-lines.el
Last active August 29, 2015 14:18
Little hack for moving lines of text up and down.
(defun kill-current-line ()
"An abbreviated method for killing a whole line plus the newline terminal"
(kill-region (line-beginning-position) (+ (line-end-position) 1)))
(defun copy-current-line ()
"Similar to the above but copy the text rather than cut it"
(copy-region-as-kill (line-beginning-position) (+ (line-end-position) 1)))
(defun kill-yank (n)
(kill-current-line) ;grab current line of text
@mangreen
mangreen / Youtube Get Current Second Api Demo.
Last active August 26, 2021 02:04
Youtube Get Current Second Api Demo.
<!DOCTYPE html>
<html>
<body>
<!-- 1. The <iframe> (and video player) will replace this <div> tag. -->
<div id="player"></div>
<div>Current Time: <span id="time"></span></div>
<script>
// 2. This code loads the IFrame Player API code asynchronously.
var tag = document.createElement('script');
@pinge
pinge / ubuntu_14.04_macbook_pro_retina_15_inch_mid_2014.md
Last active March 10, 2021 03:05
How to install Ubuntu 14.04.1 LTS on a MacBook Pro Retina 15" Mid 2014 (11,3)
@miguelmota
miguelmota / README.md
Last active May 25, 2024 13:23
Multiple accounts with Mutt E-Mail Client (gmail example)

How to set up multiple accounts with Mutt E-mail Client

Thanks to this article by Christoph Berg

Instructions

Directories and files

~/
STATUS_CANCELLED = 'cancelled'
STATUS_NEW = 'new'
STATUS_PENDING = 'pending'
STATUS_PAYMENT_DUE = 'payment-due'
STATUS_PAYMENT_PENDING = 'payment-pending'
STATUS_PAID = 'paid'
NEGOTIABLE_STATUS_CHOICES = (
(STATUS_CANCELLED, 'Cancelled'), # Cancelled, duh
(STATUS_NEW, 'New'), # Default state of request
@caldwell
caldwell / .gitconfig
Last active November 22, 2020 20:21
~/.gitconfig snippet for using Emacs ediff with git mergetool via emacsclient.
[merge]
tool = ediff
[mergetool "ediff"]
cmd = emacsclient -c -a \"\" --eval \"(ediff-merge-files-with-ancestor \\\"$LOCAL\\\" \\\"$REMOTE\\\" \\\"$BASE\\\" nil \\\"$MERGED\\\")\"