Skip to content

Instantly share code, notes, and snippets.

@gabtastic
gabtastic / castanet.sh
Created March 6, 2022 22:24 — forked from interfect/castanet.sh
Set up a Chromecast from a Linux PC, without an Android or iOS mobile device and without Google Home
#!/usr/bin/env bash
# castanet.sh: Script to connect a chromecast to a WiFi network.
#
# Allows you to put your Chromecast on WiFi and do Chromecast initial setup
# without using the Google Home app at all, just using a normal Linux computer.
#
# You do need your Chromecast to be on Ethernet, or (untested) to join its setup WiFi
# network with your PC, and you also need to find out its IP yourself with e.g.
# Wireshark.
@gabtastic
gabtastic / oui.txt
Last active September 28, 2022 19:02
This file has been truncated, but you can view the full file.
OUI/MA-L Organization
company_id Organization
Address
00-22-72 (hex) American Micro-Fuel Device Corp.
002272 (base 16) American Micro-Fuel Device Corp.
2181 Buchanan Loop
Ferndale WA 98248
US
#!/bin/sh
dmidecode | grep -qi "Seneca"
rs=$?
if [ $rs ]; then
echo "Seneca, let's go..." 1>&2;
else
exit 1
dmidecode | grep -qi "DELL" || which ipmitool > /dev/null || yum install -y OpenIPMI-tools
dmidecode | grep -qi "DELL" || echo `ipmitool lan print | grep "IP Address "`----`ipmitool raw 0x30 0x70 0x0c 0`
#!/bin/bash
# Supervisor Agent Easy install
# Execute like this:
# curl -k https://gist.githubusercontent.com/gabtastic/bcb3891472056d747af3/raw/0730de896f82f4e530cd2001ee3f59fb1950929c/bootstrap.sh -s | sh
hostname=`hostname`
function installpackage {
echo "Installing $1"
$ ssh [email protected]
Last login: Tue Sep 29 14:10:28 2015 from 173.176.236.193
[root@gitlab-c7 ~]# su gitlab-psql
sh-4.2$ /opt/gitlab/embedded/bin/psql --list
                                         List of databases
         Name         |    Owner    | Encoding | Collate | Ctype |        Access privileges
----------------------+-------------+----------+---------+-------+---------------------------------
 gitlab_ci_production | gitlab_ci   | UTF8     | C       | C     |
 gitlabhq_production  | gitlab      | UTF8     | C       | C     |
#!/bin/bash
# Supervisor Agent Easy install
# Execute like this:
# curl -k https://gist.githubusercontent.com/gabtastic/bcb3891472056d747af3/raw/0730de896f82f4e530cd2001ee3f59fb1950929c/bootstrap.sh -s | sh
hostname=`hostname`
function installpackage {
echo "Installing $1"
#!/usr/bin/env ruby
require 'json'
hostname = `hostname`
# Lookup coordinates and determine timezone
alfred_info = JSON.parse(`curl -s "http://api.atlas.intello.com/ihotel/devices?key=123&hostname=#{hostname}"`, quirks_mode:true)
account = alfred_info[0]['account']
province = alfred_info[0]['province'].downcase
#!/usr/bin/env ruby
# Example output
# {"system_timezone":"EDT","lookup_timezone":"EDT","issue_timezone":false,"db_city":"Montreal","db_province":""}
require 'json'
# Get approximate location
wan = JSON.parse(`curl -s ipinfo.io`.chomp, quirks_mode: true)
hostname = `hostname`