Skip to content

Instantly share code, notes, and snippets.

@advaith1
advaith1 / discordjs-slash-commands.md
Last active July 28, 2024 00:12
Slash Commands in Discord.js
@sandervanhooft
sandervanhooft / cashier_mollie_exampe_basic.php
Last active May 20, 2022 13:02
Cashier Mollie basic example
<?php
// Create a new subscription
$user = User::find(1);
$user->newSubscription('main', 'monthly')
->trialDays(10)
->withCoupon('MADRID2019')
->create();
@jminor
jminor / Standard-DoubleSided.shader
Created June 1, 2017 16:30
Unity Standard-DoubleSided.shader
Shader "Standard-DoubleSided"
{
Properties
{
_Color("Color", Color) = (1,1,1,1)
_MainTex("Albedo", 2D) = "white" {}
_Cutoff("Alpha Cutoff", Range(0.0, 1.0)) = 0.5
_Glossiness("Smoothness", Range(0.0, 1.0)) = 0.5
const colours = {
normal: '#A8A77A',
fire: '#EE8130',
water: '#6390F0',
electric: '#F7D02C',
grass: '#7AC74C',
ice: '#96D9D6',
fighting: '#C22E28',
poison: '#A33EA1',
ground: '#E2BF65',
@igrr
igrr / ESP8266httpsUpdate.ino
Last active October 30, 2022 14:18
ESP8266 ota over HTTPS
/*
OTA update over HTTPS
As an example, we download and install ESP8266Basic firmware from github.
Requires latest git version of the core (November 17, 2015)
Created by Ivan Grokhotkov, 2015.
This example is in public domain.
*/
@lastguest
lastguest / JSON_to_URLEncoded.js
Created July 10, 2014 17:47
Convert JavaScript object to x-www-form-urlencoded format
function JSON_to_URLEncoded(element,key,list){
var list = list || [];
if(typeof(element)=='object'){
for (var idx in element)
JSON_to_URLEncoded(element[idx],key?key+'['+idx+']':idx,list);
} else {
list.push(key+'='+encodeURIComponent(element));
}
return list.join('&');
}