A quick and dirty script to check out each commit of a writing project and find the word count of each Markdown file at that point in time. You might want to use this on a clone of your writing repository. NO WARRANTY EXPRESS OR IMPLIED.
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>firstLineMatch</key> | |
<string>^Format:\s*(?i:complete)\s*$</string> | |
<key>foldingStartMarker</key> | |
<string>(?x) | |
(<(?i:head|body|table|thead|tbody|tfoot|tr|div|select|fieldset|style|script|ul|ol|form|dl)\b.*?> | |
|<!--(?!.*-->) |
#!/bin/bash | |
# | |
# git-mv-with-history -- move/rename file or folder, with history. | |
# | |
# Moving a file in git doesn't track history, so the purpose of this | |
# utility is best explained from the kernel wiki: | |
# | |
# Git has a rename command git mv, but that is just for convenience. | |
# The effect is indistinguishable from removing the file and adding another | |
# with different name and the same content. |
I want to write plugins for Atom's editor in Ruby. Opal makes this possible. Atom is one of several projects in recent times to combine Chromium with Node.js for a desktop app. While it utilizes chromium for it's gui, and boasts "[e]very Atom window is essentially a locally-rendered web page", writing Atom plugins is more like writing a server-side node.js app than a typical single-page client-side app (albeit with really awesome integration with Chrome Devtools). Opal development, on the other hand, has to-date been focused primarily on the browser use-case.
Because of this, I had to make a choice between using the opal-node package from npm, using Opal via Ruby w/ a compile step, or packaging up opal-parser.js, including it with the app, and writing in compilation on the fly. Each choice came with compromises. Using opal-node would have been easiest, just create a top level index.coffee that required opal-node, and then require in your ruby
// backup your nvAlt file to github as gists | |
// uses openmeta (https://code.google.com/p/openmeta/) | |
'use strict'; | |
var ChildProcess = require('child_process'); | |
var gaze = require('gaze'); | |
var GitHubApi = require('github'); | |
var fs = require('fs'); | |
var _ = require('lodash'); |
=Navigating= | |
visit('/projects') | |
visit(post_comments_path(post)) | |
=Clicking links and buttons= | |
click_link('id-of-link') | |
click_link('Link Text') | |
click_button('Save') | |
click('Link Text') # Click either a link or a button | |
click('Button Value') |
#! /usr/bin/env python | |
""" Convert values between RGB hex codes and xterm-256 color codes. | |
Nice long listing of all 256 colors and their codes. Useful for | |
developing console color themes, or even script output schemes. | |
Resources: | |
* http://en.wikipedia.org/wiki/8-bit_color | |
* http://en.wikipedia.org/wiki/ANSI_escape_code |
=begin | |
To use this build script, first install the bundler gem: | |
$ gem install bundler | |
Then use the `bundle` command to install the dependencies into the project: | |
$ rm -rf Gemfile.lock .bundle | |
bundle config --local git.allow_insecure true | |
bundle config --local build.nokogiri --use-system-libraries |
- Settings > Core Settings > Title Bar: hidden
- Settings > Packages > Tabs > Always Show Tab Bar: false
- Settings > Themes > UI Theme: Apex https://atom.io/themes/apex-ui
- Settings > Themes > Syntax Theme: Apex https://atom.io/themes/apex-syntax
Just you, your code and nothing else.... :meditatingbuddha:
// This requires 0.91.3 or higher, check for beta updates | |
// copy below into ~/.config/karabiner/karabiner.json right below "simple_modifications" | |
"complex_modifications": { | |
"rules": [ | |
{ | |
"manipulators": [ | |
{ | |
"description": "Change caps_lock to command+control+option+shift. Escape if no other key used.", | |
"from": { |