Skip to content

Instantly share code, notes, and snippets.

View jque's full-sized avatar
🏠
Working from home

Jorge Queiruga jque

🏠
Working from home
View GitHub Profile
@mrtnzagustin
mrtnzagustin / spanish-joi-messages.json
Created April 21, 2020 16:41
Spanish messages to be used with @hapi/joi schema validation
{
"any.unknown": "no esta permitido",
"any.invalid": "contiene un valor invalido",
"any.empty": "no está permitido que sea vacío",
"any.required": "es requerido",
"any.allowOnly": "debería ser uno de las siguientes variantes: {{valids}}",
"any.default": "emitió un error cuando se ejecutó el metodo default",
"alternatives.base": "no coincide con ninguna de las alternativas permitidas",
"array.base": "debe ser un array",
"array.includes": "en la posición {{pos}} no coincide con ninguno de los tipos permitidos",
@milanaryal
milanaryal / schema-org-structured-data-markup-using-microdata.html
Last active May 6, 2025 19:06
An example of how to mark up a HTML5 webpage using the schema.org schemas and microdata.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<title>Site Title</title>
<link rel="stylesheet" href="/assets/css/style.min.css">
@MohamedAlaa
MohamedAlaa / ImageMagick-snippets.md
Last active December 25, 2024 13:50
ImageMagick Snippets

Remove white background color of an image in ImageMagick

$ convert  your.jpg  -transparent white  your.png

Flatten a transparent image with a white background:

@wbroek
wbroek / genymotionwithplay.txt
Last active November 12, 2025 12:38
Genymotion with Google Play Services for ARM
NOTE: Easier way is the X86 way, described on https://www.genymotion.com/help/desktop/faq/#google-play-services
Download the following ZIPs:
ARM Translation Installer v1.1 (http://www.mirrorcreator.com/files/0ZIO8PME/Genymotion-ARM-Translation_v1.1.zip_links)
Download the correct GApps for your Android version:
Google Apps for Android 6.0 (https://www.androidfilehost.com/?fid=24052804347835438 - benzo-gapps-M-20151011-signed-chroma-r3.zip)
Google Apps for Android 5.1 (https://www.androidfilehost.com/?fid=96042739161891406 - gapps-L-4-21-15.zip)
Google Apps for Android 5.0 (https://www.androidfilehost.com/?fid=95784891001614559 - gapps-lp-20141109-signed.zip)
@jtescher
jtescher / gist:1487555
Created December 16, 2011 19:31
Capistrano task: Optimize images with pngcrush and jpegoptim
namespace :image_compression do
desc 'Optimize images with pngcrush and jpegoptim'
task :process do
# Check for pngcrush
if (!`which pngcrush`.empty? rescue false) # rescue on environments without `which` (windows)
# Crush all .png files
run "find #{shared_path}/assets/ -type f -name '*.png' -print0 | xargs -0 pngcrush -q -e .crushed"
@mattsears
mattsears / README.md
Created September 5, 2011 07:41
Gittr: A Git key/value store

Gittr.rb

Git as a key-value store! Build with Grit, it supports SET, GET, KEYS, and DELETE operations. In addition, we can also get the change history of key/values.

And since it's Git, we can easily enhance it to include other awesome Git features such as branches, diffs, reverting, and more!

Example:

@jamis
jamis / weave.rb
Created March 4, 2011 05:23
A "weave" maze implementation, using the Growing Tree maze algorithm.
# --------------------------------------------------------------------
# An implementation of a "weave" maze (with over/under passages),
# using the Growing Tree maze generation algorithm.
# --------------------------------------------------------------------
# --------------------------------------------------------------------
# Helper data and methods
# --------------------------------------------------------------------
N, S, E, W, U = 0x01, 0x02, 0x04, 0x08, 0x10