Skip to content

Instantly share code, notes, and snippets.

View Kif11's full-sized avatar
🐁
Expanding digital frontier

Kirill Kovalevskiy Kif11

🐁
Expanding digital frontier
View GitHub Profile
@krisleech
krisleech / renew-gpgkey.md
Last active June 5, 2024 14:43
Renew Expired GPG key

Renew GPG key

Given that your key has expired.

$ gpg --list-keys
$ gpg --edit-key KEYID

Use the expire command to set a new expire date:

@peerreynders
peerreynders / from_pipe.ex
Last active March 29, 2023 18:36
Elixir port using named pipe with releasing script
defmodule FromPipe do
#
# Use a helper script "from_pipe_release" to
# release/request each line read from the
# named pipe - effectively implementing a
# crude backpressure mechanism
#
@pipe_name "/tmp/testpipe"
@from_pipe_release "./from_pipe_release"
@from_pipe_clean "./from_pipe_clean"
# Full text search
[hendry@t480s 5xx]$ cat bugzilla.sh
aws --profile uneet-dev logs filter-log-events --log-group-name bugzilla --start-time $(date -d "-1 hour" +%s000) \
--filter-pattern '"apex/ping/v1.0"'
# (faster) Query on a JSON structured log
[hendry@t480s 5xx]$ cat alambda.sh
aws --profile uneet-demo logs filter-log-events --log-group-name "/aws/lambda/alambda_simple" --start-time $(date -d "-8
@crucialfelix
crucialfelix / analytics.js
Last active November 30, 2022 19:05
Google Analytics for Next.js with next/router
/**
* analytics.js;
* Copyright 2019 Chris Sattinger
* MIT license - do as thou wilt
*
* This will send page views on route change to Google Analytics.
* Works with https://nextjs.org/ and https://github.com/fridays/next-routes
**/
import Router from "next/router";
@sneha-belkhale
sneha-belkhale / Fbm.cginc
Last active March 13, 2023 13:13
Fractal Brownian Motion function to include in Unity Shader
float hash (float2 n)
{
return frac(sin(dot(n, float2(123.456789, 987.654321))) * 54321.9876 );
}
float noise(float2 p)
{
float2 i = floor(p);
float2 u = smoothstep(0.0, 1.0, frac(p));
float a = hash(i + float2(0,0));
@jhorikawa
jhorikawa / gaussianblur2d.c
Created February 19, 2020 19:45
2D Gaussian Blur for Houdini using VEX
float sigma = chf("sigma");
int res = chi("res");
int resx = chi("resx");
int resy = chi("resy");
int resn = floor(res / 2.0);
float weightTotal = 0;
float valTotal = 0;
for(int i=-resn; i<=resn; i++){
for(int n=-resn; n<=resn; n++){
float ix = @ptnum % resx + i;