Skip to content

Instantly share code, notes, and snippets.

@jsok
jsok / sqlite3_test.c
Created June 15, 2012 14:34
sqlite3 C example
#include <stdio.h>
#include <sqlite3.h>
int main(void)
{
sqlite3 *db;
sqlite3_stmt *stmt;
sqlite3_open("expenses.db", &db);
@pwalkr
pwalkr / ansible_pve_lxc_playbook.yml
Created June 4, 2022 12:21
Ansible playbook to bring up an LXC container on a Proxmox node
# Inputs:
# proxmox_host # ansible host running proxmox. Is also destination node: for container
# proxmox_user
# proxmox_pass
# vmid # ID for lxc instance in proxmox
# admin_ssh_keys # SSH keys to install for passwordless login
---
- hosts: lxc_guests
vars:

An guide how to activate Windows 11 Pro for free

Why?

Because you will get some more features like an Bitlocker and host your device as an External Desktop which can be accessed through the internet

Am i also able to switch from any other edition to Pro?

The answer is yes! You can switch from almost any edition to Pro completely for free!

Note for users with unactivated Pro edition

People which already have Pro, but not activated, can skip to this step.

Getting started

What you first need to do is open CMD (Command Prompt) as Administrator using this keyboard key:

@danielwetan
danielwetan / nodejs-cicd-github-actions.md
Last active May 13, 2024 14:38
Deploy Node.js to VPS using Github Actions

Deploy Node.js to VPS using Github Actions

Steps to deploy Node.js to VPS using PM2 and Github Actions

1. Clone repo to VPS folder

<!DOCTYPE html>
<html lang="en">
<head>
<link rel="icon" type="image/x-icon" href="/favicon.ico">
<title>Rebane's Discord Colored Text Generator</title>
<meta charset="UTF-8">
<meta name="description" content="Rebane's Discord Colored Text Generator">
<meta name="author" content="rebane2001">
<style>
/*
@aaronshaf
aaronshaf / bookmarklet-expanded.js
Last active May 13, 2024 14:35
Copy text from Amazon's Cloud Reader. Helpful for students that need block quotes.
javascript: (function () {
new_window = window.open();
new_window.document.body.innerHTML = $("iframe")
.contents()
.find("iframe")
.contents()
.find("body")
.get(1).innerHTML;
new_window.document.body.querySelector("#content-overlays").remove();
})();
@tompng
tompng / regexp_test.rb
Created December 27, 2023 12:05
regexp
class Generator
def generate_paren(level)
regexp, producer = multi(level - 1)
[['(', '(?:', '(?<a>'].sample + regexp + ')', producer]
end
ALPHABET = ('a'..'z').to_a
def generate_alphabet(_level)
c = ALPHABET.sample
@pishangujeniya
pishangujeniya / Remote-IIS-Management.md
Created May 23, 2019 13:35
How to connect and manage remote IIS Web Server from another machine without using RDP Remote Desktop Connection

Remotely connect to IIS Web Server.

Whenever you want to perform any tasks related to IIS on server you might be starting mstsc aka Remote Desktop Connection RDP for those tasks, but using the facility of remotely managing IIS from client IIS, no need of RDP now and then.

Follow the simple steps on IIS Server and client IIS machine.

Process on Server IIS

  • Run the following commands in powershell on the remote IIS Server
  • Install-WindowsFeature Web-Server
@wojteklu
wojteklu / clean_code.md
Last active May 13, 2024 14:32
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules