Skip to content

Instantly share code, notes, and snippets.

@trauber
trauber / blocknotesplitter.md
Last active July 10, 2019 12:57
#awk #markdown #firefox_addon
@trauber
trauber / readme.md
Last active October 12, 2015 03:12
grep-like posh Select-String Pipe

As close to grep as I have found so far:

<some-cmd> | Out-String -Stream | Select-String [options] <some-string>

Select-String's -Context option works pretty well ... so far.

@trauber
trauber / readme.md
Created September 12, 2015 18:13
Parameterizing Powershell Variables
[CmdletBinding()]
param (
  [string] $Name,
  [int] $Age
)

Write-Host -Object "Hi $Name!","You are $Age years old!";
@trauber
trauber / -
Last active August 29, 2015 14:07
\raggedbottom in LaTeX Preamble fixes random vertical spacing at end of sections.
@trauber
trauber / readme.md
Last active August 29, 2015 14:06
Comments on the GKOS Smartphone Keyboard (WP)

The gkos keyboard is good for writing short phrases. You write one and then copy and paste it into your document, which is in another program. I imagine you would then clear the gkos buffer and start a new or connected thought.

There are two layouts, alphabetic and optimized. I'm giving the optimized one a try; since it's based on key combination frequencies it should be more ergonomic. I'll probably give the alpha a try as well.

So far I haven't built up much speed, but I've only been using it for one day. My progress in this time convinces me speed will come with practice.

@trauber
trauber / readme.md
Created September 13, 2014 02:52
Shell Script for Finding/Copying Shotwell Photos by Tag

forthcoming

@trauber
trauber / sd.css
Last active December 30, 2015 22:29
sd.css - simple documenation css
img { max-width: 100%; max-height: 100%; }
pre { overflow-x: auto; }
@trauber
trauber / dumbphone.md
Created October 29, 2013 17:39
A Smarter Dumbphone

I can't find any documentation supporting piping stdout to mutt, but it works for me. Provide the -nc to gcal for plain text output. Use --cal to specify a calendar to use. The agenda argument tells gcalcli to list the next three days' events.

gcalcli --nc --cal home agenda| mutt -s "subject here" -c phonenumber1@smsgateway phonenumber2@smsgateway

I run this in my crontab and everbody in the family gets a text message listing upcoming events.

@trauber
trauber / 2013-10-21-ledger-expenses.md
Created October 22, 2013 01:23
A Start at Doing Expenses with ledger
ledger -f ledger.ldg bal ^expenses show "" | less

Groups expenses according to string:string:.... syntax .

@trauber
trauber / README.md
Last active December 14, 2015 23:08
CSS Paragraph Numbering

CSS Paragraph Numbering

A demo of paragraph number with CSS's counter-increment. The demo also includes CSS for handling HTML5 asides.