Skip to content

Instantly share code, notes, and snippets.

View ccdd13's full-sized avatar
🥑
still eating 🥑 🥑

ccdd13 ccdd13

🥑
still eating 🥑 🥑
View GitHub Profile
@IamSkyBlue
IamSkyBlue / pop_cat_click.js
Last active March 21, 2022 17:16
pop cat click request
/*
https://popcat.click
open devtools and go to console (or just F12)
copy & paste code below
*/
setInterval(() => {
clickPerRequest = 800 // how many click sent in one request, default set to 800
reToken = localStorage.getItem("_grecaptcha");
url = "https://stats.popcat.click/pop?pop_count=" + clickPerRequest + "&captcha_token=" + reToken
@hasn-prevas
hasn-prevas / add-bom.sh
Last active May 22, 2023 02:07
Shell script to add UTF-8 BOM to any file
#!/bin/sh
BOM='\xEF\xBB\xBF'
if ! sed -n "1{/^$BOM/q1}" "$1"; then
echo "Already has BOM" >&2
exit 1
fi
sed -i "1s/^/$BOM/" "$1"
const sleep = (delay) => new Promise((resolve) => setTimeout(resolve, delay))
const repeatedGreetings = async () => {
await sleep(1000)
console.log("First")
await sleep(1000)
console.log("Second")
await sleep(1000)
console.log("Third")
}
@rjhansen
rjhansen / keyservers.md
Last active April 14, 2024 12:28
SKS Keyserver Network Under Attack

SKS Keyserver Network Under Attack

This work is released under a Creative Commons Attribution-NoDerivatives 4.0 International License.

Terminological Note

"OpenPGP" refers to the OpenPGP protocol, in much the same way that HTML refers to the protocol that specifies how to write a web page. "GnuPG", "SequoiaPGP", "OpenPGP.js", and others are implementations of the OpenPGP protocol in the same way that Mozilla Firefox, Google Chromium, and Microsoft Edge refer to software packages that process HTML data.

Who am I?

node *find_loop(node *head)
{
node *p1;
node *p2;
if (head == NULL)
return (NULL);
p1 = head;
p2 = head;
while (p2->next != NULL && p2->next->next != NULL)
@vpnwall-services
vpnwall-services / phpinfo.php
Created December 14, 2018 15:35
[PHPINFO] phpinfo file #php #phpinfo
<?php
phpinfo();
phpinfo(INFO_MODULES);
?>
@ahmedsbytes
ahmedsbytes / keybase.md
Created October 24, 2018 22:30
keybase.md

Keybase proof

I hereby claim:

  • I am amaAbdou on github.
  • I am ahmedabdou (https://keybase.io/ahmedabdou) on keybase.
  • I have a public key whose fingerprint is 4DF1 6254 DD7E F140 3FEE C5F7 4942 4484 A73F A944

To claim this, I am signing this object:

@ahmedsbytes
ahmedsbytes / ddd_cqrs_event-sourcing_in_php.md
Created October 7, 2018 11:20 — forked from jsor/ddd_cqrs_event-sourcing_in_php.md
DDD, CQRS and Event Sourcing in PHP

DDD, CQRS and Event Sourcing in PHP

  • Broadway - Infrastructure and testing helpers for creating CQRS and event sourced applications
  • EventCentric.Core - Event Sourcing and CQRS in PHP
  • LiteCQRS - Small convention based CQRS library for PHP
  • predaddy - Common DDD classes including an annotation driven message bus and tools for CQRS and Event Sourcing
  • ProophEventSourcing - Provides basic functionality for event-sourced aggregates
  • ProophEventStore - PHP 5.4+ EventStore Implementation
  • ProophServiceBus - PHP Enterprise Service Bus Implementation supporting CQRS and DDD

Getting Started With Plug'n'Play

If you use create-react-app, #5136 (released with the 2.0) implements a --use-pnp option that allows you to easily create a new project using PnP! In this case, just use create-react-app --use-pnp together with Yarn 1.12, and you're good to go! 👍

Plug'n'Play is a new initiative from Yarn that aims to remove the need for node_modules. It's already available, and has proved being effective even on large-scale infrastructures. This document describes in a few steps how to quickly get started with it. Spoiler alert: it's quite easy 🙂

First, download a package manager that supports it. Yarn 1.12 already does, so that's what we're going to use! To install it, just follow the instructions on our website: https://yarnpkg.com/en/docs/install

If everything is ok, running yarn --version should give you v1.12.1 or higher. If you don't get this result maybe a

#!/bin/bash
echo -n Password:
read -s password
echo
hash="$(echo -n $password | openssl sha1)"
upperCase="$(echo $hash | tr '[a-z]' '[A-Z]')"
prefix="${upperCase:0:5}"
response=$(curl -s https://api.pwnedpasswords.com/range/$prefix)
while read -r line; do