Skip to content

Instantly share code, notes, and snippets.

@nakayuki805
nakayuki805 / mkdctw.js
Created November 5, 2014 13:25
magic kaito and detective conan tv tweet correcting script
/* magic kaito and detective conan live tweet correcting script */
/*jslint node: true */
'use strict';
var Twitter = require('twitter');
var fs = require('fs');
var util = require('util');
require('date-utils');
var today = new Date();
var todaystr = today.toFormat("YY-MMM-DD");
var restInterval = 7;
@nakayuki805
nakayuki805 / useragent.js
Last active September 16, 2020 02:17
User agent parser for node.js
/* global __dirname console exports process require */
// useragent parser for PC,tablet,smartphone,featurephone
/*
usage:
UAparser = require('./useragent');//require this file
result = UAparser('Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/31.0.1650.63 Chrome/31.0.1650.63 Safari/537.36');
console.log(result);
{ device: 'PC',
os: 'Linux',