background preloader

OAuth that just works.

OAuth that just works.

Webgl Academy : tutorial to learn WebGL dg/twitter-php MidnightLightning : Coinbase API via OAuth In working on connecting to the Coinbase API for automating Bitcoin merchant transactions, I ran into a few 'gotchas' that aren't well spelled out in their documentation, and worth noting if you're connecting to their API from scratch: Their documentation states "All requests use the application/json content type", and indeed if you send a malformed query to the API, the returned error tells you to double-check your JSON encoding. However, you don't need to use JSON for the request if you use the square-bracket syntax in the query variable names to indicate structure: POST https: Content-Type: application/json } or POST https: Content-Type: application/x-www-form-urlencoded button[name]=test&button[price_string]=1.23&button[price_currency_iso]=USD Both these queries work, and if you're using an HTTP library, likely the default Content-Type for a POST request will be set to application/x-www-form-urlencoded for you.

5 HTML5 Javascript APIs to keep an eye on — Adnane Belmadiaf's Blog In my last post, i have talked about HTML5 APIs, so thought it will also interesting to write about some new old JavaScript APIs. Since CSS has been improving over the time and today you can achieve what was only done with Javascript with CSS only, on the other side Javascript have to improve and follow the evolution, so today Javascript can do a lot of things, like accessing hardware(camera, microphone, gamepad, GPU), accessing the filesystem and websocket. Battery Status API The Battery Status API allows any webpage to inspect the state of the device's (Laptop, phone or tablet) battery through javascript : var battery = navigator.battery || navigator.webkitBattery || navigator.mozBattery console.log("Battery charging: ", battery.charging); console.log("Battery level: ", battery.level); console.log("Battery discharging time: ", battery.dischargingTime); Gamepad API Gamepad API allows you to connect your console gamepad into your computer and use it for browser based games. Geolocation API

abraham/twitteroauth Accepting Bitcoin Payments with Coinbase - UltraCart Documentation - UltraCart Documentation What is Bitcoin? "Bitcoin is a peer-to-peer payment system and digital currency introduced as open source software in 2009 by pseudonymous developer Satoshi Nakamoto. It is a cryptocurrency, so-called because it uses cryptography to control the creation and transfer of money. Prerequisites for accepting Bitcoin UltraCart account operating in USD.Coinbase account (signup at )Use the UltraCart regular checkout Configuring Coinbase Once you have a Coinbase account it is easy to configure the UltraCart side. Scroll down the page to the Coinbase section which should look like this: Click on the button "Link to UltraCart with OAuth2" as shown in the screen shot above. After logging in to Coinbase you will see a screen asking if it's OK for UltraCart to perform certain actions on your Coinbase account. Click the Authorize button. How the checkout works During the checkout process the customer will be prompted to select their form of payment as shown below.

How to Minify a Javascript File? | - More on Front End Web ! The web technology today has improved dramatically and the way scripting is done on websites have changed drastically over the years now. Gone are the days when JavaScript was used to just validate forms. JavaScript now holds the major share of the website code. So what is minifying a JavaScript file? Minifying a JavaScript file basically means to compress the file by removing all the unnecessary characters from the file which does not affect the functionality. For e.g : Adddata.js has the following data inside it. Function to add two numbers //The function below adds two given numbers and returns the value. function addnumbers (number1, number2) { var c = parseInt(number1) + parseInt(number2); return c; } The same can also be written as: function addnumbers(a,b){var c=parseInt(a)+parseInt(b);return c} If you notice, the comments and the white-spaces and the newlines have been removed from the code making the file lightweight. What is JavaScript Packing? For e.g The others are :-

jaredhanson/oauth2orize coinbase/coinbase-php Fuse.js | K. Risk - JavaScript Refined Lightweight fuzzy-search, in JavaScript. Download: fuse.js - (9 kb) development fuse.min.js - (1.58 kb) production Why? If you need a lightweight, fast way to search through a list of items, and allow mispellings, then Fuse.js is for you. Forget all server-side logic. Try it out! Given this list of books, try searching by misspelling the title or author’s name: The results are sorted by score. Usage Suppose you have the following data structure: Example 1 Search and return a result list of identifiers Example 2 Search and return a result list of records Example 3 Search over a flat array, and return the indices Options keys List of keys (properties) that will be searched. Limitations This isn’t meant to work across hundreds of thousands, or millions of records. Note: the pattern string cannot exceed 32 characters. How does it do it? Currently, it uses a full Bitap algorithm, leveraging a modified version of the Diff, Match & Patch tool by Google. To do Browser support Problems?

zxing/zxing bchavez/Coinbase Sly Introduction Sly is a JavaScript library for advanced one-directional scrolling with item based navigation support. It can be used as a simple scrollbar replacement, as an advanced item based navigation tool, or as a great navigation and animation interface for parallax websites. This is achieved by a powerful & developer friendly API that provides a bunch of very useful methods giving you control over everything. Dependencies jQuery 1.7+ And that's it. Compatibility Sly works in every desktop browser, and due to some divine intervention, even in IE6+, but that is a complete accident. Mobile Sly does touch events, and I'm generally trying to make it work everywhere, but the fact is that mobile is not tested. Changelog Sly upholds the Semantic Versioning Specification. Support Reward the developer And make him happy for maintaining this library! I don't want to go the Isotope & family route and monetize my libraries. Performance Examples Documentation Forum