Skip to content

Instantly share code, notes, and snippets.

View alrayyes's full-sized avatar

Ryan Kes alrayyes

View GitHub Profile
#!/bin/sh
# This assumes you have:
# 1) A user called `hubot` in charge of the bot.
# 2) A file called /home/hubot/.hubotrc that contains the Hubot credentials.
#
# To set the adapter either edit bin/hubot to specify what you want or append
# `-- -a campfire` to the $DAEMON variable below.
#
### BEGIN INIT INFO
@alrayyes
alrayyes / lostchildren.sh
Created April 29, 2014 22:41
Command to list songs iTunes mangled when I tried moving my library to my Nas and back. Moral of the story: Don't use iTunes.
#!/bin/sh
find ~/Music/iTunes/iTunes\ Media/Music -depth 3 -type d
echo "Number of files remaining:" && find ~/Music/iTunes/iTunes\ Media/Music -depth 3 -type d | wc -l
@alrayyes
alrayyes / osx-for-hackers.sh
Created September 22, 2015 15:43 — forked from brandonb927/osx-for-hackers.sh
OSX for Hackers: Yosemite Edition. This script tries not to be *too* opinionated and any major changes to your system require a prompt. You've been warned. Also, please don't email me about this script, my poor inbox...
#!/bin/sh
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Set the colours you can use
black='\033[0;30m'
white='\033[0;37m'
red='\033[0;31m'
@alrayyes
alrayyes / gist:79bfc9bfc51d44c505cf
Last active October 3, 2015 15:53
docker-machine --debug ls
executing: /usr/local/bin/VBoxManage showvminfo default --machinereadable
STDOUT: name="default"
groups="/"
ostype="Linux 2.6 / 3.x / 4.x (64-bit)"
UUID="b010cf27-762c-4387-9716-0a896d6ada0d"
CfgFile="/Users/l0rd/.docker/machine/machines/default/default/default.vbox"
SnapFldr="/Users/l0rd/.docker/machine/machines/default/default/Snapshots"
LogFldr="/Users/l0rd/.docker/machine/machines/default/default/Logs"
hardwareuuid="b010cf27-762c-4387-9716-0a896d6ada0d"
@alrayyes
alrayyes / gist:a2a8fa7ad0747d5c8b2b
Created October 3, 2015 16:09
vbox.log docker-machine
00:00:00.335393   SMEP - Supervisor Mode Execution Prevention             = 0 (0)
00:00:00.335395   BMI2 - Advanced Bit Manipulation extension 2            = 0 (0)
00:00:00.335396   ERMS - Enhanced REP MOVSB/STOSB instructions            = 0 (0)
00:00:00.335397   INVPCID - INVPCID instruction                           = 0 (0)
00:00:00.335399   RTM - Restricted Transactional Memory                   = 0 (0)
00:00:00.335400   PQM - Platform Quality of Service Monitoring            = 0 (0)
00:00:00.335401   DEPFPU_CS_DS - Deprecates FPU CS, FPU DS values if set  = 0 (0)
00:00:00.335402   MPE - Intel Memory Protection Extensions                = 0 (0)
00:00:00.335403   PQE - Platform Quality of Service Enforcement           = 0 (0)
@alrayyes
alrayyes / LICENSE
Last active May 2, 2016 11:33 — forked from msqr/LICENSE
d3 gauge
This code is released under the MIT license.
Copyright (C) 2012 Matt Magoffin
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
@alrayyes
alrayyes / Remove all containers based on Docker image name.md
Last active October 6, 2018 07:40
Remove all containers based on Docker image name

Keybase proof

I hereby claim:

  • I am alrayyes on github.
  • I am alrayyes (https://keybase.io/alrayyes) on keybase.
  • I have a public key ASBbJnrEWvMPvAKoZrw-c8xvEBL2VOeu89wKoykocCqP7wo

To claim this, I am signing this object:

@alrayyes
alrayyes / cf.sh
Created August 27, 2017 19:27 — forked from jaytaylor/cf.sh
CloudFlare command-line DNS management shell script, now with CloudFlare v4 API support!
#!/usr/bin/env bash
##
# @author Jay Taylor [@jtaylor]
# @date 2013-08-15
#
# @description CloudFlare management script.
#
# Path ENV VAR override.
@alrayyes
alrayyes / ssh-dmenu
Created June 1, 2019 11:42
A little dmenu script I made to handle ssh connections
#!/bin/bash
# get hostnames from ~/.ssh/known_hosts
ssh_host="$(awk -F "[ ,]+" '{print $1}' ~/.ssh/known_hosts | tr -d '[]' | uniq | sort -n | dmenu)"
# split hostnames into array { hostname, port }
mapfile -t params < <(echo "$ssh_host" | awk -F ":" '{print $1} {if ($2) print $2}')
if [ -n "$ssh_host" ]; then
# If array size is two then second parameter is port number
if [ ${#params[@]} -eq 2 ]; then