Skip to content

Instantly share code, notes, and snippets.

View radeksimko's full-sized avatar

Radek Simko radeksimko

View GitHub Profile
@radeksimko
radeksimko / show-invalid-csv-lines.py
Created February 17, 2015 08:05
Usage: ./show-invalid-csv-lines.py <filename.csv>
#!/usr/bin/env python
import sys
DELIMITER = '|'
line_number = 0
with open(sys.argv[1], 'r') as fh:
header = fh.readline()
delim_in_header = header.count(DELIMITER)
@radeksimko
radeksimko / github_contributions.go
Created June 26, 2015 09:21
Get number of contributions & followers for all members of a GH organization. Run as `go run github_contributions.go ORG_NAME`
package main
import (
"bytes"
"fmt"
"io/ioutil"
"log"
"net/http"
"os"
"strconv"
package main
import (
"bufio"
"fmt"
"io"
"net/http"
"os"
"sync"
)
@radeksimko
radeksimko / how-to.md
Last active June 22, 2022 11:44
VPC endpoint Terraform example setup

How to

ssh ec2-user@IP
aws configure set region us-west-2
aws s3 ls # listing s3 buckets over VPC endpoint privately
package main
import (
"fmt"
"net/http"
"os"
"sync"
"time"
)

Keybase proof

I hereby claim:

  • I am radeksimko on github.
  • I am radeksimko (https://keybase.io/radeksimko) on keybase.
  • I have a public key whose fingerprint is B422 C890 CD4F D2F7 9ADC 27D0 4DEC CD28 668E D457

To claim this, I am signing this object:

#!/bin/bash
HOMEBREW_PREFIX="/usr/local"
sudo rm -rf \
$HOMEBREW_PREFIX/etc/libvirt \
$HOMEBREW_PREFIX/var/cache/libvirt \
$HOMEBREW_PREFIX/var/lib/libvirt \
$HOMEBREW_PREFIX/var/log/libvirt \
$HOMEBREW_PREFIX/var/run/libvirt
@radeksimko
radeksimko / terraform.rb
Last active September 2, 2016 09:15
Hashicorp Casks, because binaries *just work* and are easier to maintain
cask 'terraform' do
version '0.7.2'
sha256 '2a441124efd097007414545714927a9239980a5b0707384b0ee07badbae781cf'
# hashicorp.com/terraform was verified as official when first introduced to the cask
url "https://releases.hashicorp.com/terraform/#{version}/terraform_#{version}_darwin_amd64.zip"
appcast 'https://github.com/hashicorp/terraform/releases.atom',
checkpoint: '249f260a8fda094ce3d50512f8922a07a5a676e52a6a64896fa89fdcaeef84c7'
name 'Terraform'
homepage 'https://www.terraform.io/'
@radeksimko
radeksimko / terraform.rb
Created September 26, 2016 08:04
Terraform 0.6.16
cask 'terraform' do
version '0.6.16'
sha256 '23feb79263126877e6128a03c600cd626f6691a118a474694c5ad45cc5da9366'
url "https://releases.hashicorp.com/terraform/#{version}/terraform_#{version}_darwin_amd64.zip"
appcast 'https://github.com/hashicorp/terraform/releases.atom',
checkpoint: 'afab489bef8c160cb685e558bc30f1e1b8225f42b4a84febf93bfbbed688b860'
name 'Terraform'
homepage 'https://www.terraform.io/'
license :mpl
@radeksimko
radeksimko / virtualbox.rb
Created October 27, 2016 11:24
Virtualbox 5.0.x
cask 'virtualbox' do
version '5.0.26-108824'
sha256 'e8836a98adea9350917a41e754dfec4fe2df7c4a0224fd8beca72cbc5d778437'
url "http://download.virtualbox.org/virtualbox/#{version.sub(%r{-.*}, '')}/VirtualBox-#{version}-OSX.dmg"
appcast 'http://download.virtualbox.org/virtualbox/LATEST.TXT',
checkpoint: '280bd9701a0fcbe1d7ef2e23ffede42d31db69bedaeb7b46084e450e653d8224'
name 'Oracle VirtualBox'
homepage 'https://www.virtualbox.org'