This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# You need JQ. Replace the region with the one you want | |
# | |
curl -s https://ip-ranges.amazonaws.com/ip-ranges.json | jq '.prefixes[] | select(.region == "us-east-1") | .ip_prefix' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# run commands using windows powershell, administrator | |
### install python, ninja, meson and pkg-config tool using chocolatey package manager | |
### | |
### ! MUST HAVE POWERSHELL ADMINISTRATOR PRIVILEGES TO WORK ! | |
### | |
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')) | |
choco install python311 | |
choco install meson | |
choco install ninja |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <windows.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <time.h> | |
HWND findWindow(HWND hwnd, const char *name) { | |
char windowName[256]; | |
GetWindowText(hwnd, windowName, sizeof(windowName)); | |
if (strcmp(windowName, name) == 0) { | |
return hwnd; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <X11/Xlib.h> | |
#include <X11/keysym.h> | |
#include <X11/extensions/XTest.h> | |
Window findWindow(Display *display, Window window, const char *name) { | |
Window root, parent, *children; | |
unsigned int numChildren; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <cstdlib> | |
#include <string> | |
#include <sstream> | |
#include <vector> | |
#include <iostream> | |
#include <curl/curl.h> | |
namespace UT | |
{ | |
CURL *handle; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# https://cloud.google.com/compute/docs/faq#find_ip_range | |
# nslookup -q=TXT _cloud-netblocks.googleusercontent.com 8.8.8.8 | |
myarray=() | |
for LINE in `dig txt _cloud-netblocks.googleusercontent.com +short | tr " " "\n" | grep include | cut -f 2 -d :` | |
do | |
myarray+=($LINE) | |
for LINE2 in `dig txt $LINE +short | tr " " "\n" | grep include | cut -f 2 -d :` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing! | |
VAGRANTFILE_API_VERSION = "2" | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
# All Vagrant configuration is done here. The most common configuration | |
# options are documented and commented below. For a complete reference, | |
# please see the online documentation at vagrantup.com. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
define('TICKS_PER_SEC', 60); | |
define('SECTOR_SIZE', 16); | |
define('WALKING_SPEED', 5); | |
define('FLYING_SPEED', 15); | |
define('TERMINAL_VELOCITY', 50); | |
define('PLAYER_HEIGHT', 2); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
tc qdisc del dev eth1 root | |
echo 0 > /proc/fast_nat | |
tc qdisc add dev eth1 root handle 1: prio | |
tc qdisc add dev eth1 parent 1:3 handle 30: tbf rate 20kbit buffer 1600 limit 3000 | |
tc filter add dev eth1 protocol ip parent 1:0 prio 3 u32 match ip src 31.13.85.0/24 flowid 1:3 | |
tc filter add dev eth1 protocol ip parent 1:0 prio 3 u32 match ip src 179.232.0.0/14 flowid 1:3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# EditorConfig helps developers define and maintain consistent | |
# coding styles between different editors and IDEs | |
# editorconfig.org | |
root = true | |
[*] | |
end_of_line = lf | |
charset = utf-8 |
NewerOlder