This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Copyright (C) 2011 Hakim El Hattab, http://hakim.se | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining a copy | |
* of this software and associated documentation files (the "Software"), to deal | |
* in the Software without restriction, including without limitation the rights | |
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
* copies of the Software, and to permit persons to whom the Software is | |
* furnished to do so, subject to the following conditions: | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""""""""""""""""""""""""""""""""""""""""""""""" | |
" => configuration | |
"""""""""""""""""""""""""""""""""""""""""""""""" | |
set encoding=utf-8 | |
set hidden | |
set foldlevel=99 | |
set foldmethod=indent | |
let tabsize=4 | |
"""""""""""""""""""""""""""""""""""""""""""""""" | |
" => highlight help |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@keyframes pace-bounce { | |
0% { | |
top: 0; | |
animation-timing-function: ease-in; | |
} | |
50% { | |
top: 140px; | |
height: 140px; | |
animation-timing-function: ease-out; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdint.h> | |
#include <string.h> | |
#include <stdlib.h> | |
#include <ctype.h> | |
#define swap(a, b) (a)^=(b); (b)^=(a); (a)^=(b); | |
struct balance { | |
uint16_t real; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <memory.h> | |
#define MAX 50 | |
int find_solution(int size, int consumed, int min, int max, int *len, int *num); | |
void start(int); | |
int distinct; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* The first commented line is your dabblet’s title | |
*/ | |
html { | |
background: #f06; | |
background: linear-gradient(-45deg, #bd9999,#282828); | |
min-height: 100%; | |
} | |
.container { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
// middlewares: array of generator function | |
function compose(middlewares) { | |
return function *() { | |
var i = middlewares.length; | |
var prev = function *(){}; | |
var current; | |
while (i--) { | |
current = middlewares[i]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// bad | |
function Curry(fn) { | |
var args = Array.prototype.slice.call(arguments, 1); | |
var len = fn.length - args.length; | |
var partial = function () { | |
var partialArg = Array.prototype.slice.call(arguments); | |
args = args.concat(partialArg); | |
if (args.length > len) { | |
throw new Error('wrong argument lenth: Expected ' + len + '; Receive ' + args.length); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function handlerMaker(obj) { | |
return { | |
getOwnPropertyDescriptor: function(name) { | |
var desc = Object.getOwnPropertyDescriptor(obj, name); | |
// a trapping proxy's properties must always be configurable | |
if (desc !== undefined) { desc.configurable = true; } | |
return desc; | |
}, | |
getPropertyDescriptor: function(name) { | |
var desc = Object.getPropertyDescriptor(obj, name); // not in ES5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{isArray, isFunc} = require('./util') | |
class Extractor | |
FN_ARGS = /// | |
^function # function | |
\s* # optional white | |
[^\(]* # function name | |
\( # left paren | |
\s* | |
([^\)]*) #params | |
\) # right paren |
OlderNewer