Skip to content

Instantly share code, notes, and snippets.

View d5's full-sized avatar

daniel d5

  • Los Angeles, CA
View GitHub Profile
@d5
d5 / micro-api-demo1.html
Created January 6, 2012 03:51
AES-256 Encryption AJAX Demo using Micro-API
<html>
<head>
<title>Micro-API Demo #1</title>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.min.js"></script>
<script type="text/javascript">
jQuery.support.cors = true;
function cancel_event_default(e) {
if(e.preventDefault) e.preventDefault();
// FastDelegate.h
// Efficient delegates in C++ that generate only two lines of asm code!
// Documentation is found at http://www.codeproject.com/cpp/FastDelegate.asp
//
// - Don Clugston, Mar 2004.
// Major contributions were made by Jody Hagins.
// History:
// 24-Apr-04 1.0 * Submitted to CodeProject.
// 28-Apr-04 1.1 * Prevent most unsafe uses of evil static function hack.
// * Improved syntax for horrible_cast (thanks Paul Bludov).
@d5
d5 / gist:1808375
Created February 12, 2012 13:05
Get the first index of type in the std::tuple<>
#include <tuple>
// ...
template<typename T, typename C, std::size_t I>
struct tuple_index_r;
template<typename H, typename ...R, typename C, std::size_t I>
struct tuple_index_r<std::tuple<H, R...>, C, I>
: public std::conditional<std::is_same<C, H>::value,
@d5
d5 / test1.txt
Last active December 29, 2015 21:09
test1's content
Hello, World!
testsetsetsetset
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="ko" xml:lang="ko">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=880" />
<link rel="shortcut icon" type="image/x-icon" href="http://img.naver.net/static/www/favicon.ico" />
<title>네이버 :: 나의 경쟁력, 네이버</title>
@d5
d5 / test2.txt
Last active December 29, 2015 21:19
This is a test.
Hello, <%= name %>!
<% print(a * b) %>
@d5
d5 / gist:7956153
Last active December 31, 2015 07:49
hello, {{ name }}!??
user nginx;
worker_processes 1;
error_log /var/log/nginx/error.log;
pid /var/run/nginx.pid;
events {
# max_clients = worker_processes * worker_connections / 4
worker_connections 1024;
}
@d5
d5 / helloworld.txt
Last active December 31, 2015 14:39
Hello, {{ name }}!