Skip to content

Instantly share code, notes, and snippets.

View libasoles's full-sized avatar

Guillermo Perez libasoles

View GitHub Profile
@libasoles
libasoles / clearTimeouts.js
Last active June 26, 2020 19:58
Clear newspapers timeouts
// create a dummy timeout
let id = window.setTimeout(() => {}, 0);
// count down ids from latest to remove them all
while (id--) {
window.clearTimeout(id);
}
@libasoles
libasoles / graphiql-dark-mode.css
Created April 27, 2020 13:45 — forked from bkeating/graphiql-dark-mode.css
GraphiQL One Dark Alt (Dark Mode) theme by Ben Keating
<style>
/* GraphiQL One Dark Alt (Dark Mode) theme by Ben Keating[1]
* Colors taken from Atom's One Dark theme[2]. Add this file to the end of
* your <head> block[3] to override built-in default styling.
*
* [1]. https://twitter.com/flowpoke
* [2]. https://github.com/atom/atom/tree/master/packages/one-dark-ui
* [3]. e.g. `.../site-packages/graphene_django/templates/graphene/graphiql.html`
*/
@libasoles
libasoles / aulavirtual.css
Last active November 25, 2019 00:00
CSS Aula Virtual ORT
/************/
/* Header */
/************/
header {
height: 80px;
}
.header-ba {
@libasoles
libasoles / App.js
Last active August 19, 2019 19:26
React Native - Save to cameraRoll
import React, {Fragment} from 'react';
import {Button, View, Text} from 'react-native';
import { useCapture } from "./useCapture";
function App() {
const {captureViewRef, onSaveCapture} = useCapture();
return (
<Fragment>
@libasoles
libasoles / App.js
Last active August 18, 2019 20:19
React Native save to cameraRoll draft
import React, {Fragment, useState, useCallback, useRef, useEffect} from 'react';
import {PermissionsAndroid, StyleSheet, Button, View, Text} from 'react-native';
import {captureRef} from 'react-native-view-shot';
import CameraRoll from '@react-native-community/cameraroll';
function useCapture() {
const captureViewRef = useRef(null);
const [shouldAskForPermission, setShouldAskForPermission] = useState(false);
const [permissionGranted, setPermissionGranted] = useState(false);
@libasoles
libasoles / microKey2FluidSynth.py
Created May 20, 2019 23:21
Connect microKey to Fluid Synth (with ALSA aconnect)
# run as: python microKey2FluidSynth.py
import os
import re
alsaOutputs = os.popen("aconnect -o").readlines()
def getKeyboardClientID():
return getClientID("microKEY") # could be any other
def getFluidSynthClientID():
return getClientID("FLUID Synth")
@libasoles
libasoles / cryptoapi.console.js
Last active April 12, 2019 01:16
Trigger de stopLoss y takeProfit
/******************************************************
*
* Crea (alertas de) stopLoss y takeProfit.
*
* Este código es un ejercicio. No me responsabilizo de que
* no funcione. Sos el único responsable si lo usas y pones
* tu dinero en juego.
*
* Este script solo funciona en la consola del navegador
* en cryptomkt.com
@libasoles
libasoles / cryptoapi.console.js
Created May 1, 2018 19:09
Mostrando valores limit en cryptomkt
(()=>{
function init() {
createLimitsViewer();
}
function update() {
const {stopLoss, takeProfit} = config.limits[base_name];
$('#stop-loss-viewer').text('$'+stopLoss);
@libasoles
libasoles / cryptoapi.console.js
Created May 1, 2018 18:21
Exposición de metodos para crear stopLoss y takeProfit
/******************************************************
*
* Expone metodos para crear stopLoss y takeProfit.
*
* Este script solo funciona en la consola del navegador
* en cryptomkt.com
*
*******************************************************/
const cryptoapi = (()=>{
@libasoles
libasoles / cryptoapi.console.js
Created May 1, 2018 15:43
Creando ordenes limit con la api interna de cryptomkt
/******************************************************
*
* Expone metodos para consultar balance y crear ordenes.
*
* Este script solo funciona en la consola del navegador
* en cryptomkt.com
*
* init: se ejecuta una sola vez
* update: se ejecuta cada x segundos
*