Skip to content

Instantly share code, notes, and snippets.

View nulltask's full-sized avatar

Seiya KONNO nulltask

View GitHub Profile
ffmpeg -i input.m4v -s 1024x512 -f mp4 -vcodec libx264 -preset ultrafast -an -movflags faststart output.m4v
ffmpeg -i full.m4v -vcodec copy -map 0 -bsf h264_mp4toannexb -f segment -segment_format mpegts -segment_time 10 -segment_list index.m3u8 fragment_%03d.ts
shell@SGP611:/ $ ls -laF /system/fonts/
-rw-r--r-- root root 419124 2015-09-17 22:00 .SST-Condensed.ttf
-rw-r--r-- root root 397184 2015-09-17 22:00 .SST-CondensedBd.ttf
-rw-r--r-- root root 520600 2015-09-17 22:00 .SST-Heavy.ttf
-rw-r--r-- root root 389188 2015-09-17 22:00 .SST-HeavyItalic.ttf
-rw-r--r-- root root 545100 2015-09-17 22:00 .SST-Light.ttf
-rw-r--r-- root root 453948 2015-09-17 22:00 .SST-LightItalic.ttf
-rw-r--r-- root root 499956 2015-09-17 22:00 .SST-Medium.ttf
-rw-r--r-- root root 376096 2015-09-17 22:00 .SST-MediumItalic.ttf
-rw-r--r-- root root 418308 2015-09-17 22:00 .SST-UltraLight.ttf
@nulltask
nulltask / fonts.xml
Last active September 28, 2021 11:25
<font weight="100" style="normal">.SST-UltraLight.ttf</font>
<font weight="100" style="italic">.SST-UltraLightItalic.ttf</font>
<font weight="300" style="normal">.SST-Light.ttf</font>
<font weight="300" style="italic">.SST-LightItalic.ttf</font>
<font weight="400" style="normal">.SSTVietnamese-Roman.ttf</font>
<font weight="700" style="normal">.SSTVietnamese-Bold.ttf</font>
<font weight="500" style="normal">.SST-Medium.ttf</font>
<font weight="500" style="italic">.SST-MediumItalic.ttf</font>
<font weight="900" style="normal">.SST-Heavy.ttf</font>
<font weight="900" style="italic">.SST-HeavyItalic.ttf</font>
const SunCalc = require('suncalc');
const moment = require('moment-timezone');
const dates = ['2016-03-20', '2016-06-21', '2016-09-22', '2016-12-21'];
dates.forEach((target) => {
console.log('==========')
for (let h = 0; h < 24; h++) {
for (let m = 0; m < 60; m++) {
const SunCalc = require('suncalc');
const moment = require('moment-timezone');
for (let h = 0; h < 24; h++) {
for (let m = 0; m < 60; m++) {
const date = new Date(`2017-01-18 ${h}:${m}:00`);
console.log(moment(date).tz('Asia/Tokyo').format(), SunCalc.getPosition(date, 34.649394, 135.001478).altitude);
}
}
const Koa = require('koa');
const Router = require('koa-router');
const app = new Koa();
const router = new Router();
app.use(async (ctx, next) => {
const { request, response } = ctx;
const now = Date.now();
1c1
< /*!
---
> /*
952c952
<
---
>
957c957
<
@nulltask
nulltask / app.js
Last active February 25, 2016 17:30
Draggable landmark editor for Google Maps
var canvas = document.getElementById('map');
var center = new google.maps.LatLng(35.792621, 139.806513);
var options = {
zoom: 5,
center: center
};
var map = new google.maps.Map(canvas, options);
<style>
body { margin: 0; }
video { position: fixed; bottom: 10px; right: 10px }
</style>
<body>
<video src="media/daichi.mp4" autoplay controls loop width="320"></video>