Skip to content

Instantly share code, notes, and snippets.

View dylanpyle's full-sized avatar
🏔️

Dylan Pyle dylanpyle

🏔️
View GitHub Profile
@huksley
huksley / decodeGoogleNewsUrl.ts
Last active July 25, 2024 20:59
This script decodes Google News generated encoded, internal URLs for RSS items
/**
* Google News started generate encoded, internal URLs for RSS items
* https://news.google.com/rss/search?q=New%20York%20when%3A30d&hl=en-US&gl=US&ceid=US:en
*
* This script decodes URLs into original one, for example URL
* https://news.google.com/__i/rss/rd/articles/CBMiSGh0dHBzOi8vdGVjaGNydW5jaC5jb20vMjAyMi8xMC8yNy9uZXcteW9yay1wb3N0LWhhY2tlZC1vZmZlbnNpdmUtdHdlZXRzL9IBAA?oc=5
*
* contains this
* https://techcrunch.com/2022/10/27/new-york-post-hacked-offensive-tweets/
*
@datagrok
datagrok / vendoring.md
Last active November 3, 2023 17:37
"Vendoring" is a vile anti-pattern

"Vendoring" is a vile anti-pattern

What is "vendoring"?

From a comment on StackOverflow:

Vendoring is the moving of all 3rd party items such as plugins, gems and even rails into the /vendor directory. This is one method for ensuring that all files are deployed to the production server the same as the dev environment.

The activity described above, on its own, is fine. It merely describes the deployment location for various resources in an application.

@crmne
crmne / gencpuusage.c
Created December 29, 2009 14:32
Generate arbitrary CPU usage
/* Generate arbitrary CPU usage */
#include <stdlib.h>
#include <unistd.h>
#include <err.h>
#include <math.h>
#include <sys/time.h>
#include <stdarg.h>
#include <sys/wait.h>
#define CPUUSAGE 0.2 /* set it to a 0 < float < 1 */