Skip to content

Instantly share code, notes, and snippets.

View 9kopb's full-sized avatar
💎
xyu.foundation

9kopb 9kopb

💎
xyu.foundation
View GitHub Profile
@9kopb
9kopb / index.html
Created September 5, 2023 15:03
Secret Project
<div class="mobile-wrap">
<div class="mobile clearfix">
<div class="header">
<span class="ion-ios-navicon pull-left"><i></i></span>
<span class="title">Home</span>
<span class="ion-ios-search pull-right"></span>
<div class="search">
<form method="post">
addEventListener("fetch", (event) => {
event.respondWith(
handleRequest(event.request).catch(
(err) => new Response(err.stack, { status: 500 })
)
);
});
async function handleRequest(request) {
const { pathname, searchParams, host } = new URL(request.url);
{
"$jason": {
"head": {
"templates": {
"body": {
"background": {
"type": "camera",
"options": {
"device": "back"
}
@thomaswilburn
thomaswilburn / re-iterate.md
Last active April 30, 2023 13:26
Putting JavaScript's iterable protocol into context

Re: Iterate

I'm so old I remember when arrays in JavaScript didn't have forEach() or map(), and a lot of libraries would implement their own functional looping constructs, which were better than regular loops because you got a new function scope (remember, we didn't have let or const either). We all had to adjust when native forEach() landed because we were used to jQuery's each(), which had the arguments in the wrong order.

I was reminded of this while doing some scraping last week using Cheerio to load and traverse an HTML page in Node. Cheerio implements a jQuery-like API, which is genuinely pleasant to use, but carries some of that legacy behavior (like each(index, item) argument ordering) with it in ways that are jarring if you haven't used actual jQuery in a while. Fortunately, Cheerio also implements the iterator protocol on its collections, so if you just want the items for a given selector, you can use for ... of loops and not have to think abo

@9kopb
9kopb / torrc
Created March 17, 2022 21:40 — forked from Nill-R/torrc
Minimal /etc/tor/torrc
SOCKSPort 9050
ExcludeNodes {ru}
ExcludeExitNodes {ru},{kz},{by},{cn},{kg},{tj},{uz},{ir}
Log notice file /var/log/tor/notices.log
@stvaruzek
stvaruzek / Automate App to Google Spreadsheets Integration.md
Last active March 3, 2024 16:45
Automate to Google Spreadsheets Integration

Introduction

This is a sample web app implemetation in Google Apps Script that receives a JSON payload and inserts it directly into a Google spreadsheet. It is a demo implementation for Automate app flow Google Spreadsheets Integration.

Usage

Using just one HTTP Request block in an Automate flow you can send data from your Automate flows directly into Google Spreadsheets! Pretty neat, isn't it?

Sample Spreadsheet

https://docs.google.com/spreadsheets/d/1VZEp-ru9BH9AQSNHzRxnJZx1Nabviz6UiN9PIelOjA8

Setup

@cemerson
cemerson / TSQL-replace-string-in-entire-database.sql
Created November 11, 2021 11:30
SQL replace all instances of string in all tables of entire database
/* ------------------------------------------------------- /
TITLE: SQL Server Find and Replace Values in All
Tables and All Text Columns
SOURCE: https://www.mssqltips.com/sqlservertip/1555/sql-server-find-and-replace-values-in-all-tables-and-all-text-columns/
/ ------------------------------------------------------- */
USE MyDatabaseNameHere
BEGIN TRANSACTION
@Nill-R
Nill-R / torrc
Created November 30, 2019 18:50
Minimal /etc/tor/torrc
SOCKSPort 9050
ExcludeNodes {ru}
ExcludeExitNodes {ru},{kz},{by},{cn},{kg},{tj},{uz},{ir}
Log notice file /var/log/tor/notices.log
@vavkamil
vavkamil / blind-xss-cloudflare-worker.js
Last active November 2, 2023 14:43
Serverless Blind XSS hunter with Cloudflare Worker
addEventListener("fetch", event => {
event.respondWith(handleRequest(event.request))
})
////////////////////////////////////////////////////////////////////////////////////////////////////
// ! DON'T LEAK THE SECRETS !
// Use Workers KV if you can https://developers.cloudflare.com/workers/reference/storage/
const telegram_token = "*****REDACTED*****";
const telegram_url = "https://api.telegram.org/bot" + telegram_token + "/sendMessage";