Skip to content

Instantly share code, notes, and snippets.

import requests
import os
from lxml import etree
# remove old clients from deployment server
deployment_server = os.getenv('SPLUNK_DS')
splunk_username = os.getenv('SPLUNK_DS_USER')
splunk_password = os.getenv('SPLUNK_DS_PASS')
ds_auth=(splunk_username, splunk_password)
@zorji
zorji / auto-ts-ignore.ts
Created July 16, 2021 03:41
A script to auto add // @ts-ignore to lines with TypeScript compilation error
/**
* A script to auto add // @ts-ignore to lines with TypeScript compilation error
* Example usage:
* $ npx tsc > compilation-errors.log
* $ npx ts-node auto-ts-ignore.ts compilation-errors.log
*/
import { readFile, writeFile } from 'fs/promises'
const errorLogFile = process.argv[2]
@tool
extends EditorScenePostImport
class MeshInstanceList:
var mesh: Mesh
var aabb: AABB
var transforms: Array
# Converts geometry node instances into MultiMeshInstances
func gn_instances_to_mm(parent: Node, scene: Node):
@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