Skip to content

Instantly share code, notes, and snippets.

View jnimety's full-sized avatar

Joel Nimety jnimety

  • Continuity Control
  • Austin, TX
View GitHub Profile
@jnimety
jnimety / implicit_tls_ftp.rb
Last active February 1, 2023 15:11
Ruby Net::FTP Implicit TLS
# Assumes a recent version of ruby with TLS and Explicit TLS support
class ImplicitTlsFTP < Net::FTP
FTP_PORT = 990
def connect(host, port = FTP_PORT)
synchronize do
@host = host
@bare_sock = open_socket(host, port)
begin
ssl_sock = start_tls_session(Socket.tcp(host, port))
@jnimety
jnimety / keybase.md
Created August 11, 2017 22:06
keybase.md

Keybase proof

I hereby claim:

  • I am jnimety on github.
  • I am jnimety (https://keybase.io/jnimety) on keybase.
  • I have a public key ASBn20uvMmdSa6IfTvRlyPcjZn9U9nEZBBadX__C0YmZ5Ao

To claim this, I am signing this object:

def do_something
...
rescue ErrorName => e
...
ensure
header.ack
end
@jnimety
jnimety / gist:6848946
Last active December 24, 2015 19:18
rbx crash report, happens randomly during rack spec
Rubinius Crash Report #rbxcrashreport
Error: signal �SIGSEGV
[[Backtrace]]
0 rbx 0x00000001033fa510 _ZN8rubiniusL12segv_handlerEi + 544�
1 libsystem_c.dylib 0x00007fff8cd6090a _sigtramp + 26�
2 ??? 0x00000000000000ff 0x0 + 255�
3 rbx 0x000000010355bcbb _ZN8rubinius7BakerGC7collectEPNS_6GCDataEPNS_17YoungCollectStatsE + 157�
4 rbx 0x00000001034a793b _ZN8rubinius12ObjectMemory13collect_youngEPNS_5StateEPNS_6GCDataEPNS_17YoungCollectStatsE + 85�
@jnimety
jnimety / gist:5541114
Created May 8, 2013 15:10
github ssh config
Host github.com
User git
Hostname github.com
PreferredAuthentications publickey
IdentityFile ~/.ssh/github-id_rsa
USER='capistrano'
if [ `whoami` != "$USER" ]; then
su $USER "$0"
exit
fi
source /usr/local/rvm/environments/ruby-1.9.3-p392
cd $APP_DIR
export VBOX_VERSION=$(cat /home/vagrant/.vbox_version)
cd /tmp
wget http://download.virtualbox.org/virtualbox/$VBOX_VERSION/VBoxGuestAdditions_$VBOX_VERSION.iso
mount -o loop,ro VBoxGuestAdditions_$VBOX_VERSION.iso /mnt
sh /mnt/VBoxLinuxAdditions.run
umount /mnt
rm VBoxGuestAdditions_$VBOX_VERSION.iso