Skip to content

Instantly share code, notes, and snippets.

View MatthieuLemoine's full-sized avatar

Matthieu Lemoine MatthieuLemoine

View GitHub Profile
@jordienr
jordienr / Gradient.js
Created September 12, 2021 00:23
Stripe Mesh Gradient WebGL
/*
* Stripe WebGl Gradient Animation
* All Credits to Stripe.com
* ScrollObserver functionality to disable animation when not scrolled into view has been disabled and
* commented out for now.
* https://kevinhufnagl.com
*/
@kitten
kitten / reactiveconf-sc-cfp.md
Last active November 17, 2020 15:06
ReactiveConf 2017 Lightning Talk CFP: With styled-components into the future

styled-components Logo

With styled-components into the future

Preprocessing is dead, long live preprocessing!


This is a CFP for ReactiveConf 2017's open call for Lightning talks. If you'd like to see this talk become a reality, please ⭐ star this gist. #ReactiveConf

@WaldoJeffers
WaldoJeffers / compose.js
Last active January 3, 2024 16:47
JavaScript one-line compose (ES6)
const compose = (...fns) => fns.reduce((f, g) => (...args) => f(g(...args)))
// Usage : compose functions right to left
// compose(minus8, add10, multiply10)(4) === 42
//
// The resulting function can accept as many arguments as the first function does
// compose(add2, multiply)(4, 10) === 42
anonymous
anonymous / GAME_MASTER_v0_1.protobuf
Created July 16, 2016 16:31
Pokemon Go decoded GAME_MASTER protobuf file v0.1
Result: 1
Items {
TemplateId: "BADGE_BATTLE_ATTACK_WON"
Badge {
BadgeType: BADGE_BATTLE_ATTACK_WON
BadgeRanks: 4
Targets: "\nd\350\007"
}
}
Items {
@MatthieuLemoine
MatthieuLemoine / 1_install_lets_encrypt
Last active May 24, 2016 13:13
nginx + Let's encrypt = <3
#!/bin/bash
sudo apt-get install git bc
sudo git clone https://github.com/letsencrypt/letsencrypt /opt/letsencrypt
sudo mkdir /var/www/letsencrypt
sudo chown www-data /var/www/letsencrypt
@JunkOSGitHub
JunkOSGitHub / git-create
Created January 19, 2016 15:49
Git command to create a new repo on GitHub
#!/bin/bash
#
# Create a repo on github
#
repo_name=$1
dir_name=`basename $(pwd)`
if [ "$repo_name" = "" ]; then
@marioeguiluz
marioeguiluz / HeapSort.swift
Last active November 14, 2017 13:17
Heap Sort Swift
//Safe bounds check for Array
//http://stackoverflow.com/questions/25329186/safe-bounds-checked-array-lookup-in-swift-through-optional-bindings
extension Collection {
/// Returns the element at the specified index iff it is within bounds, otherwise nil.
subscript (safe index: Index) -> Iterator.Element? {
return index >= startIndex && index < endIndex ? self[index] : nil
}
}
//Helper function to exchange position in one array