Skip to content

Instantly share code, notes, and snippets.

@Maximus5
Maximus5 / README.md
Last active August 29, 2015 14:17 — forked from fnichol/README.md

Why?

There is a long standing issue in Ruby where the net/http library by default does not check the validity of an SSL certificate during a TLS handshake. Rather than deal with the underlying problem (a missing certificate authority, a self-signed certificate, etc.) one tends to see bad hacks everywhere. This can lead to problems down the road.

From what I can see the OpenSSL library that Rails Installer delivers has no certificate authorities defined. So, let's go fetch some from the curl website. And since this is for ruby, why don't we download and install the file with a ruby script?

Installation

The Ruby Way! (Fun)

@Maximus5
Maximus5 / csp.hang.log
Created June 19, 2015 14:11
scp hangs after uploading new file to sourceforge
> scp.exe -i %home%\.ssh\id_dsa_sf file.7z conemumaximus,conemu@frs.sourceforge.net:/home/frs/project/c/co/conemu/temp/
Executing: program /usr/bin/ssh host frs.sourceforge.net, user conemumaximus,conemu, command scp -v -t /home/frs/project/c/co/conemu/temp/
OpenSSH_6.7p1, OpenSSL 1.0.2c 12 Jun 2015
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Connecting to frs.sourceforge.net [216.34.181.57] port 22.
debug1: Connection established.
debug1: identity file ***********\\id_dsa_sf type 2
debug1: key_load_public: No such file or directory
debug1: identity file ***********\\id_dsa_sf-cert type -1

Vim, Vundle and ConEmu on Windows

Let's start by getting it out on the table: Sublime Text is great, and version 3 should no longer be considered "abandonware" as of build 3065. Sublime Text served me very, very well over the years. That said, trying out new things is a major part of leveling-up, and in that vein Vim deserves a go. (And have you seen some of those thoughtbot guys flying around in Vim? It's awesome!)

Getting Vim up-and-running on your Windows machine doesn't have to be an all-day project. In this post, we'll walk through:

  • Installing gVim, which gives us both the "classic" command line version as well as the graphical version
  • Installing Vundle, the best way to handle Vim-enhancing packages
  • Installing ConEmu, a supercharged command line emulator for Windows
"disable compatibility mode with Vi
set nocompatible
filetype off
"set rtp+=~/vimfiles/bundle/Vundle.vim
"call vundle#begin('~/vimfiles/bundle')
"Plugin 'VundleVim/Vundle.vim'
]0;fish /home/Max(BWelcome to fish, the friendly interactive shell
Type help(B for instructions on how to use fish
]0;fish /home/Max(B⏎ ~(B $ (B ~(B $ (Becho "***"echo(B "***"(B ~(B $ (Becho(B "***"(B
(B]0;echo /home/Max(B***
]0;fish /home/Max(B⏎ ~(B $ (B
$ pacman -S base-devel
:: There are 52 members in group base-devel:
:: Repository msys
1) asciidoc 2) autoconf 3) autoconf2.13 4) autogen 5) automake-wrapper 6) automake1.10 7) automake1.11 8) automake1.12 9) automake1.13 10) automake1.14 11) automake1.15
12) automake1.6 13) automake1.7 14) automake1.8 15) automake1.9 16) bison 17) diffstat 18) diffutils 19) dos2unix 20) file 21) flex 22) gawk 23) gdb 24) gettext
25) gettext-devel 26) gperf 27) grep 28) groff 29) help2man 30) intltool 31) lemon 32) libtool 33) libunrar 34) m4 35) make 36) man-db 37) pacman 38) patch 39) patchutils
40) perl 41) pkg-config 42) pkgfile 43) rcs 44) scons 45) sed 46) swig 47) texinfo 48) texinfo-tex 49) ttyrec 50) unrar 51) wget 52) xmlto
Enter a selection (default=all):
warning: asciidoc-8.6.9-4 is up to date -- reinstalling
[void][reflection.assembly]::LoadWithPartialName("System.Windows.Forms")
$form = New-Object System.Windows.Forms.Form
$form.Text = "Hello World"
$set_pos = { $form.Location = New-Object System.Drawing.Point(0, 0); }
$form.add_Load($set_pos)
[void]$form.ShowDialog()
@Maximus5
Maximus5 / ping.log
Created April 10, 2016 20:03
ping does not work in bash for Windows
root@localhost:/mnt/c# cat /etc/resolv.conf
nameserver 8.8.8.8
root@localhost:/mnt/c# ping 8.8.8.8
ping: icmp open socket: Socket type not supported
root@localhost:/mnt/c#
@Maximus5
Maximus5 / export_repo_issues_to_csv.py
Created November 28, 2016 09:13 — forked from unbracketed/export_repo_issues_to_csv.py
Export Issues from Github repo to CSV (API v3)
"""
Exports Issues from a specified repository to a CSV file
Uses basic authentication (Github username + password) to retrieve Issues
from a repository that username has access to. Supports Github API v3.
"""
import csv
import requests