Skip to content

Instantly share code, notes, and snippets.

@apis
apis / secret.go
Created February 6, 2024 15:11
Encode/decode with PBKDF2 key derivation function and AES-256 cipher in Go
package secret
import (
"crypto/aes"
"crypto/cipher"
"crypto/rand"
"crypto/sha1"
"encoding/base64"
"fmt"
"golang.org/x/crypto/pbkdf2"
@apis
apis / parse_iata.rb
Last active October 7, 2024 18:50
Wikipedia IATA railway stations list scrapper, including coordinates. Written on Ruby. Resulting CSV is included.
# Wikipedia IATA railway stations list scrapper, including coordinates
# revision from: 2015-10-20
require 'net/https'
require 'uri'
require 'nokogiri'
require 'csv'
BASE_URL = 'https://en.wikipedia.org'
BASE_PATH = '/wiki/List_of_IATA-indexed_railway_stations'