Skip to content

Instantly share code, notes, and snippets.

@PogiNate
PogiNate / multiMarkdown.sublime-build
Created May 14, 2012 23:00
Cross-Platform MultiMarkdown Build for Sublime Text 2
{
"osx":
{
"cmd": ["open","-a","/Applications/Marked.app","$file"]
},
"windows":
{
"shell": "true",
"cmd": ["mmd","--smart","$file","&&","explorer","file://$file_path/$file_base_name.html"]
},
@PogiNate
PogiNate / planter.rb
Created December 13, 2012 16:43 — forked from ttscoff/planter.rb
Branch of Brett Terpstra's Planter, with some changes.
#!/usr/bin/env ruby
# ruby script to create a directory structure from indented data.
# Two ways to use it now:
# Pass it a path to a template file.
# p = planter.new
# p.plant(path/to/template.tpl)
#
# or just call it with a simple name and it will look in ~/.planter for a template that matches that name.
# You can put %%X%% variables into templates, where X is a number that corresponds to the index
# of the argument passed when planter is called.
@PogiNate
PogiNate / Multimarkdown_Primer.md
Created January 3, 2013 23:14
A MultiMarkdown Primer that uses as many of the features of MMD that I could think of. The only real purpose of this is as a quick way to find just about any MMD syntax you want and see how it's done. Note that this is MULTIMarkdown, not vanilla markdown or GFM.

Title: A MultiMarkdown Primer Author: Nate Dickson Date: Tuesday, December 18, 2012

#What Is Markdown? Markdown is a way to semantically format your text instead of stylistically formatting it. Markdown uses a set of simple and (somewhat) meaningful marks to set enrich plain text files in a way that makes sense to both humans and computers. Humans can create and style a markdown document, and then use software to render that document in any of a number of formats, depending on what is required. Markdown excels and creating HTML documents, PDF's, ![latex] documents, and other formats.

#How Do You Use It? Markdown documents are plain text files, nothing more. You use Markdown files the way you would any other text file, with simple, easy-to-remember formatting that allows it to be turned into other formats as required.

@PogiNate
PogiNate / TwitterFixer.user.js
Created February 20, 2013 12:54
I used this for a while to put twitter back the way I wanted it. Someday I might use this again, who knows.
// ==UserScript==
// @name Twitter Fixer
// @namespace http://natedickson.com
// @description Moves the twitter dashboard back where I like it.
// @include http://twitter.com/*
// @include https://twitter.com/*
// @version 0.7
// ==/UserScript==
window.addEventListener("load",function(e){
@PogiNate
PogiNate / ndBlog.yml
Created March 21, 2013 11:19
my tmuxinator layout for blogging with Octopress.
# ~/.tmuxinator/ndBlog.yml
project_name: Natedickson_dot_com
project_root: ~/Projects/Blogs/natedickson/octopress
tabs:
- editor:
layout: main-vertical
panes:
- vim
- #zsh at the project root. Useful for issuing rake commands.
@PogiNate
PogiNate / gist:5408412
Created April 17, 2013 22:48
Simple commit hook to update a file. This is mostly for my edification and use, and will probably be of no help to anyone else.
#!/bin/sh
false|tee stats # empty out the stats file
git diff --numstat HEAD HEAD~1 | egrep "txt|rtf|md" >> stats #write the stats file for any text-like files committed.
/Users/username/bin/bookBoard.rb # run a specific ruby script at the end of the commit process
@PogiNate
PogiNate / battinfo.rb
Last active May 22, 2022 10:25
A simple script to format the output from `pmset -g batt` into a row of stars and icons.
#!/usr/bin/env ruby
# encoding: utf-8
full = "★"
empty = "☆"
battery = "🔋"
plug = "⚡"
star_count = 5
per_star = 100/star_count
@PogiNate
PogiNate / leapBlink.rb
Last active August 29, 2015 14:24
A simple little toy to wire the Leap Motion to a Blink(1). Basically I've got two little expensive toys on my desk and I wanted to make them talk to each other.

Keybase proof

I hereby claim:

  • I am PogiNate on github.
  • I am natedickson (https://keybase.io/natedickson) on keybase.
  • I have a public key whose fingerprint is 9267 405F CA2D 5B0D 51F9 092A FB0B 8022 B199 D5A9

To claim this, I am signing this object:

@PogiNate
PogiNate / weatherfile.rb
Last active June 27, 2017 18:41
Create a one line file with weather info in it. Created as an example for Painless Tmux, updated to be worth using. The Emoji works best on MacOS
#! /usr/bin/env ruby
require 'json'
require 'open-uri'
@api_key = "YOUR_API_KEY"
@lat = "40.520882"
@long= "-111.962284"
forecast = JSON.parse(open("https://api.darksky.net/forecast/#{@api_key}/#{@lat},#{@long}").read)
temp = forecast['currently']['temperature']
icon_text = forecast['currently']['icon']
icon =