Skip to content

Instantly share code, notes, and snippets.

View CelvinBraun's full-sized avatar
🔬
Learning...

Celvin CelvinBraun

🔬
Learning...
  • Japan
  • 16:53 (UTC +09:00)
View GitHub Profile
@CelvinBraun
CelvinBraun / HTML - Back to top
Created January 16, 2023 03:04
HTML - Back to top
<a href="#top">Back to top</a>
@CelvinBraun
CelvinBraun / Joplin - Install&Update
Last active December 27, 2022 06:48
Joplin - Install&Update
wget -O - https://raw.githubusercontent.com/laurent22/joplin/dev/Joplin_install_and_update.sh | bash
#git master
wget -O - https://raw.githubusercontent.com/laurent22/joplin/master/Joplin_install_and_update.sh | bash
@CelvinBraun
CelvinBraun / GScript - User Encryption
Created December 21, 2022 11:28
GScript - User Encryption
import bcrypt
import hashlib
import os
salt = os.environ.get('userImportSalt')
def createEncryptedValue(value):
md5Hash = hashlib.md5(str(value).encode('utf-8')).hexdigest()
return bcrypt.hashpw(md5Hash.encode('utf-8'), salt.encode('utf-8')).decode("utf-8")
@CelvinBraun
CelvinBraun / PowerShell - Create profile and assign alias
Created December 21, 2022 11:27
PowerShell - Create profile and assign alias
New-Item -Type file -Force $profile
code $profile
#in profile
Set-Alias iAmAnAlias "C:\Path\example.py"
@CelvinBraun
CelvinBraun / Python - creating simple .exe file
Created December 21, 2022 11:23
Python - creating simple .exe file
#in .py path or everything in ide
pip install pyinstaller
pyinstaller --onefile pythonScriptName.py
@CelvinBraun
CelvinBraun / CMD - Get bitlocker key
Created December 21, 2022 11:18
CMD - Get bitlocker key
manage-bde -protectors C: -get
@CelvinBraun
CelvinBraun / Python - Start script with batch
Created December 21, 2022 11:16
Python - Start script with batch
c:\python27\python.exe c:\somescript.py %*
@CelvinBraun
CelvinBraun / PowerShell - Copy Item
Created December 21, 2022 11:16
PowerShell - Copy Item
Copy-Item -Path "C:\Logfiles\*" -Destination "C:\Drawings"
@CelvinBraun
CelvinBraun / Python - Getting a script running on another PC
Created December 20, 2022 04:25
Python - Getting a script running on another PC
#creating dependency list in IDE
pip freeze > requirements.txt
#creating new virtual environment
py -m venv /path/foldername
#copying all .py files in to venv path
#installing all dependencies
py -m pip install -r requirements.txt
@CelvinBraun
CelvinBraun / Linux - basic commands
Created December 7, 2022 08:52
Linux - basic commands
pwd ->shows current path
ls ->shows files in current path
ls -l ->shows files with right in current path
ls -la ->shows files with right in current path + invisible once
cd Downloads/ ->changes directory to folder "Downloads"
cd .. ->changes directory to folder above
cd ->changes directory to home folder
mkdir test ->creates a folder named "test"
touch test.txt ->to create a file named "test.txt"
wget https://en.wikipedia.org/wiki/Wget ->lets you download the wiki page to wget