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
{ | |
"favicon": { | |
"url": "/favicon_urbi.png" | |
}, | |
"page": { | |
"title": "Urbi Pro111", | |
"title[en]": "Urbi EN", | |
"title[arabic]": "Urbi AR" | |
}, | |
"logo": { |
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 https = require("https"); | |
const axios = require("axios"); | |
const fs = require("fs"); | |
const os = require("os"); | |
const cluster = require("cluster"); | |
const STEP = 20; | |
const saveFailedImg = url => { | |
failedImg.push(url); |
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 request = require("request"); | |
const https = require("https"); | |
const fs = require("fs"); | |
const os = require("os"); | |
const cluster = require("cluster"); | |
const jsdom = require("jsdom"); | |
const { JSDOM } = jsdom; | |
const regExpr = /(https:.*;compress=true)/g; |
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 jsdom = require("jsdom"); | |
const request = require("request"); | |
const { JSDOM } = jsdom; | |
var items = []; | |
var page = 1; | |
var pageSize = 20; | |
var level = 'jlpt-n5'; |
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 data = { | |
locations: { | |
atlantic_ocean: { | |
id: 'atlantic_ocean', | |
name: 'Atlantic Ocean', | |
isSea: true, | |
}, | |
biscay_bay: { | |
id: 'biscay_bay', | |
name: 'Biscay bay', |
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 swSupported = !!('serviceWorker' in navigator) | |
const sendMessage = (messageData) => { | |
if (!swSupported) { | |
return | |
} | |
navigator.serviceWorker.controller.postMessage(messageData) | |
} |
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 swSupported = !!('serviceWorker' in navigator) | |
const sendMessage = (messageData) => { | |
if (!swSupported) { | |
return | |
} | |
navigator.serviceWorker.controller.postMessage(messageData) | |
} |
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 branch -m old_branch new_branch # Rename branch locally | |
git push origin :old_branch # Delete the old branch | |
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote |
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
# 1.install gource using HomeBrew | |
$ brew install gource | |
# 2.install avconv | |
git clone git://git.libav.org/libav.git | |
cd libav | |
# it will take 3-5 minutes to complie, be patient. | |
./configure --disable-yasm | |
make && make install |
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
#Install Gource in Ubuntu | |
======================== | |
#Go to the folder.... and | |
#see http://tylerfrankenstein.com/code/install-gource-ubuntu-1010-visualize-git-repo | |
sudo apt-get update | |
sudo apt-get install libsdl2-dev libsdl2-image-dev libpcre3-dev libfreetype6-dev libglew-dev libglm-dev libboost-filesystem-dev libpng12-dev libsdl1.2-dev libsdl-image1.2-dev libtinyxml-dev | |
./configure | |
make | |
sudo make install |
NewerOlder