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
@Kif11
Kif11 / poop.plist
Last active February 21, 2024 04:51
Say poop every 5 seconds forever
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.poop.hello</string>
<key>ProgramArguments</key>
<array>
<string>say</string>
<string>poop</string>
@Kif11
Kif11 / pose.py
Created October 6, 2021 07:06
Extract human 3D poses from videos using Google BlazePose model
#!/usr/bin/env python3
import cv2
import mediapipe as mp
from pathlib import Path
import argparse
parser = argparse.ArgumentParser(
description='Extract human 3D poses from videos using BlazePose model.')
@Kif11
Kif11 / wsl2bridge.ps1
Created April 29, 2021 19:30
WSL2 Port Forwarding
$remoteport = bash.exe -c "ifconfig eth0 | grep 'inet '"
$found = $remoteport -match '\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}';
if( $found ){
$remoteport = $matches[0];
} else{
echo "The Script Exited, the ip address of WSL 2 cannot be found";
exit;
}
@Kif11
Kif11 / Houdini SVG Export
Last active July 15, 2020 22:10
Export Houdini poly lines to SVG
# Python script to export Houdini poly lines to SVG
# Paste content to Python node
# Replace EXPORT_PATH_HERE with desired output file location
node = hou.pwd()
geo = node.geometry()
filename = "EXPORT_PATH_HERE"
padding = 50
@Kif11
Kif11 / reclaimWindows10.ps1
Last active February 2, 2023 23:22 — forked from alirobe/reclaimWindows10.ps1
This Windows 10 Setup Script turns off a bunch of unnecessary Windows 10 telemetery, bloatware, & privacy things. Not guaranteed to catch everything. Review and tweak before running. Reboot after running. Scripts for reversing are included and commented. Fork of https://github.com/Disassembler0/Win10-Initial-Setup-Script (different defaults). N.…
# Default preset
$tweaks = @(
### Require administrator privileges ###
"RequireAdmin",
### Privacy Tweaks ###
"DisableTelemetry",
"DisableWiFiSense",
"DisableSmartScreen",
"DisableWebSearch",
@Kif11
Kif11 / syncdb.sh
Created January 11, 2020 17:40
Backup and sync two mongo databases
#!/usr/bin/env bash
# Syncronize remote DB to local instance
remote_db="myremote-mongo.com"
local_db="localhost"
db_name="my_db_name"
# Get current date and store it in $date
printf -v date '%(%Y-%m-%d)T\n' -1
@Kif11
Kif11 / create-public-bucket.sh
Created November 30, 2018 13:33
Created S3 public bucket for hosting a static website
if [ -z "$1" ]
then
echo "Usage: `basename "$0"` <bucket_name>"
fi
bucket_name=$1
bucket_policy=`echo '{
"Version":"2012-10-17",
"Statement":[{
"Sid":"PublicReadGetObject",
@Kif11
Kif11 / align_to_normal.vex
Last active April 26, 2024 07:55
Rotate flat geometry to X/Z plane. Houdini VEX.
// Align object to target vector base on selected normal
// Useful when object has some weird orientation baked
// in the mesh and you wan to straighten it up.
// Point with normal from second wrangler input to align
vector from = point(1, 'N', 0);
// Allign "from" normal to the following vector
vector to = {0,1,0};
@Kif11
Kif11 / problem24.py
Created April 12, 2018 21:25
This program use each of the numbers in src_numbers exactly once with any of the four basic math operations (addition, subtraction, multiplication, and division) to total target_number.
#! /usr/bin/env python3
"""
Bruteforce solution to the following assigment
1. Estimate how long it's going to take you, before you do it, and let us know what your guess is.
2. Time yourself at the end, compare results.
Guidelines and requirements:
-Do it in a pythonic, readable way. Readability is the priority.
-Instead of 1, 3, 4, 6, accept any user input for n integers or floas.
@Kif11
Kif11 / convert_video_for_twitter.sh
Created August 30, 2017 00:06
Bash function for convert video for twitter upload
# Bash function for convert video for twitter upload.
# Place this function in your bash profile
#
# Usage: convert_for_twitter <file_path>
#
# Source http://pimentoso.blogspot.com/2016/01/convert-videos-for-twitter-using-ffmpeg.html
function convert_for_twitter {
# Make sure to install ffmpeg with libx
# brew install ffmpeg --with-libvpx