Skip to content

Instantly share code, notes, and snippets.

View bejaneps's full-sized avatar

Bezhan Mukhidinov bejaneps

  • Outland Legends
  • Cyprus
View GitHub Profile
@sohamkamani
sohamkamani / rsa.go
Created April 12, 2020 17:31
Example of RSA encryption, decryption, signing, and verification in Go
package main
import (
"crypto"
"crypto/rand"
"crypto/rsa"
"crypto/sha256"
"encoding/base64"
"fmt"
)
@leoh0
leoh0 / debugdead.py
Last active January 23, 2024 01:58
debugging dead k8s pod ( copy k8s pods and inject busybox binary and change command to sleep )
#!/usr/bin/env python
import argparse
import os
import subprocess
import sys
import uuid
from tempfile import NamedTemporaryFile
import yaml
@julie-is-late
julie-is-late / rsa_loading.go
Created February 21, 2017 23:37
How to load rsa keys in go
package config
import (
"crypto/rand"
"crypto/rsa"
"crypto/x509"
"encoding/pem"
"io/ioutil"
"github.com/CodeCollaborate/Server/utils"
@jemygraw
jemygraw / golang_rsa_oaep.go
Created November 13, 2014 02:24
Golang RSA-OAEP Encrypt&Decrypt
package main
import (
"crypto/rand"
"crypto/rsa"
"crypto/sha1"
"crypto/x509"
"encoding/base64"
"encoding/pem"
"fmt"
@chilts
chilts / alexa.js
Created October 30, 2013 09:27
Getting the Alexa top 1 million sites directly from the server, unzipping it, parsing the csv and getting each line as an array.
var request = require('request');
var unzip = require('unzip');
var csv2 = require('csv2');
request.get('http://s3.amazonaws.com/alexa-static/top-1m.csv.zip')
.pipe(unzip.Parse())
.on('entry', function (entry) {
entry.pipe(csv2()).on('data', console.log);
})
;