Skip to content

Instantly share code, notes, and snippets.

Avatar

Alejandro Rivero arivero

View GitHub Profile
View ricos2020es.txt
60440
9350
8000
5690
5550
4930
4790
4460
3490
2850
View disable.sh
#!/bin/bash
# IMPORTANT: Don't forget to logout from your Apple ID in the settings before running it!
# IMPORTANT: You will need to run this script from Recovery. In fact, macOS Catalina brings read-only filesystem which prevent this script from working from the main OS.
# This script needs to be run from the volume you wish to use.
# E.g. run it like this: cd /Volumes/Macintosh\ HD && sh /Volumes/Macintosh\ HD/Users/sabri/Desktop/disable.sh
# WARNING: It might disable things that you may not like. Please double check the services in the TODISABLE vars.
# Get active services: launchctl list | grep -v "\-\t0"
# Find a service: grep -lR [service] /System/Library/Launch* /Library/Launch* ~/Library/LaunchAgents
@arivero
arivero / ajusteCovid.py
Last active Apr 28, 2020
descarga y ajusta los datos de fallecimientos oficiales, para estimar los datos finales
View ajusteCovid.py
#!/usr/bin/env python
# coding: utf-8
# In[1]:
from scipy.optimize import leastsq,curve_fit
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
def logcorrected(x,s0,k0,dk,mu,i0,v):
@arivero
arivero / prediccion.py
Last active Apr 14, 2020
Analysis en modelo SI (sin R) de los datos Covid oficiales de España
View prediccion.py
#!/usr/bin/env python
# coding: utf-8
# In[1]:
import pandas as pd
dataframe=pd.read_csv("https://covid19.isciii.es/resources/serie_historica_acumulados.csv", skipfooter=3, engine="python", encoding='iso8859')
@arivero
arivero / lmdb.tcl
Created Feb 4, 2020 — forked from antirez/lmdb.tcl
LMDB -- First version of Redis written in Tcl
View lmdb.tcl
# LVDB - LLOOGG Memory DB
# Copyriht (C) 2009 Salvatore Sanfilippo <antirez@gmail.com>
# All Rights Reserved
# TODO
# - cron with cleanup of timedout clients, automatic dump
# - the dump should use array startsearch to write it line by line
# and may just use gets to read element by element and load the whole state.
# - 'help','stopserver','saveandstopserver','save','load','reset','keys' commands.
# - ttl with milliseconds resolution 'ttl a 1000'. Check ttl in dump!
View android sslpining disable
$ apt-get update && apt-get upgrade --assume-yes
$
$ pip3 install frida-tools
$ pip3 install objection
$
$ sudo apt-get install android-tools-adb android-tools-fastboot
$
$ wget wget https://github.com/frida/frida/releases/download/12.7.0/frida-server-12.7.0-android-arm64.xz
$ unxz frida-server-12.7.0-android-arm64.xz
@arivero
arivero / abroHilo.py
Last active Jul 1, 2019
Comparacion de las pools de Hilos y de Procesos
View abroHilo.py
import hashlib
import timeit
def slow(z,f,i):
s=hashlib.sha3_512(i.to_bytes(8,'big'))
for x in range(z): s.update(s.digest()*f)
return s.digest()
initcode="""
import concurrent.futures
from functools import partial
executorT = concurrent.futures.ThreadPoolExecutor()
View redis_pubsub_demo.rb
# Author: Pieter Noordhuis
# Description: Simple demo to showcase Redis PubSub with EventMachine
#
# Update 7 Oct 2010:
# - This example does *not* appear to work with Chrome >=6.0. Apparently,
# the WebSocket protocol implementation in the cramp gem does not work
# well with Chrome's (newer) WebSocket implementation.
#
# Requirements:
# - rubygems: eventmachine, thin, cramp, sinatra, yajl-ruby
View rails_issue_11078.rb
unless File.exist?('Gemfile')
File.write('Gemfile', <<-GEMFILE)
source 'https://rubygems.org'
gem 'rails', github: 'rails/rails'
gem 'sqlite3'
GEMFILE
system 'bundle'
end
@arivero
arivero / .bashrc
Created Feb 1, 2019 — forked from mGalarnyk/.bashrc
Function to append to the end of .bashrc file in linux to run PySpark on jupyter notebook for the blog post https://medium.com/@GalarnykMichael/install-spark-on-ubuntu-pyspark-231c45677de0#.qxguj5czj
View .bashrc
function snotebook ()
{
#Spark path (based on your computer)
SPARK_PATH=~/spark-2.0.0-bin-hadoop2.7
export PYSPARK_DRIVER_PYTHON="jupyter"
export PYSPARK_DRIVER_PYTHON_OPTS="notebook"
# For python 3 users, you have to add the line below or you will get an error
#export PYSPARK_PYTHON=python3