Skip to content

Instantly share code, notes, and snippets.

View hyuki's full-sized avatar

Hiroshi Yuki / 結城浩 hyuki

View GitHub Profile
@hyuki
hyuki / gserr.txt
Last active January 4, 2023 01:35
Troubleshoot: GPL Ghostscript 9.16: Can't find initialization file gs_init.ps.
$ dvipdfmx test.dvi
GPL Ghostscript 9.16: Can't find initialization file gs_init.ps.
$ gs --version
GPL Ghostscript 9.16 (2015-03-30)
$ brew info gs
ghostscript: stable 9.25 (bottled), HEAD
$ brew link ghostscript
@hyuki
hyuki / README.md
Created November 29, 2018 11:46
mp3 + jpg -> mp4 with ffmpeg for Twitter
ffmpeg -loop 1 -i input.jpg -i input.mp3 -c:a aac -ab 112k -c:v libx264 -pix_fmt yuv420p -shortest -strict -2 output.mp4
@hyuki
hyuki / index.html
Created December 9, 2018 13:53
drawicon - drawing 8x8 identicon-like icon with SVGjs.
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="結城浩 / Hiroshi Yuki">
<meta name="keywords" content="結城浩,Hiroshi Yuki" >
<title>drawicon</title>
@hyuki
hyuki / ShowMobileTweet.js
Last active January 15, 2019 02:57
ShowMobileTweet.js - Bookmarklet to jump from twitter.com to mobile.twitter.com.
/*
* ShowMobileTweet.js
*
* When you see:
* https://twitter.com/hyuki/status/1079981317184315392
* Then jump to:
* https://mobile.twitter.com/hyuki/status/1079981317184315392
*/
function start() {
@hyuki
hyuki / dustlink.js
Last active February 1, 2020 17:30
dustlink.js - The longer you do not click, the darker the background-color will be.
@hyuki
hyuki / README.md
Last active January 17, 2019 15:53
update-shelf.rb - Extract first jpeg file from pdf files.

convert(ImageMagick) is required.

$ vi update-shelf     (Edit PDFDIR and SHELFDIR)
$ update-shelf
$ erb shelf.erb > index.html
$ open -a safari index.html
@hyuki
hyuki / scrapbox-diary.html
Created January 26, 2019 07:46
scrapbox-diary.html
<html>
<textarea id="SCRAPBOX-TEXT"></textarea>
<script src="https://code.jquery.com/jquery-3.2.1.min.js" integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4=" crossorigin="anonymous"></script>
<!-- Using https://thdoan.github.io/strftime/ -->
<script src="js/strftime.js"></script>
<script>
$(function() {
const project = 'https://scrapbox.io/YOURPROJECT/';
$("#SCRAPBOX-TEXT").keydown(function(e) {
@hyuki
hyuki / makeopenapp.rb
Created January 31, 2019 16:43 — forked from hyuki0000/makeopenapp.rb
URLをオープンするだけのアプリを作るスクリプト
#!/usr/bin/env ruby
# cf. http://bit.ly/2raKfLZ
# makeopenapp - URLをオープンするだけのスクリプトをMacのアプリケーションにする
if ARGV.length != 2
abort("Usage: makeopenapp URL Example.app")
end
url = ARGV[0]
appname = ARGV[1]
@hyuki
hyuki / makeapp.rb
Created January 31, 2019 16:55 — forked from hyuki0000/makeapp.rb
makeapp - スクリプトをMacのアプリケーションにする
#!/usr/bin/env ruby
# cf. http://bit.ly/2raKfLZ
# makeapp - スクリプトをMacのアプリケーションにする
if ARGV.length != 2
abort("Usage: makeapp foo.rb Foo.app")
end
scriptname = ARGV[0]
appname = ARGV[1]
@hyuki
hyuki / README.md
Last active February 8, 2019 02:32
Barebone Bootstrap4 - A Simple Bootstrap4 Template using erb.

What's this?

Barebone Bootstrap4 - A Simple Bootstrap4 Template using erb.

Requirements

  • Embedded Ruby (ERB).

How to use