Skip to content

Instantly share code, notes, and snippets.

View hypernova7's full-sized avatar
🦀
I love Rust

Eddy Otsutsuki hypernova7

🦀
I love Rust
  • www
  • México
  • 16:00 (UTC -06:00)
View GitHub Profile
@zollinger
zollinger / getcolor.py
Last active November 6, 2024 08:18
Simple way to get dominant colors from an image in Python
from PIL import Image, ImageDraw
import argparse
import sys
def get_colors(image_file, numcolors=10, resize=150):
# Resize image to speed up processing
img = Image.open(image_file)
img = img.copy()
img.thumbnail((resize, resize))
@KurtJacobson
KurtJacobson / transparent_window.py
Last active October 21, 2024 05:25
Transparent Window in Gtk+ 3, python
#!/usr/bin/env python
# Copyright (c) 2017 Kurt Jacobson
# License: https://kcj.mit-license.org/@2017
import cairo
import gi
gi.require_version('Gtk', '3.0')
gi.require_version('Gdk', '3.0')
@siwalikm
siwalikm / aes-256-cbc.js
Last active October 20, 2024 09:44
AES-256-CBC implementation in nodeJS with built-in Crypto library
'use strict';
const crypto = require('crypto');
const ENC_KEY = "bf3c199c2470cb477d907b1e0917c17b"; // set random encryption key
const IV = "5183666c72eec9e4"; // set random initialisation vector
// ENC_KEY and IV can be generated as crypto.randomBytes(32).toString('hex');
const phrase = "who let the dogs out";
var encrypt = ((val) => {