Skip to content

Instantly share code, notes, and snippets.

@PurpleBooth
PurpleBooth / README-Template.md
Last active May 5, 2025 01:35
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@NickCraver
NickCraver / Windows10-Setup.ps1
Last active February 6, 2025 04:09
(In Progress) PowerShell Script I use to customize my machines in the same way for privacy, search, UI, etc.
##################
# Privacy Settings
##################
# Privacy: Let apps use my advertising ID: Disable
Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AdvertisingInfo -Name Enabled -Type DWord -Value 0
# To Restore:
#Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AdvertisingInfo -Name Enabled -Type DWord -Value 1
# Privacy: SmartScreen Filter for Store Apps: Disable
Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AppHost -Name EnableWebContentEvaluation -Type DWord -Value 0
@starkers
starkers / lxc-prep
Last active February 17, 2020 17:08
Install SSH keys into lxc containers
#!/usr/bin/env bash
if [ "X$1" == X ]; then
echo "prepares a new container does the following:"
echo "- installs ssh keys from $KEYS"
echo "- sets random root passwords"
echo "- deletes the 'ubuntu' user"
echo
echo "usage: 'lxc-prep <container_name>'"
echo
@shathor
shathor / EjectingQueue.java
Last active October 14, 2021 19:26
Sliding window view on a stream / sequence of data. A non-blocking circular queue which automatically evicts elements from the head of the queue when attempting to add new elements into the array and it is full. Provides element insertion and removal at opposite ends (like a queue) and access to random elements in the container (like an array).
package ch.sgwerder.gist;
import java.lang.reflect.Array;
import java.util.Arrays;
import java.util.Collection;
import java.util.Iterator;
import java.util.RandomAccess;
/**
* Copyright (C) 2015 Simon Gwerder.
@d2s
d2s / installing-node-with-nvm.md
Last active April 24, 2025 18:50
Installing Node.js to Linux & macOS & WSL with nvm

Installing Node.js with nvm to Linux & macOS & WSL

A quick guide on how to setup Node.js development environment.

Install nvm for managing Node.js versions

nvm allows installing several versions of Node.js to the same system. Sometimes applications require a certain versions of Node.js to work. Having the flexibility of using specific versions can help.

  1. Open new Terminal window.
@varqox
varqox / install_debian_with_debootstrap_howto.md
Last active April 28, 2025 01:43
Instructions how to install Debian using debootstrap
@alirobe
alirobe / reclaimWindows10.ps1
Last active April 20, 2025 23:02
This Windows 10 Setup Script turns off a bunch of unnecessary Windows 10 telemetery, bloatware, & privacy things. Not guaranteed to catch everything. Review and tweak before running. Reboot after running. Scripts for reversing are included and commented. Fork of https://github.com/Disassembler0/Win10-Initial-Setup-Script (different defaults). N.…
###
###
### UPDATE: For Win 11, I recommend using this tool in place of this script:
### https://christitus.com/windows-tool/
### https://github.com/ChrisTitusTech/winutil
### https://www.youtube.com/watch?v=6UQZ5oQg8XA
### iwr -useb https://christitus.com/win | iex
###
### OR take a look at
### https://github.com/HotCakeX/Harden-Windows-Security
/**
* @Author: Jordi Corbilla
* (c) Copyright by Jordi Corbilla.
**/
//Anonymous procedure approach by Lars Fosdal
type
TArg<T> = reference to procedure(const Arg: T);
procedure TForm1.CaptureConsoleOutput(const ACommand, AParameters: String; CallBack: TArg<PAnsiChar>);
const
var Quandlobj = (function ()
{
function init()
{
var http = new XMLHttpRequest()
http.onreadystatechange = function()
{
if (http.readyState != http.DONE)
return
if (http.status != 200)
@tazjin
tazjin / Main.java
Created September 5, 2016 23:54
Playing with Prometheus Java client
import io.prometheus.client.*;
import io.prometheus.client.exporter.common.TextFormat;
import io.prometheus.client.hotspot.DefaultExports;
import spark.Request;
import spark.Response;
import java.io.IOException;
import java.io.StringWriter;
import java.util.Random;