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.exports = { | |
| config: { | |
| // default font size in pixels for all tabs | |
| fontSize: 12.5, | |
| // font family with optional fallbacks | |
| fontFamily: '"Meslo LG S for Powerline", Menlo, "DejaVu Sans Mono", "Lucida Console", monospace', | |
| // terminal cursor background color (hex) | |
| cursorColor: 'rgba(255,255,255,.4)', |
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
| from objc_util import * | |
| import ctypes | |
| import numpy as np | |
| import matplotlib.image | |
| import io,ui | |
| AVAudioEngine=ObjCClass('AVAudioEngine') | |
| AVAudioSession=ObjCClass('AVAudioSession') | |
| def setup(): | |
| error=ctypes.c_void_p(0) | |
| session=AVAudioSession.sharedInstance() |
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
| /** | |
| Dijkstra's algorithm in Swift 3 | |
| The idea is to create a more protocol oriented implementation. | |
| Note: It could use some optimizations, if you wish to use in production. | |
| */ | |
| import Foundation |
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
| # coding: utf-8 | |
| from objutil import * | |
| import ui | |
| colorpicker = ObjCClass('OMColorPickerViewController').new().autorelease() | |
| clview = colorpicker.view() | |
| clview.frame = CGRect((0, 0), (512, 512)) | |
| view = presentUIView(clview, 'Color Picker', 'sheet') | |
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
| #!python2 | |
| # coding: utf-8 | |
| import ui,requests, json, time, console, urllib | |
| # create debuggin delegate code. not necessary, but helpful for debugging | |
| debugjs=''' | |
| // debug_utils.js | |
| // 1) custom console object | |
| console = new Object(); | |
| console.log = function(log) { |
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
| import UIKit | |
| protocol StoryboardBacked:class { | |
| static func newFromStoryboardWithName(name:String?, bundle:NSBundle?) -> Self | |
| } | |
| extension StoryboardBacked { | |
| static func newFromStoryboardWithName(name:String?, bundle:NSBundle?) -> Self { | |
| let realName = name ?? NSStringFromClass(self as AnyClass).componentsSeparatedByString(".").last! | |
| let storyboard = UIStoryboard(name: realName, bundle: bundle) |
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
| void callEntryPointOfImage(char *path, int argc, char **argv) | |
| { | |
| void *handle; | |
| int (*binary_main)(int binary_argc, char **binary_argv); | |
| char *error; | |
| int err = 0; | |
| printf("Loading %s…\n", path); | |
| handle = dlopen (path, RTLD_LAZY); |
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
| # coding: utf-8 | |
| ''' | |
| This is a little helper script to make it easier | |
| to create single-file scripts with Pythonista, while | |
| still taking advantage of the UI editor. | |
| It'll essentially convert the .pyui file to a compact | |
| string representation that you can embed directly | |
| in your script. The code to unpack and load the UI | |
| is also auto-generated for convenience. |
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
| # coding: utf-8 | |
| import ui | |
| import os | |
| from objc_util import ObjCInstance, ObjCClass | |
| from operator import attrgetter | |
| import time | |
| import threading | |
| import functools | |
| import ftplib | |
| import re |
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
| # coding: utf-8 | |
| from UIKit import * | |
| from Foundation import * | |
| from ctypes import * | |
| libobjc = CDLL('/usr/lib/libobjc.dylib') | |
| QLPreviewController = ObjCClass('QLPreviewController') |