Skip to content

Instantly share code, notes, and snippets.

View libmonsoon-dev's full-sized avatar

libmonsoon-dev

View GitHub Profile
@bakirillov
bakirillov / hedgestick_v1.py
Created April 19, 2022 14:57
HedgeStick v1
from sdf import *
s = tetrahedron(0.75)
s = s.translate(Z * -3) | s.translate(Z * 3)
f = sphere(3).union(
s.orient(X), s.orient(Y), s.orient(Z),
s.orient(X+Y), s.orient(Y+Z), s.orient(X+Y+Z),
k=1
)
d = box((30, 30, 2)).translate(Z*-2)
@wongoo
wongoo / rsautil.go
Created August 1, 2019 03:19
golang RSA utility, include encrypt/decrypt/signature
//author: http://github.com/wongoo
//date: 20190717
package rsautil
import (
"bytes"
"crypto"
"crypto/rand"
"crypto/rsa"
@syntaqx
syntaqx / cloud-init.yaml
Last active September 30, 2025 19:50
cloud init / cloud config to install Docker on Ubuntu
#cloud-config
# Option 1 - Full installation using cURL
package_update: true
package_upgrade: true
groups:
- docker
system_info:
@benwattsjones
benwattsjones / gmail_mbox_parser.py
Last active October 28, 2025 02:37
Quick python code to parse mbox files, specifically those used by GMail. Extracts sender, date, plain text contents etc., ignores base64 attachments.
#! /usr/bin/env python3
# ~*~ utf-8 ~*~
import mailbox
import bs4
def get_html_text(html):
try:
return bs4.BeautifulSoup(html, 'lxml').body.get_text(' ', strip=True)
except AttributeError: # message contents empty
@liasica
liasica / macaddr.go
Created March 20, 2018 02:31
a simple example of how to grab a mac address in Golang.
// getMacAddr gets the MAC hardware
// address of the host machine
func getMacAddr() (addr string) {
interfaces, err := net.Interfaces()
if err == nil {
for _, i := range interfaces {
if i.Flags&net.FlagUp != 0 && bytes.Compare(i.HardwareAddr, nil) != 0 {
// Don't use random as we have a real address
addr = i.HardwareAddr.String()
break
@random-robbie
random-robbie / Fix
Created March 21, 2017 08:35
kex error : no match for method server host key algo: server [ssh-rsa,ssh-dss,ecdsa-sha2-nistp256], client [ssh-ed25519] notepad++
1) nano /etc/ssh/sshd_config
2) Add this line'HostKey /etc/ssh/ssh_host_ed25519_key'
3) ssh-keygen -q -f /etc/ssh/ssh_host_ed25519_key -N "" -t ed25519
4) /etc/init.d/dropbear force-reload
@petergloor
petergloor / main.go
Created January 25, 2017 13:00
MaxInt, MinInt, MaxUint and MinUint in Go (golang)
package main
import "fmt"
// Constant definitions
const MaxUint = ^uint(0)
const MinUint = 0
const MaxInt = int(^uint(0) >> 1)
const MinInt = -MaxInt - 1
@tjvr
tjvr / nginx.conf
Last active September 10, 2019 08:31
nginx cors proxy
server {
listen 80;
server_name cors.tjvr.org;
root /usr/share/nginx/html;
index index.html;
client_max_body_size 1m;
client_body_buffer_size 64k;
@parmentf
parmentf / GitCommitEmoji.md
Last active October 31, 2025 17:32
Git Commit message Emoji

Inspired by dannyfritz/commit-message-emoji

See also gitmoji.

Commit type Emoji
Initial commit πŸŽ‰ :tada:
Version tag πŸ”– :bookmark:
New feature ✨ :sparkles:
Bugfix πŸ› :bug:
@rxaviers
rxaviers / gist:7360908
Last active November 1, 2025 20:02
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: πŸ˜„ :smile: πŸ˜† :laughing:
😊 :blush: πŸ˜ƒ :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
πŸ˜† :satisfied: 😁 :grin: πŸ˜‰ :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: πŸ˜€ :grinning:
πŸ˜— :kissing: πŸ˜™ :kissing_smiling_eyes: πŸ˜› :stuck_out_tongue: