Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/dumb-init /bin/sh
set -e
# Note above that we run dumb-init as PID 1 in order to reap zombie processes
# as well as forward signals to all processes in its session. Normally, sh
# wouldn't do either of these functions so we'd leak zombies as well as do
# unclean termination of all our sub-processes.
# Prevent core dumps
ulimit -c 0
### Keybase proof
I hereby claim:
* I am petesh on github.
* I am anysh (https://keybase.io/anysh) on keybase.
* I have a public key ASAUkOe3Zy0o59kw5ZVDMomsHU5GgVIJCS_2e8ax13gPZgo
To claim this, I am signing this object:
// Display the difference between a float being printed
// and a double being printed.
public class foo {
public static void main(String[] args) {
float valuef = 2.0f/3;
double valued = 2.0/3;
System.out.println(valuef);
System.out.println(valued);
}
}
@petesh
petesh / simpletest2.cs
Created April 13, 2018 10:43
using ls on the files to ensure that they're present.
using System;
using System.Diagnostics;
public class simpletest
{
static public void Main ()
{
Console.WriteLine(">>> use ls on the binary <<<");
var psi = new ProcessStartInfo("/bin/ls", "-l /usr/bin/7z");
var proc = new Process() { StartInfo = psi, };
@petesh
petesh / simpletest.cs
Created April 13, 2018 10:08
Simple test cs code to test passing/failure - compile with csc simpletest.cs, run with mono simpletest.exe
using System;
using System.Diagnostics;
public class simpletest
{
static public void Main ()
{
// start with working situation
var psi = new ProcessStartInfo() {
FileName = "/usr/bin/7z",