Skip to content

Instantly share code, notes, and snippets.

View cba85's full-sized avatar
🌊

Clément Barbaza cba85

🌊
View GitHub Profile
#!/bin/bash
# Optimized IP Country Block Generator for .htaccess
# (Make executable: chmod +x generate-country-blocks.sh)
# Usage: ./generate-country-blocks.sh [OPTIONS] [country1] [country2] …
set -e
# Configuration
OUTPUT_FILE="generate-country-blocks.htaccess"
@stenuto
stenuto / gather.js
Last active January 16, 2025 17:02
A simple script to gather, annotate, and copy code to your clipboard
#!/usr/bin/env node
/**
* gather.js
*
* A CLI tool to gather code files from given directories/files, annotate them,
* and copy the resulting annotated code blob into the clipboard.
*
* Usage:
* node gather.js relative/path/to/dir relative/path/to/file.js ...
@faustinoaq
faustinoaq / myAngular.html
Last active July 7, 2026 07:13
Front-end libraries (React, Vue, Angular) and the basic principles of how they work, all in a single file using pure JavaScript (VanillaJS).
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>My Angular from Scratch</title>
<style>
.my-component {
font-family: Arial, sans-serif;

Crippling Facebook

Facebook works with advertisers to target you. These instructions are one of the many ways to begin crippling that relationship. When AI targeting is crippled, your psychosecurity improves :)

  1. On your desktop machine, goto https://accountscenter.facebook.com/ads/audience_based_advertising
  2. Maximize the browser window
  3. Press F12 and click on the Console tab
  4. Select the code below, copy it, paste it upon the Console line (The area next to the > character in the Console window), and press enter:
@rameerez
rameerez / telegram-mtproxy.md
Last active November 11, 2026 00:39
Telegram Proxy How-To: complete and up-to-date MTProxy tutorial

How to set up a Telegram Proxy (MTProxy)

Telegram proxies can help people connect when Telegram is blocked. Telegram apps support them directly, so sharing a proxy can be as simple as sending someone a link.

I've used MTProxy to run my public Telegram proxy, which you can use if you don't want to set up your own.

A proxy cannot simply decrypt Telegram's encrypted message traffic, but it can observe client IP addresses, connection times, traffic volume and destinations. Its logs may retain that information. MTProxy is not a VPN or an anonymity guarantee, and it does not turn ordinary Telegram cloud chats into end-to-end encrypted Secret Chats. Choose an operator you trust.

Read this before choosing the software

@marcoarment
marcoarment / S3.php
Last active July 8, 2025 17:39
A simple PHP class to perform basic operations against Amazon S3 and compatible services.
<?php
/*
A simple PHP class to perform basic operations against Amazon S3 and compatible
services. Requires modern PHP (7+, probably) with curl, dom, and iconv modules.
Copyright 2022 Marco Arment. Released under the MIT license:
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
@pretzelhands
pretzelhands / index.php
Created June 2, 2021 13:31
Forbidden Prototype Template
<?php
// Your PHP code here
?>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
@rubenvanassche
rubenvanassche / tests.yml
Last active September 23, 2024 12:08
A simple Laravel testing workflow for GitHub Actions
name: Tests (PHP)
on: [push]
jobs:
tests:
name: Run tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
@sgup
sgup / recommended-routine.md
Last active December 4, 2026 06:26
Recommended Routine - Reddit BodyweightFitness
@jakebathman
jakebathman / remove_laravel_comments.php
Last active November 12, 2025 21:40
Remove comments from fresh Laravel files
<?php
/*
|--------------------------------------------------------------------------
| Remove Laravel Comments
|--------------------------------------------------------------------------
|
| Just made a new Laravel project, but don't want all those big
| comment blocks? Put this in the root of your project and run
| "php remove_laravel_comments.php"
|