Skip to content

Instantly share code, notes, and snippets.

View sofar's full-sized avatar
🤦‍♂️
I'm drowning in the absence of time.

sofar

🤦‍♂️
I'm drowning in the absence of time.
View GitHub Profile
Kerbal Space Program - 0.90.0.0 (LinuxPlayer) Steam BETA
OS: Linux 3.6 Lunar Linux 1.6.5-nubs-alpha 32bit
CPU: Intel(R) Core(TM) i7 CPU X 990 @ 3.47GHz (12)
RAM: 5994
GPU: GeForce 9800 GT/PCIe/SSE2 (1024MB)
SM: 30 (OpenGL 3.3 [3.3.0 NVIDIA 304.60])
RT Formats: ARGB32, Depth, ARGBHalf, RGB565, ARGB4444, ARGB1555, Default, DefaultHDR, ARGBFloat, RGFloat, RGHalf, RFloat, RHalf, R8
@sofar
sofar / gist:255eda1a109ec3ed4911
Created January 5, 2015 23:47
KSP autosave your persistent.sfs into a git tree
#!/bin/sh
# how to use:
#
# - packages required: inotify-tools, git
# - change SAVENAME into the name of your savegame (folder name)
# - cd into your savegame folder, and execute:
# git init
# git add * */* */*/*
# git commit -a --message "Initial Checkin."
@sofar
sofar / init.lua
Created June 21, 2015 21:21
estimate size of _G table elements in minetest
local s = ""
local function dd(ss)
s = s .. ss
end
-- alt version2, handles cycles, functions, booleans, etc
-- - abuse to http://richard.warburton.it
-- output almost identical to print(table.show(t)) below.
function print_r (t, name, indent)
diff --git a/src/mods.cpp b/src/mods.cpp
index f5174ac..a8874fa 100644
--- a/src/mods.cpp
+++ b/src/mods.cpp
@@ -85,15 +85,12 @@ void parseModContents(ModSpec &spec)
}
}
-std::map<std::string, ModSpec> getModsInPath(std::string path, bool part_of_modpack, const std::string &worldpath)
+std::map<std::string, ModSpec> getModsInPath(std::string path, bool part_of_modpack, const Settings &worldmt_settings)
@sofar
sofar / installkernel
Created July 13, 2012 18:43
installkernel - preserve vmlinuz-
#!/bin/bash
. /etc/lunar/config
preserve()
{
if [ -f $1 ] ; then
mv -f $1 $1.old
fi
}
[Unit]
Description=dhcpd
After=network.target
[Service]
ExecStart=/usr/sbin/dhcpd -q eth0 -f
Restart=always
RestartSec=60
[Install]
cat /etc/systemd/system/minetest@.service
[Unit]
Description=Minetest server
After=systemd-user-sessions.service
[Service]
User=minetest
Type=simple
Restart=always
@sofar
sofar / gist:4709791
Created February 4, 2013 21:16
fix systemd build?
diff --git a/Makefile.am b/Makefile.am
index f3ab908..08d773d 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1846,7 +1846,8 @@ libudev_la_LDFLAGS = \
-Wl,--version-script=$(top_srcdir)/src/libudev/libudev.sym
libudev_la_LIBADD = \
- libsystemd-shared.la
+ libsystemd-shared.la \
@sofar
sofar / wth?
Created December 15, 2015 05:07
diff --git a/src/content_mapblock.cpp b/src/content_mapblock.cpp
index 01a06b6..c237f15 100644
--- a/src/content_mapblock.cpp
+++ b/src/content_mapblock.cpp
@@ -1316,7 +1316,7 @@ void mapblock_mesh_generate_special(MeshMakeData *data,
p2.X++;
MapNode n2 = data->m_vmanip.getNodeNoEx(blockpos_nodes + p2);
const ContentFeatures *f2 = &nodedef->get(n2);
- if(f2->drawtype == NDT_FENCELIKE)
+ if(f2->drawtype == NDT_FENCELIKE || f2->drawtype == NDT_NORMAL)
+ f32 xrailuv[24]={
+ 8/16.,8/16.,14/16.,10/16., // xzxz +y
+ 8/16.,12/16.,14/16.,14/16., // xzxz -y
+ 14/16.,8/16.,16/16.,10/16., // yzyz +x
+ 6/16.,8/16.,8/16.,10/16., // yzyz -x
+ 8/16.,10/16.,14/16.,12/16., // xyxy +z
+ 8/16.,14/16.,14/16.,16/16.}; // xyxy -z