Skip to content

Instantly share code, notes, and snippets.

View Vengarioth's full-sized avatar
🌈
casting rays into space

ash Vengarioth

🌈
casting rays into space
View GitHub Profile
@tsabat
tsabat / zsh.md
Last active July 22, 2025 02:26
Getting oh-my-zsh to work in Ubuntu
@cuppster
cuppster / 1.cs
Created September 3, 2012 18:39
Promises for C# using Generics
/*
modified from original source: https://bitbucket.org/mattkotsenas/c-promises/overview
*/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Promises
@nerdbeere
nerdbeere / getCarBrands.js
Created January 29, 2014 13:44
In case you need car brands and their models just go to autoscout24.de and use this gist.
var brands = [];
$('#make1 option').each(function() {
var id = $(this).val();
var name = $(this).text();
var obj = {
id: id,
name: name,
models: []
};
@staceymakes
staceymakes / gist:36694e45c030925bb02e
Last active August 29, 2015 14:05
Twilio Python AP from Raspberry Pi
import RPi.GPIO as GPIO
from twilio.rest import TwilioRestClient
import time
GPIO.setmode(GPIO.BCM)
GPIO.setup(25,GPIO.IN,pull_up_down=GPIO.PUD_DOWN)
try:
GPIO.wait_for_edge(25,GPIO.RISING)
print("button pressed")
ACCOUNT_SID = "[account id]"
@jansegre
jansegre / script.lua
Last active February 10, 2020 23:48
Very basic luajit from Rust.
-- script.lua
-- Receives a table, returns the sum of its components.
io.write("The table the script received has:\n");
x = 0
for i = 1, #foo do
print(i, foo[i])
x = x + foo[i]
end
io.write("Returning data back to C\n");
return x
use list::Node;
mod list {
use std::mem;
#[derive(Show)]
pub struct Node<T> {
pub data: T,
prev: Option<Box<Node<T>>>,
next: Option<Box<Node<T>>>
@gafferongames
gafferongames / delta_compression.cpp
Last active April 28, 2025 22:48
Delta Compression
/*
Delta Compression by Glenn Fiedler.
This source code is placed in the public domain.
http://gafferongames.com/2015/03/14/the-networked-physics-data-compression-challenge/
*/
#include <stdint.h>
#include <stdio.h>
#include <assert.h>
#include <string.h>
@sunnyone
sunnyone / hello-u8.rs
Last active September 20, 2021 10:13
Windows Unicode conversion in Rust
// Add to Cargo.toml
// [dependencies]
// winapi = "*"
// user32-sys = "*"
extern crate winapi;
extern crate user32;
fn from_wide_ptr(ptr: *const u16) -> String {
use std::ffi::OsString;
use std::os::windows::ffi::OsStringExt;
@linadk
linadk / UnetHelloWorld
Created June 19, 2015 18:37
Using the Unity3d Unet LLAPI this will establish a connection and send data. There aren't many examples out there for this currently so I thought I'd write this up.
/// <summary>
/// UNet LLAPI Hello World
/// This will establish a connection to a server socket from a client socket, then send serialized data and deserialize it.
/// </summary>
using UnityEngine;
using System.Collections;
using UnityEngine.Networking;
using System.Runtime.Serialization.Formatters.Binary;
using System.IO;