This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git filter-branch --env-filter ' | |
WRONG_EMAIL="[email protected]" | |
NEW_NAME="New Name" | |
NEW_EMAIL="[email protected]" | |
if [ "$GIT_COMMITTER_EMAIL" = "$WRONG_EMAIL" ] | |
then | |
export GIT_COMMITTER_NAME="$NEW_NAME" | |
export GIT_COMMITTER_EMAIL="$NEW_EMAIL" | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"BD": { | |
"countryName": "Bangladesh", | |
"currency": "BDT", | |
"symbol": "Tk" | |
}, | |
"BE": { | |
"countryName": "Belgium", | |
"currency": "EUR", | |
"symbol": "€" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const puppeteer = require("puppeteer"); | |
async function request(url, cookie, headers = {}, cb) { | |
try { | |
const browser = await puppeteer.launch({ args: ["--start-fullscreen"] }); | |
const page = await browser.newPage(); | |
if (cookie) { | |
await page.setCookie(cookie); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component } from 'react'; | |
import PropTypes from 'prop-types'; | |
const throttle = (delay, noTrailing, callback, debounceMode) => { | |
let timeoutID; | |
let cancelled = false; | |
let lastExec = 0; | |
function clearExistingTimeout() { | |
if (timeoutID) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from __future__ import division | |
from PIL import Image, ImageOps | |
import os, sys | |
import uuid | |
import requests | |
from io import BytesIO | |
#======================== | |
HEIGHT = 675 | |
WIDTH = 540 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from __future__ import division | |
from PIL import Image, ImageOps | |
import os, sys | |
HEIGHT = 675 | |
WIDTH = 540 | |
QUALITY = 60 | |
OUTPUT_TYPE = "jpeg" | |
def getSize(i): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fs = require("fs"); | |
const imagemin = require("imagemin"); | |
const mozjpeg = require("imagemin-mozjpeg"); | |
const imageminWebp = require('imagemin-webp'); | |
const sharp = require("sharp"); | |
const isJpg = require("is-jpg"); | |
const NEED_FORMAT = "jpeg"; | |
const convertToFormat = async (input) => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add - | |
sudo sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list' | |
sudo apt-get update | |
# Install | |
sudo apt-get install google-chrome-stable | |
# Update | |
sudo apt-get --only-upgrade install google-chrome-stable |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ offset: 'GMT-11:00', label: 'Niue (GMT-11:00)', name: 'Pacific/Niue' }, | |
{ offset: 'GMT-11:00', label: 'Pago Pago (GMT-11:00)', name: 'Pacific/Pago_Pago' }, | |
{ offset: 'GMT-10:00', label: 'Hawaii Time (GMT-10:00)', name: 'Pacific/Honolulu' }, | |
{ offset: 'GMT-10:00', label: 'Rarotonga (GMT-10:00)', name: 'Pacific/Rarotonga' }, | |
{ offset: 'GMT-10:00', label: 'Tahiti (GMT-10:00)', name: 'Pacific/Tahiti' }, | |
{ offset: 'GMT-09:30', label: 'Marquesas (GMT-09:30)', name: 'Pacific/Marquesas' }, | |
{ offset: 'GMT-09:00', label: 'Alaska Time (GMT-09:00)', name: 'America/Anchorage' }, | |
{ offset: 'GMT-09:00', label: 'Gambier (GMT-09:00)', name: 'Pacific/Gambier' }, | |
{ offset: 'GMT-08:00', label: 'Pacific Time (GMT-08:00)', name: 'America/Los_Angeles' }, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ offset: 'GMT-11:00', label: 'Niue (GMT-11:00)', name: 'Pacific/Niue' }, | |
{ offset: 'GMT-11:00', label: 'Pago Pago (GMT-11:00)', name: 'Pacific/Pago_Pago' }, | |
{ offset: 'GMT-10:00', label: 'Hawaii Time (GMT-10:00)', name: 'Pacific/Honolulu' }, | |
{ offset: 'GMT-10:00', label: 'Rarotonga (GMT-10:00)', name: 'Pacific/Rarotonga' }, | |
{ offset: 'GMT-10:00', label: 'Tahiti (GMT-10:00)', name: 'Pacific/Tahiti' }, | |
{ offset: 'GMT-09:30', label: 'Marquesas (GMT-09:30)', name: 'Pacific/Marquesas' }, | |
{ offset: 'GMT-09:00', label: 'Alaska Time (GMT-09:00)', name: 'America/Anchorage' }, | |
{ offset: 'GMT-09:00', label: 'Gambier (GMT-09:00)', name: 'Pacific/Gambier' }, | |
{ offset: 'GMT-08:00', label: 'Pacific Time (GMT-08:00)', name: 'America/Los_Angeles' }, |