Skip to content

Instantly share code, notes, and snippets.

View emersxw's full-sized avatar
😎
oh, hey!

Emerson Lopes emersxw

😎
oh, hey!
View GitHub Profile
@jiglesiasabio
jiglesiasabio / select-lang-codes
Created December 1, 2011 18:36
Select options for all languages HTML·FORM
http://www.loc.gov/standards/iso639-2/ISO-639-2_utf-8.txt
ISO-639-2 Standard three letter codes for langs
<option value="aar"> Afar </option>
<option value="abk"> Abkhazian </option>
<option value="ace"> Achinese </option>
<option value="ach"> Acoli </option>
<option value="ada"> Adangme </option>
<option value="ady"> Adyghe Adygei </option>
@DavidWells
DavidWells / reset.css
Last active November 13, 2024 09:16 — forked from karbassi/reset.css
CSS reset. Follow me on the twitters for more tips: https://twitter.com/davidwells
/* http://meyerweb.com/eric/tools/css/reset/
v2.0-modified | 20110126
License: none (public domain)
*/
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
@saqueib
saqueib / errorHandler.js
Last active June 9, 2022 06:42
Global error handling using axios interceptor for http calls http://www.qcode.in/api-error-handling-in-vue-with-axios
import axios from 'axios'
import toast from './toast'
function errorResponseHandler(error) {
// check for errorHandle config
if( error.config.hasOwnProperty('errorHandle') && error.config.errorHandle === false ) {
return Promise.reject(error);
}
// if has response show the error
@bradtraversy
bradtraversy / node_cheerio_scraping.js
Created August 6, 2018 02:55
Simple example to scrape some posts and put into a CSV file using Node & Cheerio
const request = require('request');
const cheerio = require('cheerio');
const fs = require('fs');
const writeStream = fs.createWriteStream('post.csv');
// Write Headers
writeStream.write(`Title,Link,Date \n`);
request('http://codedemos.com/sampleblog', (error, response, html) => {
if (!error && response.statusCode == 200) {