Skip to content

Instantly share code, notes, and snippets.

View Nnubes256's full-sized avatar
🌯

Ignacio Gutiérrez Gómez Nnubes256

🌯
View GitHub Profile
@Nnubes256
Nnubes256 / Cargo.toml
Last active September 2, 2022 11:45
learn-wgpu macOS M1 memory leak fix, CVDisplayLink variant
# Add this to Cargo.toml
[target.'cfg(target_os = "macos")'.dependencies]
display-link = "0.2"
@Nnubes256
Nnubes256 / LICENSE.md
Last active August 28, 2021 22:43
NSFastEnumeration Rust interfacing

Copyright 2021 Ignacio Gutiérrez Gómez

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE

// TODO find out if spaces and tabs are interchangeable in which contexts
WHITESPACE = _{ " " | "\t" }
version_number = @{ASCII_DIGIT}
version = {"VERSION" ~ version_number}
// Floating-point values in Cytus I always have 6 decimals
fp_value = @{ASCII_DIGIT+ ~ "." ~ ASCII_DIGIT{6}}
bpm = {"BPM" ~ fp_value}
@Nnubes256
Nnubes256 / Cargo.toml
Last active August 13, 2020 19:42
Rust GUI with iced: expanded counter demo, for personal testing
[package]
name = "iced-playground"
version = "0.1.0"
authors = ["Ignacio <nnubes256@gmail.com>"]
edition = "2018"
[dependencies]
iced = "0.1"
@Nnubes256
Nnubes256 / keybase.md
Created February 25, 2017 13:23
keybase.md

Keybase proof

I hereby claim:

  • I am nnubes256 on github.
  • I am nnubes256 (https://keybase.io/nnubes256) on keybase.
  • I have a public key whose fingerprint is EF38 5AFB 3A8C E859 8AD2 3221 15FD 9836 42C0 53F6

To claim this, I am signing this object:

@Nnubes256
Nnubes256 / baselea.js
Last active February 10, 2017 23:09
BaseLea implementation
// TODO:
// - Add input validation
// - Improve reliability of atob parsing
var TABLE = [
"Hi.","Hi?","Hi!","Lea.", // 0...4
"Lea?","Lea!","Bye.","Bye?", // 5...8
"Bye!","How.","How?","How!", // 9...B
"Why.","Why?","Why!","..." // C...F
];
@Nnubes256
Nnubes256 / devtroll.js
Last active June 10, 2016 15:00
Dorito mods
// For 0.3.5
dorito.Events.GameLoaded.add(function() {
var override = dorito_api.Injectors.override;
var before = dorito_api.InjectTypes.before;
var filter = dorito_api.InjectTypes.filter;
var dispatch_before = dorito_api.InjectTypes.dispatch_before;
window.__GLOBAL__ = {};
window.Gh = {};
window.sc.Wy = {};
window.ig.uC = true;
var fs = require('fs');
var cytoscape = require('cytoscape');
var acorn = require('acorn');
var ONLY_PARSE = true;
var ONLY_AST = false;
var MODULE_MODULE = "C";
var MODULE_REQUIRE = "F";
var MODULE_DEFINE = "v";
@Nnubes256
Nnubes256 / europeancountries.js
Last active August 29, 2015 13:56
Small javascript snippet that asks you the capital of an European country throught a prompt and says if you answered correctly or not every time it's executed. It's in Spanish, traductions welcome. It uses a Key-Value structure to store the countries and its capitals, respectively, includes a null check and LoWeR-uPpEr case support.
var capitalList = [
{"K":"Albania","V":"Tirana"},
{"K":"Alemania","V":"Berlín"},
{"K":"Andorra","V":"Andorra la Vella"},
{"K":"Armenia","V":"Ereván"},
{"K":"Austria","V":"Viena"},
{"K":"azerbaiyán","V":"bakú"},
{"K":"Bélgica","V":"Bruselas"},
{"K":"Bielorrusia","V":"Minsk"},
{"K":"Bosnia y Herzegovina","V":"Sarajevo"},
@Nnubes256
Nnubes256 / thetest.py
Created May 31, 2013 17:37
Nnubes256/GuacaBot permissions system base(Python, by markveidemanis). Small bot base that I can use for make the base of the permissions system.
import socket
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect(("irc.freenode.net",6667))
user = "MasterBot"
admins = ["markveidemanis"]
grant = ["markveidemanis all"]
channel = "#mtmt"
message = "Hello!"
password = "_________________"
help = "Commands: !join, !part, !cmd, !op, !voice, !devoice, !kick, !nick, !add, !del, !addmod, !delmod, !ping, !identify, !quit, !msg, !help"