start new:
tmux
start new with session name:
tmux new -s myname
#include <stdio.h> | |
#include <stdint.h> | |
#include <stdlib.h> | |
#define XLIM 17 | |
#define YLIM 9 | |
#define ARSZ (XLIM * YLIM) | |
#define DEBUG 0 |
GitHub RCE by Environment variable injection Bug Bounty writeup | |
Disclaimer: I'll keep this really short but I hope you'll get the key points. | |
GitHub blogged a while ago about some internal tool called gerve: | |
https://github.com/blog/530-how-we-made-github-fast | |
Upon git+sshing to github.com gerve basically looks up your permission | |
on the repo you want to interact with. Then it bounces you further in | |
another forced SSH session to the back end where the repo actually is. |
package main | |
//Thanks to http://ecs.victoria.ac.nz/foswiki/pub/Main/TechnicalReportSeries/ECSTR11-01.pdf | |
import ( | |
"fmt" | |
) | |
//We will have multiple car parts | |
type CarPart interface { | |
Accept(CarPartVisitor) |
open Lwt | |
let block_size = 256 * 4096 | |
let ifd = Lwt_unix.stdin | |
let ofd = Lwt_unix.stdout | |
let print spd = | |
try_lwt | |
Lwt_io.eprintf "%s\r" (Speed.to_string spd) | |
with Speed.Undefined -> return_unit |
This guide assumes you are using Ubuntu and have some basic linux command-line know-how.
Download the server https://www.factorio.com/download-headless/stable:
An indentation sensitive parser combinator language is one that helps you express
ideas like "this parse only succeeds if it's within the current indentation block".
The concept is somewhat small and elegant and is implemented in a few libraries. In
this writeup, I will use examples from indents
.
The direct goal will be to write the sameOrIndented
parser combinator with a type
module Reader = struct | |
type ('e, 'a) t = Reader of ('e -> 'a) | |
let run = function | |
| Reader r -> r | |
let map f m = Reader (fun env -> f (run m env)) | |
let bind f m = Reader (fun env -> run (f (run m env)) env) |
(* Arithmetic with Binary numbers (unsigned, arbitrary precision!) *) | |
type digit = Zero | One | |
type t = digit list | |
let rec eq a b = | |
match a, b with | |
| [], [] -> true | |
| da :: a, db :: b when da = db -> eq a b | |
| _ -> false |