Skip to content

Instantly share code, notes, and snippets.

View karlmcguire's full-sized avatar
✂️
Trimming Complexity

Karl McGuire karlmcguire

✂️
Trimming Complexity
View GitHub Profile
autoload -U colors && colors
PS1="%{$fg[yellow]%}%m %{$reset_color%}%{$fg[magenta]%}(%~)%{$reset_color%} "
alias ls="ls -G"
alias v="nvim"
alias t="tmux"
alias tl="tmux list-sessions"
alias ta="tmux attach-session -t "
LDFLAGS = -ltermbox -I.
CFLAGS = -g -std=c99 -pedantic-errors
tanb: tanb.c
${CC} -o $@ ${CFLAGS} tanb.c ${LDFLAGS}
clean:
rm tanb
@karlmcguire
karlmcguire / battery.go
Created June 17, 2019 22:38
Mac battery percentage in Go.
package main
import (
"bytes"
"errors"
"fmt"
"os/exec"
)
var ErrOutput = errors.New("invalid pmset output")
<p>You can email me until I get a contact form up and running for this site. My email is: karl (at) karlmcguire (dot) com.</p>
<p>This is meant to be a community of people who enjoy customizing and sharing their Unix desktops. We'd like to create a simple interface in order to highlight your creations. This platform is still under heavy development, but check back in after a few months and it should be up and running — ready to host your screenshots and dotfiles.</p>
<h2>Vision</h2>
<p>Blit.io will be a community website for sharing screenshots and configuration files related to Linux/Unix software. I started the website nixers.net years ago and it has grown to 1,500 members. I have since been contacted multiple times to create a screenshot-centric website for users to display their desktop configurations and collaborate/share files, discuss, and learn new techniques.</p>
<p>The intended users of the website will be current members of nixers.net who are mostly people working in tech fields with an interest in Linux/Unix and open source software. There is a large community of these people at <a href="https://reddit.com/r/unixart">r
@karlmcguire
karlmcguire / tweets.py
Last active April 13, 2019 17:34
Simple little tweet scraper (as of April 2019).
#!/usr/bin/env python
from requests import get
from bs4 import BeautifulSoup as soup
from functools import reduce
# get the raw html from twitter
resp = get("https://twitter.com/kanyewest")
# iterate through all tags with the "tweet-text" class, which should be the
# tweet containers (at least until they change it)

Keybase proof

I hereby claim:

  • I am karlmcguire on github.
  • I am karlmcguire (https://keybase.io/karlmcguire) on keybase.
  • I have a public key whose fingerprint is 548F A086 FA1C 6601 601E F011 AAA8 A68C 8EA2 53A8

To claim this, I am signing this object: