Skip to content

Instantly share code, notes, and snippets.

View nandomoreirame's full-sized avatar
🎧
Working from home

Fernando Moreira nandomoreirame

🎧
Working from home
View GitHub Profile
@AJLeonardi
AJLeonardi / btn_group.css
Created March 20, 2018 16:52
Simple Button Group for Materialize
.btn-group {
position: relative;
display: -ms-inline-flexbox;
display: inline-flex;
vertical-align: middle;
}
.btn-group>.btn:first-child:not(:last-child) {
border-top-right-radius: 0;
border-bottom-right-radius: 0;
@DiegoPinho
DiegoPinho / arrays.js
Last active September 28, 2017 15:46
var numeros = [1,2,3,4,5];
// forEach
numeros.forEach(function(numero){
console.log(numero);
});
// map
var dobro = numeros.map(function(numero){
return numero * 2
@tjmonsi
tjmonsi / index.html
Last active June 5, 2020 02:14
My Opinionated Landing Page example
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<!-- Viewport -->
<meta name="viewport" content="width=device-width, minimum-scale = 1.0, initial-scale = 1.0, maximum-scale = 5.0, user-scalable=yes, shrink-to-fit=no">
<title>Title of the Page</title>
@fdaciuk
fdaciuk / Remove unused git branches.md
Last active November 15, 2020 14:42
Remove unused git branches

Remove unused git branchs

Update 'main|dev' with branches you want to mantain. All others will be removed.

@lcdsantos
lcdsantos / wp-get_id_by_slug
Created February 1, 2017 13:57 — forked from davidpaulsson/wp-get_id_by_slug
WordPress: Get page ID from slug
// Usage:
// get_id_by_slug('any-page-slug');
function get_id_by_slug($page_slug) {
$page = get_page_by_path($page_slug);
if ($page) {
return $page->ID;
} else {
return null;
}
@miljan-aleksic
miljan-aleksic / calendar-matrix.js
Last active August 19, 2022 12:24
Calendar Matrix (date-fns, ES6) inspired by https://github.com/bclinkinbeard/calendar-matrix
import getYear from 'date-fns/get_year'
import getMonth from 'date-fns/get_month'
import addDays from 'date-fns/add_days'
import startOfWeek from 'date-fns/start_of_week'
const rows = range(6)
const cols = range(7)
/**
* Returns a two-dimensional array with calendar represented dates
@adrianoalmeida7
adrianoalmeida7 / template_amp.html
Last active December 22, 2022 14:31
HTML Básico para AMP
<!doctype html>
<html amp lang="pt-BR">
<head>
<meta charset="utf-8">
<script async src="https://cdn.ampproject.org/v0.js"></script>
<link rel="canonical" href="http://caminho_do_arquivo_original/arquivo.html">
<title>Página compatvel com AMP</title>
<link rel="canonical" href="http://example.ampproject.org/article-metadata.html" />
<meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1">
<style amp-boilerplate>body{-webkit-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-moz-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-ms-animation:-amp-start 8s steps(1,end) 0s 1 normal both;animation:-amp-start 8s steps(1,end) 0s 1 normal both}@-webkit-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-moz-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-ms-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-o-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@keyframes -amp-start{
@monkeymonk
monkeymonk / jquery.scrollToTop.js
Created April 8, 2016 08:26
ES6 jQuery plugin definition
import $ from 'jquery';
import plugin from './plugin';
class ScrollToTop {
constructor(element, options) {
const $element = $(element);
$(window).scroll(function () {
if ($(this).scrollTop() > options.offset) {
$element.fadeIn();
@claudiosanches
claudiosanches / install.sh
Last active September 3, 2021 15:48
Ubuntu - Install Strem.io
#!/usr/bin/env bash
sudo su
curl -SO# http://178.62.254.47/Stremio3.5.1.linux.tar.gz
mkdir -p /opt/stremio
tar -xvzf Stremio3.5.1.linux.tar.gz -C /opt/stremio
curl -SO# http://www.strem.io/3.0/stremio-white-small.png
mv stremio-white-small.png /opt/stremio/
curl -SO# https://gist.githubusercontent.com/claudiosmweb/797b502bc095dabee606/raw/52ad06b73d90a4ef389a384fbc815066c89798eb/stremio.desktop
mv stremio.desktop /usr/share/applications/
@PurpleBooth
PurpleBooth / README-Template.md
Last active May 17, 2024 09:42
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites