Skip to content

Instantly share code, notes, and snippets.

@tmilos
tmilos / README.md
Last active May 9, 2024 12:46
Modified Preorder Tree Traversal

Modified Preorder Tree Traversal

Hierarchical data metrics that allows fast read operations on tree like structures.

Based on Left and Right fields that are set during tree traversal. When entered into node value is set to it's Left, when exiting node value is set to it's Right.

Sample implementation

:CheckOS
IF EXIST "%PROGRAMFILES(X86)%" (GOTO 64BIT) ELSE (GOTO 32BIT)
:64BIT
echo @echo off^
start ^"^" ^"C:\Program Files (x86)\Notepad++\notepad++.exe^" %%2 %%3 %%4 %%5 %%6> "C:\Program Files (x86)\Notepad++\npplauncher.cmd"
reg add "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\notepad.exe" /v "Debugger" /t REG_SZ /d "\"C:\Program Files (x86)\Notepad++\npplauncher.cmd\"" /f
@anubhavshrimal
anubhavshrimal / CountryCodes.json
Last active May 9, 2024 12:43 — forked from Goles/CountryCodes.json
Country and Dial or Phone codes in JSON format
[
{
"name": "Afghanistan",
"dial_code": "+93",
"code": "AF"
},
{
"name": "Aland Islands",
"dial_code": "+358",
"code": "AX"
@ZCG-coder
ZCG-coder / log.py
Last active May 9, 2024 12:42
A Pythonic way to take a n-th root without using math
#####################################################################################################
# Copyright (c) 2023-2024 NWSOFT #
# #
# Permission is hereby granted, free of charge, to any person obtaining a copy #
# of this software and associated documentation files (the "Software"), to deal #
# in the Software without restriction, including without limitation the rights #
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell #
# copies of the Software, and to permit persons to whom the Software is #
# furnished to do so, subject to the following conditions: #
# #
@n1snt
n1snt / Oh my ZSH with zsh-autosuggestions zsh-syntax-highlighting zsh-fast-syntax-highlighting and zsh-autocomplete.md
Last active May 9, 2024 12:41
Oh my ZSH with zsh-autosuggestions zsh-syntax-highlighting zsh-fast-syntax-highlighting and zsh-autocomplete.md

Oh my zsh.

Oh My Zsh

Install ZSH.

sudo apt install zsh-autosuggestions zsh-syntax-highlighting zsh

Install Oh my ZSH.

@jaredrummler
jaredrummler / COPYRIGHT_NOTICE_TEMPLATES.md
Last active May 9, 2024 12:40
Copyright templates for Intellij IDEA
@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active May 9, 2024 12:36
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This no longer works in browser!

Note

This no longer works if you're alone in vc! Somebody else has to join you!

How to use this script:

  1. Accept the quest under User Settings -> Gift Inventory
@fdanelyan
fdanelyan / generate_html.py
Created April 18, 2014 07:34
Generate HTML from python and open it on default browser
# write-html.py
import webbrowser
import os
print ()
f = open('helloworld.html','w')
message = """<html>
<head></head>
<body><p>Hello World!</p></body>
</html>"""
@m5lil
m5lil / reset.sh
Last active May 9, 2024 12:30
[reset jetbrains application trial] reset jetbrains ide evals v1.0.4 #others
#!/bin/bash
# reset jetbrains ide evals v1.0.4
OS_NAME=$(uname -s)
JB_PRODUCTS="IntelliJIdea CLion PhpStorm GoLand PyCharm WebStorm Rider DataGrip RubyMine AppCode"
if [ "$OS_NAME" == "Darwin" ]; then
echo 'macOS:'
for PRD in $JB_PRODUCTS; do