Skip to content

Instantly share code, notes, and snippets.

View lisa's full-sized avatar

Lisa Seelye lisa

View GitHub Profile
@lisa
lisa / Dockerfile
Last active February 18, 2019 23:34
Kernel 4.4.167-rockchip64 on an aarch64 CentOS Linux 7 (AltArch) kernel crash
FROM arm64v8/debian:jessie
# Upstream maintainer Andrew Dunham <andrew@du.nham.ca>
# Maintainer of this fork is Lisa Seelye
MAINTAINER Lisa Seelye <lisa@thedoh.com>
# Build this version.
# This is 'magic' for publishing too.
ENV MUSL_VERSION=1.1.20
@lisa
lisa / day15-output.txt
Created January 19, 2019 20:46
Full run for my input
Initial State:
################################
####################.###########
###################..##..#######
###################.###..#######
###################.###.########
##################G.###.######## G(200),
##..############.#..##..########
#...#####.####.....##...########
#G.....##..###.#.GG#...G.....G## G(200), G(200), G(200), G(200), G(200),
package main
import (
"fmt"
"strings"
"github.com/lisa/adventofcode/2017/src/simpleknot"
)
func stringToChars(str string) []byte {
lisa@yttrium c_test $ mkdir 1 2 3 4
lisa@yttrium c_test $ cp pristine/c2.c source.c && gcc -Os source.c -o source && gcc -Os source.c -S -o source.s && mv source* 2
'pristine/c2.c' -> 'source.c'
renamed 'source' -> '2/source'
renamed 'source.c' -> '2/source.c'
renamed 'source.s' -> '2/source.s'
lisa@yttrium c_test $ cp pristine/c3.c source.c && gcc -Os source.c -o source && gcc -Os source.c -S -o source.s && mv source* 3
'pristine/c3.c' -> 'source.c'
renamed 'source' -> '3/source'
renamed 'source.c' -> '3/source.c'
@lisa
lisa / Verbose
Last active August 18, 2018 14:01
RIP Vivaldi-1.15.1147
root@2df828a02083:/tmp/vivaldi-source# ninja -v -C out/Release vivaldi
ninja: Entering directory `out/Release'
[1/17275] ../../chromium/third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF obj/v8/v8_base/v8_base_jumbo_4.o.d -DV8_DEPRECATION_WARNINGS -DUSE_UDEV -DUSE_AURA=1 -DUSE_GLIB=1 -DUSE_NSS_CERTS=1 -DUSE_X11=1 -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DCHROMIUM_BUILD -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -DCR_CLANG_REVISION=\"321529-2\" -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -DCOMPONENT_BUILD -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DVIVALDI_BUILD -DCHROMIUM_BUILD -DVIVALDI_RELEASE=normal -DWIDEVINE_CDM_VERSION_STRING=\"1.0.123.456\" -DVIVALDI_RELEASE_KIND=vivaldi_sopranos -DBUILDING_V8_SHARED -DV8_TYPED_ARRAY_MAX_SIZE_IN_HEAP=64 -DV8_INTL_SUPPORT -DV8_USE_SNAPSHOT -DV8_USE_EXTERNAL_STARTUP_DATA -DV8_CONCURRENT_MARKING -DV8_TARGET_ARCH_X64 -DU_USING_ICU_NAMESPACE=0 -DU_ENABLE_DYLOAD=0 -DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_FILE
# Copyright Lisa Seelye (2006-2009)
# lisa@thedoh.com
# Not for commercial use without prior permission.
module float32
def float32.float32(o1,o2)
Math.sqrt( (o1.x - o2.x) ** 2 + (o1.y - o2.y) ** 2 + (o1.z - o2.z) ** 2)
end
end
@lisa
lisa / text.md
Created May 23, 2018 01:43
Python bug?

The makesetup script is responsible for creating the Makefile for Python 2.7 and is especially relevant when modules are added to Modules/Setup. See https://github.com/python/cpython/blob/2.7/Modules/Setup.dist#L13-L25 for details.

The usage notes has a note which explains how modules are defined: each on a line in the format <module> ... [<sourcefile> ...] [<cpparg> ...] [<library> ...]. Pay special attention to <cpparg> is anything starting with -I, -D, -U or -C. This means -I/build/zlib-1.2.3 or -DUSE_GLIBC or whatnot.

Here is an example:

pyexpat expat/xmlparse.c expat/xmlrole.c expat/xmltok.c pyexpat.c -I$(srcdir)/Modules/expat -DHAVE_EXPAT_CONFIG_H -DUSE_PYEXPAT_CAPI -DHAVE_SYSCALL_GETRANDOM

The bug happens with makesetup's assumptions about the data appearing in the Setup files:

@lisa
lisa / output.txt
Created May 10, 2018 18:20
qoobaa/s3 issue with version 0.3.26
lisas@lisas ~ $ for v in ruby-1.8.7-p374 ruby-2.1.7 ruby-2.4.0 ruby-2.5.0; do rvm use $v; ruby tester.rb ; done
Using /Users/lisas/.rvm/gems/ruby-1.8.7-p374
Ruby version: 1.8.7
@ivar is defined
@notvar is not defined
Using /Users/lisas/.rvm/gems/ruby-2.1.7
Ruby version: 2.1.7
@ivar is defined
@notvar is not defined
Using /Users/lisas/.rvm/gems/ruby-2.4.0
@lisa
lisa / settimeofday.go
Created September 13, 2017 19:09
settimeofday.go
package main
import (
"fmt"
"syscall"
"time"
)
func main() {
t := time.Now()
@lisa
lisa / nuclear-guide.md
Created May 20, 2017 18:04 — forked from alficles/nuclear-guide.md
Nuclear Guide

Nuclear Power

Nuclear Power is a major new feature introduced to Factorio in version 0.15. It requires higher level technology compared to either Solar Power or Steam Boiler Power, but it offers very high power output in exchange. It's a great solution for middle- to end-game power generation and it works well in combination with other power generation techniques.

This guide is written for people who want to know exactly how nuclear power works, but don't necessarily want all the solutions. It focuses on what you should do and what you should know to get Nuclear up and running, but doesn't tell you what to do or exactly how to solve the problems.

First Steps

Technology Required: Nuclear Power You can mine uranium ore sooner, but you'll need the Nuclear Power technology to do anything useful with it.