Skip to content

Instantly share code, notes, and snippets.

View gomezhyuuga's full-sized avatar
🤖
Learning never stops :)

Fernando Gómez gomezhyuuga

🤖
Learning never stops :)
View GitHub Profile
@gomezhyuuga
gomezhyuuga / SequentialPI.java
Created April 20, 2018 10:06
A code for computing PI in Java 8. Sequential Algorithm.
/*--------------------------------------------------------------------
* Fecha: 24-Agosto-2015
* Autor: Fernando Gómez Herrera
*--------------------------------------------------------------------*/
package mx.itesm.cem.pmultinucleo;
public class SequentialPI {
public static void main(String[] args) {
long NUM_RECTS = 2_000_000_000;
@gomezhyuuga
gomezhyuuga / botlist.txt
Created September 21, 2017 16:46
Bot List
'adsbot-google',
'ahrefsbot',
'altavista',
'ask jeeves',
'avsearch',
'baidubot',
'baiduspider',
'bingbot',
'bot-',
'bot/',
@gomezhyuuga
gomezhyuuga / full_audit.pw3af
Created August 23, 2017 17:52
Full audit profile for W3AF
[profile]
description = This profile performs a full audit of the target website, using only the web_spider plugin for crawling.
name = full_audit
[output.console]
verbose = False
use_colors = True
[audit.file_upload]
extensions = gif,html
@gomezhyuuga
gomezhyuuga / histogram.txt
Created October 10, 2016 15:21
Sample histogram
95.3394; 97.0567; 97.2595; 97.3967; 97.4883; 97.5651; 97.6248; 97.679; 97.7286; 97.7722; 97.8092; 97.8456; 97.878; 97.9078; 97.9344; 97.9613; 97.9852; 98.01; 98.032; 98.0541; 98.0756; 98.0962; 98.1156; 98.1336; 98.1518; 98.1686; 98.1855; 98.2015; 98.217; 98.2318; 98.2459; 98.2597; 98.2734; 98.2871; 98.2999; 98.3128; 98.3246; 98.337; 98.3489; 98.36; 98.3707; 98.3821; 98.3932; 98.4038; 98.4141; 98.4247; 98.4348; 98.4447; 98.4541; 98.4639; 98.4735; 98.4824; 98.4915; 98.5003; 98.5092; 98.518; 98.5267; 98.5359; 98.5443; 98.5524; 98.5607; 98.5688; 98.5768; 98.5846; 98.5923; 98.6003; 98.6081; 98.6155; 98.623; 98.6303; 98.6377; 98.645; 98.652; 98.6589; 98.6657; 98.6719; 98.6786; 98.6851; 98.6921; 98.6989; 98.7054; 98.7116; 98.7181; 98.7246; 98.7308; 98.7371; 98.7433; 98.7497; 98.7557; 98.7615; 98.7673; 98.773; 98.7789; 98.785; 98.7906; 98.7963; 98.8021; 98.8077; 98.8133; 98.8187; 98.824; 98.8294; 98.8349; 98.84; 98.8456; 98.8508; 98.8561; 98.8611; 98.866; 98.8709; 98.876; 98.8812; 98.8862; 98.891; 98.8961; 98.9007; 9
@gomezhyuuga
gomezhyuuga / adasd.java
Created August 18, 2015 21:30
Codigo encuentra palabra
String cadena = "el hombre soltó al perro, pero el perro escapó"
s = "el hombre soltó al perro"
b = "holagabo"
c = "casa"
0123
c.length => 4
b.substring(c.length);
@gomezhyuuga
gomezhyuuga / find_output
Created August 18, 2015 19:15
Using find to get files with large size
~ ❯ find $HOME -type f -size +100M -ls ⏎
8499958 1627136 -rw------- 1 gomezhyuuga staff 833093632 7 jul 20:30 /Users/gomezhyuuga/.docker/machine/machines/dev/disk.vmdk
1684221 745376 -rw------- 1 gomezhyuuga staff 381631488 26 mar 10:46 /Users/gomezhyuuga/.vagrant.d/boxes/ubuntu-VAGRANTSLASH-trusty64/14.04/virtualbox/box-disk1.vmdk
1684056 626280 -rw------- 1 gomezhyuuga staff 320654336 26 mar 10:38 /Users/gomezhyuuga/.vagrant.d/boxes/vagrantup_ubuntu_precise_64/0/virtualbox/box-disk1.vmdk
2967550 3138944 -rw------- 1 gomezhyuuga staff 1607139328 13 may 04:12 /Users/gomezhyuuga/.vboxes/ubuntu_default_1429628190602_10544/box-disk1.vmdk
3728730 1813816 -rw-r--r-- 1 gomezhyuuga staff 928670754 27 abr 01:39 /Users/gome
@gomezhyuuga
gomezhyuuga / gist:eb13f417db2613bbbc54
Created June 19, 2015 04:05
Sublime Text Packages
{
"in_process_packages":
[
],
"installed_packages":
[
"ApplySyntax",
"Better CoffeeScript",
"C++ Starting Kit",
"Color Scheme - Frontend Delight",
@gomezhyuuga
gomezhyuuga / Preferences.sublime-settings
Created June 19, 2015 04:01
Sublime Text Preferences
{
"Seti_ClosedFolder_dots": true,
"Seti_ClosedFolder_remove": false,
"Seti_ClosedFolder_same": false,
"Seti_SB_bright": true,
"Seti_SB_med": true,
"Seti_in_4_a_treat": false,
"Seti_no_bar_undertabs": false,
"Seti_pad_3": true,
"Seti_pad_5": true,
private int sumaMultiplosUtil(NodeABB<T> ptr, int total, int dato) {
if (ptr.der != null && ptr.izq != null) {
Integer dato1 = Integer.parseInt(ptr.der.nodeValue.toString());
Integer dato2 = Integer.parseInt(ptr.izq.nodeValue.toString());
int dif = dato1 - dato2;
if (dif > dato) {
total++;
public static ArrayList<Integer> cuentaCuantos(List<Integer> lista) {
Iterator<Integer> it = lista.iterator();
int max = 0;
// Obtener máximo
while (it.hasNext()) {
int num = it.next();
if (num > max) {
max = num;
}