Skip to content

Instantly share code, notes, and snippets.

nickname: "R0WB0AT"
levels:
# Moderator
203287359125585920: 100
# Support
180036462832648192: 100
# Devs
41771983423143936: 100
@alirobe
alirobe / reclaimWindows10.ps1
Last active April 26, 2024 17:59
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
###
###
@preshing
preshing / sort1mb.cpp
Created October 25, 2012 11:28
Sort one million 8-digit numbers in 1MB RAM
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
typedef unsigned int u32;
typedef unsigned long long u64;
//-------------------------------------------------------------------------
// WorkArea
//-------------------------------------------------------------------------
@paulfryzel
paulfryzel / gist:3947535
Created October 24, 2012 17:36
like gofmt but for c... and using astyle
#!/usr/bin/env bash
# mostly from http://word.bitly.com/post/31921713978/static-analysis
function cfmt {
if [[ $# -ne 1 ]]; then
echo "Usage: cfmt <file>"
else
astyle \
--style=1tbs \
--lineend=linux \
--convert-tabs \
@rgreenjr
rgreenjr / postgres_queries_and_commands.sql
Last active May 7, 2024 09:51
Useful PostgreSQL Queries and Commands
-- show running queries (pre 9.2)
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query
FROM pg_stat_activity
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%'
ORDER BY query_start desc;
-- show running queries (9.2)
SELECT pid, age(clock_timestamp(), query_start), usename, query
FROM pg_stat_activity
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'
@myano
myano / AAAAAA.py
Last active December 27, 2016 12:55
Python script to check for latest episodes of television shows from tpb. Please use responsibility. Code not the cleanest nor most efficient. Improvements to come.
#!/usr/bin/env python
"""
AAAAAA.py
This script, when placed in a folder with other episodes, will find the next
episode number and query thepiratebay for the infohash of the most popular
match.
This script is only used to find shows that are freely available.
I personally enjoy Pioneer One and a bunch more films provided freely over at
@mkottman
mkottman / id3.lua
Created August 22, 2011 12:13
An ID3 tag reader implemented in pure Lua. Supports ID3v1 tags and a subset of ID3v2 tags.
--- A simple module to read ID3 tags from MP3 files.
-- Supports ID3v1 tags and a (meaningful) subset of ID3v2 tags.
-- @class module
-- @name id3
-- @author Michal Kottman
-- @copyright 2011, released under MIT license
local id3 = {}
local function textFrame(name)