Skip to content

Instantly share code, notes, and snippets.

@xcommerce-gists
xcommerce-gists / CreateAccount
Last active December 25, 2015 12:21
How to Create a PayPal Account Using Adaptive Accounts.curl
HTTP Headers
------------
-H "X-PAYPAL-SECURITY-USERID: <Caller-UID>" # UserID from the Caller account
-H "X-PAYPAL-SECURITY-PASSWORD: <Caller-Pswd>" # Password from the Caller account
-H "X-PAYPAL-SECURITY-SIGNATURE: <Caller-Sig>" # Signature from the Caller account
-H "X-PAYPAL-REQUEST-DATA-FORMAT: JSON"
-H "X-PAYPAL-RESPONSE-DATA-FORMAT: JSON"
-H "X-PAYPAL-SANDBOX-EMAIL-ADDRESS: <Caller-Sandbox-edress>"
-H "X-PAYPAL-DEVICE-IPADDRESS: 192.0.2.0"
-H "X-PAYPAL-APPLICATION-ID: APP-80W284485P519543T" # Standard Sandbox App ID
@olasd
olasd / stream_to_youtube.sh
Created March 28, 2014 19:58
Stream video to youtube via ffmpeg
#! /bin/bash
#
# Diffusion youtube avec ffmpeg
# Configurer youtube avec une résolution 720p. La vidéo n'est pas scalée.
VBR="2500k" # Bitrate de la vidéo en sortie
FPS="30" # FPS de la vidéo en sortie
QUAL="medium" # Preset de qualité FFMPEG
YOUTUBE_URL="rtmp://a.rtmp.youtube.com/live2" # URL de base RTMP youtube
@staltz
staltz / introrx.md
Last active July 29, 2024 05:55
The introduction to Reactive Programming you've been missing
@parmentf
parmentf / GitCommitEmoji.md
Last active July 30, 2024 23:31
Git Commit message Emoji
@0x4D31
0x4D31 / beautiful_idiomatic_python.md
Last active July 8, 2024 09:36 — forked from JeffPaine/beautiful_idiomatic_python.md
[Beautiful Idiomatic Python] Transforming Code into Beautiful, Idiomatic Python #python

Transforming Code into Beautiful, Idiomatic Python

Notes from Raymond Hettinger's talk at pycon US 2013 video, slides.

The code examples and direct quotes are all from Raymond's talk. I've reproduced them here for my own edification and the hopes that others will find them as handy as I have!

Looping over a range of numbers

for i in [0, 1, 2, 3, 4, 5]:
@shu-yusa
shu-yusa / create_jwt.sh
Last active March 21, 2024 14:57
Generate private and public keys, and create JWT and JWKs
#!/bin/sh
## Requires openssl, nodejs, jq
header='
{
"kid": "12345",
"alg": "RS256"
}'
payload='
{
"iss": "https://example.com",
@PJUllrich
PJUllrich / big-o.md
Last active June 28, 2024 20:25
Big-O Time Complexities for Elixir Data Structures

Big-O Time Complexities for Elixir data structures

Map [1]

Operation Time Complexity
Access O(log n)
Search O(log n)
Insertion O(n) for <= 32 elements, O(log n) for > 32 elements [2]
Deletion O(n) for <= 32 elements, O(log n) for > 32 elements