Skip to content

Instantly share code, notes, and snippets.

View philoserf's full-sized avatar
Remote and happy

Mark Ayers philoserf

Remote and happy
View GitHub Profile
@TfTHacker
TfTHacker / Hypothesidian.js
Last active May 5, 2024 00:58
Hypothes.is - retrieve your annotations into Obsidian (for templater plugin)
<%*
/*
# Hypothes.idian a templater script for retrieving annotations from Hypothes.is
Dev: TfTHacker https://twitter.com/TfTHacker
# Prerequisites:
+ Templater plugin by https://github.com/SilentVoid13/Templater
+ Free Hypothes.is developer token from: https://hypothes.is/account/developer
+ This script will prompt you for his token and save it to a file called "hypothesis config.md"
+ This file store your configuration and can be located any where in your vault.
@mwhite
mwhite / git-aliases.md
Last active April 30, 2024 11:32
The Ultimate Git Alias Setup

The Ultimate Git Alias Setup

If you use git on the command-line, you'll eventually find yourself wanting aliases for your most commonly-used commands. It's incredibly useful to be able to explore your repos with only a few keystrokes that eventually get hardcoded into muscle memory.

Some people don't add aliases because they don't want to have to adjust to not having them on a remote server. Personally, I find that having aliases doesn't mean I that forget the underlying commands, and aliases provide such a massive improvement to my workflow that it would be crazy not to have them.

The simplest way to add an alias for a specific git command is to use a standard bash alias.

# .bashrc
@bzerangue
bzerangue / _verify-repair-permissions-disk.md
Last active April 25, 2024 22:55
Mac OS X Utilities via Terminal: (Verify and Repair: Disk Permissions AND Disk / Software Update / TimeMachine)

Verify and Repair Disk Permissions via Terminal (Mac OS X)

Verify Permissions

diskutil verifyPermissions /

Repair Permissions

diskutil repairPermissions /

--------------------------------------------------
--------------------------------------------------
-- Import tasks from Things to OmniFocus
--------------------------------------------------
--------------------------------------------------
--
-- Script taken from: http://forums.omnigroup.com/showthread.php?t=14846&page=2
-- Added: creation date, due date, start date functionality
-- Empty your Things Trash first.
-- Note that this won't move over scheduled recurring tasks.
package main
import (
"net/http"
"database/sql"
"fmt"
"log"
"os"
)
@skanev
skanev / rubocop.rb
Last active March 13, 2024 08:24
A Rubocop wrapper that checks only added/modified code
#!/usr/bin/env ruby
# A sneaky wrapper around Rubocop that allows you to run it only against
# the recent changes, as opposed to the whole project. It lets you
# enforce the style guide for new/modified code only, as opposed to
# having to restyle everything or adding cops incrementally. It relies
# on git to figure out which files to check.
#
# Here are some options you can pass in addition to the ones in rubocop:
#
@remy
remy / batcharge.py
Last active March 6, 2024 00:57
My zsh set up as of July 25, 2013
#!/usr/bin/env python
# saved to ~/bin/batcharge.py and from
# http://stevelosh.com/blog/2010/02/my-extravagant-zsh-prompt/#my-right-prompt-battery-capacity
#!/usr/bin/env python
# coding=UTF-8
import math, subprocess
p = subprocess.Popen(["ioreg", "-rc", "AppleSmartBattery"], stdout=subprocess.PIPE)
output = p.communicate()[0]
@mvilrokx
mvilrokx / opendyslexic.css
Created January 15, 2013 06:09
OpenDyslexic CSS
@font-face {
font-family: 'opendyslexic';
src: url('http://dyslexicfonts.com/fonts/OpenDyslexic-Regular.otf');
font-style: normal;
font-weight: normal;
}
@font-face {
font-family: 'opendyslexic';
src: url('http://dyslexicfonts.com/fonts/OpenDyslexic-Italic.ttf');
@ttscoff
ttscoff / editscript.rb
Created July 7, 2012 01:26
Fuzzy CLI file search through configured directories, ranked results displayed as menu
#!/usr/bin/env ruby
# encoding: utf-8
# == Synopsis
# Proof of concept using Fuzzy File Finder to locate a script to edit
# Searches a set of predefined locations for a fuzzy string
# e.g. "mwp" matches both "myweatherprogram" and "mowthelawnplease"
# ................on "(m)y(w)eather(p)rogram" and "(m)o(w)thelawn(p)lease"
#
# Results are ranked and a menu is displayed with the most likely
# match at the top. Editor to be launched and directories to search
@ttscoff
ttscoff / tabs2md.rb
Created September 26, 2012 19:48
Convert indented text lists to Markdown outlines
#!/usr/bin/env ruby
# tabs2md
# Brett Terpstra 2012
#
# Convert indented text to Markdown
#
# Great for apps that can copy out indented outlines but not OPML
# For basic outlines (mind maps) to Markdown, faster than OPML
#
# Indents can be tabs or 4 spaces