Skip to content

Instantly share code, notes, and snippets.

View agrif's full-sized avatar

agrif agrif

View GitHub Profile
@agrif
agrif / README.md
Last active September 6, 2022 07:32
my current ipxe setup

All of this should go into a directory that is available via HTTP and NFS. In variables.ipxe you can provide the HTTP root and NFS root paths, which are used later. Also there are some variables to set the default iscsi root (without the last part after the colon) and the initiator iqn. These are used to auto-fill the iscsi menu options.

You should tell iPXE to boot bootstrap.ipxe.

The bootstrap process reads a bunch of files and sets a bunch of variables. Of importance, it will read the file macs/XXXXXXX.ipxe

class Base:
pass
if __name__ == '__main__':
from mod2 import Derived
print("Derived:", Derived)
print("Derived.__bases__:", Derived.__bases__)
print("Base:", Base)
print("issubclass(Derived, Base):", issubclass(Derived, Base))
@agrif
agrif / cudaminer-9999-nvcc-flags.patch
Last active January 1, 2016 04:09
goes in net-p2p/cudaminer, patch goes in net-p2p/cudaminer/files, remember to run ebuild *.ebuild digest
diff --git a/Makefile.am b/Makefile.am
index ca325f1..17d47ab 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -32,19 +32,19 @@ cudaminer_LDADD = @LIBCURL@ @JANSSON_LIBS@ @PTHREAD_LIBS@ @WS2_LIBS@ @CUDA_LIBS
cudaminer_CPPFLAGS = -msse2 @LIBCURL_CPPFLAGS@ @OPENMP_CFLAGS@ $(PTHREAD_FLAGS) -fno-strict-aliasing $(JANSSON_INCLUDES)
.cu.o:
- $(NVCC) @CFLAGS@ -Xptxas "-abi=no -v" -arch=compute_10 --maxrregcount=64 --ptxas-options=-v $(JANSSON_INCLUDES) -o $@ -c $<
+ $(NVCC) -O3 -Xptxas "-abi=no -v" -arch=compute_10 --maxrregcount=64 --ptxas-options=-v $(JANSSON_INCLUDES) -o $@ -c $<
@agrif
agrif / convert.py
Created December 24, 2013 19:50
converter for RamsesA's wow maps
#!/usr/bin/python
import redstone as rs
import numpy
import multiprocessing
import sys
import os
import os.path
# amount of overlap between layers
__plugin_name__ = "XmasGifts"
__plugin_version__ = "1.0"
__plugin_mainclass__ = "brix"
import os,math,re
from java.io import FileInputStream,File
from java.lang import String
from org.bukkit.util import Vector
from org.bukkit.configuration.file import YamlConfiguration
import org.bukkit as bukkit
@agrif
agrif / drivenotes.md
Last active January 1, 2016 17:19
drive notes

Raid and BCache Notes

Day 1

Herein lies notes on the current drive configuration, recorded faithfully on this Thursday, December 19, in the year of our lord 2013.

{
"type": "cube",
"texture": "assets/minecraft/textures/blocks/stone.png"
}
@agrif
agrif / ambplay.c
Last active January 2, 2016 11:59
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdarg.h>
#include <math.h>
#include <assert.h>
#include <portaudio.h>
#include <sndfile.h>
#define BUFSIZE 1024
@agrif
agrif / nginx.conf
Last active January 3, 2016 02:09
overviewer.org RTMP configuration
# RTMP server
rtmp {
server {
listen 1935;
ping 30s;
application stream {
live on;
hls on;
hls_path /var/www/org/overviewer/htdocs/stream/hls;
@agrif
agrif / vector.py
Created January 13, 2014 23:49
demo vector implementation with quickcheck tests
import math
class Vector:
"""A test vector class, with dot products, cross products,
addition, and scalar multiplication.
"""
def __init__(self, x, y, z):
self.val = (x, y, z)