Skip to content

Instantly share code, notes, and snippets.

Avatar
🤏
sup!

Edmundo Santos edmundojr

🤏
sup!
View GitHub Profile
@edmundojr
edmundojr / titleCase.js
Created Aug 2, 2017
JS: Convert string to Title case with JavaScript
View titleCase.js
function titleCase(str) {
return str.toLowerCase().split(' ').map(function(word) {
return (word.charAt(0).toUpperCase() + word.slice(1));
}).join(' ');
}
@edmundojr
edmundojr / countries.html
Last active Jul 31, 2017
HTML: <select> element with the names and codes of all countries
View countries.html
<label>Country</label>
<select name="country" id="country">
<option value="">Select a country…</option>
<option value="US">United States</option>
<option value="CA">Canada</option>
<option value="AR">Argentina</option>
<option value="BE">Belgium</option>
<option value="AF">Afghanistan</option>
<option value="AL">Albania</option>
<option value="AD">Andorra</option>
@edmundojr
edmundojr / _timing-functions.scss
Created Jul 20, 2017
CSS cubic-bezier timing functions – courtesy of https://github.com/jaukia/easie
View _timing-functions.scss
// CSS cubic-bezier timing functions
// @type cubic-bezier
$ease-in-quad: cubic-bezier(0.550, 0.085, 0.680, 0.530);
$ease-in-cubic: cubic-bezier(0.550, 0.055, 0.675, 0.190);
$ease-in-quart: cubic-bezier(0.895, 0.030, 0.685, 0.220);
$ease-in-quint: cubic-bezier(0.755, 0.050, 0.855, 0.060);
$ease-in-sine: cubic-bezier(0.470, 0.000, 0.745, 0.715);
$ease-in-expo: cubic-bezier(0.950, 0.050, 0.795, 0.035);
$ease-in-circ: cubic-bezier(0.600, 0.040, 0.980, 0.335);
@edmundojr
edmundojr / image-performance-on-the-web.md
Last active Jul 20, 2017
Image performance on the web
View image-performance-on-the-web.md

Image performance on the web

Some notes on image performance. What we'll cover:

  • The cost of images (Both on the Network & Render side)
  • Image srcset – what it does and how it works
  • Linting responsive images

The cost of images

View whois.sh
whois gaa.ie
% Rights restricted by copyright; http://iedr.ie/index.php/mnudomregs/mnudnssearch/96
% Do not remove this notice
domain: gaa.ie
descr: Gaelic Athletic Association
descr: Unincorporated Association
descr: Unincorporated Association Name
admin-c: JD277-IEDR
@edmundojr
edmundojr / ffmpeg.sh
Created Mar 31, 2017
Optimise videos with ffmpeg
View ffmpeg.sh
ffmpeg -i huge-file.mp4 -vcodec libx264 -preset veryfast smaller-file.mp4
View add-class-based-on-scroll-position.js
function header_change() {
window.addEventListener('scroll', function(e){
var distanceY = window.pageYOffset || document.documentElement.scrollTop,
shrinkOn = 55,
//header = document.querySelector("header");
header = document.getElementsByClassName("actual_header");
if (distanceY > shrinkOn) {
classie.add(header,"smaller");
// convert to new color and add apacity
classie.add(header,"change_background")
View keybase.md

Keybase proof

I hereby claim:

  • I am edmundojr on github.
  • I am edmundo (https://keybase.io/edmundo) on keybase.
  • I have a public key ASCy7IB8sG9PIpb7hG5EiEjBdOlQf1QpBzb2A02tqtfAOgo

To claim this, I am signing this object: