Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000| open class _ComposableSearchablePushRow<T: Equatable, Cell: CellType> : TableSelectorRow<Cell, ComposableSearchableViewController<T>> where Cell: BaseCell, Cell: TypedCellType, Cell.Value == ComposableSearchableItem<T>, T: SearchableItem, T: CustomStringConvertible { | |
| public required init(tag: String?) { | |
| super.init(tag: tag) | |
| onCreateControllerCallback = { [weak self] _ in | |
| let controller = ComposableSearchableViewController<T>() | |
| controller.searchPlaceholder = self?.searchPlaceholder | |
| return controller | |
| } |
| #!/bin/sh | |
| # | |
| # Iconizer shell script by Steve Richey (srichey@floatlearning.com) | |
| # Modified by Rich Ellis (rich@richellis.net) based on contributions on Github from crishoj, giria | |
| # https://gist.github.com/steverichey/8493f3bd31ae71a9c933/forks | |
| # | |
| # This is a simple tool to generate all necessary app icon sizes and the JSON file for an *EXISTING* Xcode project from one file. | |
| # To use: specify the path to your vector graphic (PDF format) and the path to your Xcode folder containing Images.xcassets | |
| # Example: sh iconizer.sh MyVectorGraphic.pdf MyXcodeProject |
| def skeletonize(img): | |
| """ OpenCV function to return a skeletonized version of img, a Mat object""" | |
| # hat tip to http://felix.abecassis.me/2011/09/opencv-morphological-skeleton/ | |
| img = img.copy() # don't clobber original | |
| skel = img.copy() | |
| skel[:,:] = 0 | |
| kernel = cv2.getStructuringElement(cv2.MORPH_CROSS, (3,3)) |
| #!/usr/bin/env bash | |
| # Works fine on Ubuntu 14.0.4 LTS | |
| NGINX_VERSION="1.9.9" | |
| NCHAN_VERSION="0.97" | |
| HEADERS_MORE_VERSION="0.29" | |
| DEV_KIT_VERSION="0.2.19" | |
| ECHO_VERSION="0.58" | |
| FANCY_INDEX_VERSION="0.3.5" |
| # OSX for Hackers (Mavericks/Yosemite) | |
| # | |
| # Source: https://gist.github.com/brandonb927/3195465 | |
| #!/bin/sh | |
| # Some things taken from here | |
| # https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
| # Ask for the administrator password upfront |
| -- swipe library | |
| --[[ Libraries ]]-- | |
| local composer = require("composer") | |
| --[[ Fields ]]-- | |
| local mainstage = display.getCurrentStage() | |
| local stage = composer.stage |
| # Sticky session module for nginx | |
| # https://bitbucket.org/nginx-goodies/nginx-sticky-module-ng/ | |
| # nginx configure command: ./configure --with-http_ssl_module --add-module=../nginx-sticky-module-ng/ --sbin-path=/usr/local/sbin --with-http_gzip_static_module | |
| upstream vida_node_server { | |
| sticky path=/; | |
| server 127.0.0.1:3000 max_fails=3 fail_timeout=30s; | |
| server [server2]:3000 max_fails=3 fail_timeout=30s; | |
| } |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000| BIN = ./node_modules/.bin | |
| SRC = $(wildcard src/*.coffee) | |
| LIB = $(SRC:src/%.coffee=lib/%.js) | |
| build: $(LIB) | |
| lib/%.js: src/%.coffee | |
| @mkdir -p $(@D) | |
| @$(BIN)/coffee -bcp $< > $@ |
| #!/bin/sh | |
| exec <"$0" || exit; read v; read v; exec /usr/bin/osascript - "$@"; exit | |
| -- the above is some shell trickery that lets us write the rest of | |
| -- the file in plain applescript | |
| tell application "Google Chrome" | |
| activate | |
| tell application "System Events" | |
| tell process "Google Chrome" |