Skip to content

Instantly share code, notes, and snippets.

@FlandreDaisuki
FlandreDaisuki / FB.rainbow.CSSgradient.js
Last active August 29, 2015 14:23
paste on console and 🌈
function repImg( tar ) {
var div = document.createElement( 'div' );
div.style.height = tar.height + 'px';
div.style.width = tar.width + 'px';
div.style.display = 'inline-block';
div.style.backgroundColor = 'transparent';
// http://stackoverflow.com/questions/9847580/how-to-detect-safari-chrome-ie-firefox-and-opera-browser
var isFirefox = typeof InstallTrigger !== 'undefined';
@dannvix
dannvix / c99-vector.c
Created October 8, 2015 14:57
Simple std::vector-like container implemented in C99, without error handling and thread-safety
/*
* c99-vector.c
* - Description: Simple std::vector-like container implemented in C99, without error handling and thread-safety
* - Author: Shao-Chung Chen
* - License: CC0
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@dannvix
dannvix / c99-heap.c
Created October 8, 2015 14:58
Simple std::priority_queue-like container implemented in C99, without error handling and thread-safety
/*
* c99-heap.c
* - Description: Simple std::priority_queue-like container implemented in C99, without error handling and thread-safety
* - Author: Shao-Chung Chen
* - License: CC0
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdbool.h>