Skip to content

Instantly share code, notes, and snippets.

View hoang-himself's full-sized avatar
🚫
Company prohibits GitHub

Hoàng hoang-himself

🚫
Company prohibits GitHub
View GitHub Profile
@hoang-himself
hoang-himself / matlab_idol.m
Last active January 31, 2021 01:19
Assignment
clear; clc;
n_dim = input('Nhap so chieu: ');
n_vector = input('Nhap so vecto: ');
if n_dim == 0 || n_vector == 0
clc;
disp('Ma tran khong hop le');
return;
end
@hoang-himself
hoang-himself / get_filename.py
Last active January 31, 2021 01:21
Python split path
import ntpath
def path_leaf(path):
head, tail = ntpath.split(path)
return tail or ntpath.basename(head)
if __name__ == '__main__':
path = '/content/My Drive/ocr_demo_test/act_data/Page_1.jpg'
print(path_leaf(path))
@hoang-himself
hoang-himself / fun.ps1
Created August 19, 2022 05:11
PowerShell 7 speech syntheziser
function Sing99Bottles {
$total = 99
Add-Type -AssemblyName System.speech
$speak = New-Object System.Speech.Synthesis.SpeechSynthesizer
$speak.selectvoice('Microsoft Zira Desktop')
$speak.rate = 4
1..100 | ForEach-Object {
$Words = "$total bottles of beer on the wall, $total bottles of beer. Take one down and pass it around, $($total - 1) bottles of beer on the wall."
$speak.Speak($Words)
$total = $($total - 1)
@hoang-himself
hoang-himself / SMouse.cs
Created October 11, 2022 15:13
Make the mouse cursor rotate accordingly to movement. Stolen from Reddit before I knew how to use Git.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Drawing;
using System.Windows.Forms;
namespace ShittyMouse
{
@hoang-himself
hoang-himself / README.md
Last active November 15, 2024 16:24
Local runcoms

Local runcoms

These modules are meant to be used with my dotfiles. They live in $Profile\profile.d or ~/.config/zsh/.zshrc.d of their respective shell.

@hoang-himself
hoang-himself / README.md
Last active July 28, 2024 03:51
Local configs

Local configs

These configs are meant for personal use only. You can make changes and use these as you like.

@hoang-himself
hoang-himself / README.md
Last active October 3, 2024 14:33
Registry tweaks

Registry tweaks

Various tweaks related to the Windows Registry