Skip to content

Instantly share code, notes, and snippets.

@Yaffle
Yaffle / gist:1284012
Last active April 2, 2018 08:03
javascript base64 encode/decode
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<script type="text/javascript">
var nativeAtob = window.atob;
var nativeBtoa = window.btoa;
// http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html#atob
(function (global) {
"use strict";
@mckamey
mckamey / bezier.js
Created September 25, 2012 16:35
JavaScript port of Webkit CSS cubic-bezier(p1x.p1y,p2x,p2y) and various approximations
/*
* Copyright (C) 2008 Apple Inc. All Rights Reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the