Skip to content

Instantly share code, notes, and snippets.

tell application "iTunes"
activate
set newPreset to make new EQ preset
set name of newPreset to "Eargasm Explosion"
set band 1 of newPreset to 3
set band 2 of newPreset to 6
set band 3 of newPreset to 9
set band 4 of newPreset to 7
set band 5 of newPreset to 6
set band 6 of newPreset to 5
tell application "iTunes"
activate
set newPreset to make new EQ preset
set name of newPreset to "Perfect"
set band 1 of newPreset to 3
set band 2 of newPreset to 6
set band 3 of newPreset to 9
set band 4 of newPreset to 7
set band 5 of newPreset to 6
set band 6 of newPreset to 5
@laclefyoshi
laclefyoshi / test_featurefu_snippet.java
Last active September 6, 2015 11:50
FeatureFuを使ってみた
// https://github.com/laclefyoshi/test_featurefu/blob/master/src/test/java/org/saekiyoshiyasu/OperationTest.java
// assertEquals(expected, actual, delta)
assertEquals(evaluator("(== a b)", 1.2, 1.3), 0.0, 0); // false == 0.0
assertEquals(evaluator("(== a b)", 2.5, 2.5), 1.0, 0); // true == 1.0
assertEquals(evaluator("(!= a b)", 1.2, 1.3), 1.0, 0);
assertEquals(evaluator("(> a b)", 1.3, 1.3), 0.0, 0);
assertEquals(evaluator("(< a b)", 2.3, 2.5), 1.0, 0);
assertEquals(evaluator("(>= a b)", 1.3, 1.3), 1.0, 0);
assertEquals(evaluator("(<= a b)", 2.3, 2.5), 1.0, 0);
assertEquals(evaluator("(max a b)", 1.2, 1.3), 1.3, 0);
@laclefyoshi
laclefyoshi / langtool-popup.el
Created September 12, 2015 11:33
langtool.elをpopup.elに対応
(defun popup-current-langtool-error ()
(interactive)
(let ((msgs (langtool--current-error-messages)))
(if (null msgs)
(popup-tip "No errors")
(let ((msg (split-string (car msgs) "\n")))
(popup-tip (join "\n" (reverse (nthcdr 2 (reverse msg)))))))))
(global-set-key "\C-ce" 'popup-current-langtool-error)
@laclefyoshi
laclefyoshi / translator.hs
Created October 16, 2010 05:29
A Command-line Tool for Google Translate
-- A Command-line Tool for Google Translate
-- Copyright : (c) SAEKI Yoshiyasu
-- License : MIT-style license <http://www.opensource.org/licenses/mit-license.php>
-- last updated: 2010/10/16
import Network.URI
import Data.List
import Network.HTTP
import Text.JSON
import System
@laclefyoshi
laclefyoshi / websocket_devicemotion_ios.html
Created November 26, 2010 13:22
WebSocket and DeviceMotion Event for iOS Safari
<!DOCTYPE html>
<html lang="jp" xml:lang="jp">
<head>
<meta charset="utf-8">
<title>Balls</title>
<style>
.ball {
position: absolute;
top: 0px;
left: 0px;
@laclefyoshi
laclefyoshi / websocket_server.py
Created November 26, 2010 13:25
WebSocket server with Tornado
#!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright : (c) SAEKI Yoshiyasu
# License : MIT-style license
# <http://www.opensource.org/licenses/mit-license.php>
# last updated: 2010/11/25
import tornado.httpserver
import tornado.ioloop
import tornado.web
@laclefyoshi
laclefyoshi / balls_canvas.html
Created December 4, 2010 01:08
Web page using WebSocket and DeviceMotion Event
<!DOCTYPE html>
<html lang="jp" xml:lang="jp">
<head>
<meta charset="utf-8">
<title>Balls</title>
<style>
.ball {
position: absolute;
top: 0px;
left: 0px;
@laclefyoshi
laclefyoshi / balls_websocket.py
Created December 4, 2010 01:02
WebSocket Server for connecting iPod touch and Arduino
#!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright : (c) SAEKI Yoshiyasu
# License : MIT-style license
# <http://www.opensource.org/licenses/mit-license.php>
# last updated: 2010/12/03
import tornado.httpserver
import tornado.ioloop
import tornado.web