Skip to content

Instantly share code, notes, and snippets.

View branan's full-sized avatar
💩

Branan Riley branan

💩
View GitHub Profile
set -x
# USAGE
# Set the variables below for your test environment
# Run the following git commands:
# > git bisect start
# > git bisect bad <bad>
# > git bisect good <good>
# > git bisect run agent-bisect.sh
@branan
branan / altair.js
Created July 21, 2021 16:26
Altair block calculation
const asNumber = BigInt("0xd64330b4c9eb5721260619dc4235b1bc1f342ee7c3ece88b31be96be690fb1c1")
const divisor = BigInt(1) << BigInt(256);
const result = (asNumber * (BigInt(6655171) - BigInt(6626371)) / divisor) + BigInt(6626371);
console.log(result)
diff --git a/lib/puppet/indirector/request.rb b/lib/puppet/indirector/request.rb
index 3a52b0e..d969952 100644
--- a/lib/puppet/indirector/request.rb
+++ b/lib/puppet/indirector/request.rb
@@ -199,7 +199,7 @@ class Puppet::Indirector::Request
if primary_server = Puppet.settings[:server_list][0]
bound_server = primary_server[0]
else
- bound_server = nil
+ bound_server = Puppet.settings[:server]
diff --git a/cmake/cflags.cmake b/cmake/cflags.cmake
index a1b1b6d..b588e91 100644
--- a/cmake/cflags.cmake
+++ b/cmake/cflags.cmake
@@ -47,10 +47,15 @@ elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
endif()
# On Windows with GCC 5.2.0, disable deprecated declarations because it causes warnings with Boost's use of auto_ptr
- if (WIN32)
+ # On Solaris 12, <insert reason here>
@branan
branan / playset.md
Last active May 18, 2016 16:16
Fiasco Template

preserve the spaces at the end of each line - they signal to the markdown parser that we really want line breaks there.

TITLE

Quick summary about your playset, the setting, and what's going on. No more than a couple of paragraphs - you don't want to be too prescriptive about play!

Relationships

1.

require 'puppet'
require 'benchmark'
def compare_no_warn(a, b)
a.to_s <=> b.to_s
end
def compare_deprecation_warning(a, b)
if (b.class != Symbol)
LNv4P6jo2fi1UNUyWyc8NMj4SsXUpwmWXV
#!/opt/local/bin/python2.6
from __future__ import print_function
import optparse
import PyHSPlasma
from PyHSPlasma import *
def indent(text):
"\n".join([" %s" % (line) for line in text.splitlines()])
def export_obj:
obj.export_thyself
obj.children.each
export_obj child
if obj.needs_lightmaps
lm_list.push_back(obj)
# more of this for other post-processing
def post_process
icfp2013.language> ((eval(transform-prog '(lambda (x) (shl1 (shr1 x))))) 1)
( )shr1 0x0000000000000001=0x0000000000000000
( )shl1 0x0000000000000000=0x0000000000000000
()(clojure.core/binding [icfp2013.language/*indent-level* (clojure.core/inc icfp2013.language/*indent-level*)] (clojure.core/let [the-arg__2295__auto__ (clojure.core/binding [icfp2013.language/*indent-level* (clojure.core/inc icfp2013.language/*indent-level*)] (clojure.core/let [the-arg__2290__auto__ x result__2291__auto__ (clojure.core/bit-and 9223372036854775807 (clojure.core/bit-shift-right the-arg__2290__auto__ 1))] (icfp2013.language/debug-print (clojure.core/format shr1 0x%016x=0x%016x the-arg__2290__auto__ result__2291__auto__)) result__2291__auto__)) result__2296__auto__ (clojure.core/bit-shift-left the-arg__2295__auto__ 1)] (icfp2013.language/debug-print (clojure.core/format shl1 0x%016x=0x%016x the-arg__2295__auto__ result__2296__auto__)) result__2296__auto__))
()lambda [1]=0x0000000000000000
0