Skip to content

Instantly share code, notes, and snippets.

mecab mecab

Block or report user

Report or block mecab

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@mecab
mecab / change-font-size.el
Created Aug 5, 2019
Emacs lisp interactive function to change font size in GUI easily.
View change-font-size.el
(defun change-font-size (size)
"Change font size (clearly `:height` in `face-attribute`) to given SIZE."
(interactive
(list
(read-number
(format "Input font size (current=%d): " (face-attribute 'default :height))
nil)))
(set-face-attribute 'default nil :height size)
View copy_firebase_auth.sh
#!/bin/bash
set -e
# PROJECT_FROM="firebase-project-from"
# PROJECT_TO="firebase-project-to"
function getParam() {
echo $(cat .hashParameter | grep ${1}: | sed 's/.*: \(.*\),/\1/')
}
View twitch-speakout-voiceroid.js
const API_KEY = 'ここにAPIキーを貼る';
const url = `https://api.apigw.smt.docomo.ne.jp/aiTalk/v1/textToSpeech?APIKEY=${API_KEY}`;
document.addEventListener('onEventReceived', async function(obj) {
if (obj.detail.command == 'PRIVMSG') {
play(obj.detail.body, 'maki');
}
});
async function play(text, who) {
View twitch-speakout.js
document.addEventListener('onEventReceived', function(obj) {
const synth = window.speechSynthesis;
if (obj.detail.command === 'PRIVMSG') {
var utter = new SpeechSynthesisUtterance(obj.detail.body);
utter.voice = synth.getVoices().filter(v => v.lang === 'ja-JP')[0];
utter.rate = 1;
utter.pitch = 1;
synth.speak(utter);
}
});
View proxy.js
#!/usr/bin/env node
// Needs `npm install yargs connect request superstatic firebase-tools` as prerequisites.
const stream = require('stream');
const yargs = require('yargs');
const connect = require('connect');
const request = require('request');
const superstatic = require('superstatic');
View keybase.md

Keybase proof

I hereby claim:

  • I am mecab on github.
  • I am mecab (https://keybase.io/mecab) on keybase.
  • I have a public key ASAdthX1dzIg-LfZ57mQTBw9Ej1x0jvebfuntkBt7qe6Xgo

To claim this, I am signing this object:

@mecab
mecab / stratum.patch
Created Mar 27, 2018
stratum-mining patch for wavi
View stratum.patch
diff --git a/externals/stratum b/externals/stratum
--- a/externals/stratum
+++ b/externals/stratum
@@ -1 +1 @@
-Subproject commit 8ba1b5fd8a802b981f31dace4cf920cfb4a3907c
+Subproject commit 8ba1b5fd8a802b981f31dace4cf920cfb4a3907c-dirty
diff --git a/lib/halfnode.py b/lib/halfnode.py
index 4ffc017..aca8cc8 100644
--- a/lib/halfnode.py
+++ b/lib/halfnode.py
View stratum.patch
diff --git a/externals/stratum b/externals/stratum
--- a/externals/stratum
+++ b/externals/stratum
@@ -1 +1 @@
-Subproject commit 8ba1b5fd8a802b981f31dace4cf920cfb4a3907c
+Subproject commit 8ba1b5fd8a802b981f31dace4cf920cfb4a3907c-dirty
diff --git a/lib/halfnode.py b/lib/halfnode.py
index 4ffc017..aca8cc8 100644
--- a/lib/halfnode.py
+++ b/lib/halfnode.py
@mecab
mecab / osc52e.el
Last active Jul 26, 2019 — forked from AlexCharlton/osc52e.el
Copy text from emacs into xterm, hterm, trough screen and tmux, with support for graphical displays and multi-byte characters
View osc52e.el
;;;; This script can be loaded during emacs initialization to automatically
;;;; send `kill-region' and `kill-ring-save' regions to your system clipboard.
;;;; The OSC 52 terminal escape sequence is used to transfer the selection from
;;;; emacs to the host terminal.
;;;; It is based off of the osc52.el copyright the Chromium OS authors, but
;;;; was modified to add support for tmux, graphical displays, and
;;;; multi-byte strings.
;;;; It works in hterm, xterm, and other terminal emulators which support the
@mecab
mecab / wpb.sh
Last active Jan 16, 2017 — forked from greymd/wpb.sh
copy & paste through Web
View wpb.sh
# Usage
## Example 1 (Text)
# $ echo foobar | wpbcopy
# $ wpbpaste
# foobar
## Example 2 (Binary)
# $ cat image.jpg| wpbcopy
# $ wpbpaste | file -
You can’t perform that action at this time.