Skip to content

Instantly share code, notes, and snippets.

View Naahuel's full-sized avatar

Nahuel José Naahuel

View GitHub Profile
@Naahuel
Naahuel / dolar.10m+.js
Last active June 29, 2020 20:07
Extensión de Argos para Gnome para ver el valor del dolar desde Banco Nación
#!/home/nahuel/.nvm/versions/node/v11.15.0/bin/node
const fetch = require('node-fetch');
const fs = require('fs');
const parse = require('node-html-parser').parse;
const notifier = require('node-notifier');
const display = text => console.log(`<span> </span><span foreground="greenyellow">${text}</span>`);
const URL = 'http://www.bna.com.ar/Personas';
@Naahuel
Naahuel / argos-mail-check.10m+.js
Created November 25, 2019 01:52
Gnome Argos extension - Check delivery status
#!/home/nahuel/.nvm/versions/node/v11.15.0/bin/node
# ^ replace with your own, of course
const fetch = require('node-fetch');
const fs = require('fs');
const parse = require('node-html-parser').parse;
const notifier = require('node-notifier');
const display = text => {
console.log(`<small>${text}</small> | color=orange`);
let UserContext = React.createContext();
class App extends React.Component {
state = {
user: null,
setUser: user => {
this.setState({ user });
}
};
@Naahuel
Naahuel / react-unused-files.sh
Last active July 17, 2018 17:21 — forked from dethi/unused-files.sh
Find files not used in the app bundle, i.e. unused source code
#!/bin/bash
# Launch inside a react project after building the production build with webpack
# Require `jq`.
diff \
<(find src -type f \( -name '*.js' -o -name '*.jsx' -o -name '*.scss' \) | sort) \
<(cat dist/**/*.map | jq --raw-output '.sources | join("\n")' \
| grep -v '\.\./' | grep -E '\.(js|jsx|scss)$' \
| sed "s~^webpack:///\./~~" -r | sort | uniq) \