Skip to content

Instantly share code, notes, and snippets.

View Zenahr's full-sized avatar
💜

Zenahr Barzani Zenahr

💜
View GitHub Profile
@Zenahr
Zenahr / import hack.txt
Created January 8, 2022 23:37
Python import "hack" for sibling and parent module imports
import sys, os
sys.path.insert(0, os.path.abspath('.')) # https://stackoverflow.com/a/9446075/12675239
replace ('.') with whatever directory you'd like to enable imports from. (sibling/parent)
@Zenahr
Zenahr / .md
Created September 25, 2021 21:06
get permission to read Users directory on old Windows drive

navigate to the root directory of your windows 7 disk, type in:

takeown /f Users /r

@Zenahr
Zenahr / Set DNS servers to cloudflare on Windows OS.txt
Created September 10, 2021 15:04
Set DNS servers to cloudflare on Windows OS
open cmd as admin
enter following commands:
interface ip show config
interface ip set dns "YOURNETWORKOFCHOICE" static 1.1.1.1
@Zenahr
Zenahr / how to check if current terminal REALLY is running Python 64 bit.md
Created July 22, 2021 19:46
how to check if current terminal REALLY is running Python 64 bit
import sys
print(sys.maxsize > 2**32) # true if running 64 bit Python
@Zenahr
Zenahr / ffmpeg - convert video to gif.txt
Last active September 8, 2021 14:39
ffmpeg - convert video to gif
ffmpeg -i in.mp4 -filter_complex 'fps=20,scale=320:-1:flags=lanczos,split [o1] [o2];[o1] palettegen [p]; [o2] fifo [o3];[o3] [p] paletteuse' out.gif
ffmpeg -i input.mp4 -filter_complex 'fps=10,scale=320:-1:flags=lanczos,split [o1] [o2];[o1] palettegen [p]; [o2] fifo [o3];[o3] [p] paletteuse' out.gif
@Zenahr
Zenahr / regex.txt
Last active March 30, 2021 23:03
my personal regex list
\((.*?)\) // Removes stuff inside () and () themselves. So --> (~) =>
\[(.*?)\] // Removes stuff inside [] and [] themselves. So --> [~] =>
@Zenahr
Zenahr / UE4-enable-sequencer-keep-state.md
Last active May 19, 2023 08:54
Unreal Engine 4 Sequencer: Make it keep state for property changes on Actors after sequence end

To make the sequencer keep property changes on Actors, add the following to your DefaultEngine.ini file inisde your project's Config folder:

[/Script/LevelSequence.LevelSequence]
DefaultCompletionMode=KeepState

To make UE4 keep the state on default, change the corresponding .ini inside your UE4 Engine folder. This will then be passed along to all future projects that you will create with this engine. Add this change to all Engine versions accordingly.

@Zenahr
Zenahr / weekly-breakdown.md
Created August 25, 2020 20:02
Weekly Breakdown

NAN

@Zenahr
Zenahr / gist:c32e09b86f1a6f1c9fbf1a397c789bb3
Created August 23, 2020 20:48
Open Fonts folder regularily on Windows 10
\\computer-name\c$\Windows\Fonts
@Zenahr
Zenahr / .md
Created August 23, 2020 17:04
SaveSequenceStateDefaultSetting

Save these two lines inside your UE4 DefaultEngine.ini config file:

[/Script/LevelSequence.LevelSequence] DefaultCompletionMode=KeepState