Skip to content

Instantly share code, notes, and snippets.

View jdenen's full-sized avatar

Johnson Denen jdenen

  • Columbus, OH
View GitHub Profile
anonymous
anonymous / org-capture-firefox.el
Created February 12, 2018 21:17
org-capture in Firefox EXWM buffers
(defun elmord-exwm-get-firefox-url ()
(exwm-input--fake-key ?\C-l)
(sleep-for 0.1) ;; Wish I could get rid of the sleeps...
(exwm-input--fake-key ?\C-c)
(sleep-for 0.1)
(gui-backend-get-selection 'CLIPBOARD 'STRING))
(defun elmord-exwm-org-store-link ()
(when (and (equal major-mode 'exwm-mode)
(member exwm-class-name '("Firefox" "Firefox-esr")))
@ythecombinator
ythecombinator / change-commit-date.md
Last active March 16, 2022 18:35
Changin' a commit timestamp.

Changing a commit date info

Reason

My country is under a daylight saving time period and not all my commits are made during the morning/afternoon. Because I commited after 11:00 PM - which, given the local DST, was after 00:00 AM - my 100+ days commit streak got broken - which made me very unhappy.

The process

#!/bin/sh
# This script will setup Evm (Emacs Version Manager) and Cask on
# Travis to use for Emacs Lisp testing.
#
# In .travis.yml, add this:
#
# - curl -fsSkL https://gist.github.com/rejeep/ebcd57c3af83b049833b/raw > x.sh && source ./x.sh
#
# Emacs 24.3 is installed in the above script because Cask requires
@mattly
mattly / tweettrim.rb
Last active March 21, 2016 19:37 — forked from robinsloan/langoliers.rb
Rolling Tweet Deletion
#!/usr/bin/env ruby
require 'rubygems'
require 'twitter'
require 'json'
require 'faraday'
# things you must configure
TWITTER_USER = "you"
# get these from dev.twitter.com
@searls
searls / git-undo
Last active June 19, 2018 09:57
git undo script -- obviously git lacks a real undo feature, but sometimes in a moment frustration it can be worrying to not have the most common commands in mind after one makes a mistake. Just add a file named `git-undo` to a directory on your PATH and then run it with `git undo`
#!/usr/bin/env bash -e
cat <<TEXT
Git has no undo feature, but maybe these will help:
===================================================
## Unstage work
Unstage a file
# Hello, and welcome to makefile basics.
#
# You will learn why `make` is so great, and why, despite its "weird" syntax,
# it is actually a highly expressive, efficient, and powerful way to build
# programs.
#
# Once you're done here, go to
# http://www.gnu.org/software/make/manual/make.html
# to learn SOOOO much more.
@jerodsanto
jerodsanto / Rakefile
Created January 10, 2015 16:51
A code dump showing how we generate "The Changelog Weekly" using the Trello API
require "rubygems"
require "bundler"
require_relative "lib/importer"
Bundler.setup
desc "Import from Trello board"
task :import do
Importer.new(File.dirname(__FILE__)).import ENV["ISSUE"]
end