Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env python
# Modified version of https://github.com/arruda/starbound_mod_copy_script to support post paks
# License: MIT
import os
from shutil import copyfile
GAME_ID = '211820'
GAME_PATH = os.path.dirname(os.path.abspath(__file__))
@Txuritan
Txuritan / Cargo.toml
Created July 12, 2020 20:57
Firegox Lightbeam Exporter
[package]
name = "lightbeam-sink"
version = "0.1.0"
authors = [ "Txuritan <[email protected]>" ]
edition = "2018"
[dependencies]
anyhow = "1.0"
bytes = "0.5"
hyper = "0.13"
static mut LOOKUP_TABLE: Vec<(String, u16)> = Vec::new();
static INIT: std::sync::Once = std::sync::Once::new();
fn overlaps<'pairs>(pairs: &'pairs str) -> bool {
let mut lookup_table = Vec::new();
let mut percent_0 = false;
let mut percent_5 = false;
let mut percent_10 = false;
let mut percent_15 = false;
@Txuritan
Txuritan / playground.rs
Created December 5, 2019 03:36 — forked from rust-play/playground.rs
Code shared from the Rust Playground
use std::{str::FromStr, convert::TryFrom };
fn main() {
println!(
"{:#?}",
tokenize("use myriad_mod::{Block, Item, Logger, Mod, Resource}")
);
}
fn tokenize(text: impl AsRef<str>) -> Vec<Token> {
@Txuritan
Txuritan / main.rs
Last active May 22, 2018 07:02
Simple Rust TCP Web Server
use std::collections::HashMap;
use std::io::prelude::*;
use std::net::TcpListener;
enum Method {
GET,
}
impl ::std::fmt::Display for Method {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
from kivy.lang import Builder
from kivy.uix.button import Button
class RegisterUACButton(Button):
def __init__(self):
super(RegisterUACButton, self).__init__(**kwargs) # These
def btn_down(self):
self.bind(on_press=Builder.load_file('../register/register.kv'))
@Txuritan
Txuritan / merge-maps.kt
Last active December 18, 2017 18:09 — forked from cy6erGn0m/merge-maps.kt
Merge two maps with custom reduce function for Kotlin
fun main(args: Array<String>) {
var mapOne = mutableMapOf<String, Any>(
"_version_" to "1.10.2-1.0.0",
"tweaks" to hashMapOf<String, Any>(
"_comment_" to "General tweaks to make the game slightly better",
"greener" to hashMapOf(
"_comment_" to "Makes the game slightly greener (based off Quark)",
"value" to true
)
)
@Txuritan
Txuritan / index.html
Created March 12, 2017 20:15 — forked from anonymous/index.html
Tumblr Theme
<div class="navbar marginBottom">
<div class="button">
<div data-icon="ei-navicon" data-size="s"></div>
</div>
<div class="name">Txuritan</div>
<div class="search">
<div data-icon="ei-search" data-size="s"></div>
</div>
</div>
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADIEAYAAAD9yHLdAAAhDElEQVR4nOydd3wVddb/JyGEEkA6gqgRFlSeBVRsiBQRWEAsoC6uioiLiqvSBNuKbXUfFRHsBVTAguiqoIAgRVy6FAsiEZAeDUmoKiXl5vf8PJ9xNyE3mTt35p4pn/c/b+WVO/fM3Jl77sz3+z0n2SCEEEJswARCCCHEFkwghBBCbMEEQgghxBZMIIQQQmzBBEIIIcQWTCCEEEJswQRCCCHEFkwghBBCbMEEQgghxBYVtAMgxH2S9ouPWS8+Yp73OSrhEEII8QvJDbQjICSIJGkHQIh7pNwprj5eNw4tfh0pzrtXN46oXCmqNU83DK+T8oy4YHDxf696nzjzjsTGQ0gwaVz8f7vh0VVRUTg9YJLhaQZ9I9Y+Tn7145sNZTiITvxMC9HvN9I7tQIhsXBKmvjxx3Xj8CvPnC++q4luHEwgxN98JyrSjYJY5LxjxJ93F9d4Uy8WP1F0ivheHK8hFUv8Qc2EhvNfpGi9MSEkLLT5XLxgtLjSv/Ri8RXPiQb2Fb/WL8rf7UtINKXABEIIcYmm08WfdBFXytOLxY+8NgI+ohtHdPgIixDiMLVvFs/Fupt6TBwxkTFXPPwM3TjKh3cghBCHGTtWfFIV3Tj8xvazxV1OEO9fpheLNXgHQgiJk6Rc8RP44rsuQy8WP7Jqlvi8m8SZ7+vFEhtMIISQOHkFTzJGbsM/nK4Wiq9Yi+nMnTAPPfNGvVjswUdYhBCbjDpZPPAY3Tj8RuY94i6YPfVrql4s8cE7EEJIjPTH2MbDf9SNw28UTRX3v0ic7dvEYcIE4mmSMf/bXHm6DfPo+32EP2ib8JBIiGnbVPzqn/APXM9hjR2i2/PF89vrhUJCQO0s8ceTxdFq4aw8Udy+V+Ji8xOshWU4QvpB8bavEhu/352PMY2bWSySJILTkDB24FbX6okaeUf8HEocVDvF3Tj9AhOIERcnnCfOHK
@Txuritan
Txuritan / index.md
Last active March 15, 2016 13:48
Website/HTML Support for Facebook Posts, Twiiter Cards, Google Plus Posts, iOS Web Apps and Android Web Apps
<!DOCTYPE html>
<html>

<head>
    <!--Main Meta-->
    <!-- Site Contect (Type and Text-Type) -->
    <meta http-equiv="Content-Type" content="text/html" charset="UTF-8">
    <!-- Site Description -->
    <meta name="description" content="Description">