Skip to content

Instantly share code, notes, and snippets.

View GrayHatter's full-sized avatar

GrayHatter

View GitHub Profile
@alirobe
alirobe / reclaimWindows10.ps1
Last active June 7, 2024 16:24
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
###
###
@urraka
urraka / stb.c
Last active January 21, 2024 00:20
#define STB_IMAGE_IMPLEMENTATION
#define STB_IMAGE_WRITE_IMPLEMENTATION
#define STBI_ONLY_PNG
#define STBI_ONLY_JPEG
#define STBI_ONLY_BMP
#define STBI_ONLY_GIF
#include "stb_image.h"
#include "stb_image_write.h"
@jrnewell
jrnewell / open.bash
Last active May 12, 2016 22:26
Open Sublime Text in Windows Cygwin
#!/bin/bash
run-fixed-cygpath "/cygdrive/c/Windows" explorer.exe "$@"
exit $?
anonymous
anonymous / pacman-stats.py
Created October 15, 2013 09:40
Creates graphs like these: http://i.imgur.com/e81lG8I.png The first one shows how long did one wait between the upgrades, the second – at what hours one upgraded.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from datetime import datetime
from math import ceil
from matplotlib import pyplot as plt
import re
update_dates = []
with open("/var/log/pacman.log") as input_file:
@willurd
willurd / web-servers.md
Last active June 17, 2024 09:38
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@ghedo
ghedo / sound_playback.c
Last active June 19, 2024 02:00
Simple sound playback using ALSA API and libasound
/*
* Simple sound playback using ALSA API and libasound.
*
* Compile:
* $ cc -o play sound_playback.c -lasound
*
* Usage:
* $ ./play <sample_rate> <channels> <seconds> < <file>
*
* Examples: