Skip to content

Instantly share code, notes, and snippets.

@yagop
yagop / client.sh
Created April 12, 2025 06:55
Test max connections
#!/bin/bash
for port in `seq 50000 60000`;
do
nc -vw3 192.168.0.1 $port &
done
wait
@yagop
yagop / rules.txt
Created August 27, 2024 08:36
uBlock hckrnews Dark mode
hckrnews.com##body:style(background-color:#0e1113!important)
hckrnews.com##a:style(color:#ffffff!important)
/**
* Scan networks and print in screen
*/
#include "WiFi.h"
#include "HT_SSD1306Wire.h"
#define BAUDRATE 115200
// addr , freq , i2c group , resolution , rst
@yagop
yagop / _README.md
Last active March 16, 2021 12:58
Soria Mining

Scripts I'm using to mine ETH on Linux.

nbminer.service: setup Nvidia Power Limit to 250 and start nbminer

local.conf: disable IPv6

nct6775-fans: Set Fan 2 and Fan 3 to ~78%

@yagop
yagop / index.js
Created October 5, 2019 22:25
Navaja Negra 2019 - Mojo
const crypto = require('crypto');
const vm = require('vm');
process.env.FLAG = "FLAG"
const secret = (key) => ((key == 1337) ? process.env.FLAG : 'fail');
const sandbox = {[crypto.randomBytes(32).toString('hex')] : secret};
const message = 'this.constructor.values(this).shift()(this.constructor.values(this.constructor).concat(this.constructor.values(this.constructor).concat(null).length).concat(this.constructor.values(this.constructor).concat(null).concat(null).concat(null).length).concat(this.constructor.values(this.constructor).concat(null).concat(null).concat(null).length).concat(this.constructor.values(this.constructor).concat(null).concat(null).concat(null).concat(null).concat(null).concat(null).concat(null).length).join(this.constructor.name.repeat()))';
// ...
if (message.match(/^[a-z.()]+$/)) {
try {
@yagop
yagop / LINKS.md
Last active June 26, 2022 11:31
Crytpo Links - Some links I use for crypto trading [WIP]
@yagop
yagop / a.sh
Last active May 8, 2018 15:00
Compile clang-format on Ubuntu Xenial Docker
docker run -w /root -it ubuntu:xenial-20180417 /bin/bash
apt update
apt install curl xz-utils cmake ninja-build g++ python -y
curl -o llvm-6.0.0.src.tar.xz http://releases.llvm.org/6.0.0/llvm-6.0.0.src.tar.xz
tar xvf llvm-6.0.0.src.tar.xz
cd llvm-6.0.0.src/tools/
curl -o cfe-6.0.0.src.tar.xz http://releases.llvm.org/6.0.0/cfe-6.0.0.src.tar.xz
tar xvf cfe-6.0.0.src.tar.xz
mv cfe-6.0.0.src clang
@yagop
yagop / .babelrc
Last active December 28, 2017 20:17
Webpack example
{
"presets": ["env"]
}
@yagop
yagop / Readme.md
Last active November 15, 2017 09:56
Webtask bot sample

This is a sample Telegram Bot to showcase Webtask.

Hints included

  • Main function promisification through Bluebird.try and asCallback.
  • Query params and body access.
  • Secrets (TG_TOKEN)
  • Get the Webtask runner URL
  • Basic Telegram Bot API usage

Setup

@yagop
yagop / README.md
Last active October 22, 2017 19:49
Simple example of WebTask Storage

This example demostrate the usage of WebTask Storage with multiple models and how to save / filter / find them.

$ curl https://__host__.run.webtask.io/example\?action\=delete_all
{}

$ curl https://__host__.run.webtask.io/example\?action\=save_model \
  -H "Content-Type: application/json" \
  --data '{"modelName": "planets", "properties": {"name": "Earth"}}'
{}