I hereby claim:
- I am djhworld on github.
- I am djhworld (https://keybase.io/djhworld) on keybase.
- I have a public key ASBuDsFo40OPjQUbBHDIr1dXS_7QOXG7NGajhjKYUIzVnQo
To claim this, I am signing this object:
| #!/bin/bash | |
| # could probably get this to work with GNU grep but using ripgrep for now | |
| check=$(cat /proc/acpi/wakeup | /usr/bin/rg XHC1 | /usr/bin/rg disabled) | |
| if [[ $check == '' ]]; then | |
| echo "Wakeup from XHC1 is enabled - disabling!" | |
| echo XHC1 > /proc/acpi/wakeup | |
| else |
| use std::collections::HashMap; | |
| use std::io; | |
| use std::io::BufRead; | |
| struct Counter { | |
| items: HashMap<String, usize>, | |
| } | |
| impl Counter { | |
| fn new() -> Counter { |
| package main | |
| import ( | |
| "bufio" | |
| "fmt" | |
| "os" | |
| ) | |
| type Counter struct { | |
| uniqueItems map[string]int |
I hereby claim:
To claim this, I am signing this object:
| #!/bin/bash | |
| RED=`tput setaf 1` | |
| GREEN=`tput setaf 2` | |
| RESET=`tput sgr0` | |
| # test devised by gordonDrogon | |
| function testpin { | |
| pin=$1 | |
| echo -n "Testing GPIO pin #$pin..." | |
| gpio mode $pin in |
| public class BeadSort { | |
| private static final int BEAD = 1; | |
| public void sort(int[] array) { | |
| int[][] abacus = populateAbacusAndWipeInput(array); | |
| for (int pole = 0; pole < abacus[0].length; pole++) { | |
| int poleRow = abacus.length - 1; | |
| for (int currentRow = poleRow; currentRow >= 0; currentRow--) { | |
| if (abacus[currentRow][pole] == BEAD) { |
| function prompt { | |
| echo $1 | |
| read -p "Ready? " -n 1 -r | |
| echo # (optional) move to a new line | |
| if [[ $REPLY =~ ^[Yy]$ ]] | |
| then | |
| echo | |
| else | |
| echo "Quitting" | |
| exit |
| package main | |
| import ( | |
| "fmt" | |
| "os" | |
| "strconv" | |
| "strings" | |
| ) | |
| func main() { |
| ; A REPL-based, annotated Seesaw tutorial | |
| ; Please visit https://github.com/daveray/seesaw for more info | |
| ; | |
| ; This is a very basic intro to Seesaw, a Clojure UI toolkit. It covers | |
| ; Seesaw's basic features and philosophy, but only scratches the surface | |
| ; of what's available. It only assumes knowledge of Clojure. No Swing or | |
| ; Java experience is needed. | |
| ; | |
| ; This material was first presented in a talk at @CraftsmanGuild in | |
| ; Ann Arbor, MI. |