Skip to content

Instantly share code, notes, and snippets.

View janogarcia's full-sized avatar

Jano Garcia janogarcia

View GitHub Profile
@janogarcia
janogarcia / irradiation_illusion.md
Last active April 3, 2024 17:46
uxdesign.cc · Why white looks bigger than black — The irradiation illusion

Markdown backup of ‟Why white looks bigger than black — The irradiation illusion” article by Gonçalo Dias, originally published in UX Collective.


Why white looks bigger than black — The irradiation illusion

The unknown optical illusion every designer should know

@janogarcia
janogarcia / email_coding_guidelines.md
Last active March 13, 2024 12:13
Email Coding Guidelines
@janogarcia
janogarcia / index.html
Created February 27, 2024 20:24 — forked from lostintangent/index.html
ZzFX Sound Board - Zuper Zmall Zeeded Zound Zynth
<body bgcolor=#223><center>
<div style=font-size:45px><b>ℤ𝕫𝔽𝕏 - Zuper Zmall Zound Zynth</b></div>
<div style=font-size:20px><i>A tiny tool for creating and playing sound effects with JavaScript</i></div>
<div style=max-width:799px>
<div style=font-size:20px>
<input id=volume type=range min=0 max=1 step=.01 oninput='zzfxV=volume.value;volumeText.innerHTML=volume.value*100|0'></input>
Volume <span id=volumeText>30</span> %
</div>
<button onClick=zzfx(...[,,1675,,.06,.24,1,1.82,,,837,.06])>💰</button>
<button onClick=zzfx(...[,,925,.04,.3,.6,1,.3,,6.27,-184,.09,.17])>🥊</button>
@janogarcia
janogarcia / php_logical_operators.php
Created December 12, 2012 15:32
PHP Logical operators: The difference between OR vs ||, AND vs && explained. Key concepts: Logical operators precendence. Logical operators short-circuit evalutation.
<?php
// PHP Logical operators: The difference between OR vs ||, AND vs &&
// Key concept #1: "||" and "&&" have greater precedence than "=", "OR", "AND"
// http://php.net/manual/en/language.operators.precedence.php
// Key concept #2: PHP logical operators are short-circuit
// http://en.wikipedia.org/wiki/Short-circuit_evaluation
// http://php.net/manual/en/language.operators.logical.php
@janogarcia
janogarcia / css_coding_guidelines.md
Last active February 13, 2022 03:13
CSS Coding Guidelines
@janogarcia
janogarcia / php_valid_twitter_hashtag_regex.php
Created October 24, 2012 15:01
PHP Twitter Hashtag Validation Regex
<?php
/**
* PHP Regex to validate a Twitter hashtag
*
* Useful for validating a text input (an HTML form in your CMS or custom application) that must be a valid Twitter hashtag.
* Valid examples: #a, #_, #_1, #_a, #1a, #áéìôü, #123hàsh_täg446
* Invalid examples: #1, ##hashtag, #hash-tag, #hash.tag, #hash tag, #hashtag!, (any hashtag that is more than 140 characters long, hash symbol included)
*
* Regex explanation:
* First, the lookahead assertion (?=.{2,140}$) checks the minimum and max length, as explained here http://stackoverflow.com/a/4223213/1441613

Reverse Manifesto

A list of company-related stuff—mission, core values, and culture—that I research before considering applying to a job.

Sure, it’s nearly impossible to find a company that will satisfy every single point, but it helps me at least in finding better matches against my personal preferences and values.

The list doesn’t follow any specific order.

  • Smart and inspiring leaders (CEO, founders), over megalomaniacs and tyrants
  • Driven by a good and meaningful mission/cause, over greed (betting/casinos, scammy cryptos...)
@janogarcia
janogarcia / mailtoui_modal.pug
Created August 23, 2020 11:45
MailtoUI — Custom modal template
include ../mixins/util
#mailtoui-modal.mailtoui-modal(style="display: none;" aria-hidden="true")
.mailtoui-modal-content
.mailtoui-modal-head
#mailtoui-modal-title.mailtoui-modal-title Send email to…
a#mailtoui-modal-close.mailtoui-modal-close(title="Close" aria-label="Close" href="#")
+svg('delete')
.mailtoui-modal-body
#mailtoui-copy.mailtoui-copy
@janogarcia
janogarcia / gearman_admin.md
Created November 26, 2012 09:05
Gearman Server Administration (telnet, PHP)

Telnet

The Gearman job server supports a text-based protocol to pull information and run some administrative tasks. The following commands are supported:

  • workers
  • status
  • maxqueue
  • shutdown
  • version