Skip to content

Instantly share code, notes, and snippets.

View ktor's full-sized avatar

Pawel Kruszewski ktor

View GitHub Profile

How to Access LUKS-Encrypted Drives on Windows

This guide provides step-by-step instructions on how to install Windows Subsystem for Linux 2 (WSL 2), set up Debian, and mount LUKS-encrypted drives on a Windows system.

Prerequisites

  • A LUKS-encrypted drive that you want to access.
  • Windows 10 (version 2004 and later) or Windows 11 with support for WSL 2.
  • Administrator privileges on your Windows system.
  • Basic knowledge of command-line operations in PowerShell and Linux.
@JonhSHEPARD
JonhSHEPARD / install-copilot.sh
Last active August 20, 2023 00:45
Github Copilot on NixOS
#!/bin/sh
if [ "$EUID" -ne 0 ]
then echo "This script must be run as root"
exit
fi
if [ "$#" -ne 1 ]; then
echo "Usage: ./$0 <path-to-ide"
exit 1
@mahmut-gundogdu
mahmut-gundogdu / useStateWithDep.ts
Created June 8, 2021 19:30
useState initial value changed when initialValue changed
import {useEffect, useState} from 'react';
export function useStateWithDep(defaultValue: any) {
const [value, setValue] = useState(defaultValue);
useEffect(() => {
setValue(defaultValue);
}, [defaultValue]);
return [value, setValue];
}
{ pkgs ? import <nixpkgs> {} }:
# https://sid-kap.github.io/posts/2018-03-08-nix-pipenv.html
let manyLinuxFile =
pkgs.writeTextDir "_manylinux.py"
''
print("in _manylinux.py")
manylinux1_compatible = True
'';
in (pkgs.buildFHSUserEnv rec {
@taktoa
taktoa / keybase.nix
Created November 22, 2017 20:21
Getting the Keybase GUI to work on NixOS
# Add this file to your /etc/nixos/configuration.nix `imports = [ ... ];` attribute.
#
# After running `nixos-rebuild switch`, `systemctl --user start keybase-gui.service`
# can be used to start the Keybase GUI.
#
# Not sure if it's just my tiling window manager, but there is a bit of wonkiness
# with the tray icon. Other than that it works perfectly (as of 2017/11/22).
{ pkgs, ... }:
1. Setup a project
2. Add groovy SDK support:
https://www.bonusbits.com/wiki/HowTo:Add_Groovy_SDK_to_IntelliJ_IDEA
3. Download http://(yourjenkinsurl)/job/(yourpipelinejob)/pipeline-syntax/gdsl
- this will give you the .gdsl file - download this to the src folder of your project.
4. Finally follow this step - right click on the src folder -> Mark directory as -> Sources Root
  1. Create project blade create -t servicebuilder -p com.liferay.bootcamp book
    1. If the web module is missong generate it with blade
      blade create -t mvcportlet -p com.liferay.bootcamp -c com.liferay.bootcamp.portlet.BookPortlet book-web
      
    2. Delete the content of the build.gradle file and use the dependencies form the next step.
@jardineworks
jardineworks / gist:eb9e39290536ef0efd3c
Last active November 1, 2017 22:45
SB + Custom Indexer + Search
---------------------------------------------------------------------------------------------------------
STEP #1: Create new service builder portlet
---------------------------------------------------------------------------------------------------------
1. Project name sample-recipe-portlet
2. Plugin type: Service Builder Portlet
3. Portlet type should be MVCPortlet (at least that is my prefrence)
4.
---------------------------------------------------------------------------------------------------------