Revision: 06.08.2023, https://compute.toys/view/407
fn sdSphere(p: vec3f, r: f32) -> f32 {
return length(p) - r;
}Revision: 06.08.2023, https://compute.toys/view/407
fn sdSphere(p: vec3f, r: f32) -> f32 {
return length(p) - r;
}| @implementation UIApplication (AppVersion) | |
| + (NSString *) appVersion | |
| { | |
| return [[NSBundle mainBundle] objectForInfoDictionaryKey: @"CFBundleShortVersionString"]; | |
| } | |
| + (NSString *) build | |
| { | |
| return [[NSBundle mainBundle] objectForInfoDictionaryKey: (NSString *)kCFBundleVersionKey]; |
| extension UIApplication { | |
| class func appVersion() -> String { | |
| return Bundle.main.object(forInfoDictionaryKey: "CFBundleShortVersionString") as! String | |
| } | |
| class func appBuild() -> String { | |
| return Bundle.main.object(forInfoDictionaryKey: kCFBundleVersionKey as String) as! String | |
| } |
| # Usage: | |
| # 1. Drop this file into lib/capistrano/remote_cache_with_project_root_strategy.rb | |
| # 2. Add the following to your Capfile: | |
| # require 'capistrano/git' | |
| # require './lib/capistrano/remote_cache_with_project_root_strategy' | |
| # 3. Add the following to your config/deploy.rb | |
| # set :git_strategy, RemoteCacheWithProjectRootStrategy | |
| # set :project_root, 'subdir/path' | |
| # Define a new SCM strategy, so we can deploy only a subdirectory of our repo. |
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| Install ruby 1.8.7 on Mac OS X 10.8 (Mountain Lion) using RVM and MacPorts | |
| 1) Install http://xquartz.macosforge.org | |
| 2) sudo port install apple-gcc42 | |
| 3) CC=/opt/local/bin/gcc-apple-4.2 CPPFLAGS=-I/opt/X11/include rvm install 1.8.7 |
These instructions work for the Raspberry Pi running Raspbian (hard float) and create a hardware optimized version of NodeJS for the Raspberry PI, (and include a working install and NPM!!!):
Install Raspbian - http://www.raspberrypi.org/downloads
Install the necessary dependecies:
sudo apt-get install git-core build-essential(If you just installed git then you need to administer your git identity first, else adding the patches below will fail!!!)
| # coding: utf-8 | |
| # | |
| # Encode any codepoint outside the ASCII printable range to an HTML character | |
| # reference (https://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references#Character_reference_overview). | |
| def encode(string) | |
| string.each_codepoint.inject("") do |buffer, cp| | |
| cp = "&#x#{cp.to_s(16)};" unless cp >= 0x20 && cp <= 0x7E | |
| buffer << cp | |
| end | |
| end |
| set :shared_children, shared_children << 'tmp/sockets' | |
| namespace :deploy do | |
| desc "Start the application" | |
| task :start, :roles => :app, :except => { :no_release => true } do | |
| run "cd #{current_path} && RAILS_ENV=#{stage} bundle exec puma -b 'unix://#{shared_path}/sockets/puma.sock' -S #{shared_path}/sockets/puma.state --control 'unix://#{shared_path}/sockets/pumactl.sock' >> #{shared_path}/log/puma-#{stage}.log 2>&1 &", :pty => false | |
| end | |
| desc "Stop the application" | |
| task :stop, :roles => :app, :except => { :no_release => true } do |