Skip to content

Instantly share code, notes, and snippets.

View varas's full-sized avatar
🦾

jhvaras varas

🦾
View GitHub Profile

Keybase proof

I hereby claim:

  • I am varas on github.
  • I am jhvaras (https://keybase.io/jhvaras) on keybase.
  • I have a public key ASCoaxX8N4mMB2D_by8qN23gCTzhC1lWxqUwJ7cuU3_0lAo

To claim this, I am signing this object:

@varas
varas / select_close.go
Created July 12, 2019 20:33
Ensure closing an open channel via select is feasible?
// Being Stop called several times
// Besides the race condition btw channel read & close
// Given that select is non-deterministic
// Would this work without panicking?
func Stop() {
select {
case _, open := <-sender.stopChannel:
if open {
close(sender.stopChannel)
@varas
varas / coin-hive.txt
Created September 28, 2017 08:31 — forked from PaulSec/coin-hive.txt
Extract from the Top 1M Alexa domains (and also from investigations) using coin-hive mining service
0x00sec.org
10.32.59.31:32204
10.45.35.173:7990
1122qq.weebly.com
123movies.co
123moviesfull.co
123movies.re
1337x.io
1592878.com
18comix.com
#!/bin/bash
echo -e "\e[1;33mAdd multiverse repo\e[0m"
sudo add-apt-repository multiverse
sudo apt-get update
echo -e "\e[1;33mInstall common dependencies\e[0m"
sudo apt-get install python python-pip python-dev git ruby ruby-dev build-essential
echo -e "\e[1;33mInstall virtualbox\e[0m"
@varas
varas / PhpUnit PsyShell debug
Created April 8, 2014 15:15
Catch PhpUnit assert errors with PsyShell REPL for live debugging
testX()
{
try {
...
} catch(\Exception $e) {
if (get_class($e) != 'PHPUnit_Framework_ExpectationFailedException')
Psy\Shell::debug(array('v' => get_defined_vars()));
throw($e);
}
}
@varas
varas / packer-vbox-ssh-timeout
Created March 4, 2014 12:20
Packer virtualbox-iso ssh-timeout
$ packer build xxx.json
...
==> virtualbox-iso: Creating virtual machine...
==> virtualbox-iso: Creating hard drive...
==> virtualbox-iso: Creating forwarded port mapping for SSH (host port 4391)
==> virtualbox-iso: Starting the virtual machine...
==> virtualbox-iso: Waiting 10s for boot...
==> virtualbox-iso: Typing the boot command...
==> virtualbox-iso: Waiting for SSH to become available...
==> virtualbox-iso: Timeout waiting for SSH.