Skip to content

Instantly share code, notes, and snippets.

View sockdrawermoney's full-sized avatar
👻

Sock sockdrawermoney

👻
View GitHub Profile
@tinchoabbate
tinchoabbate / ezine.txt
Last active December 28, 2023 17:22
First e-zine of The Red Guild. Released for the first time during the security awareness campaign in Ethereum Argentina 2023.
Now available at https://theredguild.org/ezines/1.html
@z0r0z
z0r0z / Multisig.sol
Last active March 9, 2022 01:50
Simple gas-optimized multi-signature contract.
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity >=0.8.4;
/// @notice Simple gas-optimized multi-signature contract.
contract Multisig {
event Propose(address indexed proposer, uint256 indexed proposal);
event Sign(address indexed signer, uint256 indexed proposal);
event Execute(uint256 indexed proposal);
error NotSigner();
# Recursion UDF from FaunaDB Community user
---
Q: Is there an approved way to loop/repeat FQL an arbitrary number of times? Or generate a set/array of arbitrary size to Foreach on?
A: You can play with UDF to achieve it. Here is a quick idea (using recursion, careful it's max 200 iterations).
Calling it would be something like this Call("Repeat", ["3", "AnotherFunctionName", 0]) .
It's really just an example, you can mess around it to add input values if needs be, etc.
const Repeat = Query(
@tovbinm
tovbinm / fauna-graphql-relations.gql
Last active March 6, 2022 14:38
FaunaDB Relations: GraphQL schemas, mutations and resulting documents
****************************************************************************
**** FaunaDB Relations: GraphQL schemas, mutations and resulting documents *
****************************************************************************
**** One to One Relation ***************************************************
SCHEMA:
type User { name: String! car: Car }
type Car { plate: String! owner: User }
MUTATION:
mutation Create {
createUser(data: {
@colllin
colllin / Readme.md
Last active August 11, 2020 03:03
Auth0 + FaunaDB integration strategy

Goal

Solutions

At the very least, we need two pieces of functionality:

  1. Create a user document in Fauna to represent each Auth0 user.
  2. Exchange an Auth0 JWT for a FaunaDB user secret.
set localComputer to "" -- enter name of a remote computer
set username to "" -- remote computer username
set computerPassword to "" -- remote computer password
set remoteComputer to "eppc://" & username & ":" & computerPassword & "@" & localComputer
set rTunes to application "iTunes" of machine remoteComputer
if application "iTunes" is running then
try
tell application "iTunes"
set {tArtist, tName, tAlbum, theID} to {artist, name, album, database ID} of current track
@didichanoch
didichanoch / sample-discord-coc.md
Last active May 19, 2023 17:23 — forked from annalee/sample-slack-coc.md
A sample code of conduct for discord servers.

[DISCORD SERVER] Code of Conduct

Welcome!

[BRIEF DESCRIPTION OF THE DISCORD SERVER AND ITS PURPOSE]

The current admins are:

  • [NAMES]
@oliveratgithub
oliveratgithub / emojis.json
Last active July 30, 2024 19:21
Emoji-list with emojis, names, shortcodes, unicode and html entities [massive list]
{
"emojis": [
{"emoji": "👩‍👩‍👧‍👧", "name": "family: woman, woman, girl, girl", "shortname": ":woman_woman_girl_girl:", "unicode": "1F469 200D 1F469 200D 1F467 200D 1F467", "html": "👩‍👩‍👧‍👧", "category": "People & Body (family)", "order": ""},
{"emoji": "👩‍👩‍👧‍👦", "name": "family: woman, woman, girl, boy", "shortname": ":woman_woman_girl_boy:", "unicode": "1F469 200D 1F469 200D 1F467 200D 1F466", "html": "👩‍👩‍👧‍👦", "category": "People & Body (family)", "order": ""},
{"emoji": "👩‍👩‍👦‍👦", "name": "family: woman, woman, boy, boy", "shortname": ":woman_woman_boy_boy:", "unicode": "1F469 200D 1F469 200D 1F466 200D 1F466", "html": "👩‍👩‍👦‍👦", "category": "People & Body (family)", "order": ""},
{"emoji": "👨‍👩‍👧‍👧", "name": "family: man, woman, girl, girl", "shortname": ":man_woman_girl_girl:", "unicode": "1F468 200D 1F469 200D 1F467 200D 1F467", "html": "👨‍👩&z
@othiym23
othiym23 / wtf.md
Last active September 10, 2017 03:35
An experiment. Subject to change.
@annalee
annalee / sample-slack-coc.md
Last active April 11, 2024 21:14
A sample code of conduct for social slack teams.

[SLACKNAME] Code of Conduct

Welcome!

[BRIEF DESCRIPTION OF THE SLACK AND ITS PURPOSE]

The current admins are:

  • [NAMES]