Skip to content

Instantly share code, notes, and snippets.

View ds84182's full-sized avatar
🐺

Dwayne Slater ds84182

🐺
View GitHub Profile
@ds84182
ds84182 / main.dart
Created January 17, 2019 02:23
Flutter GPU memory growth repro
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 July 10, 2018 03:57
¿libwhp example?
extern crate libwhp;
extern crate memmap;
use libwhp::*;
use memmap::*;
fn main() {
println!("?");
let p = Partition::new().unwrap();
#include <3ds.h>
#include <stdio.h>
#include <cstdint>
#include <string>
#include <string_view>
#include <utility>
#include <vector>
static s64 base_tick;
/*
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 November 5, 2017 00:38
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).
#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 August 22, 2017 18:31
Testing if Dart can load packages from a gist
pkga:pkga_
pkgb:pkgb_
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 {

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:

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 April 21, 2016 02:04
fuckit.lua makes sure that your Lua code always runs to the end of file despite any errors that occur
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"})