Skip to content

Instantly share code, notes, and snippets.

@vidarh
vidarh / closures-basic.c
Created December 18, 2009 12:10
A number of ways to implement closures in C, in preparation of an upcoming blog post
#include <stdio.h>
#include <stdlib.h>
struct closure {
void (* call)(struct closure *);
int x;
};
@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active April 26, 2024 15:52
Complete Recent Discord Quest

Complete Recent Discord Quest

How to use this script:

  1. Accept the quest under User Settings -> Gift Inventory
  2. Join a vc
  3. Stream any window (can be notepad or something)
  4. Press Ctrl+Shift+I to open DevTools
  5. Go to the Console tab
  6. Paste the following code and hit enter:
let wpRequire;
@instantiator
instantiator / cloud-formation-vpc-with-internet.md
Last active April 26, 2024 15:50
AWS CloudFormation/SAM templates for an app that places lambdas inside a VPC, and restores their internet access

Sometimes you need to move your application lambdas inside VPC subnets (eg. if you need them to be able to access an RDS cluster, or another service that doesn't mesh perfectly with serverless). Doing so removes them from the default VPC, and with that they lose internet access.

The templates included here show how you can deploy lambdas inside a VPC, and create a route for them back to the internet.

You can still use API Gateway and trigger your lambdas with events, but now they'll be able to reach the internet, too.

template.yaml creates the VPC, which is then used by all the other resources.

@devjin0617
devjin0617 / .manifest
Created May 19, 2017 15:15
chrome extension using a content script to access the `window` object
{
"content_scripts": [
{
"matches": ["http://*/*", "https://*/*"],
"js": ["inject.js"],
"all_frames": true
}
],
"web_accessible_resources": [
"content.js"
@advaith1
advaith1 / nitro.md
Created May 4, 2023 01:06
Discord Nitro Subscription Links
@TheBrokenRail
TheBrokenRail / README.md
Last active April 26, 2024 15:48
Jailbreak Firefox!

Jailbreak-Firefox

This script allows you to install unsigned extensions (ones that aren't approved by Mozilla) on normal Firefox builds and the official Snap! That's right, no "Firefox Developer Edition" nonsense required!

โš ๏ธ Disclaimer โš ๏ธ

This script is not well tested, like at all. This script might break things, possibly important things. You should probably take a backup of your Firefox profile before using it. You have been warned.

Dependencies

sudo apt install -y curl unzip zip
# Only needed when jailbreaking the Snap
@Bryan-Essi
Bryan-Essi / hello.c
Last active April 26, 2024 15:48
mon hello world
int main()
{
printf("Hello World");
return 0;
}
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active April 26, 2024 15:48
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example