This file contains hidden or 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
get '/' do | |
@subtitle = "サブタイトル" | |
erb :index | |
end |
This file contains hidden or 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
<svg | |
viewBox="0 0 100 99.999999" | |
height="100" | |
width="100" | |
y="0px" | |
x="0px"> | |
<path | |
id="line1" | |
d="m 16.65463,7.2500163 7,66.9999997" | |
style="fill:none;stroke:#668a33;stroke-width:9;stroke-miterlimit:10" /> |
This file contains hidden or 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
$("html").prop("contenteditable",false) |
This file contains hidden or 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
sudo add-apt-repository ppa:ubuntu-desktop/ubuntu-make | |
sudo apt-get update | |
sudo apt-get install ubuntu-make |
This file contains hidden or 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:(function(r){r.selectNode(document.getElementById("lyricBlock"));getSelection().addRange(r);document.execCommand("copy");getSelection().removeAllRanges()})(document.createRange()) |
This file contains hidden or 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
let time = $(el).css("transition-duration"); | |
if(/ms$/.test(time)){ // msかどうか | |
time = parseFloat(time); | |
} else { | |
time = parseFloat(time) * 1000; | |
} | |
setTimeout(()=>{ |
This file contains hidden or 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
isNaN("x") // -> true | |
Number.isNaN("x") // -> false |
This file contains hidden or 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 | |
for size in 16 48 128 | |
do | |
convert icons/source.png -resize ${size}x -unsharp 1.5x1+0.7+0.02 icons/${size}.png | |
done |
This file contains hidden or 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
for f in $(ls frames); do | |
echo "converting ${f}..." | |
convert ./source.png "./frames/${f}" -composite "${tempDir}/${f}" # ① | |
done | |
echo "building gif file..." | |
convert -layers optimize -delay 10 "${tempDir}/*.png" $output # ② |
This file contains hidden or 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 encoder = new GIFEncoder(); | |
encoder.setRepeat(0); | |
encoder.setDelay(500); | |
encoder.start(); | |
// canvasに何か書く | |
// e,g. 文字 → context.fillText() 画像 → context.drawImage() など | |
encoder.addFrame(context.getImageData(0, 0, width, height).data); |
OlderNewer