Skip to content

Instantly share code, notes, and snippets.

View rasa's full-sized avatar

Ross Smith II rasa

View GitHub Profile
@rasa
rasa / gist:6109248
Last active December 20, 2015 09:39
Running
regedit /e hklm.reg HKEY_LOCAL_MACHINE
regedit /e classes.reg HKEY_CLASSES_ROOT\\Applications
iconv -f UTF-16 -t UTF-8 hklm.reg >hklm8.reg
iconv -f UTF-16 -t UTF-8 classes.reg >classes8.reg
grep -inC 5 'C:\\\\Program Files (x86)\\\\VMware\\\\VMware Workstation' hklm8.reg >hklm-found.txt
grep -inC 5 'C:\\\\Program Files (x86)\\\\VMware\\\\VMware Workstation' classes8.reg >classes-found.txt
produced the following:
Aug 5 21:06:57 ubuntu-server-raring-32 mysqld_safe[3462]: /usr/bin/mysql_install_db: line 37: use: command not found
Aug 5 21:06:57 ubuntu-server-raring-32 mysqld_safe[3462]: /usr/bin/mysql_install_db: line 38: use: command not found
Aug 5 21:06:57 ubuntu-server-raring-32 mysqld_safe[3462]: /usr/bin/mysql_install_db: line 39: use: command not found
Aug 5 21:06:57 ubuntu-server-raring-32 mysqld_safe[3462]: /usr/bin/mysql_install_db: line 40: use: command not found
Aug 5 21:06:57 ubuntu-server-raring-32 mysqld_safe[3462]: /usr/bin/mysql_install_db: line 41: use: command not found
Aug 5 21:06:57 ubuntu-server-raring-32 mysqld_safe[3462]: /usr/bin/mysql_install_db: line 42: use: command not found
Aug 5 21:06:57 ubuntu-server-raring-32 mysqld_safe[3462]: /usr/bin/mysql_install_db: line 43: use: command not found
Aug 5 21:06:57 ubuntu-server-raring-32 mysqld_safe[3462]: /usr/bin/mysql_install_db: line 45: syntax error near unexpected token `"pass_through"'
Aug 5 21:06:57 ubuntu-server-raring-32 mysqld_safe
@rasa
rasa / install-mysql-5.6.sh
Created August 15, 2013 23:55
Install 5.6 on Ubuntu using password 'password'
dpkg -s mysql-client >/dev/null 2>&1 &&
sudo apt-get -y remove mysql-client
dpkg -s mysql-server >/dev/null 2>&1 &&
sudo apt-get -y remove mysql-server
command -v debconf-set-selections ||
sudo apt-get -y install debconf-utils
sudo debconf-set-selections <<< "mysql-server-5.6 mysql-server/root_password password password"
sudo debconf-set-selections <<< "mysql-server-5.6 mysql-server/root_password_again password password"
command -v add-apt-repository ||
sudo apt-get -y install software-properties-common
@rasa
rasa / mingw-build-minimul.sh
Last active December 21, 2015 15:19
Build win32 aria2c using: --without-sqlite3 --without-libxml2 --without-libexpat --disable-bittorrent --disable-metalink --without-libgcrypt --without-libnettle
#!/bin/bash
set -x
set -e
test -z "$HOST" && HOST=i686-w64-mingw32
test -z "$PREFIX" && PREFIX=/usr/local/$HOST
OPENSSL_URL=http://www.openssl.org/source/openssl-1.0.1f.tar.gz
SQLITE_URL=http://www.sqlite.org/2014/sqlite-autoconf-3080301.tar.gz
2013/10/02 12:10:42 Packer Version: 0.3.9
2013/10/02 12:10:42 Packer Target OS/Arch: windows amd64
2013/10/02 12:10:42 Attempting to open config file: C:\Users\ross\AppData\Roaming\packer.config
2013/10/02 12:10:42 File doesn't exist, but doesn't need to. Ignoring.
2013/10/02 12:10:42 Packer config: &{PluginMinPort:0 PluginMaxPort:0 Builders:map[amazon-ebs:packer-builder-amazon-ebs amazon-chroot:packer-builder-amazon-chroot amazon-instance:packer-builder-amazon-instance digitalocean:packer-builder-digitalocean openstack:packer-builder-openstack virtualbox:packer-builder-virtualbox vmware:packer-builder-vmware] Commands:map[build:packer-command-build fix:packer-command-fix inspect:packer-command-inspect validate:packer-command-validate] PostProcessors:map[vagrant:packer-post-processor-vagrant] Provisioners:map[chef-solo:packer-provisioner-chef-solo file:packer-provisioner-file puppet-masterless:packer-provisioner-puppet-masterless shell:packer-provisioner-shell salt-masterless:packer-provisioner-salt-masterl
2013/10/02 12:10:37 Packer Version: 0.3.9
2013/10/02 12:10:37 Packer Target OS/Arch: windows amd64
2013/10/02 12:10:37 Attempting to open config file: C:\Users\ross\AppData\Roaming\packer.config
2013/10/02 12:10:37 File doesn't exist, but doesn't need to. Ignoring.
2013/10/02 12:10:37 Packer config: &{PluginMinPort:0 PluginMaxPort:0 Builders:map[amazon-ebs:packer-builder-amazon-ebs amazon-chroot:packer-builder-amazon-chroot amazon-instance:packer-builder-amazon-instance digitalocean:packer-builder-digitalocean openstack:packer-builder-openstack virtualbox:packer-builder-virtualbox vmware:packer-builder-vmware] Commands:map[build:packer-command-build fix:packer-command-fix inspect:packer-command-inspect validate:packer-command-validate] PostProcessors:map[vagrant:packer-post-processor-vagrant] Provisioners:map[chef-solo:packer-provisioner-chef-solo file:packer-provisioner-file puppet-masterless:packer-provisioner-puppet-masterless shell:packer-provisioner-shell salt-masterless:packer-provisioner-salt-masterl
2013/10/02 21:16:22 Packer Version: 0.3.9
2013/10/02 21:16:22 Packer Target OS/Arch: windows amd64
2013/10/02 21:16:22 Attempting to open config file: C:\Users\ross\AppData\Roaming\packer.config
2013/10/02 21:16:22 File doesn't exist, but doesn't need to. Ignoring.
2013/10/02 21:16:22 Packer config: &{PluginMinPort:0 PluginMaxPort:0 Builders:map[amazon-ebs:packer-builder-amazon-ebs amazon-chroot:packer-builder-amazon-chroot amazon-instance:packer-builder-amazon-instance digitalocean:packer-builder-digitalocean openstack:packer-builder-openstack virtualbox:packer-builder-virtualbox vmware:packer-builder-vmware] Commands:map[build:packer-command-build fix:packer-command-fix inspect:packer-command-inspect validate:packer-command-validate] PostProcessors:map[vagrant:packer-post-processor-vagrant] Provisioners:map[chef-solo:packer-provisioner-chef-solo file:packer-provisioner-file puppet-masterless:packer-provisioner-puppet-masterless shell:packer-provisioner-shell salt-masterless:packer-provisioner-salt-masterl
@rasa
rasa / gist:7086767
Last active December 26, 2015 03:29
git rebase failure
ross@pv1:~/repos$ git clone git@github.com:rasa/packer.git
Cloning into 'packer'...
Warning: Permanently added 'github.com' (RSA) to the list of known hosts.
remote: Counting objects: 12193, done.
remote: Compressing objects: 100% (6880/6880), done.
remote: Total 12193 (delta 5643), reused 11468 (delta 5003)
Receiving objects: 100% (12193/12193), 5.69 MiB | 351 KiB/s, done.
Resolving deltas: 100% (5643/5643), done.
ross@pv1:~/repos$ cd packer
C:\github\rasa\basebox-packer\vmware>vagrant provision
[win7x64-pro] Running provisioner: shell...
C:\Users\vagrant>ipconfig /all
Windows IP Configuration
Host Name . . . . . . . . . . . . : WINDOWS-79RB2TL
Primary Dns Suffix . . . . . . . :
Node Type . . . . . . . . . . . . : Hybrid
package vmware
import (
"fmt"
"github.com/mitchellh/multistep"
"github.com/mitchellh/packer/packer"
"log"
"io/ioutil"
"math/rand"
"net"