Skip to content

Instantly share code, notes, and snippets.

View piyukore06's full-sized avatar
🍒
Focusing

Priyanka Kore piyukore06

🍒
Focusing
View GitHub Profile
@piyukore06
piyukore06 / scraping
Last active July 1, 2019 19:18
Scraping with Puppeteer
const puppeteer = require('puppeteer');
const fa = require('fs');
let scrape = (async () => {
const browser = await puppeteer.launch({ headless: false });
const page = await browser.newPage();
await page.goto('https://unicode.org/emoji/charts/full-emoji-list.html');
const result = await page.evaluate(() => {
let data = []
let getDimentions = (length, height) => ({length, height});
// It is same as
getDimentions = (length, height) => {
return {length: length, height: height};
};
// function arguments defaults: Old way
getDimentions = (length, height) => {
if (!length) {
const path = require('path');
const fs = require('fs');
const baseFile = readFileContent('./variables-1.scss');
const customFile = readFileContent('./variables-2.scss');
// warning colored
console.log('\x1b[33m', '=====The following variables have same values in both files====');
Object.keys(customFile).forEach(key => {
if (key && (baseFile[key] == customFile[key])) {
alias rustc="~/.cargo/bin/rustc"
alias gl="git log --oneline --decorate --graph"
alias amend="git commit --amend"
alias pulldev="git checkout develop && git pull && git checkout -"
alias nom="npm"
alias got="git"
alias clear-local="git fetch -p && for branch in `git branch —vv grep ‘: gone]’ | awk ‘{print $1}’`; do git branch -D $branch; done"
alias oops="git reset --hard"
alias please="$(fc -ln -1)" # !!sudo
alias back="git checkout -"