Skip to content

Instantly share code, notes, and snippets.

@paradigm
paradigm / gist:9741650
Created March 24, 2014 14:52
dolphin netplay fix for linux
From 5a3de6d6221fae50446ac06bda992b8942d1cc26 Mon Sep 17 00:00:00 2001
From: paradigm <paradigm@bedrocklinux.org>
Date: Sat, 4 Jan 2014 19:41:45 -0500
Subject: [PATCH] paradigm Revert "Make FileSearch less dumb in order to make
me feel better and faciliate determinism."
This reverts commit 685206c97eded569e58c6d3ff0e5215e3bdb6394.
Conflicts:
Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_fs.cpp
@paradigm
paradigm / profile
Last active August 29, 2015 13:58
Bedrock Linux 1.0alpha4 Flopsie with XDG_DATA_DIRS hack to populate applications menus cross-client
#!/bin/sh
### Bedrock Linux 1.0alpha4 Flopsie
### /etc/profile
# source settings from rc.conf
. /bedrock/etc/rc.conf
# these settings can be directly exported
export TZ
export LANG
@paradigm
paradigm / gist:10081721
Created April 8, 2014 01:45
Bedrock Linux offline-client-change issue
If Bedrock Linux is to support allowing a client to both work as a stand-alone
distro as well as a client such that the user can dual-boot between them, the
following issues need to be solved:
- Bedrock Linux as of flopsie does not care about the client's version of a
global file, as it just overlays its own on top. This is particularly
notable for /etc/passwd and /etc/group. If a client boots on its own and its
version of those two files is out of date, it will not know what to do with
files created with the new uid/gids. Bedrock has to update the local version
of those files for their clients to work independently.
@paradigm
paradigm / gist:10565454
Last active August 29, 2015 13:59
bedrock linux flopsie experimental shared subtree for /mnt and /media instructions
Purpose:
In Bedrock Linux, as of flopsie, mounts in one client do not appear in others.
This is particularly annoying for things like usb drives which are mounted by a
mount command in one client, but then cannot have their contents used by
programs from other clients.
Solution:
Linux supports the ability to automatically propogate mount points in mount
trees when set up properly. Utilize that.
date = [6, 7, 8, 10, 11, 12, 14, 17, 18, 19, 20, 21, 24, 25, 26, 27, 28, 29, 31, 32, 35, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48]
cases = [7, 13, 13, 16, 16, 19, 21, 23, 28, 32, 37, 37, 63, 70, 82, 82, 103, 100, 111, 116, 150, 155, 163, 175, 189, 200, 200, 200, 210, 224, 230, 234]
var('a b c x')
model(x) = a + b*x^c
fit = find_fit(zip(date,cases),model)
model(a=fit[0].rhs(),b=fit[1].rhs(),c=fit[2].rhs())
nvidia proprietary linux driver installer dies with SIGBUS on Bedrock Linux
1.0alpha4 Flopsie due, likely, to a bug in Bedrock Linux's "bru" utility.
Relevant strace output is below. Hopefully this is sufficient information to
hunt down the issue.
Various notes:
- Note the installer seems to copy files via mmap()ing them.
- There seems to be some kind of alignment issue that bru isn't happy about in one instance of mmap().
- Note that if the "./nvidia.icd" file is replaced with an empty file, the
nvidia driver installs correctly; this issue is not triggered in that
@paradigm
paradigm / gist:5311e7cbb454955c8b1f
Created August 8, 2014 21:04
`set -e` exception demo
#!/bin/sh
set -e
fun() {
echo 'About to run `false`'
false # this should cause `set -e` to abort
echo "this should never show"
}
@paradigm
paradigm / gist:86c8541741d830e25e8a
Last active August 29, 2015 14:06
quick and dirty binary and two series of hex values
#!/usr/bin/awk -f
# paradigm quick and dirty binary and two hex values
BEGIN {
for (i=0; i < 10; i++) {
h2d_map[i] = i
d2h_map[i] = i
}
h2d_map["A"] = 10; h2d_map["B"] = 11
@paradigm
paradigm / qfsplit.vim
Created October 14, 2014 10:32
Open Quickfix items in scrollbind'd split window
command Qfsplit :call Qfsplit()
function! Qfsplit()
" check if window is already open and, if so, close it
let winnr = winbufnr('^qfsplit$')
let qfsplitbuf = get(b:,"qfsplitbuf",-1)
if winnr != -1 && qfsplitbuf != -1
execute winnr . 'wincmd w'
if bufnr("%") == qfsplitbuf
bd
return
@paradigm
paradigm / gist:1aeb3bf7a2c08ca5016e
Last active August 29, 2015 14:08
Nyla brp.conf layout proposal
Nyla brp proposal 2014-11-09
The brp changes for Nyla are intended to serve two purposes:
1. Support login shells
2. Support "pinning".
A program calling a login shell informs the shell that it is a login shell by
prepending a "-" to argv[0]. This information is lost in a hashbang line file