Skip to content

Instantly share code, notes, and snippets.

View Xibanya's full-sized avatar

Manuela Malasaña Xibanya

View GitHub Profile
@Xibanya
Xibanya / MakeMesh.cs
Created January 12, 2023 09:11
util for creating unity mesh from csv
using System.Collections.Generic;
using System.Text.RegularExpressions;
using UnityEngine;
using System;
#if UNITY_EDITOR
using UnityEditor;
#endif
[RequireComponent(typeof(MeshFilter), typeof(MeshRenderer))]
public class MakeMesh : MonoBehaviour
@Xibanya
Xibanya / preprocessor_fun.h
Created November 17, 2021 00:39 — forked from aras-p/preprocessor_fun.h
Things to commit just before leaving your job
// Just before switching jobs:
// Add one of these.
// Preferably into the same commit where you do a large merge.
//
// This started as a tweet with a joke of "C++ pro-tip: #define private public",
// and then it quickly escalated into more and more evil suggestions.
// I've tried to capture interesting suggestions here.
//
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_,
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant,
@Xibanya
Xibanya / DrunkenBishop.cs
Created March 2, 2019 03:11
Red Star Azimuth randomart generator
using UnityEngine;
using System;
using System.Text;
//based on the algorithm described here http://www.dirk-loss.de/sshvis/drunken_bishop.pdf
public class DrunkenBishop
{
private int width = 17;
private int height = 9;
private int[] tiles;
@Xibanya
Xibanya / README.md
Created May 3, 2018 14:28
the frontpages readme

frontpages

Compare front pages of various online news sources! Check it out! http://xibanya.github.io/frontpages

How to use it

Click the buttons near the top of the screen to see a 1200x1200 screenshot of the front page of the named news source taken within the last hour. Click the image or click the button again to dismiss. Copy and paste the link generated at the bottom of the page to share the currently displayed combination of images.

How it works

capture.sh is run locally as a scheduled windows task once an hour at about 30 minutes past. The script first deletes any images in the root directory with the names of the images shown in html, then uses pageres cli to update the screenshots, and then it pushes the changes to the repo.

How to suggest changes

@Xibanya
Xibanya / persona.html
Created August 14, 2017 22:34
Maybe a persona 5 style html menu
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="initial-scale=1.0" />
<style media="screen">
.container {
transition: all 1.2s ease;
width: 200px;
@Xibanya
Xibanya / index.html
Created April 7, 2017 20:22
initialize
init
@Xibanya
Xibanya / index.html
Created March 22, 2017 19:25
compare front pages
<!DOCTYPE html>
<html>
<head>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<!-- Optional theme -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
require 'sinatra'
require 'open-uri'
require 'nokogiri'
get '/' do
'Congrats, you did a GET'
status 200
headers \
'Content-Type' => 'application/json'
body '{"response_type": "in_channel","text": "It works!"}'
require 'sinatra'
require 'nokogiri'
PAGE_URL = 'http://forums.somethingawful.com/misc.php?action=showsmilies' #'emotes.html'
get '/emote/:name' do
page = Nokogiri::HTML(open(PAGE_URL))
search = params['name']
items = page.css('div.text')
items.each do |item|
@Xibanya
Xibanya / ColorFade.fx
Created August 8, 2016 16:49
simple fade shader
sampler ColorMapSampler : register(s0);
float filterRed;
float filterGreen;
float filterBlue;
float amount;
float4 PixelShaderFunction(float2 TextureCoordinate : TEXCOORD0) : COLOR0
{