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
license: mit |
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
<!DOCTYPE html> | |
<html> | |
<body> | |
<h2>Drag link to bookmarks bar</h2> | |
<a href='javascript:(function(e){const t={split(e){const t=[];for(let r=0;r<e.length;){const n=e.charCodeAt(r);let o;n>=55296&&n<=56319?(o=(n-55296<<10)+(e.charCodeAt(r+1)-56320+65536),r+=2):(o=n,++r),t.push(String.fromCodePoint(o))}return t},encode(e){const t=5-e.length %25 5;let r="";e=String.fromCharCode(t)+"\0".repeat(t-1)+e;for(let t=0;t<e.length;t+=5){let o=e.substr(t,5).split("").map(n).reduce((e,t)=>256*e+t,0);for(let e=0;e<4;++e){const e=o %25 1024;o=Math.floor(o/1024),r+=this.map[e]}}return r},decode(e){const t=this.split(e);let r="";for(let e=0;t.length;++e){let n=[];for(;n.length<4;)n.unshift(this.map.indexOf(t.shift()));let o=n.reduce((e,t)=>1024*e+t,0),l="";for(let t=0;t<5;++t){let r=o %25 256;o=Math.floor(o/256),l=String.fromCharCode(r)+l,0==e&&4==t&&(l=l.substring(r))}r+=l}return r}};t.map=t.split("♈♉♊♋♌♍♎♏♐♑♒♓⚛⛓⛔🄰🄱🄲🄳🄴🄵🄶🄷🄸🄹🄺🄻🄼🄽🄾🄿🅀🅁🅂🅃🅄🅅🅆🅇🅈🅉🅐🅑🅒🅓🅔🅕🅖🅗🅘🅙🅚🅛🅜🅝🅞🅟🅠🅡🅢🅣🅤🅥🅦🅧🅨🅩🆎🆏🆑🆒🆓🆔🆕🆖🆗🆘🆙🆚🌀🌁🌂🌃🌄🌅🌆🌇🌈🌉🌊🌋🌌🌍🌎🌏🌐🌑🌒🌓🌔🌕🌖🌗🌘🌙🌚🌛🌜🌝🌞🌟🌠🌡🌤🌥🌦🌧🌨🌩🌪🌫🌬 |
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
// | |
// rui_test.h | |
// Quanta | |
// | |
// Created by Justin Bowes on 2014-11-06. | |
// Copyright (c) 2014 Informi Software Inc. All rights reserved. | |
// | |
#ifndef rui_test__B2BD1D7_F65A_4026_B67F_437E3C640A18_h | |
#define rui_test__B2BD1D7_F65A_4026_B67F_437E3C640A18_h |
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
/* | |
* An implementation of C11 stdatomic.h directly borrowed from FreeBSD | |
* (original copyright follows), with minor modifications for | |
* portability to other systems. Works for recent Clang (that | |
* implement the feature c_atomic) and GCC 4.7+; includes | |
* compatibility for GCC below 4.7 but I wouldn't recommend it. | |
* | |
* Caveats and limitations: | |
* - Only the ``_Atomic parentheses'' notation is implemented, while | |
* the ``_Atomic space'' one is not. |
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
// science/blackbody_srgb.c. ©2014 Informi Software Inc. Use and modify this file for any purpose without attribution. | |
#include "science/blackbody_srgb.h" | |
#ifndef XPL_STATIC_INLINE | |
# define XPL_STATIC_INLINE static inline | |
#endif | |
XPL_STATIC_INLINE float r_0_6700(float k) { | |
return 1.0f; |
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
// xpl/res/markov.c. ©2014 Informi Software Inc. Use and modify this file for any purpose without attribution. | |
#include <ut/uthash.h> // get from https://github.com/troydhanson/uthash | |
#include <xpl/mem/memory.h> // you can use calloc(sizeof(type), 1) instead of xpl_calloc_type(type), | |
// strdup instead of xpl_strdup, free instead of xpl_free, etc. | |
#include "markov.h" | |
typedef struct link_entry { |
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
<?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>AllowedTypes</key> | |
<array> | |
<string>public.c-header</string> | |
<string>public.c-plus-plus-header</string> | |
</array> | |
<key>BuildableType</key> |
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 <sys/unistd.h> | |
#include <sys/fcntl.h> | |
#include "net/udpnet.h" | |
#ifdef SOCK_WIN32 | |
#include <ws2tcpip.h> | |
#include <ctype.h> | |
typedef int socklen_t; |
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
#ifndef compile_time_hash_h | |
#define compile_time_hash_h | |
// Posted by jbowes. Public domain. | |
// source: (dead link) | |
// http://lol.zoy.org/blog/2011/12/20/cpp-constant-string-hash | |
// | |
// At higher compiler optimization levels (-O1 and higher on clang/llvm), | |
// C_HASH("string") should be replaced by a hash of "string" at compile time. |
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
C entity system. Justin Bowes, Informi Software Inc. Public domain. Go nuts. | |
The only external dependency is the wonderful UThash by Troy D. Hanson, | |
which I overuse. | |
http://troydhanson.github.io/uthash/ | |
The system is intended to be used primarily through the macros. You | |
supply the component type you expect; the code hashes the type (as | |
a string) and casts the result (as pointer to the type you passed). |
NewerOlder