Skip to content

Instantly share code, notes, and snippets.

Yago yagop

  • Madrid, Spain
Block or report user

Report or block yagop

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@yagop
yagop / LINKS.md
Last active Oct 2, 2018
Crytpo Links - Some links I use for crypto trading [WIP]
@yagop
yagop / a.sh
Last active May 8, 2018
Compile clang-format on Ubuntu Xenial Docker
View a.sh
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 Dec 28, 2017
Webpack example
View .babelrc
{
"presets": ["env"]
}
@yagop
yagop / Readme.md
Last active Nov 15, 2017
Webtask bot sample
View Readme.md

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 Oct 22, 2017
Simple example of WebTask Storage
View README.md

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 Jun 27, 2017
Stream server
View index.js
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 Apr 21, 2017
Insomnia REST Client Arch installer
View insomnia.sh
#! /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
@yagop
yagop / node-js-app.service
Created Jan 7, 2017
Nodejs Systemd service example
View node-js-app.service
[Unit]
Description=Node.js App
After=network.target
[Service]
Type=simple
ExecStart=/usr/local/node-v7.4.0/bin/node index.js
WorkingDirectory=/home/yago/produccion/app
Environment="HOST=127.0.0.1"
Environment="PORT=1234"
@yagop
yagop / emojis.js
Created Dec 25, 2016
Simple Twitter emoji streamer
View emojis.js
const emojisStr = '😀😂😅😆😇😘😍😜😎🤓😶😏🤗😐😡😟😞🙄☹️😔😮😴💤💩😭😈👿👌👸🎅👅👀👍💪👻🤖😺🐟🐠🐷🐌🐼🐺🐯🐅🦃🐕🐇🌾🎍🍀🐾🌏🌚🌝🌞🌦🔥💥☃️✨❄️💧🍏🍊🍌🌽🍔🌮☕️🍧⚽️🏐🎖🎹🎰🎣🏓🚵🎮🎬🚗🚓🚨🚋🚠🛥🚀🚢🎠🚧🚧🚧✈️🏥📱⌨💻📠📞🔦💴💸🔮💊🔬🔭📫📈📉🖇✂️🔒🔓📒💛❤️💙💔💞💕💝💘🚾⚠️♻️🎵💬🕐🇬🇧🇺🇸🇪🇸🇵🇹🇳🇺🇳🇷🇬🇾🇬🇦🇮🇸🇯🇵';
const emojis = [...emojisStr]
.filter(emoji => emoji.length > 0)
.filter(emoji => emoji !== '\uFE0F');
module.exports = emojis;
@yagop
yagop / config.toml
Last active Dec 9, 2016
Telegram bot torrent to folder
View config.toml
BotToken = "123456:AAAAAAA"
AdminId = 11696011
TorrentDownloadPath = "/tmp"
You can’t perform that action at this time.