Skip to content

Instantly share code, notes, and snippets.

View R4wm's full-sized avatar
💝
tab tab tab...

r4wm R4wm

💝
tab tab tab...
View GitHub Profile
@R4wm
R4wm / raspberry_pi_notes.sh
Created September 27, 2019 06:46
raspberry pi install notes for my setip
#!/bin/bash
pacman -S xf86-video-fbdev
@R4wm
R4wm / plots.go
Created September 22, 2019 22:10
example embedded png plots html outputter
package main
import (
"bytes"
"encoding/base64"
"fmt"
"log"
"math/rand"
"net/http"
"time"
@R4wm
R4wm / no_blanking.sh
Created September 15, 2019 22:34
disable screen auto blackout
#!/bin/bash
xset -dpms ; xset s off
@R4wm
R4wm / curlf.sh
Last active August 15, 2019 17:12
source the file then curlf for time formatted results
#!/bin/bash
echo '
time_namelookup: %{time_namelookup}\n
time_connect: %{time_connect}\n
time_appconnect: %{time_appconnect}\n
time_pretransfer: %{time_pretransfer}\n
time_redirect: %{time_redirect}\n
time_starttransfer: %{time_starttransfer}\n
----------\n
time_total: %{time_total}\n' > /tmp/format.txt
@R4wm
R4wm / blocking.go
Last active August 11, 2019 20:32
blocking channel demonstration
package main
import "fmt"
const mock = "haha you waited"
func main() {
c := make(chan string)
@R4wm
R4wm / fan.go
Created July 10, 2019 06:43
Fan In demonstration
package main
import (
"fmt"
"math/rand"
"time"
)
func main() {
fmt.Println("start main")
@R4wm
R4wm / stuff and stuff
Created June 30, 2019 05:38
2 whoami
lfs chroot) I have no name!:/# whoami
root
(lfs chroot) I have no name!:/# which
bash: which: command not found
(lfs chroot) I have no name!:/# find . -iname "whoami" -print
./tools/bin/whoami
./tools/lib/bash/whoami
(lfs chroot) I have no name!:/# file ./tools/bin/whoami
./tools/bin/whoami: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /tools/lib64/ld-linux-x86-64.so.2, for GNU/Linux 3.2.0, with debug_info, not stripped
(lfs chroot) I have no name!:/#
@R4wm
R4wm / create_kjv_es_index.sh
Last active May 19, 2019 21:40
Create Elasticsearch Index for King James Bible
#!/bin/bash
curl https://raw.githubusercontent.com/R4wm/elastic_kjv/master/data/esBulk.json -o /tmp/kjv_es_bulk_payload.json
curl -XPOST -H"Content-Type: application/json" http://localhost:9200/bible/_bulk --data-binary @/tmp/kjv_es_bulk_payload.json
curl http://localhost:9200/_cat/indices?v
curl -XPUT http://localhost:9200/bible/_settings -H"content-type: application/json" -d '{"number_of_replicas": 0}'
@R4wm
R4wm / svn_notes.txt
Last active June 25, 2021 22:51
svn why,...
# Turn on exe on file
svn propset svn:executable on
# Turn off exe on file
svn propdel -R svn:executable
@R4wm
R4wm / get_emacs.sh
Last active February 19, 2019 21:34
installs emacs
#!/bin/bash
emacs_url='http://ftp.wayne.edu/gnu/emacs/emacs-25.3.tar.xz'
echo "Downloading tar from $emacs_url"
apt install libncurses5-dev/xenial -y
cd /tmp
curl -s "$emacs_url" -o emacs-25.3.tar.xz
tar -xvf emacs-25.3.tar.xz
cd emacs-25.3