Skip to content

Instantly share code, notes, and snippets.

View hexatridecimal's full-sized avatar
🤩
Making something beautiful

Janet Jeffus hexatridecimal

🤩
Making something beautiful
View GitHub Profile
@hexatridecimal
hexatridecimal / resize_windows_10_gnome_boxes
Created January 24, 2019 20:20
How to resize a Windows 10 VM paritition in gnome boxes
# sources
# https://www.reddit.com/r/gnome/comments/3ijfm5/cant_increase_vm_disk_size_in_gnome_boxes/
# https://www.howtogeek.com/howto/windows-vista/resize-a-partition-for-free-in-windows-vista/
1. Shutdown windows with the shutdown from the start menu.
2. Right click on the VM in the gnome-boxes vm and select Properties
3. Click on the System tab and drag the slider to the new desired device size.
4. Click the VM to start it.
5. Open the Disk manager.
6. Right Click the volume and click on the Expand volume option.
Verifying that +jeffus is my blockchain ID. https://onename.com/jeffus
function geocode(lat,lon) {
geocoder = new google.maps.Geocoder();
var latlng = new google.maps.LatLng(lat,lon);
geocoder.geocode({'latLng': latlng}, function(results, status) {
if (status == google.maps.GeocoderStatus.OK) {
if (results[0]) {
var address = "", city = "", state = "", zip = "", country = "", formattedAddress = "";
var lat;
var lng;
#!/usr/bin/env perl
use DBI;
use Data::Dumper qw/Dumper/;
my $query = shift(@ARGV);
my $dbh = DBI->connect('dbi:mysql:database=', 'root', 'YoPassword');
my $sth = $dbh->prepare("SHOW PROCESSLIST");
while (1) {
$sth->execute();
@hexatridecimal
hexatridecimal / rsa-test.rb
Created April 12, 2012 15:04 — forked from benders/rsa-test.rb
Ruby RSA using OpenSSL example
require 'openssl'
require 'base64'
require 'stringio'
plaintext = StringIO.new <<-EOF
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Also, because I said so.
EOF
target_key = OpenSSL::PKey::RSA.new(640)
@hexatridecimal
hexatridecimal / google2piwik_automator.rb
Created March 2, 2012 15:19
Google2Piwik Automatic Import of All Web Properties
#!/usr/bin/env ruby
require 'rubygems'
require 'inifile'
require "mysql"
config = IniFile.load('google2piwik.conf')
begin
mysql = config['mysql']
dbh = Mysql.real_connect(mysql['host'],
@hexatridecimal
hexatridecimal / import_tiger2011.rb
Created January 28, 2012 16:15
Geocoder script to build Tiger/LINE 2011
#!/usr/bin/env ruby
require 'tmpdir'
tmp = Dir.tmpdir + "/TIGER2011"
base = Dir.pwd + "/build"
shp2 = base + "/shp2sqlite"
sql = base + "/sql"
lib = Dir.pwd + "/lib/geocoder/us/sqlite3.so"
database = ARGV.shift
@hexatridecimal
hexatridecimal / walmart.txt
Created January 18, 2012 09:39
Letter to Wal-Mart
I've always supported Wal-Mart. Anytime anyone is critical I'm the
guy who stands up and points out how much good Wal-Mart does in our
communities. How much they help to raise the standard of living of
so many different people. I was really upset when I found out that
Wal-Mart is sponsoring SOPA/PIPA legislation in the house and senate.
I've worked in the tech industry for over 15 years, I understand
the technical issues involved and I can assure you that they will
do nothing to slow piracy. The only thing they'll do is put small
business people like myself out of work as we are required to police
our sites for rogue links. This bill is a grave danger to our basic
@hexatridecimal
hexatridecimal / letter.txt
Created January 18, 2012 08:12
Letter to my representative
As an entrepreneur and small business owner I can't afford to police
content. I develop and build websites for small start-ups every day
and I can tell you that building censorship tools would be costly.
Requiring the policing of all user contributed content would bring
most of these start-ups to their knees - removing all the jobs they
create. It is not trivial to remove all forms of links, many sites
struggle with this including Craigslist. Implementing the censorship
of linking is a dangerous and costly solution. Even if a site censors
straight links to a site successfully, it doesn't at all preclude
links which have been designed to get around the filters. Like
@hexatridecimal
hexatridecimal / tiger2011_import.rb
Created January 18, 2012 07:15
Ruby script to import tiger/line 2011 data into geocommons geocoder.db
#!/bin/env ruby
require 'tmpdir'
tmp = Dir.tmpdir + "/TIGER2011"
base = Dir.pwd + "/build"
shp2 = base + "/shp2sqlite"
sql = base + "/sql"
lib = Dir.pwd + "/lib/geocoder/us/sqlite3.so"
database = ARGV.shift