Skip to content

Instantly share code, notes, and snippets.

View LGUG2Z's full-sized avatar

جاد LGUG2Z

View GitHub Profile
@y0ug
y0ug / BootstrapWin.ps1
Last active December 3, 2022 00:14
Bootstrap windows 10 machine
# Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString("https://gist.githubusercontent.com/y0ug/0c5859de8858f9229de8fcf72a6ae691/raw/BootstrapWin.ps1"))
$kmsserver = "192.168.10.2:1688"
$gvlk = "W269N-WFGWX-YVC9B-4J6C9-T83GX" #windows10/11 pro
Set-TimeZone -Name "Romance Standard Time"
$features = @(
#"VirtualMachinePlatform"
#"Microsoft-Windows-Subsystem-Linux"
#"HypervisorPlatform"
@cr2007
cr2007 / README.md
Last active January 13, 2023 12:48
Automating Dark, Light Mode for Windows 10

Using the Task Scheduler, you can schedule when to enable Dark Mode for apps by using these Powershell commands and setting them to be triggered at the time you prefer.

Switching to Dark Theme

New-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize -Name AppsUseLightTheme -Value 0 -Type Dword -Force

Switching back to Light Mode

New-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize -Name AppsUseLightTheme -Value 1 -Type Dword -Force;
@antlionguard
antlionguard / twitter-remove-retweets.js
Last active July 23, 2024 17:10
With this script, you can remove all retweets you are retweeted on Twitter.
const timer = ms => new Promise(res => setTimeout(res, ms));
// Unretweet normally
const unretweetTweet = async (tweet) => {
await tweet.querySelector('[data-testid="unretweet"]').click();
await timer(250);
await document.querySelector('[data-testid="unretweetConfirm"]').click();
console.log('****// Unretweeted Successfully //****')
}
@lmgeorge
lmgeorge / idea.properties
Last active August 10, 2022 04:09 — forked from judepereira/idea.vmoptions
Jetbrains IDE vmoptions template
# Use ${idea.home.path} macro to specify location relative to IDE installation home.
# Use ${xxx} where xxx is any Java property (including defined in previous lines of this file) to refer to its value.
# Note for Windows users: please make sure you're using forward slashes: C:/dir1/dir2.
ide.app.name=webstorm
ide.config.home=${user.home}/.jetbrains/${ide.app.name}
#---------------------------------------------------------------------
# Uncomment this option if you want to customize a path to the settings directory.
#---------------------------------------------------------------------
idea.config.path=${ide.config.home}/config
@rkitover
rkitover / WINDOWS_CHANGE_USERNAME_AND_FOLDER.md
Created September 14, 2019 13:12
How to Change your Username and Profile Folder in Windows

How to Change your Username and Profile Folder in Windows

If you don't like the username windows assigned you, I will describe a relatively simple and safe procedure to change it. For example windows gave me the username rkito and I wanted my normal one rkitover.

create a restore point

disable autologin, if you have it

Go into netplwiz and disable your autologin, you can reenable it when you're done.

@aymericbeaumet
aymericbeaumet / delete-likes-from-twitter.md
Last active July 24, 2024 19:17
[Recipe] Delete all your likes/favorites from Twitter

Ever wanted to delete all your likes/favorites from Twitter but only found broken/expensive tools? You are in the right place.

  1. Go to: https://twitter.com/{username}/likes
  2. Open the console and run the following JavaScript code:
setInterval(() => {
  for (const d of document.querySelectorAll('div[data-testid="unlike"]')) {
    d.click()
 }
@jchv
jchv / configuration.nix
Last active February 14, 2023 05:22
Nix configuration for VGA passthrough
{ config, pkgs, lib, ... }:
{
# IOMMU configuration
boot.kernelParams = [ "amd_iommu=on" "pcie_aspm=off" ];
boot.kernelModules = [ "kvm-amd" "vfio_virqfd" "vfio_pci" "vfio_iommu_type1" "vfio" ];
boot.extraModprobeConfig = ''
options vfio-pci ids=10de:13c2,10de:0fbb
options kvm ignore_msrs=1
'';
@allenyllee
allenyllee / install_tools.sh
Last active July 7, 2024 11:34
mount vhdx in linux
#!/bin/bash
# install qemu utils
sudo apt install qemu-utils
# install nbd client
sudo apt install nbd-client
@judepereira
judepereira / idea.vmoptions
Last active November 8, 2022 07:53
IntelliJ on steroids with G1 GC
-Xmx2048m
-Xss256k
-XX:+UseG1GC
-XX:InitiatingHeapOccupancyPercent=65
-XX:G1HeapRegionSize=16m
-XX:MaxGCPauseMillis=100
@a-h
a-h / setup.tf
Last active December 8, 2023 14:56
Terraform - Creating an Instance with an S3 Bucket Policy
# Create an IAM role for the Web Servers.
resource "aws_iam_role" "web_iam_role" {
name = "web_iam_role"
assume_role_policy = <<EOF
{
"Version": "2012-10-17",
"Statement": [
{
"Action": "sts:AssumeRole",
"Principal": {