Skip to content

Instantly share code, notes, and snippets.

@hadilq
hadilq / NixOS-guide.md
Last active May 10, 2024 21:54
Encypted LUKS LVM Btrfs Root with Opt-in State on NixOS

I'm trying to follow this guide to install NixOS using Btrfs, LUKS and LVM. The main usage of this page for me will be remembering what I did! My laptop is ASUS ROG GL553VD.

Just downloaded Plasma Desktop, 64bit and create a bootable Flash Drive. Then boot up to NixOS Live CD. Using gparted to create two partitions, One 200MB vfat EFI partittion and the rest of SSD drive will be an encrypted partition.

DISK=/dev/nvme0n1
@vchernogorov
vchernogorov / _readme.md
Last active May 10, 2024 21:49
Многопоточность в Java
@AveYo
AveYo / . Pitch Black Theme.reg
Last active May 10, 2024 21:49
Pitch Black Theme.reg - now for Ctrl+Alt+Del (and logon on 11) as well - revised 2022-06-16
Windows Registry Editor Version 5.00
; Pitch Black Theme preset by AveYo, AccentPalette idea by /u/Egg-Tricky
; for Ctrl+Alt+Del, Logon, Taskbar, Start Menu, Action Center (10 & 11)
; revised 2022-06-16: show active taskbar button in accent color
[-HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Accent]
[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Accent]
"AccentColorMenu"=dword:aa000000 ; Window borders and titlebar
"StartColorMenu"=dword:aa202020 ; Modals in UWP ex. Apply new refresh rate in 10
@chuongmep
chuongmep / PurgeCAD.cs
Last active May 10, 2024 21:45
Purge CAD
public static void PurgesCAD()
{
Document doc = Autodesk.AutoCAD.ApplicationServices.Core.Application.DocumentManager.MdiActiveDocument;
Database db = doc.Database;
using (Transaction Tx = db.TransactionManager.StartTransaction())
{
BlockTable table = Tx.GetObject(db.BlockTableId,
OpenMode.ForRead) as BlockTable;
ObjectIdCollection blockIds = new ObjectIdCollection();
do
@kennypete
kennypete / navigating_the_modes_of_Vim.md
Created April 18, 2024 20:46
Navigating the modes of Vim

Navigating the modes of Vim

This diagram illustrates navigating through Vim’s modes. It was built factoring Vim 9 (i.e., all its modes, including up to two new modes, cr and cvr, in November 2023). Information about the state() and 'showmode' is provided too.

SVG version

Some features are only available in the SVG version. It is not provided directly from within this gist’s files because SVGs do not always play nicely in GitHub (particularly, refusing to display embedded fonts).

The SVG version includes hover text help, which shows pertinent information about the underlying key, command, mode, etc.

@bearlikelion
bearlikelion / Log.gd
Last active May 10, 2024 21:44
Godot debug screen console autoload
extends Node
var debug: bool = OS.has_feature("debug")
@onready var panel: Panel = Panel.new()
@onready var canvas_layer: CanvasLayer = CanvasLayer.new()
@onready var rich_text_label: RichTextLabel = RichTextLabel.new()
# @onready var theme: Theme = load("res://SurvivalScape.theme") # Your custom theme file
func _ready() -> void:
@ertugrulturan
ertugrulturan / routeros.sh
Last active May 10, 2024 21:44
RouterOS Install Ubuntu 20.04/22.04 Server
#!/bin/bash
wget https://download.mikrotik.com/routeros/7.13.3/chr-7.13.3.img.zip -O chr.img.zip && \
gunzip -c chr.img.zip > chr.img && \
mount -o loop,offset=512 chr.img /mnt && \
ADDRESS=`ip addr show ens18 | grep global | cut -d ' ' -f 6 | head -n 1` && \
GATEWAY=`ip route list | grep default | cut -d ' ' -f 3` && \
echo "/ip address add address=$ADDRESS interface=[/interface ethernet find where name=ether1]
/ip route add gateway=$GATEWAY
/ip service disable telnet
/user set 0 name=root password=xxxxxx"
@unitycoder
unitycoder / FolderTypeFix.reg
Last active May 10, 2024 21:41
Make Windows Folder Browsing Faster (by disabling folder type detection)
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\SOFTWARE\Classes\Local Settings\Software\Microsoft\Windows\Shell\Bags\AllFolders\Shell]
"FolderType"="NotSpecified"
@manwithsteelnerves
manwithsteelnerves / KeyboardHelper.java
Created December 9, 2017 05:38
Webview Adjust Pan in Fullscreen Activity
package com.voxelbusters.nativeplugins.helpers;
import android.app.Activity;
import android.graphics.Rect;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewTreeObserver;
import android.view.WindowManager;
import com.voxelbusters.nativeplugins.helpers.interfaces.IKeyboardListener;
@rjescobar
rjescobar / extend-trial-jetbrains-windows.bat
Created August 31, 2021 02:53
JetBrains IDE trial reset windows
REM Delete eval folder with licence key and options.xml which contains a reference to it
for %%I in ("WebStorm", "IntelliJ", "CLion", "Rider", "GoLand", "PhpStorm", "Resharper", "PyCharm") do (
for /d %%a in ("%USERPROFILE%\.%%I*") do (
rd /s /q "%%a/config/eval"
del /q "%%a\config\options\other.xml"
)
)
REM Delete registry key and jetbrains folder (not sure if needet but however)
rmdir /s /q "%APPDATA%\JetBrains"