Skip to content

Instantly share code, notes, and snippets.

View prochac's full-sized avatar

Tomáš Karela Procházka prochac

View GitHub Profile
@jedy
jedy / go_scp.go
Last active May 31, 2022 07:20
an example of scp in golang
// https://blogs.oracle.com/janp/entry/how_the_scp_protocol_works
package main
import (
"fmt"
"golang.org/x/crypto/ssh"
)
const privateKey = `content of id_rsa`
@return1
return1 / bitcoin-cpuminer.sh
Last active March 18, 2024 23:23
install a bitcoin cpuminer on ubuntu/debian
# install dependencies
sudo apt-get install libcurl4-openssl-dev libncurses5-dev pkg-config automake yasm
# clone cpuminer
git clone https://github.com/pooler/cpuminer.git
# compile
cd cpuminer
./autogen.sh
./configure CFLAGS="-O3"
@sdorra
sdorra / keys.go
Created April 17, 2016 19:31
Golang RSA Key Generation
/*
* Genarate rsa keys.
*/
package main
import (
"crypto/rand"
"crypto/rsa"
"crypto/x509"
@physacco
physacco / README.md
Last active December 27, 2023 09:05
Python 3 extension example

Python 3 extension example

Build

python3 setup.py build

Output: build/lib.macosx-10.11-x86_64-3.5/hello.cpython-35m-darwin.so

Run

@elerch
elerch / arch-usb-uefi.md
Last active January 26, 2024 22:20
Installation of Arch Linux on a USB stick with UEFI and legacy BIOS Support

Our goal here is to have one USB stick to rule them all. Objectives:

  • We want a full system - not a live CD
  • We want to boot this system on a Macbook Pro (requires UEFI)
  • We want to boot this system on a Acer C720 Chromebook (requires Legacy BIOS support)
  • We want the system "functional"

The last bullet is subject to interpretation, but I'm defining functional as:

  • X Windows works (with LXDE)
@kwilczynski
kwilczynski / buckets.txt
Last active August 28, 2023 14:38
Parse S3 URL into bucket, key, region, version ID, etc. Useful when using AWS SDK for Go.
http://s3.amazonaws.com/bucket/key (for a bucket created in the US East (N. Virginia) region)
https://s3.amazonaws.com/bucket/key
http://s3-region.amazonaws.com/bucket/key
https://s3-region.amazonaws.com/bucket/key
http://s3.region.amazonaws.com/bucket/key
https://s3.region.amazonaws.com/bucket/key
http://s3.dualstack.region.amazonaws.com/bucket/key (for requests using IPv4 or IPv6)
@Ompluscator
Ompluscator / main.go
Created September 25, 2021 11:41
Go Proxy Full
package main
import (
"archive/zip"
"bytes"
"encoding/json"
"fmt"
"io"
"io/ioutil"
"log"
@vkareh
vkareh / jira.desktop
Created May 10, 2023 14:26
Jira TUI
#!/usr/bin/env xdg-open
[Desktop Entry]
Type=Application
Name=Jira
GenericName=Issue tracker
Exec=sh -c "xterm -class Jira -name jira -title Jira -e jira.sh"
StartupWMClass=jira
Icon=jira.png
Terminal=false
Categories=Office;;Network