Skip to content

Instantly share code, notes, and snippets.

@felipou
felipou / decrypt_dbeaver.py
Last active Jul 22, 2021
DBeaver password decryption script - for newer versions of DBeaver
View decrypt_dbeaver.py
# https://stackoverflow.com/questions/39928401/recover-db-password-stored-in-my-dbeaver-connection
# requires pycryptodome lib (pip install pycryptodome)
import sys
import base64
import os
import json
from Crypto.Cipher import AES
@adrianlzt
adrianlzt / sharescreen
Last active Nov 12, 2020
Scripts to share only a portion of the screen
View sharescreen
#!/bin/bash
# Modified version of https://github.com/Ashark/hliss/blob/master/vlc-hangouts
# Script to share a portion of the screen in VLC to be used by Chrome/Firefox to share the screen
# By default, when run, it asks to click in some window. The area of that window is what is going to be shared.
# If executed with "sharescreen area", it asks for a portion of the screen to be shared.
unset x y w h
# Old code to choose a monitor
@kylebrandt
kylebrandt / i3hangout.md
Last active Jul 10, 2020
i3 Hangout / Meet VLC screensharing workaround mutli-monitor
View i3hangout.md

Share an area of your screen by using vlc screen capture, and then sharing the vlc capture window

Make sure the VLC window floats

In i3 config:

for_window [window_role="vlc-video"] floating enable move down 100px;

We float it so the tiling window manager doesn't resize the window and mess up the scale. We also move the window placement down at launch so it easy to drag somewhere mostly offscreen.

View split.sh
# Split the logs in separate files
echo Splitting...
csplit r-ryantm '/2018-..-..T..:..:.. .* [^ ]* -> [^ ]*/' '{*}' 1>/dev/null
# rename xx* to xx*-package-name
echo Renaming...
parallel -j30 "mv {} {}-\$(head -n1 {} | cut -d' ' -f2)" ::: xx*
echo Separating...
@tazjin
tazjin / thoughts.md
Last active Jul 12, 2021
Nix builder for Kubernetes
View thoughts.md
@edolstra
edolstra / nix-lang.md
Last active Jul 24, 2021
Nix language changes
View nix-lang.md

This document contains some ideas for additions to the Nix language.

Motivation

The Nix package manager, Nixpkgs and NixOS currently have several problems:

  • Poor discoverability of package options. Package functions have function arguments like enableFoo, but there is no way for the Nix UI to discover them, let alone to provide programmatic ways to
@balsoft
balsoft / crd.nix
Last active Jan 18, 2020
chrome-remote-desktop on nixos/nix
View crd.nix
{ config, lib, pkgs, ...}:
with lib;
let
cfg = config.services.crd;
in {
options = {
services.crd = {
enable = mkEnableOption ''
chrome remote desktop, a service which allows for remote control of your desktop from anywhere.
'';
@brettscott
brettscott / aes-256-cbc-test.js
Last active Jul 29, 2021
AES 256 CBC encryption between Golang and Node JS
View aes-256-cbc-test.js
// Node v6.9.0
//
// TEST FILE (cut down for simplicity)
// To ensure Golang encrypted string can be decrypted in NodeJS.
//
let crypto;
try {
crypto = require('crypto');
View Wannacrypt0r-FACTSHEET.md

WannaCry|WannaDecrypt0r NSA-Cyberweapon-Powered Ransomware Worm

  • Virus Name: WannaCrypt, WannaCry, WanaCrypt0r, WCrypt, WCRY
  • Vector: All Windows versions before Windows 10 are vulnerable if not patched for MS-17-010. It uses EternalBlue MS17-010 to propagate.
  • Ransom: between $300 to $600. There is code to 'rm' (delete) files in the virus. Seems to reset if the virus crashes.
  • Backdooring: The worm loops through every RDP session on a system to run the ransomware as that user. It also installs the DOUBLEPULSAR backdoor. It corrupts shadow volumes to make recovery harder. (source: malwarebytes)
  • Kill switch: If the website www.iuqerfsodp9ifjaposdfjhgosurijfaewrwergwea.com is up the virus exits instead of infecting the host. (source: malwarebytes). This domain has been sinkholed, stopping the spread of the worm. Will not work if proxied (source).

update: A minor variant of the viru

@domenkozar
domenkozar / nixos-on-dell-9560.org
Last active Jul 25, 2021 — forked from grahamc/nixos-on-dell-9560.org
NixOS on a Dell 15" 9560 with the 4K screen.
View nixos-on-dell-9560.org