Skip to content

Instantly share code, notes, and snippets.

View ceer's full-sized avatar

Antoine Caillet ceer

View GitHub Profile
@mrdoob
mrdoob / WebAudio.js
Last active February 14, 2024 05:02
HTMLAudioElement polyfill using the WebAudio API with seamless loop support in Safari.
/**
* @author mrdoob / http://mrdoob.com/
*/
function WebAudio( context ) {
if ( context === undefined ) {
context = WebAudio.context;
@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
*/
//MIT License
//Copyright (c) 2021 Felix Westin
//Source: https://github.com/Fewes/MinimalAtmosphere
//Ported to GLSL by Marcin Ignac
#ifndef ATMOSPHERE_INCLUDED
#define ATMOSPHERE_INCLUDED
// -------------------------------------
@johnboxall
johnboxall / curl-bash-aliases.sh
Created May 14, 2019 19:06
cURL Bash Aliases
# Print the headers of URL.
alias curl-headers='curl ${CURL_ARGS[@]} --dump-header -'
# Print Time to First Byte of URL.
alias curl-ttfb='curl ${CURL_ARGS[@]} --write-out "%{time_starttransfer}\n"'
# Print bytes file size of URL.
alias curl-size='curl ${CURL_ARGS[@]} --write-out "%{size_download}\n"'
# https://ec.haxx.se/usingcurl-writeout.html
alias curl-timing='curl ${CURL_ARGS[@]} --write-out "
namelookup: %{time_namelookup} Start to name resolving
connect: %{time_connect} Start to TCP connect to host
@freddiemixell
freddiemixell / netlify.php
Last active February 15, 2021 11:24
WordPress Netlify Build Hook
<?php
// Somewhere off in your wp-config.php make sure you replace 123456 with your api key.
define( 'NETLIFY_API_KEY', '123456' );
// Somewhere off in your theme or even a plugin.
/**
* Netlify Webhook Build Function
*
@marchildmann
marchildmann / mailgun.php
Last active November 18, 2018 11:00
PHP Mailgun CURL example
<?php
define('MAILGUN_URL', 'https://api.mailgun.net/v3/DOMAIN');
define('MAILGUN_KEY', 'key-123341442922');
function sendmailByMailGun($to,$toname,$mailfromname,$mailfrom,$subject,$html,$text,$tag,$replyto){
$array_data = array(
'from'=> $mailfromname .'<'.$mailfrom.'>',
'to'=>$toname.'<'.$to.'>',
'subject'=>$subject,
@dmnsgn
dmnsgn / WebGL-WebGPU-frameworks-libraries.md
Last active July 18, 2024 10:09
A collection of WebGL and WebGPU frameworks and libraries

A non-exhaustive list of WebGL and WebGPU frameworks and libraries. It is mostly for learning purposes as some of the libraries listed are wip/outdated/not maintained anymore.

Engines and libraries ⚙️

Name Stars Last Commit Description
three.js ![GitHub
@judy2k
judy2k / parse_dotenv.bash
Created March 22, 2017 13:34
Parse a .env (dotenv) file directly using BASH
# Pass the env-vars to MYCOMMAND
eval $(egrep -v '^#' .env | xargs) MYCOMMAND
# … or ...
# Export the vars in .env into your shell:
export $(egrep -v '^#' .env | xargs)
@santerref
santerref / sync.sh
Last active April 12, 2021 17:20
Simple bash script to synchronize your WordPress dev (local) with your staging or production.
#/bin/bash
REMOTE_URL="https://staging.example.com"
LOCAL_URL="http://example.dev"
REMOTE_PATH="/home/staging_example/public_html"
LOCAL_PATH="/var/www/example.dev"
SSH_HOST="user@staging.example.com"
@Hailong
Hailong / default.vcl
Last active July 9, 2022 10:41
Varnish 4 VCL for Prestashop 1.6 (*** This is still under development, don't use it directly! ***)
#
# This is an example VCL file for Varnish.
#
# It does not do anything by default, delegating control to the
# builtin VCL. The builtin VCL is called when there is no explicit
# return statement.
#
# See the VCL chapters in the Users Guide at https://www.varnish-cache.org/docs/
# and https://www.varnish-cache.org/trac/wiki/VCLExamples for more examples.