Skip to content

Instantly share code, notes, and snippets.

View manfromanotherland's full-sized avatar
🤏

Edmundo Santos manfromanotherland

🤏
View GitHub Profile
@manfromanotherland
manfromanotherland / documents.json
Last active June 30, 2023 17:02
views, documents, and tags
{
"documents": [
{
"id": "QM-1",
"name": "Quality Control",
"tags": ["HW", "SaMD"]
},
{
"id": "SOP-6",
"name": "Training",
@manfromanotherland
manfromanotherland / titleCase.js
Created August 2, 2017 14:20
JS: Convert string to Title case with JavaScript
function titleCase(str) {
return str.toLowerCase().split(' ').map(function(word) {
return (word.charAt(0).toUpperCase() + word.slice(1));
}).join(' ');
}
@manfromanotherland
manfromanotherland / countries.html
Last active July 31, 2017 10:55
HTML: <select> element with the names and codes of all countries
<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>
@manfromanotherland
manfromanotherland / _timing-functions.scss
Created July 20, 2017 22:32
CSS cubic-bezier timing functions – courtesy of https://github.com/jaukia/easie
// 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);
@manfromanotherland
manfromanotherland / image-performance-on-the-web.md
Last active July 20, 2017 22:33
Image performance on the web

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

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
@manfromanotherland
manfromanotherland / ffmpeg.sh
Created March 31, 2017 11:49
Optimise videos with ffmpeg
ffmpeg -i huge-file.mp4 -vcodec libx264 -preset veryfast smaller-file.mp4
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")