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
| # If you don't have the requests module, you can download by typing: | |
| # | |
| # sudo easy_install -U requests` | |
| # | |
| # into the terminal on macOS | |
| # | |
| # You can change the partnum below with any Apple SKU | |
| # | |
| import urllib |
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
| * | |
| !*.m | |
| !Makefile |
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
| //: Playground - noun: a place where people can play | |
| import UIKit | |
| class LKSwitch : UISwitch { | |
| let action: (UISwitch) -> Void | |
| init(action: @escaping (UISwitch) -> Void) { | |
| self.action = action | |
| super.init(frame: .zero) |
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
| const ui = require("ui"); | |
| class MyView extends ui.View { | |
| constructor() { | |
| super() | |
| // |
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
| #include <lua.h> | |
| #include <lauxlib.h> | |
| #include <lualib.h> | |
| #include <stdlib.h> | |
| int map_create(lua_State *lua); | |
| int map_slice(lua_State *lua); | |
| int main(int argc, char **argv){ | |
| lua_State *lua = lua_open(); |
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
| const objc = require('objc'); | |
| const Color = require("./color.js"); | |
| const ui = require("../index.js"); | |
| const UIView = objc("UIView"); | |
| const UIViewController = objc("UIViewController"); | |
| const LKJSViewController = objc("LKJSViewController"); | |
| const UINavigationController = objc("UINavigationController"); | |
| const UIApplication = objc("UIApplication"); |
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
| const ui = require("ui"); | |
| const mapkit = require("mapkit"); | |
| const location = require("location"); | |
| let view = new ui.View(); | |
| let mapView = new mapkit.MapView(); | |
| mapView.backgroundColor = new ui.Color("red"); | |
| mapView.showsUserLocation = true; | |
| mapView.mapType = mapkit.MapType.hybridFlyover; |
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
| // #1 | |
| Number.prototype.add_1 = (n) => { | |
| return this + n; | |
| } | |
| // #2 | |
| Object.defineProperty(Number.prototype, 'add_2', { | |
| get: () => { | |
| return function(n) { | |
| return this + n; |
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
| // compile with `clang fib.c -o fib` | |
| #include <stdio.h> | |
| int main() { | |
| int x = 0; | |
| int y = 1; | |
| int z = 0; | |
| do { |
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
| // `otool -tv fib` | |
| fib: | |
| (__TEXT,__text) section | |
| _main: | |
| 0000000100000f20 pushq %rbp | |
| 0000000100000f21 movq %rsp, %rbp | |
| 0000000100000f24 subq $0x20, %rsp | |
| 0000000100000f28 movl $0x0, -0x4(%rbp) | |
| 0000000100000f2f movl $0x0, -0x8(%rbp) |