Skip to content

Instantly share code, notes, and snippets.

/**
* 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"}}'
{}
@yagop
yagop / index.js
Last active June 27, 2017 11:56
Stream server
const ts = require('tail-stream')
const http = require('http')
const PORT = 1234
const HOST = '0.0.0.0'
const FILE = 'info.log'
const server = http.createServer((req, resp) => {
const tstream = ts.createReadStream(FILE, {
beginAt: 0,
@yagop
yagop / insomnia.sh
Created April 21, 2017 11:21
Insomnia REST Client Arch installer
#! /bin/bash
cd $(mktemp -d)
wget https://aur.archlinux.org/cgit/aur.git/snapshot/insomnia.tar.gz
tar xzf insomnia.tar.gz
cd insomnia
makepkg -s
sudo pacman -U insomnia-*-x86_64.pkg.tar