Skip to content

Instantly share code, notes, and snippets.

;; Cyberpunk Colour Theme
;;
;; "and he'd still see the matrix in his sleep, bright lattices of logic
;; unfolding across that colorless void..."
;; William Gibson, Neuromancer.
(deftheme cyberpunk
"")
(custom-theme-set-faces
<html>
<head><title>Overflow Hidden is the Thing</title>
<style>
#doc-content { overflow:auto; display: block; height: 300px }
</style>
</head>
<body>
<div id="top">
I have a NavBar here
</div>
@bo0ts
bo0ts / movie.el
Created October 23, 2012 21:27
Query IMDB and parse the result into org-mode
(require 'url)
(defun get-and-parse-json (url)
(interactive)
(with-current-buffer (url-retrieve-synchronously url)
(goto-char (point-min))
(re-search-forward "^$")
(json-read)))
(defun get-movie-json (title &optional year)
#include <CGAL/Simple_cartesian.h>
#include <CGAL/Polyhedron_3.h>
#include <boost/interprocess/managed_shared_memory.hpp>
#include <boost/interprocess/allocators/allocator.hpp>
#include <iostream>
using namespace boost::interprocess;
struct shm_remove {
#include <boost/mpl/vector/vector10.hpp>
#include <boost/mpl/if.hpp>
#include <boost/mpl/at.hpp>
#include <boost/type_traits/is_integral.hpp>
#include <boost/type_traits/is_reference.hpp>
#include <boost/type_traits/is_same.hpp>
#include <boost/static_assert.hpp>
#include <iostream>
#include <iostream>
#include <boost/thread/thread.hpp>
#include <boost/asio/placeholders.hpp>
#include <boost/asio/deadline_timer.hpp>
class TimerThing
{
protected:
boost::asio::deadline_timer* statusTimer_;
boost::thread_group worker_threads_;
@bo0ts
bo0ts / *gitattributes*.txt
Created December 3, 2012 16:46
CGAL gitattributes
# Set default behaviour, in case users don't have core.autocrlf set.
* text=auto
# Explicitly declare text files we want to always be normalized and converted
# to native line endings on checkout.
*.cpp text
*.c text
*.h text
*.tex text
template <typename Construction, typename Dummy = boost::none_t>
struct Lazy_wrapper_traits :
boost::mpl::eval_if< internal::Has_result_type<Construction>,
boost::mpl::eval_if< boost::is_same< typename boost::remove_cv<
typename boost::remove_reference<
typename internal::Lazy_result_type<Construction>::type
>::type >::type,
typename Approximate_kernel::FT>,
boost::mpl::int_<NT>,
boost::mpl::eval_if< boost::is_same< typename internal::Lazy_result_type<Construction>::type,
integration:
Triangulation construction :
#pts Time
100 0.000443
1000 0.00538
10000 0.0602
100000 0.61
master:
Triangulation construction :
(require 'url)
(defun get-and-parse-json (url)
(interactive)
(with-current-buffer (url-retrieve-synchronously url)
(goto-char (point-min))
(re-search-forward "^$")
(json-read)))
(defun get-movie-json (title &optional year)