Skip to content

Instantly share code, notes, and snippets.

View santiq's full-sized avatar
⌨️
Coding

santy santiq

⌨️
Coding
View GitHub Profile
// ==UserScript==
// @name Taringa! Shouts Dislike
// @namespace www.santiagoquinteros.com
// @description Vota negativo los shouts que no te gustan
// @include *://www.taringa.net/*
// @require https://code.jquery.com/jquery-2.2.1.min.js
// ==/UserScript==
const serverURL = 'http://glacial-cove-76906.herokuapp.com';
function deleteDuplicates(){
var shouts = $('#Feed-list > .activity-element > .clearfix.shout-footer > .s-action-list').map((i,e)=>{
return ( $(e).attr('data-id') )
}).toArray();
var duplicated = shouts.filter( (elem, index, arr) => arr.indexOf(elem) !== index );
duplicated.forEach((shout)=>{
$("#Feed-list > .activity-element > .clearfix.shout-footer > div[data-id="+shout+"]").each((i,e)=>{

#Inicios modestos

Javascript fue creado en Mayo de 1995, por Brendan Eich, en ese entonces solo funcionaba en Netscape En diciembre de ese año, fue presentado como lenguaje para el lado del servidor, corriendo en Netscape Enterprise Server, no fue hasta mediados de los años 200x que aparecio Node.

https://developer.mozilla.org/en-US/docs/Web/JavaScript/New_in_JavaScript

Su nombre oficial es ECMAScript

@santiq
santiq / Promisify.js
Last active June 23, 2017 01:32
Promisify a function with callback
// Needs ... notation to be available
const promisify = (fn) => {
return (...args) => {
return new Promise((resolve, reject)=>{
fn(...args, function(err, res){
if(err){
return reject(err);
}
return resolve(res);
})
@santiq
santiq / circle.yml
Created June 13, 2017 00:03
Ionic app build automation with circle-ci
## Setup machine
machine:
java:
version: 'oraclejdk8'
node:
version: v6.10.3
ruby:
version: 2.1.2
environment:
ANDROID_HOME: /usr/local/android-sdk-linux
process.on('uncaughtException', (error) => {
console.log('Oh my god, something terrible happend: ', error);
process.exit(1); // exit application
});
process.on('unhandledRejection', (error, promise) => {
console.log(' Oh Lord! We forgot to handle a promise rejection here: ', promise);
console.log(' The error was: ', error );
});
@santiq
santiq / config.yml
Created March 5, 2019 06:33
Automate generation Ionic App APK with CircleCI.
version: 2
jobs:
build:
docker:
- image: circleci/android:api-28-node
working_directory: ~/repo
environment:
JVM_OPTS: -Xmx3200m
steps:
- checkout
@santiq
santiq / config.yml
Last active November 24, 2020 13:54
CircleCI file to deploy to AWS S3 and invalidate AWS CloudFront cache. Read the blogpost about it https://softwareontheroad.com/s3-cloudfront-circleci-continuous-integration #continuousintegration #aws #s3 #CDN #deploy
version: 2
jobs:
"testing":
docker:
- image: circleci/node:10-stretch
working_directory: ~/repo
steps:
- checkout
- restore_cache:
keys:
@santiq
santiq / arbitrage.py
Created September 8, 2022 18:59 — forked from noxx3xxon/arbitrage.py
CFMM Routing Arbitrage Example
import numpy as np
import cvxpy as cp
import itertools
# Problem data
global_indices = list(range(4))
# 0 = TOKEN-0
# 1 = TOKEN-1
# 2 = TOKEN-2