Skip to content

Instantly share code, notes, and snippets.

View RobCranfill's full-sized avatar

Rob Cranfill RobCranfill

View GitHub Profile
@RobCranfill
RobCranfill / gist:21186a1cea079c697b90
Created January 6, 2016 23:53
How to install VirtualBox 5 so it will use the old NDIS5 network driver, instead of the not-working version 6.
F:\Downloads\ $ VirtualBox-5.0.10-104061-Win.exe -msiparams NETWORKTYPE=NDIS5
@RobCranfill
RobCranfill / gist:41918a7e16d35e9fe9aa
Created January 7, 2016 15:37
Samba control stuff on Debian
sudo systemctl status smbd.service
sudo systemctl restart smbd.service
@RobCranfill
RobCranfill / gist:158df97b048fe6668dfe
Created January 8, 2016 21:32
Force localization 'off' for speed, prettiness
# http://superuser.com/questions/334800/lang-c-is-in-a-number-of-the-etc-init-d-scripts-what-does-lang-c-do-and-why
export LANG=C
@RobCranfill
RobCranfill / gist:956fc23a3959fc0800fe
Last active January 19, 2016 02:03
New Laravel install and update webapp
* Go to parent of web dir
* ``laravel new mathaffirm``
* ``cd mathaffirm/``
* `` composer install``
* git clone https://github.com/RobCranfill/ma.git
@RobCranfill
RobCranfill / gist:6db7f5db6577c28101b2
Created January 21, 2016 05:03
One non-obvious thing to get new Laravel install to work
In /etc/apache2/apache2.conf
# change allowoverride none to all
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
@RobCranfill
RobCranfill / hass_aliases.sh
Created July 6, 2018 15:55
Home Assistant: Aliases
# 'source' this file to incorporate the aliai in your shell env
alias hadown='sudo systemctl stop home-assistant@homeassistant'
alias halogin='sudo su -s /bin/bash homeassistant'
alias harestart='sudo systemctl restart home-assistant@homeassistant'
alias hastatus='sudo systemctl status home-assistant@homeassistant'n
alias haup='sudo systemctl start home-assistant@homeassistant'
alias hawatch='tail -f /var/log/syslog | grep homeassistant'
@RobCranfill
RobCranfill / gist:ee5134296151f00e199f20e1d5e04690
Created July 6, 2018 15:57
Home Assistant: Setting the venv
To activate the environment,
sudo su -s /bin/bash homeassistant
source /srv/homeassistant/bin/activate
#!/bin/bash
# robcranfill@gmail.com for Todd S
# uses 'xmlstarlet' to extract XML data to CSV
# fix input file - example
# sed 's/\x0d\xEF\xBB\xBF/\x0a/g' <ut-landmarks.gpx >ut-landmarks-good.gpx
# - will still have one ^M at start of file?
# rock art - this one is different
@RobCranfill
RobCranfill / exp.sh
Created February 1, 2019 20:15
Extract a boatload of ZIP files (big ones downloaded from my "good riddance to Flickr") in parallel. Uses GNU "parallel".
#!/bin/bash
# extract all zip files in parallel
find . -name "*zip" | parallel --jobs 8 --progress unzip {} -d {/.}.out
@RobCranfill
RobCranfill / configuration.yaml
Created July 4, 2019 22:30
Initial YAML for basic card. WTF?
title: Chez Cran
views:
- path: default_view
title: Home
badges:
- person.rob
- sun.sun
cards:
- type: entities
title: Lights