Skip to content

Instantly share code, notes, and snippets.

View Majramos's full-sized avatar
🙃
In a world when you can be anything, be the person who ends the meeting early

Majramos Majramos

🙃
In a world when you can be anything, be the person who ends the meeting early
View GitHub Profile
@Majramos
Majramos / git-prompt.sh
Created April 18, 2022 13:54
git prompt in windows
PS1='\[\033]0;$PWD\007\]' # set window title
PS1="$PS1"'\[\033[32m\]' # change to green
PS1="$PS1"'\u@\h ' # user@host<space>
PS1="$PS1"'\[\033[33m\]' # change to brownish yellow
PS1="$PS1"'\w ' # current working directory<space>
PS1="$PS1"'\[\033[92m\]' # change to brownish yellow
PS1="$PS1"'\t' # the current time in 24-hour HH:MM:SS format
if test -z "$WINELOADERNOEXEC"
then
GIT_EXEC_PATH="$(git --exec-path 2>/dev/null)"
@Majramos
Majramos / userDefineLang_Dockerfile.xml
Created April 14, 2022 14:49
Solarized dark colorsheme for notepad++
<NotepadPlus>
<UserLang name="Dockerfile" ext="Dockerfile" udlVersion="2.1">
<Settings>
<Global caseIgnored="no" allowFoldOfComments="no" foldCompact="no" forcePureLC="0" decimalSeparator="0" />
<Prefix Keywords1="no" Keywords2="no" Keywords3="no" Keywords4="no" Keywords5="no" Keywords6="no" Keywords7="no" Keywords8="no" />
</Settings>
<KeywordLists>
<Keywords name="Comments">00# 01 02 03 04</Keywords>
<Keywords name="Numbers, prefix1"></Keywords>
<Keywords name="Numbers, prefix2"></Keywords>
@Majramos
Majramos / wifi-password.py
Created January 10, 2022 11:38
Get all wifi passwords
import subprocess
data = (
subprocess.check_output(["netsh", "wlan", "show", "profiles"])
.decode("ISO-8859-1")
.split("\n")
)
profiles = [i.split(":")[1][1:-1] for i in data if "All User Profile" in i]
for i in profiles:
results = (
@Majramos
Majramos / .env.devenv
Last active December 5, 2021 18:04
Setup a python development environment in docker
local_pg={"host":"localhost","port": 5432,"database":"local_pg","user":"local_pg","password":"local_pg"}
@Majramos
Majramos / main.py
Created September 24, 2021 23:50
Using a .ui file from Qt Designer with Pyside6
import sys
import os
from PySide6.QtWidgets import QApplication, QMessageBox
from PySide6.QtUiTools import loadUiType
from PySide6.QtGui import QCloseEvent
CWD = os.path.dirname(__file__)
@Majramos
Majramos / add_wtl_context_menu.reg
Created September 6, 2021 14:00
Add "Open windows terminal here" option to context menu
Windows Registry Editor Version 5.00
;User action
;Download icon: https://github.com/microsoft/terminal/blob/main/res/terminal.ico
[HKEY_CLASSES_ROOT\Directory\Background\shell\WindowsTerminal]
@="Open Terminal here"
"Icon"="%USERPROFILE%\\AppData\\Local\\terminal\\terminal.ico"
;User action command
[HKEY_CLASSES_ROOT\Directory\Background\shell\WindowsTerminal\command]
@Majramos
Majramos / docker-compose.yml
Created June 8, 2021 09:07
local database setup with docker
services:
postgres:
image: postgres:13.2
container_name: postgres
restart: unless-stopped
environment:
- POSTGRES_USER=local_pg
- POSTGRES_PASSWORD=local_pg
- POSTGRES_DB=local_pg
ports:
@Majramos
Majramos / simple_idw.ipynb
Last active December 14, 2023 17:47
Simple inverse distance weighted (IDW) interpolation with python
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.