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 / 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 / README.md
Last active March 16, 2020 07:15
TS logger implementation?
@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 / 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 / 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 / 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 / aolnet.ccl
Created February 19, 2020 09:49
CCL file
!----------------------------------------------------------------------
! AOLNET.CCL
!----------------------------------------------------------------------
Title "AOLnet"
ID 4
DriverType 1
-Label 0 { Label 0 }
IfConnects 2 1
@lighth7015
lighth7015 / readme.md
Created February 18, 2020 05:36
waf runtim error
My code here

Setting top to                           : directory-it-doesnt-matter
Setting out to                           : directory-it-doesnt-matter
Traceback (most recent call last):
  File "/lib/python3.8/site-packages/waf/waflib/Scripting.py", line 159, in waf_entry_point
    run_commands()
  File "/lib/python3.8/site-packages/waf/waflib/Scripting.py", line 255, in run_commands
 ctx = run_command(cmd_name)
@lighth7015
lighth7015 / tar.c
Created February 16, 2020 20:18
tar.c
#include <stdio.h>
#include <fcntl.h>
#include <errno.h>
#include <unistd.h>
#include <stdint.h>
#include <string.h>
#include <stdbool.h>
#include <sys/stat.h>
#include <sys/mman.h>
@lighth7015
lighth7015 / README.md
Created February 16, 2020 17:31
std::shared_ptr crash
(gdb) r
Starting program: /home/robert_/C++/intervue/bin/x86_64-pc-linux-gnu/debug/client 
/usr/lib/../share/gcc-9.2.0/python/libstdcxx/v6/xmethods.py:731: SyntaxWarning: list indices must be integers or slices, not str; perhaps you missed a comma?
  refcounts = ['_M_refcount']['_M_pi']
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
height is 16

ID = 1, Position = (231, 2)