Skip to content

Instantly share code, notes, and snippets.

View xorenio's full-sized avatar
🚀
Minimal code, Maximum effort

John J xorenio

🚀
Minimal code, Maximum effort
View GitHub Profile
@mbround18
mbround18 / Makefile
Last active October 9, 2023 05:09
Fast build on windows for WSL2
# Following this tutorial: https://markentier.tech/posts/2022/01/speedy-rust-builds-under-wsl2/
# This makes developing on windows significantly easier for rust projects!!
SOURCE_DIR = $(PWD)
# `notdir` returns the part after the last `/`
# so if the source was "/some/nested/project", only "project" remains
BUILD_DIR = ~/tmp/$(notdir $(SOURCE_DIR))
wsl.build: wsl.sync
cd $(BUILD_DIR) && cargo build
@cutiepoka
cutiepoka / gist:a9347c68bfcf29060926a8af46bb1701
Created October 6, 2023 18:18
Youtube allow ads popup blocker
// ==UserScript==
// @name youtube popup killer
// @namespace http://tampermonkey.net/
// @version 0.3
// @description try to take over the world!
// @author Selbereth
// @match https://*.youtube.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=youtube.com
// @grant none
// ==/UserScript==
@magnetikonline
magnetikonline / README.md
Last active May 21, 2024 02:53
GitHub token validation regular expressions.
@NanoAi
NanoAi / gist:2d3440014cba9c2d3f6c
Created August 16, 2015 06:24
Hosts File Generator for Linux and Mac
#!/bin/bash
echo "/etc/hosts | Stats" && stat -x /etc/hosts && echo -n "Number of Lines: " && wc -l /etc/hosts && echo -n "MD5: " && md5 /etc/hosts
echo -e "\n-------------------------\n"
cp ~/bakup.hosts ~/hosts.uniq
curl --silent http://someonewhocares.org/hosts/hosts | grep '^127.0.0.1' >> ~/hosts.uniq && echo "someonewhocares.org : DONE"
curl --silent http://www.malwaredomainlist.com/hostslist/hosts.txt | grep '^127.0.0.1' >> ~/hosts.uniq && echo "malwaredomainlist.org : DONE"
curl --silent https://adaway.org/hosts.txt | grep '^127.0.0.1' >> ~/hosts.uniq && echo "adaway.org : DONE"
curl --silent http://winhelp2002.mvps.org/hosts.txt | grep '^127.0.0.1' >> ~/hosts.uniq && echo "mvps.org : DONE"
curl --silent http://hosts-file.net/ad_servers.txt | grep '^127.0.0.1' >> ~/hosts.uniq && echo "hosts-file.net : DONE"
@mbasaglia
mbasaglia / rcon.sh
Created June 5, 2014 21:04
A shell script which executes rcon commands
#!/bin/bash
SERVER='localhost'
PORT='26000'
PASSWORD='foo'
SECURE=0
SECURE_PORT="1234"
RCON_HEADER=$(echo -e "\xff\xff\xff\xff")
ESCAPE_CHAR=$(echo -en "\x1b")
# Install dependencies
#
# * checkinstall: package the .deb
# * libpcre3, libpcre3-dev: required for HTTP rewrite module
# * zlib1g zlib1g-dbg zlib1g-dev: required for HTTP gzip module
apt-get install checkinstall libpcre3 libpcre3-dev zlib1g zlib1g-dbg zlib1g-dev && \
mkdir -p ~/sources/ && \
# Compile against OpenSSL to enable NPN
@btoone
btoone / curl.md
Last active June 19, 2024 12:54
A curl tutorial using GitHub's API

Introduction

An introduction to curl using GitHub's API.

The Basics

Makes a basic GET request to the specifed URI

curl https://api.github.com/users/caspyin