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
#!/bin/bash | |
SAVEIFS=$IFS | |
IFS=$(echo -en "\n\b") | |
src="/volume1/homes/1605259395" | |
dst="/volume1/books" | |
echo $src | |
function read_dir() { | |
for file in $(# | |
ls $1 |
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
idlePrefetch (originImageUrl) { | |
let fetched = false; | |
let myNonEssentialWork = deadline => { | |
const appendLinkTo = function (url) { | |
const linkTag = document.createElement('link') | |
linkTag.rel = 'prefetch' | |
linkTag.href = url | |
document.head.appendChild(linkTag) | |
} | |
if (deadline.timeRemaining() > 0) { |
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
document.querySelectorAll('[id*=block]') | |
Array.apply(null, document.querySelectorAll('[id]')).map(item => item.getAttribute('id')).filter(item => item.includes('block')) |
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
document.querySelectorAll('b').forEach(element=>{ | |
// element.parentNode.replaceChild(document.createTextNode(element.innerText), element) | |
console.log(element) | |
if (element.parentNode && element.parentNode.innerText) { | |
element.parentNode.innerHTML = element.parentNode.innerText | |
} | |
} | |
) |
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
{ | |
"name": "New Project", | |
"lastSyncedAt": "2019-03-28T07:51:57.386Z", | |
"markers": [], | |
"tracks": [], | |
"version": 13, | |
"shouldCloudSync": false, | |
"updatedAt": "2019-03-28T07:55:23.935Z", | |
"schemaVersion": 8, | |
"aspectRatio": "16:9", |
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
{ | |
"local": [ | |
{ | |
"asset_path": null, | |
"name": null, | |
"asset_size": 19932335, | |
"tags": [], | |
"created_at": "2019-03-28T07:55:27.049620", | |
"updated_at": "2019-03-28T07:55:27.049628", | |
"s3_bucket_name": null, |
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
{ | |
"id": "8f1a9f7f-64b6-4c43-9bd5-948101d055fc", | |
"name": "New Project", | |
"aspectRatio": "16:9", | |
"markers": [], | |
"version": 10, | |
"schemaVersion": 8, | |
"shouldCloudSync": false, | |
"createdAt": "2019-03-12T03:59:16.662Z", | |
"updatedAt": "2019-03-28T07:41:16.659Z", |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>Document</title> | |
</head> |
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
var fs = require('fs'); | |
var path = require('path'); | |
var OpenCC = require('opencc'); | |
// Load the default Simplified to Traditional config | |
var opencc = new OpenCC('t2s.json'); | |
// Sync API | |
var converted = opencc.convertSync("漢字"); | |
console.log(converted); |
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
#!/bin/sh | |
# bash tut: http://linuxconfig.org/bash-scripting-tutorial | |
# Linux PDF,OCR: http://blog.konradvoelkel.de/2013/03/scan-to-pdfa/ | |
y="$(pwd)/$1" | |
echo Will create a searchable PDF for $y | |
x="$(basename "$y")" | |
name=${x%.*} |