Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
_filename=$1
_outputfile="frobnicated"
#For each file:
# get a list of non-unique ids
_non_unique_ids=$(cut -d',' -f1 "${_filename}" | sort | uniq -d)
#
# next, split your file into 2 piles
homeassistant:
name: Home
latitude: x
longitude: x
elevation: x
unit_system: imperial
time_zone: America/New_York
customize:
# Garage Door
@unxmaal
unxmaal / backup.sh
Last active December 3, 2016 18:10 — forked from anonymous/backup.sh
A backup script for daily file and database backups for a single website
#!/bin/bash
### Globals
# Set the date
date=$(date +"%d-%b-%Y")
# Set default file permissions
umask 117
# Site name
# site_name="sitename.com"
@unxmaal
unxmaal / gist:ad58b9c3cf8d7ddfdf4295b693cca274
Last active January 26, 2018 01:31
bigswitch qmk fail
$ make -f Makefile bigswitch:default
QMK Firmware 0.5.20
Making bigswitch with keymap default
avr-gcc (GCC) 7.2.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Compiling: keyboards/bigswitch/bigswitch.c In file included from ./quantum/quantum.h:31:0,
# generate host keys
ssh-keygen -t rsa /tmp/ssh_host_rsa_key
ssh-keygen -t dsa /tmp/ssh_host_dsa_key
# create /usr/local/etc/sshd.conf
# Changed items in /usr/local/etc/sshd.conf
Port 22
ListenAddress <host IP>
SyslogFacility AUTH
``````==== Installation ====
=== Irixboot ===
* Get irixboot from https://github.com/halfmanhalftaco/irixboot
* Connect direct p2p ethernet from mac eth1 to SGI
* Set mac to 172.16.1.1
* Configure Vagrantfile as follows
irixversion = '6.5'
clientname = 'indy'
This file has been truncated, but you can view the full file.
Script started on Sun Feb 17 10:44:24 2019
[root@blue:/usr/pkgsrc/archivers/bzip2] # bmake install
===> Checking for vulnerabilities in bzip2-1.0.6nb1
===> Installing dependencies for bzip2-1.0.6nb1
=> Tool dependency libtool-base>=2.4.2nb9: found libtool-base-2.4.6nb2
===> Overriding tools for bzip2-1.0.6nb1
===> Extracting for bzip2-1.0.6nb1
/sbin/cp -r /usr/pkgsrc/archivers/bzip2/files /usr/pkgsrc/archivers/bzip2/work/bzip2-1.0.6
===> Patching for bzip2-1.0.6nb1
===> Creating toolchain wrappers for bzip2-1.0.6nb1
root@Whiskey:/config/scripts# python /config/scripts/eap_proxy.py --restart-dhcp --ignore-when-wan-up --ignore-logoff --ping-gateway --set-mac eth0 eth2
[2019-03-03 23:09:18,726]: proxy_loop starting
[2019-03-03 23:09:25,160]: eth0: 00:90:d0:63:ff:01 > 01:80:c2:00:00:03, EAP packet (0) v1, len 15, Request (1) id 38, len 15 [11] > eth2
[2019-03-03 23:09:25,205]: exception in getifhwaddr line 156 (IOError: [Errno 2] No such file or directory: '/sys/class/net/eth0.0/address'); restarting in 10 seconds
Traceback (most recent call last):
File "/config/scripts/eap_proxy.py", line 541, in proxy_forever
self.proxy_loop()
File "/config/scripts/eap_proxy.py", line 561, in proxy_loop
on_poll_event(socks[fd], event)
File "/config/scripts/eap_proxy.py", line 580, in on_poll_event
--- lzmadec-xzdec.o ---
In file included from /opt/local/gcc-8.2.0/lib/gcc/mips-sgi-irix6.5/8.2.0/include-fixed/internal/stdio_core.h:424,
from /opt/local/gcc-8.2.0/lib/gcc/mips-sgi-irix6.5/8.2.0/include-fixed/stdio.h:18,
from /usr/include/inttypes.h:185,
from /usr/pkgsrc/archivers/xz/work/.buildlink/include/inttypes.h:1,
from ../../src/common/sysdefs.h:36,
from xzdec.c:13:
../../config.h:474:25: error: conflicting types for 'rpl_getopt_long'
#define __GETOPT_PREFIX rpl_
^~~~
# Ran this:
gcc -DHAVE_CONFIG_H -I. -I./src -DPKGLIBDIR="\"/usr/pkg/lib/mpg123\"" -I./src -I./src/compat -I./src/libmpg123 -I./src/libout123 -I./src/libmpg123 -I./src/libout123 -DGENERIC -DOPT_GENERIC -DREAL_IS_FLOAT -DNOXFERMEM -D_POSIX90 -D_POSIX90 -DDEVOSSAUDIO="\"\"" -DDEVOSSSOUND="\"\"" -I/usr/pkg/include -I/usr/include -std=gnu99 -g0 -O2 -mips4 -std=gnu99 -g0 -O2 -mips4 -I/usr/pkg/include -I/usr/include -MT src/local.o -MD -MP -MF $depbase.Tpo -c -E -o src/local.o src/local.c
src/local.o: src/local.c src/config.h /usr/include/locale.h \
/usr/include/internal/locale_core.h \