Skip to content

Instantly share code, notes, and snippets.

View zv's full-sized avatar
💭
FOLLOWS YOU

zv zv

💭
FOLLOWS YOU
View GitHub Profile
@zv
zv / auctionhouse.cpp
Created May 22, 2012 01:41
auctionhouse bs
#include <Windows.h>
#include <algorithm>
#include <ctime>
#include <fstream>
#include <memory>
#include <stdexcept>
#include <tuple>
#include <vector>
#include <boost/exception/all.hpp>
#include <boost/format.hpp>
@zv
zv / gist:3602558
Created September 2, 2012 18:19
Sample rebar.config for Chris
Invoke with
erl -pa ebin -pa deps/*/ebin
%------------ rebar.config ------------%
%%-*- mode: erlang -*-
{erl_opts, [warnings_as_errors,
warn_export_all]}.
{xref_checks, [undefined_function_calls]}.
@zv
zv / gist:3967018
Created October 28, 2012 00:25
rotl_64 in rarvm
and count, 0x3F
cmp count, 0x1F
jbe inf32
mov tmp, low
mov low, high
mov high, tmp
and count, 0x1F
inf32:
mov tmpcount, 32
sub tmpcount, count
10 SET(16,33, 1)
20 SET(17,32, 1)
30 SET(17,33, 1)
40 SET(18,33, 1)
50 SET(18,34, 1)
60 SET(16,32, 1)
70 SET(16,33, 1)
80 SET(17,32, 1)
90 SET(18,32, 1)
100 SET(18,33, 1)
/home/zv/Development/elixir/lib/elixir/lib/file.ex:34: redefining module File.Error
/usr/local/lib/erlang/lib/parsetools-2.0.9/include/yeccpre.hrl:128: :elixir_parser.yecctoken_end_location/1
/usr/local/lib/erlang/lib/parsetools-2.0.9/include/yeccpre.hrl:113: :elixir_parser.yeccpars1/7
/usr/local/lib/erlang/lib/parsetools-2.0.9/include/yeccpre.hrl:56: :elixir_parser.yeccpars0/5
src/elixir_translator.erl:16: :elixir_translator.forms/4
src/elixir_translator.erl:28: :elixir_translator.forms!/4
src/elixir_compiler.erl:24: :elixir_compiler.string/2
src/elixir_compiler.erl:48: :elixir_compiler.file_to_path/2
/home/zv/Development/elixir/lib/elixir/lib/kernel/parallel_compiler.ex:68: Kernel.ParallelCompiler."-spawn_compilers/7-fun-0-"/3

A Quick Review of Some Features I use in Org Mode

Graphics Packages

+-----------+        +---------+  
|  Hackers  |        |Warren   |                
|           +<------>+Harding  +<---=---------+ 
|    cRED   |        |  c707   |              | 
+-----------+        +----+----+              | 
                          ^                   | 
                          |                   | 
@zv
zv / gist:70d2787987cb4217a7d7
Last active August 29, 2015 14:13
Generated
// Sections
attributes: {
name: {
type: 'text',
required: true
},
description: {
@zv
zv / keybinding.el
Created October 27, 2015 20:55
Spacemacs path keybinding made easy
(defun zv//initial-path-keybinding (key-file-map)
"Create leader keybindings from an alist of the form (KEYS . PATH)"
(mapc (lambda (binding)
(let* ((path (cdr binding))
(keybinding (car binding)))
(evil-leader/set-key keybinding (if (string-match "\/$" path)
;; use ido-find-file-in-dir if we're binding a directory
`(lambda () (interactive) (ido-find-file-in-dir ,path))
;; Otherwise we're looking at a file, jump directly to it
`(lambda () (interactive) (find-file-existing ,path))))))
@zv
zv / gist:91244200083030327391
Created October 31, 2015 11:21
Z3 Solver Optimization for Diablo Three Paragon points
;; Critical Hit Chance 50 + 5 * points
;; Attack Speed: +.2% per point, for a maximum of +10% at 50 points.
;; Cooldown Reduction: +2% per point, for a maximum of +10% reduction at 50 points.
;; Critical Hit Chance, +.10% per point, for a maximum of 5% at 50 points.
;; Critical Hit Damage, +1% per point, for a maximum of 50% at 50 points.
(declare-var chdmgp Int)
(declare-var chcp Int)
(declare-var atksp Int)
@zv
zv / wuw.cpp
Last active November 2, 2015 22:25
top tier microsoft research
hilbert_basis::hilbert_basis():
m_cancel(false),
m_use_support(true),
m_use_ordered_support(true),
m_use_ordered_subsumption(true)
{
m_index = alloc(index, *this);
m_passive = alloc(passive, *this);
m_passive2 = alloc(passive2, *this);