I hereby claim:
- I am mattijs on github.
- I am mattijs (https://keybase.io/mattijs) on keybase.
- I have a public key whose fingerprint is C630 852B B446 9A5B 70DF 2D08 B9E5 2C7E 3E32 0693
To claim this, I am signing this object:
| /** | |
| * Faulty test setup. | |
| * | |
| * Underscore recognizes the `foo_string` as an Object and | |
| * the Backbone Model refuses to set the model value in the | |
| * last case. | |
| */ | |
| var _ = require('underscore'); | |
| var Backbone = require('backbone'); |
| // Values we check against | |
| var obj = {}; | |
| var str = 'foo'; | |
| // Two identical functions | |
| var isObjectA = function(o) { | |
| return o === Object(o); | |
| }; | |
| var isObjectB = function(o) { | |
| return o === Object(o); |
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
| <plist version="1.0"> | |
| <dict> | |
| <key>Ansi 0 Color</key> | |
| <dict> | |
| <key>Blue Component</key> | |
| <real>0.07884746789932251</real> | |
| <key>Green Component</key> | |
| <real>0.081504985690116882</real> |
| /* Color codes */ | |
| @plain: #f8f6f2; | |
| @dalespale: #fade3e; | |
| @snow: #ffffff; | |
| @dirtyblond: #f4cf86; | |
| @coal: #000000; | |
| @taffy: #ff2c4b; | |
| @brightgravel: #d9cec3; | |
| @saltwatertaffy: #8cffba; | |
| @lightgravel: #998f84; |
| import threading | |
| from oauth2client.client import Storage as BaseStorage | |
| from oauth2client.client import Credentials | |
| from oauth2client.anyjson import simplejson | |
| def from_dict(container): | |
| """ | |
| Create a Credentials object from a dictionary. |
I hereby claim:
To claim this, I am signing this object:
| // Adaptation of http://chriswarbo.net/blog/2012-10-01-better_currying_in_javascript.html | |
| /** | |
| * Make the inout function f curryable. | |
| * | |
| * @param {function} f | |
| * @returns {function} | |
| */ | |
| const curry = c = function(f) { | |
| const apply = function(args) { |
| // --- Selectors --------------------------------------------------------- | |
| export function find(selector, el = document) { | |
| return el.querySelector(selector); | |
| } | |
| export function findAll(selector, el = document) { | |
| return el.querySelectorAll(selector); | |
| } |
| /** | |
| * Curry the given function. | |
| * | |
| * @param {Function} fn | |
| * @param {[...*]} initialArgs | |
| * @returns {Function|*} | |
| */ | |
| export function curry(fn, ...initialArgs) { | |
| return curryN(fn.length, fn, ...initialArgs); | |
| } |
Selective implementation of strftime
This is an implementation of Unix strftime for JavaScript Dates supporting only American English (en_US). Not all format options are implemented.
I only had use cases for formatting in American English (en_US) for this function and most conversion characters are also implemented based on use cases I had.
It would be possible to adapt this to support a different language or multiple languages but I have no use cases for this. Feel free to use this code any way you like. I just copy this into projects and adapt it to the project specific needs, this is just a capture of the code at a certain point in time.