This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns tetris.core | |
(:import (java.awt Color Dimension BorderLayout) | |
(javax.swing JPanel JFrame JOptionPane JButton JLabel) | |
(java.awt.event KeyListener)) | |
(:use clojure.contrib.import-static deflayout.core | |
clojure.contrib.swing-utils) | |
(:gen-class)) | |
(import-static java.awt.event.KeyEvent VK_LEFT VK_RIGHT VK_DOWN VK_UP VK_SPACE) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Asynchronous io.popen for Awesome WM. | |
-- How to use... | |
-- ...asynchronously: | |
-- asyncshell.request('wscript -Kiev', function(f) wwidget.text = f:read("*l") end) | |
-- ...synchronously | |
-- wwidget.text = asyncshell.demand('wscript -Kiev', 5):read("*l") or "Error" | |
local awful = require('awful') | |
asyncshell = {} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns test.leindroid.sample.main | |
(:use [neko.activity :only [defactivity set-content-view!]] | |
[neko.threading :only [on-ui]] | |
[neko.ui :only [make-ui]]) | |
(:import android.widget.EditText | |
android.net.Uri | |
android.content.Intent)) | |
(declare ^EditText edit | |
^android.app.Activity a) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function smart_movetoscreen(c, s) | |
local was_maximized = { h = false, v = false } | |
if c.maximized_horizontal then | |
c.maximized_horizontal = false | |
was_maximized.h = true | |
end | |
if c.maximized_vertical then | |
c.maximized_vertical = false | |
was_maximized.v = true | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(declaim (optimize (debug 2))) | |
;; Part one. | |
(defun line-number (fname code-loc) | |
(let* ((all-offsets (sb-di::debug-source-start-positions code-loc)) | |
;; Get last item from the array, I haven't found anything | |
;; like 'pop' to do it better. | |
(offset (aref all-offsets (- (length all-offsets) 1)))) | |
(with-open-file (f fname) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Automatically downloads and sets wallpapers from 4walled.com. | |
-- Requires asyncshell (https://gist.github.com/alexander-yakushev/1466863) | |
-- For configuration details see http://awesome.naquadah.org/wiki/Picturesque | |
-- How to use: | |
-- local picturesque = require('picturesque') | |
-- local t = timer { timeout = 3600 } | |
-- t:connect_signal("timeout", picturesque.change_image) | |
-- t:start() | |
local awful = require('awful') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Quick launchbar widget for Awesome WM | |
-- http://awesome.naquadah.org/wiki/Quick_launch_bar_widget/3.5 | |
-- Put into your awesome/ folder and add the following to rc.lua: | |
-- local launchbar = require('launchbar') | |
-- local mylb = launchbar("/path/to/directory/with/shortcuts/") | |
-- Then add mylb to the wibox. | |
local layout = require("wibox.layout") | |
local util = require("awful.util") | |
local launcher = require("awful.widget.launcher") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I had a dream. Like there is ahead | |
And endless, empty and the wildest plane. | |
And I stand there, held by iron chain, | |
Under the tall rock made from finest granite | |
And next to me are thousands just like me. | |
The face of everyone is marked by woe and sorrow, | |
And eyes of everyone contain fervor of love. | |
And hands of everyone are chained with snakes of iron, | |
And every shoulder's bent low to the ground, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Toggable tray, for those who don't like to see it all the time. | |
-- http://awesome.naquadah.org/wiki/Minitray | |
-- Usage: after requiring a module, bind minitray.toggle() to a key. | |
local wibox = require("wibox") | |
-- Module minitray | |
local minitray = { geometry = {} } | |
local function show() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Module for calculating sunrise/sunset times for a given location | |
-- Based on algorithm by United Stated Naval Observatory, Washington | |
-- Link: http://williams.best.vwh.net/sunrise_sunset_algorithm.htm | |
-- @author Alexander Yakushev | |
-- @license CC0 http://creativecommons.org/about/cc0 | |
-- Module lustrous | |
local lustrous = { | |
update_interval = 600 | |
} |
OlderNewer