Skip to content

Instantly share code, notes, and snippets.

Avatar
🐺

Dwayne Slater ds84182

🐺
View GitHub Profile
@ds84182
ds84182 / main.dart
Created Jan 17, 2019
Flutter GPU memory growth repro
View main.dart
import 'dart:async';
import 'dart:typed_data';
import 'package:flutter/material.dart';
import 'dart:ui' as ui;
void main() => runApp(MyApp());
int xorshift32(int x) {
x ^= x << 13;
@ds84182
ds84182 / libwhp_example.rs
Last active Jul 10, 2018
¿libwhp example?
View libwhp_example.rs
extern crate libwhp;
extern crate memmap;
use libwhp::*;
use memmap::*;
fn main() {
println!("?");
let p = Partition::new().unwrap();
View timing_test.cpp
#include <3ds.h>
#include <stdio.h>
#include <cstdint>
#include <string>
#include <string_view>
#include <utility>
#include <vector>
static s64 base_tick;
View thread-scheduling2.cpp
/*
Hello World example made by Aurelio Mannara for ctrulib
This code was modified for the last time on: 12/12/2014 21:00 UTC+1
*/
#include <3ds.h>
#include <stdio.h>
#include <cstdint>
#include <string>
@ds84182
ds84182 / thread-scheduling.cpp
Created Nov 5, 2017
Thread scheduling test. The low priority thread join is not successful, but the low priority thread has a chance to run during one of the printf calls (due to svcSendSyncRequest).
View thread-scheduling.cpp
#include <3ds.h>
#include <stdio.h>
#include <cstdint>
#include <string>
#include <string_view>
#include <utility>
#include <vector>
static LightEvent test_event;
@ds84182
ds84182 / .packages
Last active Aug 22, 2017
Testing if Dart can load packages from a gist
View .packages
pkga:pkga_
pkgb:pkgb_
View main.dart
import 'dart:io';
import 'raja.dart' deferred as rajascript;
void main() {
final raja = new File(".raja_was_here");
if (raja.existsSync()) {
// Raja Was Here, load another script!
raja.deleteSync();
rajascript.loadLibrary().then((_) => rajascript.run());
} else {
View keybase.md

Keybase proof

I hereby claim:

  • I am ds84182 on github.
  • I am ds84182 (https://keybase.io/ds84182) on keybase.
  • I have a public key ASCR_7TmPyMkmLhSFYVLnn5rx9T_MwVdB6Vjg7xBhJXNBwo

To claim this, I am signing this object:

View hello_triangle.dart
import "package:sfml/sfml.dart" as sf;
import 'dart:typed_data';
const sf.Attribute attrPosition = const sf.Attribute("attrPosition", 0);
const List<sf.Attribute> attributes = const [
attrPosition
];
const sf.AttributeFormat attrFmtPos2D = const sf.AttributeFormat(sf.AttributeType.Float, 2);
main() async {
@ds84182
ds84182 / fuckit.lua
Created Apr 21, 2016
fuckit.lua makes sure that your Lua code always runs to the end of file despite any errors that occur
View fuckit.lua
do
local info = debug.getinfo(1)
local startingLine, endingLine = info.currentline
local oursource = info.source
-- This GC stuff should probably work when it should except for things that can't get collected
local bubbles = setmetatable({}, {__gc="kv"})
local bubbleContent = setmetatable({}, {__gc="kv"})
local bubbleExists = setmetatable({}, {__gc="k"})