Skip to content

Instantly share code, notes, and snippets.

View Indamix's full-sized avatar

Indamix Indamix

View GitHub Profile
/*
const Y = (f) =>
( x => f(v => x(x)(v)) )(
x => f(v => x(x)(v))
);
*/
const Y = f => {
const something = x => f(v => x(x)(v));
return something(something);
@Indamix
Indamix / bitwise for color.js
Last active January 4, 2016 19:09
bitwise for color
var hexToRgb = function(hex) {
hex = parseInt(hex, 16);
return [
(hex & 0xff0000) >> 16,
(hex & 0x00ff00) >> 8,
(hex & 0x0000ff)
];
};
var rgbToHex = function(r, g, b) {
@Indamix
Indamix / gist:2227793
Created March 28, 2012 16:06
get function code
function getCode(fn){
return fn.toString().replace(/^function.*?{|}$/g, '')
}
@Indamix
Indamix / gist:2226290
Created March 28, 2012 13:44
css 3d bended shadow
.bended-shadow {position:relative}
.bended-shadow::before, .bended-shadow::after {
content: '';
position: absolute;
width: 60%;
height: 20px;
-webkit-box-shadow: 0 8px 16px rgba(0, 0, 0, 0.5);
-moz-box-shadow: 0 8px 16px rgba(0, 0, 0, 0.5);
-ms-box-shadow: 0 8px 16px rgba(0, 0, 0, 0.5);
function rgb2hex(r, g, b){
return (1 << 24 | r << 16 | g << 8 | b).toString(16).substr(1);
}