Skip to content

Instantly share code, notes, and snippets.

View vinicius-ianni's full-sized avatar

Vinicius Ianni vinicius-ianni

  • Jundiai - SP - Brasil
View GitHub Profile
@vinicius-ianni
vinicius-ianni / dom3d.js
Created April 9, 2024 12:25 — forked from OrionReed/dom3d.js
3D DOM viewer, copy-paste this into your console to visualise the DOM topographically.
// 3D Dom viewer, copy-paste this into your console to visualise the DOM as a stack of solid blocks.
// You can also minify and save it as a bookmarklet (https://www.freecodecamp.org/news/what-are-bookmarklets/)
(() => {
const SHOW_SIDES = false; // color sides of DOM nodes?
const COLOR_SURFACE = true; // color tops of DOM nodes?
const COLOR_RANDOM = false; // randomise color?
const COLOR_HUE = 190; // hue in HSL (https://hslpicker.com)
const MAX_ROTATION = 180; // set to 360 to rotate all the way round
const THICKNESS = 20; // thickness of layers
const DISTANCE = 10000; // ¯\\_(ツ)_/¯
openssl genrsa 2048 > private.pem
openssl req -x509 -new -key private.pem -out public.pem
openssl pkcs12 -export -in public.pem -inkey private.pem -out mycert.pfx
@vinicius-ianni
vinicius-ianni / gist:106ebb40473f0ecd870389c318a628dc
Created June 8, 2018 12:48 — forked from cschaba/gist:4740380
PHP: parse output of ifconfig (tested with Ubuntu Linux)
<?php
// from http://www.highonphp.com/regex-pattern-parsing-ifconfig
$data = <<<EOF
eth0 Link encap:Ethernet HWaddr 00:50:56:33:B6:D2
inet addr:192.168.12.103 Bcast:192.168.12.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1337 errors:0 dropped:0 overruns:0 frame:0
TX packets:985 errors:0 dropped:0 overruns:0 carrier:0
@vinicius-ianni
vinicius-ianni / formatXML.js
Created June 5, 2018 18:51 — forked from sente/formatXML.js
javascript to format/pretty-print XML
The MIT License (MIT)
Copyright (c) 2016 Stuart Powers
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@vinicius-ianni
vinicius-ianni / distributed-scraper.R
Created February 18, 2018 00:03
Distributed Web Scraping with R
### SETUP =====================================================================
# Install package if necessary
if (!require("WikipediR")) {
install.packages("WikipediR")
}
# Set seed for sampling
set.seed(1234)
@vinicius-ianni
vinicius-ianni / gist:64de4314dc46dee431c0e41d669e3338
Created May 5, 2016 12:54 — forked from ederwander/gist:1342497
Accessing the Google Speech API + Python
# Copyright (c) 2011, Eng Eder de Souza
# ___ _ _ ___
# | __|__| |___ _ _ __| |___ / __| ___ _ _ _____ _
# | _|/ _` / -_) '_| / _` / -_) \__ \/ _ \ || |_ / _` |
# |___\__,_\___|_| \__,_\___| |___/\___/\_,_/__\__,_|
#Accessing the Google API for speech recognition!
#Open a file type Wav to speech recognition
#This source does not require any external programs to perform audio conversions :-)
#http://ederwander.wordpress.com/2011/11/06/accessing-the-google-speech-api-python/
#Eng Eder de Souza