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
| waxClass{"SomePlugin", Plugin} | |
| function init(self) | |
| self = self.super(self) | |
| -- Any initialization goes here | |
| return self | |
| 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
| # text_view is a NSTextView | |
| text_view.insertText("0123456789") | |
| atts = {NSBackgroundColorAttributeName => NSColor.redColor} | |
| range = NSRange.new(0, 5) | |
| text_view.textStorage.setAttributes(attrs, range:range) |
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
| waxClass{"Comic", Base} | |
| function all(callback) | |
| return get{url("/features"), callback = function(json, response) | |
| local success, error = wasSuccessful(response) | |
| if success then | |
| local comics = table.map(json, function(c) | |
| return Comic:initWithAttrs(c) | |
| 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
| function runString_debug(s, d) | |
| local u,v=loadstring(s) | |
| if (v~=nil) then | |
| print(v) | |
| else | |
| -- Set up a debug hook. | |
| if d==1 then | |
| local function callb() | |
| print("called callb") | |
| error() |
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
| waxClass{"User", Base} | |
| -- Class Methods | |
| ---------------- | |
| function login(class, login, password) | |
| class:get{class:url("user/show/%s", login), callback = function(body, response) | |
| puts(body) | |
| end, | |
| authCallback = function(challenge) | |
| if challenge:previousFailureCount() == 0 and not challenge:proposedCredential() then |
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
| waxClass{"User", Base} | |
| -- Class Methods | |
| ---------------- | |
| function login(class, login, password) | |
| class:get{class:url("user/show/%s", login), callback = function(body, response) | |
| puts(body) | |
| end, | |
| authCallback = function(challenge) | |
| if challenge:previousFailureCount() == 0 and not challenge:proposedCredential() then |
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
| let mapleader = " " | |
| " Load the janus vimrc file | |
| runtime vimrc | |
| " My Mappings | |
| noremap ; : | |
| colorscheme vividchalk |
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
| waxClass{"AppDelegate", protocols = {"UIApplicationDelegate"}} | |
| -- Well done! You are almost ready to run a lua app on your iPhone! | |
| -- | |
| -- Just run the app (ββ΅) in the simulator or on a device! | |
| -- You will see a dull, bland "hello world" app (it is your job to spice it up.) | |
| -- | |
| -- If your prefer using TextMate to edit the Lua code just type | |
| -- 'rake tm' from the command line to setup a wax TextMate project. | |
| -- |
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
| // | |
| // WaxRetainIssueAppDelegate.m | |
| // WaxRetainIssue | |
| // | |
| // Created by Martin Cote on 11-02-17. | |
| // Copyright Loopycube 2011. All rights reserved. | |
| // | |
| #import "WaxRetainIssueAppDelegate.h" | |
| #import "WaxRetainIssueViewController.h" |
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
| $('head').prepend('<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=0" />'); |