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
| # http://www.mono-project.com/Compiling_Mono_on_OSX | |
| require 'formula' | |
| class MonoBasic < Formula | |
| url 'http://download.mono-project.com/sources/mono-basic/mono-basic-2.10.tar.bz2' | |
| homepage 'http://www.mono-project.com/' | |
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
| set :stage, 'production' | |
| set :shared_children, shared_children << 'tmp/sockets' | |
| puma_sock = "unix://#{shared_path}/sockets/puma.sock" | |
| puma_control = "unix://#{shared_path}/sockets/pumactl.sock" | |
| puma_state = "#{shared_path}/sockets/puma.state" | |
| puma_log = "#{shared_path}/log/puma-#{stage}.log" | |
| namespace :deploy do | |
| desc "Start the application" |
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
| require 'formula' | |
| class Tsocks < Formula | |
| # The original is http://tsocks.sourceforge.net/ | |
| # This GitHub repo is a maintained fork with OSX support | |
| homepage 'http://github.com/pc/tsocks' | |
| head 'https://github.com/pc/tsocks.git' | |
| depends_on 'autoconf' => :build if MacOS.xcode_version.to_f >= 4.3 |
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
| # Go to the project dir | |
| prcd() { | |
| project=$* | |
| cd $PROJECTS_HOME/$project | |
| } | |
| # Create new project and cd in the project path and open ST | |
| prnew() { | |
| mkdir "$PROJECTS_HOME/$*" && cd "$PROJECTS_HOME/$*" && git init | |
| } |
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 <stdlib.h> | |
| #include <stdio.h> | |
| /* Include the mruby headers */ | |
| #include <mruby.h> | |
| #include <mruby/proc.h> | |
| #include <mruby/data.h> | |
| #include <mruby/compile.h> | |
| int main(int argc, const char * argv[]) |
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
| # http://www.mono-project.com/Compiling_Mono_on_OSX | |
| require 'formula' | |
| class Mono < Formula | |
| #url 'http://download.mono-project.com/sources/mono/mono-3.0.6.tar.bz2' | |
| #sha1 'e2187f80366fcd65c55a1ab946f8d3b39e81be77' | |
| url 'http://download.mono-project.com/sources/mono/mono-2.10.9.tar.bz2' | |
| sha1 '1a6e8c5a0c3d88d87982259aa04402e028a283de' | |
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
| list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules") | |
| include(android.toolchain) | |
| set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) |
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
| require 'socket' | |
| require "http/parser" | |
| READ_CHUNK = 1024 * 4 | |
| socket = Socket.new(Socket::AF_INET, Socket::SOCK_STREAM) | |
| addr = Socket.pack_sockaddr_in(9799, '127.0.0.1') | |
| socket.bind(addr) | |
| socket.listen(Socket::SOMAXCONN) | |
| socket.setsockopt(:SOCKET, :REUSEADDR, true) |
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
| def true.if_true; yield end; | |
| def false.if_true; end; | |
| def true.if_false; end; | |
| def false.if_false; yield end; | |
| a = true |
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
| [] | |
| HELLO | |
| hello | |
| [{:upcase!=>"hello"}, {:downcase!=>"HELLO"}] | |
| [Finished in 0.1s] |