Skip to content

Instantly share code, notes, and snippets.

Shu Miyao BeFiveINFO

Block or report user

Report or block BeFiveINFO

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
BeFiveINFO / appendChild-test.js
Created Nov 16, 2019
JSDOM appendChild sample
View appendChild-test.js
const $Fs = require('fs');
const { JSDOM } = require('jsdom'); // uninstall when done
const htmlText = `
<div id="target">
const _htmlTextDom = new JSDOM(htmlText);
BeFiveINFO / getDocs.js
Last active Nov 16, 2019
Transpose Json data (example)
View getDocs.js
'use strict';
const $Fs = require('fs');
const $Path = require('path');
const $Glob = require('glob');
const { JSDOM } = require('jsdom'); // uninstall when done
const $Beautify = require('js-beautify');
BeFiveINFO / argv.json
Last active Oct 30, 2019
VS Code gpu flickering problem workaround - place this file under ~/.vscode/ (see
View argv.json
"disable-color-correct-rendering": true,
"disable-hardware-acceleration": true
BeFiveINFO / components-Adsense.vue
Last active Sep 14, 2019
Adsense for Gridsome
View components-Adsense.vue
<ins class="adsbygoogle"
export default {
BeFiveINFO /
Created Jan 4, 2019
[Python3] Batch Download Files by URLs Listed in a Text File
#-*- coding:utf-8 -*-
import re
import requests
import os
# Function to parse url in a file one by one into a list
def loadTextFile(filePath):
lines = [line.rstrip('\n') for line in open(filePath)]
return lines
BeFiveINFO / list.js
Created Oct 25, 2018
[Node.JS] Open a JSON file and list each one of values of a key
View list.js
// require
var fs = require("fs");
var sourceData = fs.readFileSync("ttl.json","utf8");
sourceData = JSON.parse(sourceData);
for(const categoryName in sourceData){
BeFiveINFO /
Created Oct 12, 2018 — forked from joeshub/
Sync your Sublime Text 3 Settings using iCloud Drive on multiple Macs
# Notes
# Using iCloud Drive, you can sync your Sublime Text 3
# plugins and prefs so you can always have the same setup
# Prerequisites
# Make sure both machines have the latest version of OSX 10.10.x with
# Yosemite or higher and iCloud Drive turned on
BeFiveINFO / gist:258b62f4eadc0e9eee26ed77b881fdfb
Created Oct 3, 2018
Scrape page url and title of a tags by using jQuery
View gist:258b62f4eadc0e9eee26ed77b881fdfb
var a = jQuery(' .mega-sub-menu.row');
var aa = [];
var b = $(e).text();
var c = $(e).attr('href');
BeFiveINFO / gist:c27f64e92babcc46b5ba24d67abc7e48
Created Oct 2, 2018
[WordPress] Get all the page url in WP multisite
View gist:c27f64e92babcc46b5ba24d67abc7e48
// throw the following into functions.php of a theme etc.
$site_ids = array(1,2,3); // site ids
foreach($site_ids as $bid){
switch_to_blog( $bid );
$pages = get_pages(array('post_type' => 'page'));
$current_site_home = get_site_url().'/';
BeFiveINFO /
Created Feb 8, 2018
Bulk validate for Nu Html Checker
# Requirements:
# - Nu Html Checker Validation server, preferably the one running on your own.
# - curl
# Usage:
# bulk_validation -l http://validation.server.address urllist.txt resultsouput.json
# -l option is to specify a validation server http address.
# The urllist.txt has a list of url with one url each line.
You can’t perform that action at this time.