Skip to content

Instantly share code, notes, and snippets.

View odinuge's full-sized avatar

Odin Ugedal odinuge

View GitHub Profile
@odinuge
odinuge / hugepage-tester.c
Created April 25, 2020 14:03
Simple program to test hugepages
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/mman.h>
#include <unistd.h>
#define PROTECTION (PROT_READ | PROT_WRITE)
#ifndef MAP_HUGE_SHIFT
#define MAP_HUGE_SHIFT 26
@odinuge
odinuge / configureStore.jsx
Created January 28, 2018 19:50
server-side-rendering-express.jsx
export default function configureStore(
initialState: State,
Raven: UniversalRaven
): Store {
const messageMiddleware = createMessageMiddleware(
message => addToast({ message }),
Raven
);
@odinuge
odinuge / raven-for-redux-SSR-example.js
Created January 8, 2018 18:02
Simple proof of concept how to do SSR with raven-for-redux in SSR
// configureStore.js
export default function configureStore(initialState: State, Raven: any): Store {
const middlewares = [
// Other middlewares
createRavenMiddleware(Raven, ravenMiddlewareOptions)
];
// configure store
return createStore(/**/);
}
@odinuge
odinuge / katexpatch.patch
Created October 15, 2016 20:22
Katex-support in gogs
diff --git a/templates/repo/view_file.tmpl b/templates/repo/view_file.tmpl
index 68e8444..38c790c 100644
--- a/templates/repo/view_file.tmpl
+++ b/templates/repo/view_file.tmpl
@@ -76,3 +76,26 @@ function submitDeleteForm() {
}
}
</script>
+
+{{if .IsMarkdown}}
@odinuge
odinuge / Keybase.md
Created June 3, 2015 16:16
Keybase.md

Keybase proof

I hereby claim:

  • I am odinuge on github.
  • I am odinugedal (https://keybase.io/odinugedal) on keybase.
  • I have a public key whose fingerprint is 43FC A939 5DB2 DA04 D1D2 9ADF 49AE AB06 408D D4C2

To claim this, I am signing this object: