Skip to content

Instantly share code, notes, and snippets.

View Guard.kt
fun main(args: Array<String>) {
var name: String? = null
var name2: String? = null
var name5: String? = null
val (name3, name4, name6) = guard(name, name2, name5, { name, name2, name5 -> name.length > 0 }) {
print("variables include null OR name.length <= 0")
return
}
print(name3.length)
print(name4.length)
View touchegg.conf
<touchégg>
<settings>
<property name="composed_gestures_time">0</property>
</settings>
<application name="All">
<gesture type="DRAG" fingers="4" direction="LEFT">
<action type="SEND_KEYS">Control+Alt+Right</action>
</gesture>
<gesture type="DRAG" fingers="4" direction="DOWN">
<action type="SEND_KEYS">Super+s</action>
@sakuna63
sakuna63 / NetNewsWirePocket.scpt
Created Apr 6, 2013
以下のサイトのスクリプトを改変して作ったNetNewsWireで見ている記事をPocketに送るスクリプト。 http://jaidev.info/hacks/NetNewsWire+Pocket 使用するにはNotification Scriptingというアプリを入れる必要があります。(通知センター難しすぎぃ) Notification Scriptingの実装は以下を参考にしました。 http://veadardiary.blog29.fc2.com/blog-entry-4110.html
View NetNewsWirePocket.scpt
-- NetNewsWire+Pocket: Add items to Pocket (Read It Later) from NetNewsWire.
-- Copyright (c) 2005-2011, Jaidev K Sridhar <mail . jaidev @ info>
-- Released under the GPL license version 2. http://www.gnu.org/licenses/gpl-2.0.html
-- INSTALLING:
-- Copy NetNewsWire+Pocket.scpt to /Users/$USER/Library/Application\ Support/NetNewsWire/Scripts/. A new item 'NetNewsWire+Pocket' shows up in the scripts menu when NetNewsWire is restarted.
-- ADDING A KEYBOARD SHORTCUT:
-- To configure a keyboard shortcut, open System Preferences > Keyboard > Keyboard Shortcuts > Application Shortcuts. Add a keyboard shortcut with these parameters:
-- * Application: NetNewsWire