Skip to content

Instantly share code, notes, and snippets.

View m4thfr34k's full-sized avatar
👽

Daniel Charpentier m4thfr34k

👽
View GitHub Profile
@pojntfx
pojntfx / main.sh
Last active May 18, 2024 07:53
Bluesky/AT Protocol: cURL API Interaction Cheatsheet
#!/bin/bash
# This script resolves a DID, retrieves an API key, fetches a user's feed,
# and posts a "Hello, world" message to the user's feed.
# Resolve DID for handle
HANDLE='felicitas.pojtinger.com'
DID_URL="https://bsky.social/xrpc/com.atproto.identity.resolveHandle"
export DID=$(curl -G \
--data-urlencode "handle=$HANDLE" \
curl http://api.mainnet-beta.solana.com -X POST -H "Content-Type: application/json" -d '{
"jsonrpc": "2.0",
"id": 1,
"method": "getProgramAccounts",
"params": [
"cndyAnrLdpjq1Ssp1z8xxDsB8dxe7u4HL5Nxi2K5WXZ",
{
"encoding": "jsonParsed",
"filters": [ ]
}
@sadhasivam
sadhasivam / go-interview-questions.md
Created November 23, 2020 00:04
Golang Interview Questions
  • Installation: 1- Explain how Go path works? 2- What are the benefits of Go Module (reference its commands)?

  • Concurrency: 1- Explain Concurrency & when to use it? 2- How would you allow communication between goroutines in Go? 3- How would you manage their access to resources?

  1. why do you use Go (my answer was as simple as "why i shouldn't", and some extra points Grimacing face)
Rank Type Prefix/Suffix Length
1 Prefix my+ 2
2 Suffix +online 6
3 Prefix the+ 3
4 Suffix +web 3
5 Suffix +media 5
6 Prefix web+ 3
7 Suffix +world 5
8 Suffix +net 3
9 Prefix go+ 2
@IanColdwater
IanColdwater / twittermute.txt
Last active July 2, 2024 02:25
Here are some terms to mute on Twitter to clean your timeline up a bit.
Mute these words in your settings here: https://twitter.com/settings/muted_keywords
ActivityTweet
generic_activity_highlights
generic_activity_momentsbreaking
RankedOrganicTweet
suggest_activity
suggest_activity_feed
suggest_activity_highlights
suggest_activity_tweet
@marianzange
marianzange / coinbaseProSignature.js
Created August 20, 2018 13:19
Coinbase Pro HMAC signature generation for Postman
// Computes the HMAC for requests sent to the Coinbase Pro API.
//
// - Add the following code as Postman pre-request script
// - Adapt the getPatch function an the variable names according to your needs
const timestamp = Date.now() / 1000;
function getPath(url) {
// URL path regex works only if your URLs look like this: {{api_url}}/resource
// If you use hardcoded URLs or any other scheme, adapt the regex pattern!
@nlaz
nlaz / node_tutorial.md
Last active January 8, 2023 03:13
Build a Backend from Scratch
@Avaq
Avaq / combinators.js
Last active July 4, 2024 07:20
Common combinators in JavaScript
const I = x => x
const K = x => y => x
const A = f => x => f (x)
const T = x => f => f (x)
const W = f => x => f (x) (x)
const C = f => y => x => f (x) (y)
const B = f => g => x => f (g (x))
const S = f => g => x => f (x) (g (x))
const S_ = f => g => x => f (g (x)) (x)
const S2 = f => g => h => x => f (g (x)) (h (x))
@judsonmitchell
judsonmitchell / developing_apps_on_chromebook.md
Last active December 22, 2022 16:39
A quick guide to developing Android and iOS apps using only a Chromebook.

How I Develop iOS and Android Apps Using a Chromebook.

(Current as of July, 2014)

I'm a Chromebook fanboy, I admit it. I had one of the first CR-48s and am now happily possessed of an Acer C720. I use it for everything, from writing legal briefs to developing apps, and I am thoroughly satisfied with it.

Mobile App development on a CB poses some special issues, however. Most developers have dedicated OS-specific machines to develop mobile apps (on iOS this is almost a requirement), but I simply refuse to buy an Apple computer just to create a mobile app. After much trial and error, I have found it possible, even enjoyable, to create apps on my CB. Here's how I do it.

1. Preparing the Chromebook

@soheilhy
soheilhy / nginxproxy.md
Last active May 16, 2024 08:59
How to proxy web apps using nginx?

Virtual Hosts on nginx (CSC309)

When hosting our web applications, we often have one public IP address (i.e., an IP address visible to the outside world) using which we want to host multiple web apps. For example, one may wants to host three different web apps respectively for example1.com, example2.com, and example1.com/images on the same machine using a single IP address.

How can we do that? Well, the good news is Internet browsers