Skip to content

Instantly share code, notes, and snippets.

@charlesmudy
charlesmudy / index.html
Last active August 29, 2015 14:16
HTML5 complete tags for web and mobile
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimal-ui" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="google-site-verification" content="" />
<meta name="msvalidate.01" content="" />
<meta name="y_key" content="" />
<meta name="alexaverifyid" content="" />
@belsrc
belsrc / gist:672b75d1f89a9a5c192c
Last active April 15, 2023 15:13
Simple Vue.js filters that I usually need
/**
* Changes value to past tense.
* Simple filter does not support irregular verbs such as eat-ate, fly-flew, etc.
* http://jsfiddle.net/bryan_k/0xczme2r/
*
* @param {String} value The value string.
*/
Vue.filter('past-tense', function(value) {
// Slightly follows http://www.oxforddictionaries.com/us/words/verb-tenses-adding-ed-and-ing
var vowels = ['a', 'e', 'i', 'o', 'u'];
@ricardozea
ricardozea / Smooth scroll to top of page.markdown
Last active May 12, 2024 12:12
Smooth scroll to top of page

Visit the new improved script here! Smooth scroll to top of page (Improved!)


Smooth scroll to top of page (Legacy!)

If you need a plain JavaScript function to add a smooth scrolling back to the top of the page, you can use this script.

  1. Add an id of "top" to the <body> tag. Like this: <body id="top">
  2. Add the onclick function to the link. Like this: <a href="#top" onclick="scrollToTop(); return false">Back to Top ↑</a>
@pablox-cl
pablox-cl / Xdefaults.jellybeans
Last active February 14, 2021 05:43
Jellybeans color palette for rxvt and xfce4-terminal
# Adjust Rxvt to suit your terminal emulator
# Created with
# ITERM_COLOR_MULTIPLIER=2.5 ./itermcolors2Xdefaults.rb Jellybeans.itermcolors
# https://github.com/richo/jellybeans.vim/blob/c7ff7e9555881a5671fcc8753b381ba142b5ea82/Xdefaults/jellybeans.Xdefaults
Rxvt*color0: #393939
Rxvt*color1: #ca674a
Rxvt*color2: #96a967
Rxvt*color3: #d3a94a
Rxvt*color4: #5778c1
Rxvt*color5: #9c35ac
@michaelBenin
michaelBenin / Grunt Convert Video FFMPEG
Created June 19, 2013 14:58
Grunt task to convert Video to HTML5 Formats.
/*
convertVideo_config: {
ffmpeg: 'bin/ffmpeg/./ffmpeg',
mp4: '-vcodec libx264',
m4v: '-vcodec libx264',
'3gp': '-acodec libvo_aacenc -vcodec libx264',
webm: '-acodec libvorbis -vcodec libvpx',
ogv: '-acodec libvorbis'
},
@wylieconlon
wylieconlon / currencies.json
Last active December 15, 2015 14:59
List of currency codes and countries that use them, from ISO 4217 http://en.wikipedia.org/wiki/ISO_4217
{
"AED": ["United Arab Emirates"],
"AFN": ["Afghanistan"],
"ALL": ["Albania"],
"AMD": ["Armenia"],
"ANG": ["Curaçao", "Sint Maarten"],
"AOA": ["Angola"],
"ARS": ["Argentina"],
"AUD": ["Australia", "Australian Antarctic Territory", "Christmas Island", "Cocos Islands", "Heard and McDonald Islands", "Kiribati", "Nauru", "Norfolk Island", "Tuvalu"],
"AWG": ["Aruba"],