Skip to content

Instantly share code, notes, and snippets.

View john-peterson's full-sized avatar

John Sebastian Peterson john-peterson

View GitHub Profile
From 456cf216232cc3e7515dc836d78f9a33038d8d82 Mon Sep 17 00:00:00 2001
From: John Peterson <john.peterson3@hotmail.com>
Date: Mon, 21 May 2012 22:55:39 -0700
Subject: [PATCH] Fixing nfsd-getattr and nfsd-setattr so that it reads and writes the correct time.
_wstat64 and _wutime (and _futime) when called from nfs.exe read and write a time that is one hour into the future and one hour in the past, respectively. To offset this problem an adjustment is required to the value that is read and written.
---
attr.cl | 8 +++++++-
unicode-file.cl | 6 +++---
2 files changed, 10 insertions(+), 4 deletions(-)
@john-peterson
john-peterson / gist:3202111
Created July 29, 2012 22:08
make endless loop
This file has been truncated, but you can view the full file.
execve("/usr/bin/make", ["make", "V=99"], [/* 23 vars */]) = 0
brk(0) = 0xec4000
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f2e41869000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=137886, ...}) = 0
mmap(NULL, 137886, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f2e41847000
close(3) = 0
@john-peterson
john-peterson / config.log
Created July 29, 2012 22:48
autotools endless loop
This file has been truncated, but you can view the full file.
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by GNU Automake configure 1.11.3, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ ./configure CC=gcc CFLAGS=-O2 -I/mnt/nfs/source/Programs/OpenWrt/repo/trunk/staging_dir/host/include CPPFLAGS=-O2 -I/mnt/nfs/source/Programs/OpenWrt/repo/trunk/staging_dir/host/include LDFLAGS=-L/mnt/nfs/source/Programs/OpenWrt/repo/trunk/staging_dir/host/lib SHELL=/bin/bash am_cv_prog_PERL_ithreads=no --target=x86_64-linux-gnu --host=x86_64-linux-gnu --build=x86_64-linux-gnu --program-prefix= --program-suffix= --prefix=/mnt/nfs/source/Programs/OpenWrt/repo/trunk/staging_dir/host --exec-prefix=/mnt/nfs/source/Programs/OpenWrt/repo/trunk/staging_dir/host --sysconfdir=/mnt/nfs/source/Programs/OpenWrt/repo/trunk/staging_dir/host/etc --localstatedir=/mnt/nfs/source/Programs/OpenWrt/repo/trunk/staging_dir/host/var --sbindir=/mnt/nfs/source/Programs/OpenWrt/repo/trunk
@john-peterson
john-peterson / gist:5481542
Last active December 16, 2015 18:59
git diff --stat -p _diff..state
Source/Core/Core/Src/ConfigManager.cpp | 4 -
Source/Core/Core/Src/State.cpp | 44 +++++--
Source/Core/Core/Src/State.h | 4 +-
Source/Core/DolphinWX/Src/Frame.cpp | 204 ++++++++----------------------
Source/Core/DolphinWX/Src/FrameTools.cpp | 4 +-
5 files changed, 85 insertions(+), 175 deletions(-)
diff --git a/Source/Core/Core/Src/ConfigManager.cpp b/Source/Core/Core/Src/ConfigManager.cpp
index 1c686ae..ded0cd1 100644
--- a/Source/Core/Core/Src/ConfigManager.cpp
@john-peterson
john-peterson / VertexLoaderManager.cpp
Last active December 17, 2015 15:19
AddList: unknown count of vertices found
void RunVertices(int vtx_attr_group, int primitive, int count)
{
if (!count)
return;
RefreshLoader(vtx_attr_group);
g_VertexLoaders[vtx_attr_group]->RunVertices(vtx_attr_group, primitive, count);
if (primitive == 2 && count % 3 != 0) {
NOTICE_LOG(VIDEO, "RunVertices: unknown count of vertices found %u, %u, %u", vtx_attr_group, primitive, count);
for (int i = 1; i <= count; i++) {
@john-peterson
john-peterson / disable_journal.c
Last active December 18, 2015 11:29
Disable HFS+ journaling
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/mman.h>
#include <fcntl.h>
#include <byteswap.h>
int main(int argc, char *argv[])
{
@john-peterson
john-peterson / color.properties
Last active June 27, 2023 08:51
Daytime colors that work everywhere
# https://raw.githubusercontent.com/Gogh-Co/Gogh/master/themes/Google%20Light.yml
color0=#202124
color1=#EA4335
color2=#34A853
color3=#FBBC04
color4=#4285F4
color5=#A142F4
color6=#24C1E0
color7=#E8EAED
extra-keys = [[ESC, '$', &, +, *, HOME, 'UP','END','PGUP'], \
[CTRL, ALT,_, ~, -, LEFT,'DOWN','RIGHT','PGDN'], \
[TAB, ':','\"', '/', '|', '\\\\', DEL, ENTER, PASTE]]
@john-peterson
john-peterson / merge-nsp.sh
Last active July 2, 2023 20:34
Merge base and update NSP into a single file. We used to call it slipstream when we used windows
mkdir .switch base update exefs romfs nca nsp
basensp=diablo3.nsp
updatensp=diablo3u.nsp
cp .local/share/yuzu/keys/prod.keys .switch/
sed 's/|[^|]*$//' .local/share/yuzu/keys/title.keys | sed 's/|/=/' > .switch/title.keys
hactool -t pfs0 $basensp --outdir base
hactool -t pfs0 $updatensp --outdir update
@john-peterson
john-peterson / sdl2-config.ini
Last active July 5, 2023 11:56
DON'T USE QUOTES !!!!!
[ControlsP0]
button_a=engine:sdl,port:0,guid:030000005e0400008e02000010010000,button:0
button_b=engine:sdl,port:0,guid:030000005e0400008e02000010010000,button:1
button_x=engine:sdl,port:0,guid:030000005e0400008e02000010010000,button:2
button_y=engine:sdl,port:0,guid:030000005e0400008e02000010010000,button:3
button_lstick=
button_rstick=
button_l=