Skip to content

Instantly share code, notes, and snippets.

View TACIXAT's full-sized avatar
🌴
Good life

TACIXAT TACIXAT

🌴
Good life
View GitHub Profile
@TACIXAT
TACIXAT / obj.go
Created September 13, 2020 07:01
ASM instruction builder in Golang.
package main
/*
This legend twitchyliquid64 mirrored cmd/internal/obj as an importable package.
Use the instruction builder then assemble. More examples in their repo.
*/
import (
asm "github.com/twitchyliquid64/golang-asm"
"github.com/twitchyliquid64/golang-asm/obj"
@TACIXAT
TACIXAT / winjit.go
Created September 12, 2020 21:14
Windows Executable JIT Memory in Golang
package main
// Executable memory / JIT in Golang for Windows
// Linux see:
// https://medium.com/kokster/writing-a-jit-compiler-in-golang-964b61295f
import (
"log"
"reflect"
"syscall"

Keybase proof

I hereby claim:

  • I am tacixat on github.
  • I am tacixat (https://keybase.io/tacixat) on keybase.
  • I have a public key ASCLJgLNP5WO43MhMW0X8nvg4aIX1KQS1tUgb-zuHkARZAo

To claim this, I am signing this object:

@TACIXAT
TACIXAT / manticore_challenge.c
Created May 5, 2017 21:43
A small challenge to get familiar with Manticore
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
int check_char_0(char chr) {
register uint8_t ch = (uint8_t) chr;
ch ^= 97;
if(ch != 92) {
def reverse17(val):
return val ^ (val >> 17) ^ (val >> 34) ^ (val >> 51)
def reverse23(val):
return (val ^ (val << 23) ^ (val << 46)) & 0xFFFFFFFFFFFFFFF
def xs128p_backward(state0, state1):
prev_state1 = state0
prev_state0 = state1 ^ (state0 >> 26)
prev_state0 = prev_state0 ^ state0
@TACIXAT
TACIXAT / xs128p.py
Created November 28, 2016 16:16
Python XorShift128Plus Algorithm
def xs128p(state0, state1):
s1 = state0
s0 = state1
s1 ^= (s1 << 23)
s1 ^= (s1 >> 17)
s1 ^= s0
s1 ^= (s0 >> 26)
state0 = state1
state1 = s1
generated = (state0 + state1)
@TACIXAT
TACIXAT / risc.sublime-syntax
Created May 19, 2016 01:58
Simple syntax highlighting for RiSC-16 in Sublime Text 3
%YAML1.2
---
# See http://www.sublimetext.com/docs/3/syntax.html
file_extensions:
- risc
scope: source.risc
contexts:
main:
- match: 'r[0-9]'
scope: support.type.risc
@TACIXAT
TACIXAT / therm.ino
Last active October 20, 2015 04:29
Single byte control heating using HVAC-IR-Control for Mitsubishi Mini Split
/* AUTHOR
** Douglas Goddard
** October 2015
*/
/* ABOUT
** This file is a simple set up for heating.
** There is a single byte for control.
** This allows temperature ranges 21c - 28c (~70f - 82f).
** Fan speeds 2, 3, 4 and silent.
@TACIXAT
TACIXAT / BoyerMooreStringSearch.py
Last active August 29, 2015 14:21 — forked from ameerkat/BoyerMooreStringSearch.py
BoyerMoore Python - Multiple Matches
# Boyer Moore String Search implementation in Python
# Ameer Ayoub <ameer.ayoub@gmail.com>
# Modified to return all indices - GG
# Generate the Bad Character Skip List
def generateBadCharShift(term):
skipList = {}
for i in range(0, len(term)-1):
skipList[term[i]] = len(term)-i-1
return skipList