Skip to content

Instantly share code, notes, and snippets.

@alterecco
alterecco / pkget
Created March 6, 2010 18:12
pkget
#!/bin/bash
##
##
## Search and download packages from ABS and AUR
## Inspired by pbget, aurget and yaourt
## Does really not try to be more than what it say
## on the box, we have plenty of tools for that
##
##
@alterecco
alterecco / gist:483523
Created July 20, 2010 20:29
dsf syntax example
(setq my-initial-screen (lambda nil
(block nil
;; use the standard screen, and set a name for the screen
(dsf/screen 'Standard "Initial Screen")
;; add a description to the screen
(dsf/description "This is a pane description")
;; define the attributes of an action on the screen
(dsf/action 0 "Default Action" 'D '(dbgLog "Called Default Action"))
(dsf/action 1 "Exit" 'E '(scrExitDock gScreen))
(dsf/show-screen)
<?xml version="1.0" ?>
<!DOCTYPE TranscendenceExtension
[
<!ENTITY modAutonomousAutons "0xDCBA00A0">
<!ENTITY itAAutonAdvertiser "0xDCBA00A1">
]>
<TranscendenceExtension UNID="&modAutonomousAutons;" version="0.99c">
;; http://www.gnu.org/software/emacs/manual/html_node/elisp/index.html#Top
;; http://www.chemie.fu-berlin.de/chemnet/use/info/elisp/elisp_toc.html
;; turn off menu bar as the first thing,
;; so we don't get an annoying flash
(if (fboundp 'menu-bar-mode) (menu-bar-mode -1))
(if (fboundp 'tool-bar-mode) (tool-bar-mode -1))
(if (fboundp 'scroll-bar-mode) (scroll-bar-mode -1))
;; add local dir to load path
@alterecco
alterecco / gist:486829
Created July 23, 2010 00:07
dsf screen-identifiers
(block nil
;; a very simple example
(setq screens (lambda nil
(block nil
;; start a new screen
(dsf/new-screen 'screen-one 'standard "Screen One")
(dsf/add-action 'goto-two "Go to Screen 2" 'G '(dsf/show-screen 'screen-two))
(dsf/default-action 'goto-two)
(scrSetDesc gScreen
(cat "Total cargo space:"
(objGetData gPlayerShip "cargoSpace")
" ("
(objGetStaticData gPlayerShip "cargoSpace") ")\n"))
(block nil
(scrSetDesc gScreen
(cat "Total cargo space: "
(objGetData gPlayerShip "cargoSpace")
" ("
(objGetStaticData gPlayerShip "cargoSpace")
")\n"
)
)
)
(setq debugShip (lambda (shp)
(block (devCnt tItem)
(dbgLog "####################################################")
(dbgLog " ")
(dbgLog " ------ (shpGetDataField) -----")
(dbgLog "| Name | " (shpGetDataField shp "name") " |")
(dbgLog "| Manufacturer | " (shpGetDataField shp "manufacturer") " |")
(dbgLog "| Level | " (shpGetDataField shp "level") " |")
(dbgLog "| Score | " (shpGetDataField shp "score") " |")
@alterecco
alterecco / FuncList.txt
Created July 24, 2010 05:32
tscript function list 1.02
NEW IN 1.02
===========
(plyGetStat player stat)
"resurrectCount"
"bestEnemyShipsDestroyed"
"enemyShipsDestroyed"
"systemData"
"systemsvisited"
(plyGetItemStat player stat criteria)
(block nil
(dsf/new-screen 'abandoned-station)
(dsf/name '(objGetName gSource))
(dsf/description "You are docked with an abandoned cargo crate.")
(dsf/add-action 'loot "Loot" 'L '(dsf/show-screen 'loot))
(dsf/add-action 'jettison "Jettison" 'J '(dsf/show-screen 'jettison))
(dsf/add-action 'undock "Undock" 'U '(dsf/exit))
(dsf/default-action 'loot)
(dsf/cancel-action 'undock)
(dsf/show-screen)