Skip to content

Instantly share code, notes, and snippets.

View arj03's full-sized avatar
🌞

Anders Rune Jensen arj03

🌞
View GitHub Profile
#!/bin/bash
if [ $# -eq 0 ]; then
echo "\nUsage start-unless-running.sh process-name path-to-script\n"
exit 1
fi
ps aax | grep $1 | grep -v grep | grep -v start-unless-running.sh > /dev/null
if [ $? -eq 0 ]; then
echo "Process is running."
@arj03
arj03 / keybase.md
Last active September 10, 2019 06:56
keybase.md

Keybase proof

I hereby claim:

  • I am arj03 on github.
  • I am arj03 (https://keybase.io/arj03) on keybase.
  • I have a public key whose fingerprint is 24A4 4542 3724 4DE3 B36B 8F1F 065B 325E C271 57F1

To claim this, I am signing this object:

<AF>^@{"v":"hello world hello world hello world hello world hello world hello world hello world hello world hello world hello world hello world hello world hello world hello world"}<AF>^@+^A^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@<B3>^@^@^@<BD>^@{"v":"hello world hello world 2 hello world hello world 2 hello world hello world 2 hello world hello world 2 hello world hello world 2 hello world hello world 2 hello world hello world 2"}<BD>^@+^A^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@<C1>^@^@^@<A3>^@{"v":"hello world hello world 3 hello world hello world 3 hello world hello world 3 hello world hello world 3 hello world hello world 3 hello world hello world 3"}<A3>^
const tribes = require("ssb-tribes")
const Bot = require("scuttle-testbot")
const Stack = Bot.use(require("ssb-backlinks")).use(tribes)
const bot = Stack()
const Stack2 = Bot.use(require("ssb-backlinks")).use(tribes)
const bot2 = Stack2()
bot.tribes.create({}, (err, data) => {
@arj03
arj03 / diff.json
Created January 31, 2021 20:06
rooms wss
diff --git a/bin.js b/bin.js
old mode 100644
new mode 100755
diff --git a/config.js b/config.js
index 0b9c7ed..26f4a46 100644
--- a/config.js
+++ b/config.js
@@ -1,11 +1,9 @@
-const Config = require('ssb-config/inject');
+//const Config = require('ssb-config/inject');
comment booting
enter peer
hops peer 1
load peer @TWKY4Bq5ezVqbXV2D7NyODxCXgu8o4rgp/sf1GdHbCw=.ed25519
enter server
hops server 1
load server @3eIPXptMcbrFPw8seKbywmPbRogERylNuoFVaZ9AlOg=.ed25519
alloffsets server
start peer ssb-server
start server ssb-server
let l = []
let counter;
function setup() {
counter = 0
for (var i = 0; i < 10000; ++i) {
l.push(() => counter += 1)
}
}