Skip to content

Instantly share code, notes, and snippets.

View gythialy's full-sized avatar
🎯
Focusing

Goren G gythialy

🎯
Focusing
View GitHub Profile
@gythialy
gythialy / combine.sh
Created December 22, 2020 02:55 — forked from GuangTianLi/combine.sh
combine
#!/usr/bin/bash
echo "processing $1 and $2"
PNG0=$1 ## png0 <----- first image should be the BLACKEST
PNG1=$2 ## png1 <----- second image should be the WHITEST
#PNG2=$3 ## png2 <----- third - todo - this could be an opaque fg with tranparent bg
bg_size=`identify -format '%wx%h' "$1"`
#echo "bg is $bg_size"
magick convert $PNG1 -resize $bg_size $PNG1
magick convert $PNG0 -channel RGBA -matte -colorspace gray -normalize -ordered-dither o8x8 gray_$PNG0
magick convert $PNG1 -channel RGBA -matte -colorspace gray -normalize -ordered-dither o8x8 gray_$PNG1
@gythialy
gythialy / combine.sh
Created December 22, 2020 02:55 — forked from GuangTianLi/combine.sh
combine
#!/usr/bin/bash
echo "processing $1 and $2"
PNG0=$1 ## png0 <----- first image should be the BLACKEST
PNG1=$2 ## png1 <----- second image should be the WHITEST
#PNG2=$3 ## png2 <----- third - todo - this could be an opaque fg with tranparent bg
bg_size=`identify -format '%wx%h' "$1"`
#echo "bg is $bg_size"
magick convert $PNG1 -resize $bg_size $PNG1
magick convert $PNG0 -channel RGBA -matte -colorspace gray -normalize -ordered-dither o8x8 gray_$PNG0
magick convert $PNG1 -channel RGBA -matte -colorspace gray -normalize -ordered-dither o8x8 gray_$PNG1
@gythialy
gythialy / example.wat
Created June 12, 2020 02:46
example.wat
(module
(type $t0 (func (param i32 i32 i32) (result i32)))
(type $t1 (func (param i32 i32) (result i32)))
(type $t2 (func (param i32 i32)))
(type $t3 (func (param i32 i32 i32 i32)))
(type $t4 (func (param i32 i32 i32 i32 i32) (result i32)))
(type $t5 (func (param i32)))
(type $t6 (func (param i32 i32 i32 i32) (result i32)))
(type $t7 (func (result i32)))
(type $t8 (func))
@gythialy
gythialy / deloy.yml
Created May 22, 2020 02:59
deploy Hexo by GitHub Actions
name: Main workflow
on:
push:
branches:
- raw
jobs:
build:
@gythialy
gythialy / github.labels.json
Created April 29, 2020 12:05
github.labels.json
[
{
"name": "duplicate",
"color": "ededed",
"description": "This issue or Pull Request already exists"
},
{
"name": "help wanted",
"color": "e99695",
"description": "Extra attention is needed"
@gythialy
gythialy / Dockerfile
Created February 25, 2020 01:16 — forked from avishayp/Dockerfile
Add non-root user for alpine linux
# non root user example for alpine
#
# usage:
# $ docker build --build-arg "USER=someuser" --tag test .
# $ docker run --rm test
FROM alpine
ARG USER=default
ENV HOME /home/$USER
@gythialy
gythialy / cupsd.conf
Created November 23, 2019 06:23
sudo vim /etc/cups/cupsd.conf
#
# Configuration file for the CUPS scheduler. See "man cupsd.conf" for a
# complete description of this file.
#
# Log general information in error_log - change "warn" to "debug"
# for troubleshooting...
LogLevel warn
PageLogFormat
@gythialy
gythialy / install.sh
Last active May 22, 2023 06:06
install and config zsh tmux
#!/bin/bash
set -e
cd $HOME
# install zsh and tmux
yum -y install git zsh tmux
echo "setting antigen and zsh"
curl -L git.io/antigen > /opt/antigen.zsh
@gythialy
gythialy / ecies.go
Created May 11, 2019 11:46
It is an ECIES Go implementation, a hybrid asymmetric–symmetric key encryption algorithm based on the Diffie–Hellman key exchange, specifically uses one of the following combinations: Mode P256 P-256 curve (FIPS 186-3, section D.2.3) AES-128 for symmetric encryption with the CTR (Counter) mode Poly1305 for message aunthentication (MAC with 32-bi…
package ecies
import (
"crypto/aes"
"crypto/cipher"
"crypto/elliptic"
"crypto/sha256"
"crypto/sha512"
"hash"
"io"
@gythialy
gythialy / debug.json
Created July 20, 2018 01:45
debugger for chrome
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Launch localhost with sourcemaps",
"type": "chrome",
"request": "launch",