Skip to content

Instantly share code, notes, and snippets.

View lighth7015's full-sized avatar
Perpetually exhausted.

Robert Butler lighth7015

Perpetually exhausted.
View GitHub Profile
@lighth7015
lighth7015 / justification.cpp
Created February 24, 2020 10:01
lisp project
#include <vector>
#include <unordered_map>
#include <string>
#include <ctype.h>
#include <utility>
#include <sstream>
#include "sexpr.h"
#include "tinyformat.h"
#include "fmt/format.h"
@lighth7015
lighth7015 / label.cpp
Created February 25, 2020 18:12
Justified label control
#include <FL/Fl_Box.H>
class TextLabel: public Fl_Box {
LayoutEngine engine;
std::string text;
public:
TextLabel( std::string& text, uint32_t x, uint32_t y, uint32_t height, uint32_t width)
: text(text)
, Fl_Box( x, y, width, height, text.c_str())
@lighth7015
lighth7015 / MyAccountApp.dart
Last active March 11, 2020 02:16
MyAccountApp class
import 'package:flutter/material.dart';
import 'package:simple_gravatar/simple_gravatar.dart';
class MyAccount extends StatefulWidget {
@override
MyAccountApp createState() => new MyAccountApp();
}
class MyAccountApp extends State<MyAccount> {
final Gravatar profile = Gravatar('[email protected]');
@lighth7015
lighth7015 / logging.ts
Last active March 17, 2020 12:11
Logging service interface
const len = <T, TIterable extends Array<T>>(iterable: TIterable): number => iterable.length;
const hasMember = <T>(param: T, fieldName: string): boolean => fieldName in param;
interface CategoryInfo {
id: number;
name: string;
}
interface LogMessage {
logText: string;
@lighth7015
lighth7015 / README.md
Last active March 16, 2020 07:15
TS logger implementation?
@lighth7015
lighth7015 / build.log
Last active March 22, 2020 17:33
proposed project structure
user@local giza-sdk# bin/sdk build
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
Building SDK compiler...
[cc] host compiler1.c
[cc] host compiler2.c
@lighth7015
lighth7015 / sdk.py
Created March 18, 2020 17:14
sdk.py
#!/usr/bin/env python
"""Wrapper for mesonbuild"""
import mesonbuild.mesonmain as sdk, sys, os, os.path as path
sdk_options = [ '--native-file', 'sdk/spec/system.txt', '--cross-file', 'sdk/spec/compiler.txt', 'build' ]
misc_params = sys.argv[1:]
sys.argv = list(( sys.argv[0], )) + sdk_options + misc_params
sys_path = os.environ['PATH']
@lighth7015
lighth7015 / wayfire.log
Created March 18, 2020 21:50
Crash log
II 18-03-20 17:48:02.669 - [src/main.cpp:260] Starting wayfire
II 18-03-20 17:48:02.683 - [render/egl.c:246] Using EGL 1.5
II 18-03-20 17:48:02.683 - [render/egl.c:247] Supported EGL extensions: EGL_EXT_buffer_age EGL_EXT_client_sync EGL_EXT_create_context_robustness EGL_EXT_output_base EGL_EXT_stream_acquire_mode EGL_EXT_sync_reuse EGL_IMG_context_priority EGL_KHR_config_attribs EGL_KHR_create_context_no_error EGL_KHR_context_flush_control EGL_KHR_create_context EGL_KHR_fence_sync EGL_KHR_get_all_proc_addresses EGL_KHR_partial_update EGL_KHR_swap_buffers_with_damage EGL_KHR_no_config_context EGL_KHR_gl_colorspace EGL_KHR_gl_renderbuffer_image EGL_KHR_gl_texture_2D_image EGL_KHR_gl_texture_3D_image EGL_KHR_gl_texture_cubemap_image EGL_KHR_image EGL_KHR_image_base EGL_KHR_image_pixmap EGL_KHR_reusable_sync EGL_KHR_stream EGL_KHR_stream_attrib EGL_KHR_stream_consumer_gltexture EGL_KHR_stream_cross_process_fd EGL_KHR_stream_fifo EGL_KHR_stream_producer_eglsurface EGL_KHR_surfaceless_context EGL_KHR_wait_sync EGL
@lighth7015
lighth7015 / build.log
Created March 20, 2020 17:25
DJGPP build log
echo "compiling c:/mwinsrc/src/bin/landmine.exe"
compiling c:/mwinsrc/src/bin/landmine.exe
gcc -Wno-deprecated-declarations -O3 -s -DHAVE_FILEIO=1 -DMW_FEATURE_IMAGES=1 -DMW_FEATURE_TIMERS=1 -DHAVE_SIGNAL=0 -DHAVE_FPRINTF=0 -DNONETWORK=1 -DUPDATEREGIONS=1 -DERASEMOVE=1 -DHAVE_MMAP=0 -DNANOWM=1 -DHAVE_BMP_SUPPORT=1 -DHAVE_GIF_SUPPORT=1 -DHAVE_PNM_SUPPORT=0 -DHAVE_XPM_SUPPORT=1 -DHAVE_JPEG_SUPPORT=1 -DHAVE_PNG_SUPPORT=1 -DHAVE_FNT_SUPPORT=1 -DHAVE_FREETYPE_2_SUPPORT=1 -I/usr/include/freetype2 -DSCREEN_HEIGHT=768 -DSCREEN_WIDTH=1024 -DSCREEN_DEPTH=8 -DSCREEN_PIXTYPE=MWPF_TRUECOLORARGB -DMWPIXEL_FORMAT=MWPF_TRUECOLORARGB -Lc:/mwinsrc/src/lib -Ic:/mwinsrc/src/include -o c:/mwinsrc/src/bin/landmine.exe demos/nanox/landmine.o -ljpeg -lpng -lft2 -lz -lnano-X
c:/mwinsrc/src/lib/libnano-X.a(kbd_dj.o):kbd_dj.c:(.text+0x940): multiple definition of `_inportb'
c:/mwinsrc/src/lib/libnano-X.a(scr_djvesa.o):scr_djvesa.c:(.text+0x350): first defined here
c:/mwinsrc/src/lib/libnano-X.a(kbd_dj.o):kbd_dj.c:(.text+0x950): mult
@lighth7015
lighth7015 / build.log
Created March 21, 2020 19:23
build.log
i686-pc-msdosdjgpp-g++ -DPACKAGE_NAME=\"fox\" -DPACKAGE_TARNAME=\"fox\" -DPACKAGE_VERSION=\"1.6.57\" -DPACKAGE_STRING=\"fox\ 1.6.57\" -DPACKAGE_BUGREPORT=\"[email protected]\" -DPACKAGE_URL=\"\" -DPACKAGE=\"fox\" -DVERSION=\"1.6.57\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -D__EXTENSIONS__=1 -D_ALL_SOURCE=1 -D_GNU_SOURCE=1 -D_POSIX_PTHREAD_SEMANTICS=1 -D_TANDEM_SOURCE=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DTIME_WITH_SYS_TIME=1 -DHAVE_SYS_WAIT_H=1 -DHAVE_DIRENT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_UNISTD_H=1 -DHAVE_SYS_PARAM_H=1 -DHAVE_GETPAGESIZE=1 -DHAVE_VSSCANF=1 -DHAVE_VSNPRINTF=1 -DHAVE_STRTOLL=1 -DHAVE_STRTOULL=1 -DHAVE_ZLIB_H=1 -I. -Wall -Wformat -Woverloaded-virtual -Wshadow -DUNICODE -DHAVE_ZLIB_H=1 -DHAVE_XFT_H=1 -I/usr/include/freetype2 -DNO_XIM -I/usr/include -MT reswrap.o -MD -MP -MF .deps/reswrap.Tpo -c -o reswrap.o reswrap.cpp
mv -f .deps/reswr