Skip to content

Instantly share code, notes, and snippets.

@iRajatDas
iRajatDas / HowToDeleteAllCloudflareRecors.md
Created November 20, 2022 14:51 — forked from AidasK/HowToDeleteAllCloudflareRecors.md
Cloudflare delete all DNS records. Just go to cloudflare dns zones, open your browers developer console and paste this javascript code.

image

Real developers are not used to clicking, it's allways easier to write a script to do it for you.
@gcatlin
gcatlin / sdl-metal-example.m
Last active April 20, 2024 13:04
Minimal C SDL2 Metal example
//
// cc sdl-metal-example.m `sdl2-config --cflags --libs` -framework Metal -framework QuartzCore && ./a.out
//
#include <SDL.h>
#import <Metal/Metal.h>
#import <QuartzCore/CAMetalLayer.h>
int main (int argc, char *args[])
{
SDL_SetHint(SDL_HINT_RENDER_DRIVER, "metal");
@danielpquinn
danielpquinn / svg-rounded-rectangle-path.js
Last active April 20, 2024 13:04
Draw SVG Rounded Rectangle Path
/**
* Get path data for a rounded rectangle. Allows for different radius on each corner.
* @param {Number} w Width of rounded rectangle
* @param {Number} h Height of rounded rectangle
* @param {Number} tlr Top left corner radius
* @param {Number} trr Top right corner radius
* @param {Number} brr Bottom right corner radius
* @param {Number} blr Bottom left corner radius
* @return {String} Rounded rectangle SVG path data
*/
@Kurrt
Kurrt / Respond to Ringer Switch Change.xm
Created September 3, 2020 05:57
Jailbreak Tweak Example: React to Ringer Switch Change
%hook SpringBoard
-(void)_ringerChanged:(struct __IOHIDEvent *)arg1 {
// Ringer changed!
%orig;
}
%end
@lukekarrys
lukekarrys / README.md
Last active December 7, 2016 18:08
NCAA Tournament Formatter
@Kurrt
Kurrt / Handle Physical Button Presses.xm
Last active April 20, 2024 13:00
Jailbreak Tweak Example: React to hardware buttons
%hook SpringBoard
// Note: this example does not work for software buttons such as the home gesture on iPX and above.
-(_Bool)_handlePhysicalButtonEvent:(UIPressesEvent *)arg1 {
int type = arg1.allPresses.allObjects[0].type;
int force = arg1.allPresses.allObjects[0].force;
// type = 101 -> Home button
// type = 104 -> Power button
class ForegroundServiceLauncher(private val serviceClass: Class<out Service>) {
private var isStarting = false
private var shouldStop = false
private var isCreated = false
@Synchronized
fun startService(context: Context, block: Intent.() -> Unit = {}) {
if (!isCreated) {
isStarting = true
@mackwage
mackwage / windows_hardening.cmd
Last active April 20, 2024 12:56
Script to perform some hardening of Windows OS
:: Windows 10 Hardening Script
:: This is based mostly on my own personal research and testing. My objective is to secure/harden Windows 10 as much as possible while not impacting usability at all. (Think being able to run on this computer's of family members so secure them but not increase the chances of them having to call you to troubleshoot something related to it later on). References for virtually all settings can be found at the bottom. Just before the references section, you will always find several security settings commented out as they could lead to compatibility issues in common consumer setups but they're worth considering.
:: Obligatory 'views are my own'. :)
:: Thank you @jaredhaight for the Win Firewall config recommendations!
:: Thank you @ricardojba for the DLL Safe Order Search reg key!
:: Thank you @jessicaknotts for the help on testing Exploit Guard configs and checking privacy settings!
:: Best script I've found for Debloating Windows 10: https://github.com/Sycnex/Windows10Debloater
:
@henriqueclaranhan
henriqueclaranhan / passeidireto.js
Created February 29, 2024 14:31
Passei Direto
document.querySelectorAll(".BannerSelector_banner-container__lwUxw").forEach(element => {
element.remove();
});
document.querySelectorAll("*").forEach(element => {
const clonedElement = element.cloneNode(true);
element.parentNode.replaceChild(clonedElement, element);
});
document.querySelectorAll("*").forEach(element => {
@egorsmkv
egorsmkv / metrials-go.md
Last active April 20, 2024 12:43
Материалы по Go (golang): мануалы, статьи, книги и ссылки на сообщества

Материалы по Go (golang)

На русском языке

Мануалы и туториалы

  • [Введение в программирование на Go][1]
  • [Маленькая книга о Go][3]
  • [Эффективный Go][2]
  • Есть еще [Краткий пересказ Effective Go на русском языке][4], но 2009 года