Skip to content

Instantly share code, notes, and snippets.

View omerbn's full-sized avatar
🎯
Focusing

Omer omerbn

🎯
Focusing
View GitHub Profile
class MockBuffer: SPSRingBuffer<uint_8> {
/*
*/
}
class Buffer {
SPSRingBuffer<uint_8> buffer;
Log time: 2021-03-19 02:37:49.496113
Log time: 2021-03-19 02:37:52.712108
Log time: 2021-03-19 02:46:23.143597
MarkInstall libunity-settings-daemon1:amd64 < 15.04.1+18.04.20180413-0ubuntu1.2 -> 15.04.1+20.04.20200325-0ubuntu1 @ii umU Ib > FU=0
Installing libgnome-desktop-3-19 as Depends of libunity-settings-daemon1
MarkInstall libgnome-desktop-3-19:amd64 < none -> 3.36.8-0ubuntu1 @un uN > FU=0
MarkInstall fdisk:amd64 < 2.31.1-0.4ubuntu3.7 -> 2.34-0.1ubuntu9.1 @ii umU Ib > FU=0
Installing libncursesw6 as Depends of fdisk
MarkInstall libncursesw6:amd64 < none -> 6.2-0ubuntu2 @un uN Ib > FU=0
Installing libtinfo6 as Depends of libncursesw6
@omerbn
omerbn / findLongRunningOp.js
Last active April 23, 2020 16:25 — forked from kylemclaren/findLongRunningOp.js
Find and (safely) kill long running MongoDB ops
db.currentOp().inprog.forEach(
function(op) {
if (!op.client.startsWith("10.1.1.38")) return;
if(op.secs_running > 5){
db.killOp(op.opid);
}
}
)
A/arismap.androi: java_vm_ext.cc:662] JNI ERROR (app bug): weak global reference table overflow (max=51200)weak global reference table dump:
java_vm_ext.cc:662] Last 10 entries (of 51200):
java_vm_ext.cc:662] 51199: 0x2a540000 java.lang.Thread
java_vm_ext.cc:662] 51198: 0x2a4c0000 java.lang.Thread
java_vm_ext.cc:662] 51197: 0x2a480000 java.lang.Thread
java_vm_ext.cc:662] 51196: 0x2a440000 java.lang.Thread
java_vm_ext.cc:662] 51195: 0x2a400000 java.lang.Thread
java_vm_ext.cc:662] 51194: 0x2a3c0000 java.lang.Thread
java_vm_ext.cc:662] 51193: 0x2a380000 java.lang.Thread
java_vm_ext.cc:662] 51192: 0x2a340000 java.lang.Thread
@omerbn
omerbn / gist:d91aa96edfd2baefa59d04c5982d49b6
Created February 7, 2019 15:06
Allow Node bind port 80 (Ubuntu 16.04)
open port 80 to run without sudo:
which node
-> get node_location
sudo apt-get install libcap2-bin
-> wait to complete
sudo setcap cap_net_bind_service=+ep <node_location>
-> Done
@omerbn
omerbn / gist:57dc9b06d4ea8ed59b156f803c2a9dea
Created February 6, 2019 17:10
Installing AWS-CLI @ ubuntu 16.04
sudo apt-get install awscli
sudo apt-get install python3
sudo apt-get install pip3
python3 -m pip install --upgrade
sudo -H pip3 install awscli --upgrade
@omerbn
omerbn / upgrade-openssh.sh
Last active February 6, 2019 13:53
Ubuntu 16.04 upgrade openSSH to 1.7.7
sudo apt install -y build-essential libssl-dev zlib1g-dev
wget "http://mirrors.edge.kernel.org/ubuntu/pool/main/o/openssh/openssh_7.7p1.orig.tar.gz"
tar xfz openssh_7.7p1.orig.tar.gz
cd openssh-7.7p1
./configure
make
sudo make install
@omerbn
omerbn / gist:5b761828a7b472708fb968f8865be905
Created July 15, 2018 09:39
RabbitMQ 3.7.2: purging all queues (linux)
rabbitmqctl list_queues | sed -n '1,2!p' |while read queue; do rabbitmqctl purge_queue "${queue}"; done
let img = new Image();
img.addEventListener('load', function(){
var canvas = document.createElement("canvas");
canvas.width = this.width;
canvas.height = this.height;
// Copy the image contents to the canvas
var ctx = canvas.getContext("2d");
ctx.drawImage(this, 0, 0);
{
"_id" : ObjectId("59f1b8c3a3b34c2004ad5458"),
"key" : "import__578d336848d72719070e8b1d",
"rev" : 1,
"type" : "ORG",
"data" : [
{
"display_name" : "The ARC",
"aliases" : [
"the arc",