Skip to content

Instantly share code, notes, and snippets.

@JohannesMP
JohannesMP / Windows10RegistryHacks.md
Last active May 3, 2025 07:13
A small collection of Registry hacks for Windows 10 installations

Note: for any folder not found, navigate as far as possible, then create as a new Key

Disable Downloads like Candy Crush, etc.

  • HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\CloudContent
  • Dword DisableWindowsConsumerFeatures set to 1

Disable Lock screen, just show login form

@gryte
gryte / install_config-win2k16_core-proxmox.md
Last active January 7, 2025 17:04
Install and Configure - Windows Server 2016 Core on ProxMox VM

Install and Configure - Windows Server 2016 Core on ProxMox VM

stage drivers locally

# display available drives
Get-PSDrive

# create local driver directory
mkdir c:\drivers
@jonlabelle
jonlabelle / npm_vs_yarn_command_translation_cheatsheet.md
Last active March 11, 2025 18:53
npm vs yarn command translation cheat sheet
@dragolabs
dragolabs / proxmox-cli-and-tips.md
Last active November 28, 2024 23:07
Useful proxmox commands

Find next free VM ID

pvesh get /cluster/nextid

Create containter with external and internal nets

pct create 100 \
    local:vztmpl/ubuntu-16.04-standard_16.04-1_amd64.tar.gz \
    --cores 2 --cpuunits 1024 \
@thonixx
thonixx / resize-vm-disk-online.sh
Last active May 6, 2020 13:01
Resize a VM disk online and on-the-fly
##
## Prerequisites:
## - already resized disk on the VM host
##
## Notes:
## - I assume that we have three partitions (primary (root fs), extended, logical (swap))
## - I assume that we move swap out of the extended partition and convert to a normal primary one
## - I also assume that we place swap at the end of the disk
##
@yohangdev
yohangdev / etc-network-interfaces
Last active May 27, 2024 07:15
Proxmox single IP public with bridge/local network (NAT)
# source: https://raymii.org/s/tutorials/Proxmox_VE_One_Public_IP.html
iface eth0 inet manual
iface eth1 inet manual
auto vmbr0
iface vmbr0 inet static
address 163.172.103.199
netmask 255.255.255.0
@bellbind
bellbind / main.js
Last active April 27, 2024 04:12
[electron] Tray launcher example
"use strict";
// [run the app]
// $ npm install electron
// $ ./node_modules/.bin/electron .
const {app, nativeImage, Tray, Menu, BrowserWindow} = require("electron");
let top = {}; // prevent gc to keep windows
@11joselu
11joselu / fileUtils.js
Last active March 7, 2018 17:39
Donwload File - Vue.js 2.x
export function getFile(response) {
var result = document.createElement('a');
var contentDisposition = response.headers.get('Content-Disposition') || '';
var filename = contentDisposition.split('filename=')[1];
filename = filename.replace(/"/g,"")
return response.blob()
.then(function(data) {
result.href = window.URL.createObjectURL(data);
result.target = '_self';
@wesbos
wesbos / async-await.js
Created February 22, 2017 14:02
Simple Async/Await Example
// 🔥 Node 7.6 has async/await! Here is a quick run down on how async/await works
const axios = require('axios'); // promised based requests - like fetch()
function getCoffee() {
return new Promise(resolve => {
setTimeout(() => resolve('☕'), 2000); // it takes 2 seconds to make coffee
});
}
@jmarton
jmarton / LocalDateTestJDBC.java
Last active December 2, 2021 07:25
Demo of the new Java 8 Time API vs Oracle JDBC driver for the Database Laboratory course
import java.sql.Connection;
import java.sql.Date;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.sql.Timestamp;
import java.time.LocalDate;
import java.time.LocalDateTime;