Skip to content

Instantly share code, notes, and snippets.

Josue Zarzosa josketres

Block or report user

Report or block josketres

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile

Keybase proof

I hereby claim:

  • I am josketres on github.
  • I am josketres ( on keybase.
  • I have a public key whose fingerprint is 5A1E 25E3 0E8E 0D1A 2ABE 23B8 C19D D50E 869B 4D63

To claim this, I am signing this object:

View gist:26e1d26d3bcf22dd4dca
Comparator<Person> compareByName = Comparator.comparing(Person p -> p.getName());
try (Stream<String> lines = Files.lines(Paths.get("text.txt"))) {
long count = lines
.filter(c -> !Character.isSpaceChar(c))
System.out.printf("Count: %d", count);
} catch (Exception e) {
josketres / gist:605f9c1146516c183d8c
Last active Aug 29, 2015
View gist:605f9c1146516c183d8c
cd %USERPROFILE%\vimfiles
wget --no-check-certificate
josketres /
Last active Aug 29, 2015
Serve files in the current directory using 'mongoosehere' command
# Install mongoose binary in your ~/bin and add 'mongoosehere' alias
# ------------------------------------------------------------------
# mongoosehere - Start an http server in your current directory
# assuming that ~/bin is added to your $PATH (in your .bashrc)
cd ~/bin
wget -O mongoose
chmod +x mongoose
View Combinations.html
<h1 id="title">Combinations</h1>
<input type="text" id="numbers" value="1,2,3,4,5" />
<input type="text" id="stars" value="1,2,3" />
<input type="submit" id="byBtn" value="Change" onclick="change()" />
<div id="info"></div>
<div id="combinations"></div>
josketres /
Last active Aug 29, 2015
toggle your monitors setup between 'extended' and 'mirror' (ideal for pair programming)
# toggle your monitors setup between 'extended' and 'mirror'
# ideal for pair programming sessions
number_of_monitors=`xrandr | grep " connected" | cut -d " " -f 1 | wc -l`
if [ "$number_of_monitors" != "2" ]
echo "You should have 2 monitors connected to use this script"
exit 1
josketres / java-type-filters-list.txt
Last active Aug 29, 2015
My Java Type Filters for eclipse
View java-type-filters-list.txt
Window -> Preferences -> Java -> Appearance -> Type Filters
josketres / ejemplo-reporte-de-errores-con-stacktrace.js
Created Feb 23, 2014
Ejemplo de reporte de errores utilizando stacktrace.js
View ejemplo-reporte-de-errores-con-stacktrace.js
function buyItem(itemId) {
if(!isValidItemId(itemId)) {
var errorReport = printStackTrace().join('\n');
try {
josketres / ejemplo-envio-reporte-de-error.js
Last active Aug 29, 2015
Envio de un reporte de error mediante una petcion HTTP POST de manera "cross-browser" y sin depender de librerías externas.
View ejemplo-envio-reporte-de-error.js
var sendErrorReport = function(error) {
var xhr = createXMLHTTPObject();'POST', endpointUrl, true);
var createXMLHTTPObject = function() {
var xmlhttp, XMLHttpFactories = [
function() {
return new XMLHttpRequest();
josketres / ejemplo-captura-de-errores-globales.js
Last active Aug 29, 2015
Captura global de errores en javascript (ejemplo)
View ejemplo-captura-de-errores-globales.js
(function() {
var errorCount = 0;
window.onerror = function(error, location, line) {
if (errorCount < 5) {
sendErrorReport(error + ' [' + location + ':' + line + ']');
return false;
You can’t perform that action at this time.