Skip to content

Instantly share code, notes, and snippets.

View AquariusPower's full-sized avatar
💭
"truth is a pathless land" - J.K

AquariusPower

💭
"truth is a pathless land" - J.K
View GitHub Profile
@AquariusPower
AquariusPower / blenderPython
Created October 31, 2021 19:27
how to easily find my own way on blender's python?
Q:
I never coded in python, but already in C++ and Java.
By "find my way" I mean a tip that will help me avoid creating many questions
AND also almost not have to study the documentation.
A:
Blender has a python console with auto completion (TAB key)!
@AquariusPower
AquariusPower / gist:0ffc5891143ef79f634578f563e51e1e
Created March 7, 2021 23:07
how to fix gimp brush when it becomes elliptical for paintbrush, smudge, blur etc?
For gimp 2.10.
The circular brush suddenly becomes elliptical and changing some random setting.
I tried changing all settings and even restarting gimp.
To fix, I just deleted the folder ~/.config/GIMP, but I think it could be just some file inside of it, comment if you find out.
The other tip on the internet said to reboot, but I did not want to do that.
Out of patience to let this question/answer be accepted on stackexchange sites also... feel free to do it.
@AquariusPower
AquariusPower / quickRestartEngine.txt
Last active January 29, 2021 22:09
How to quickly restart a game after a crash/freeze on Wine(Linux)?
Some games takes a long time merely to reach the Main menu.
After a crash, in the middle of a fight, what you least want is to wait a huge reload time.
So, after the crash, we would have to wait for the game initialization + the savegame loading times...
How to overcome this boredom?
---
First prepare a new wineprefix properly:
```
@AquariusPower
AquariusPower / flock.tst.sh
Last active January 22, 2021 22:00
stress test flock
#!/bin/bash
LC_NUMERIC=en_US.UTF-8
# HELPERS:
#trash /tmp/flock.tst.log;for((i=0;i<20;i++));do flock.tst.sh&:;done #run this on shell
#trash /tmp/flock.tst.log;iSpawns=20;while true;do for((i=0;i<$iSpawns;i++));do flock.tst.sh&:;done; sleep $((60*(iSpawns+2)));done #run this on shell to make the test run forever (untill killed), remove the outer loop to prevent endless test.
#pkill -fe flock.tst.sh #end all concurrent children trying to acquire the lock
#while true;do date;lslocks |grep flock;sleep 1;done #use this to check if there is more than one lock acquired, check also the log file to confirm it, and if there is two subsequent WORK on the terminal log, it means a problem happened too
@AquariusPower
AquariusPower / HardRemapLinuxKeyboardKey.txt
Created September 11, 2020 05:47
Example on how to (low level) hard remap a keyboard key on linux
$sudo evtest #the keyboard was input 5 here, I wanted to make KeyPad0 work as LeftAlt key
Select the device event number [0-22]: 5
Input driver version is 1.0.1
Input device ID: bus 0x3 vendor 0x1a2c product 0x3d43 version 0x110
Input device name: "SEMICO USB Keyboard"
Event: time 1599799246.967341, -------------- SYN_REPORT ------------
Event: time 1599799247.011339, type 1 (EV_KEY), code 56 (KEY_LEFTALT), value 2
Event: time 1599799247.011339, -------------- SYN_REPORT ------------
@AquariusPower
AquariusPower / gist:19a71dfe1f683c5807cd452ae32513fb
Created May 31, 2020 20:57
Nesting another answer from the same site letting it be externally updated.
There are several questions about duplicating other user answer or just copying own answer etc...
This new feature would allow us to paste the link in a special way, that would show the other answer contents while having our own considerations above or below it.
When it is updated there, such changes would be shown on the nested contents too.
It could even be cross-site, as long such sites are from the same group (this means it uses the same safe content rules of text and media), and it could store the external site contents in a cache, in case the other site goes offline (like google caches homepages even in simple text).
The idea is, as the external answer won't apply word to word, our considerations would make the nested answer coherent with the current question, in wich case it would not be a duplicate.
/*
* Copyright (C) 2017 Alberts Muktupāvels
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
@AquariusPower
AquariusPower / ContributorsAreWelcome.md
Last active December 17, 2018 17:14
Always welcome contributors, always!!

We should not annoy people willing to contribute with their spare time, ideas and energy, for free, to projects they love, because of minor things, or what will probably happen is that people will just create and distribute their forks to escape from being bossed around like they are in their most probably oppressive jobs everywhere in this non utopic world. Just consider that they could be at parties having fun and many endless pleasures but they are sat behind their bright monitors, with a noisy fan nearby, focusedly coding to help us improve such marvels! Aww dammit! Did I just woke up some potential developer :o ?

@AquariusPower
AquariusPower / HowToLetProjectFilesForManyDevelopersBeCommitedOnTheSameRepo.md
Last active March 27, 2018 03:15
How To Let Project Files For Many Developers Be Commited On The Same Repo

my .gitignore added text:

######
## Eclipse developers preferences over different operational systems
## and personalized configurations.
######

# link to some user folder at /.devsPrefs
/.devsPrefs/Current
#!/bin/bash
strExt="png"
function FUNCconv() {
local lstrFile="$1"
lstrFileWebp="${lstrFile%.$strExt}.webp"
if [[ ! -f "$lstrFileWebp" ]];then
echo
echo ">>> working with $lstrFile <-> $lstrFileWebp"