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
api.mapkey('<Meta-Shift-Enter>', 'Open textwell', function() { | |
const text = '“' + window.getSelection().toString() + '”\n' + window.top.document.title + ' - ' + window.top.location.href; | |
location.href = `textwell:///add?text=${encodeURIComponent(text)}` | |
}); |
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
javascript: (() => { | |
const dest_path = "notes"; //ファイルを格納するパス | |
const amazon_id = "namaraiicom-22"; // アフィリエイトID | |
let p = document.getElementById("productTitle") || document.getElementById("ebooksProductTitle"); //書籍のタイトルの処理 | |
const title = p.innerText.trim(); | |
const asinElement = document.getElementById('ASIN') || document.getElementsByName('ASIN.0')[0]; //ASIN番号の処理 | |
const a = asinElement.value; | |
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
javascript: (() => { | |
const dest_path = 'notes'; //ファイルを格納するパス | |
const amazon_id = 'namaraiicom-22'; // アフィリエイトID | |
let p = document.getElementById("productTitle"); //書籍のタイトルの処理 | |
p = p ? p : document.getElementById("ebooksProductTitle"); | |
const title = p.innerText.trim(); | |
let asin = document.getElementById('ASIN'); //ASIN番号の処理 |
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="ja"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>電卓</title> | |
<style> | |
body { | |
font-family: Arial, sans-serif; | |
} |
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
require 'rexml/document' | |
require 'date' | |
require 'csv' | |
# Kindle for Mac | |
KINDLE_XML = "#{ENV['HOME']}/Library/Containers/com.amazon.Kindle/Data/Library/Application Support/Kindle/Cache/KindleSyncMetadataCache.xml" | |
doc = REXML::Document.new(File.read(KINDLE_XML)) | |
csv = CSV.generate(force_quotes: true) do |csv| |
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 main = () => { | |
const textAreaElement = document.createElement("textarea"); | |
textAreaElement.textContent = getUrlInfo(); | |
const bodyElement = document.getElementsByTagName("body")[0]; | |
bodyElement.appendChild(textAreaElement); | |
textAreaElement.select(); | |
const isSuccessCopy = document.execCommand('copy'); |
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
function zp(n) { | |
return ( '0' + n ).slice(-2); | |
} | |
now = new Date(); | |
year = now.getFullYear(); | |
month = now.getMonth() + 1; | |
day = now.getDate(); | |
d = year + '/' + zp(month) + '/' + zp(day) |
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
T( 'urlScheme', { | |
url: 'bear://x-callback-url/create?title=' + encodeURIComponent( T.line(1) ) + '&text=' + encodeURIComponent( T.lines(2, 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
#!/usr/bin/env ruby | |
def usage | |
$stderr.puts "usage: wavmp3 file [file ...]" | |
exit 1 | |
end | |
usage if ARGV.size < 1 | |
ARGV.each do |f| |
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
{{ $originalImage := (.Page.Resources.ByType "image").GetMatch (printf "**%s**" (.Get "src")) }} | |
{{ $noExif := .Get "noExif" }} | |
{{ $resized := "" }} | |
{{ $orientation := $originalImage.Exif.Tags.Orientation }} | |
{{ if eq $orientation 6 }} | |
{{ $resized = $originalImage.Resize "x800 q92 r270" }} | |
{{ else if (eq $orientation 8) }} | |
{{ $resized = $originalImage.Resize "x800 q92 r90"}} | |
{{ else }} |
NewerOlder