application.scss.erb - use <%= asset_path 'background.jpg' %>
on config/environments/production.rb
#!/usr/bin/env sh | |
## | |
# This is script with usefull tips taken from: | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# | |
# install it: | |
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
# |
#Steps to install RVM + Ruby 1.9.2 + Rails + nginx + Passenger on CentOS (tested on v5.5) | |
# Install git and curl, if not already installed | |
sudo yum install git | |
sudo yum install curl | |
# Create the rvm group and add any users who will be using rvm to the group | |
sudo su - | |
groupadd rvm |
source 'https://rubygems.org' | |
gem 'rails', '3.2.1' | |
# Bundle edge Rails instead: | |
# gem 'rails', :git => 'git://github.com/rails/rails.git' | |
gem 'sqlite3' | |
Getting started | |
=============== | |
# Make sure you have ggplot2 installed | |
install.packages("ggplot2") | |
library(ggplot2) | |
Basic examples | |
============== |
-- Reimplemented coroutine.wrap, returning "nil, err" if the coroutine cannot | |
-- be resumed. | |
local co_wrap = function(func) | |
local co = coroutine.create(func) | |
ngx.log(ngx.DEBUG, "co created with status ", coroutine.status(co)) | |
return function(...) | |
if coroutine.status(co) == "suspended" then | |
return select(2, coroutine.resume(co, ...)) | |
else | |
return nil, "can't resume a " .. coroutine.status(co) .. " coroutine" |
#!/bin/bash | |
# shell script to create a simple mongodb replica set (tested on osx) | |
set -e | |
red=$(tput setaf 1) | |
green=$(tput setaf 2) | |
yellow=$(tput setaf 3) | |
default=$(tput sgr0) |
This allows my Convolutional Neural Network to be trained tad little faster on 2013 MacBookPro15 (4core i7/16GB + NVidia GT750M/2GB) than a 2016 MacPro (6Core Xeon/32GB).
sudo xcode-select --switch /Library/Developer/CommandLineTools & clang -v
# Initializing DS418play with 4 x 6TB disks | |
# ssh to NAS as yourseld | |
# Check the RAID block device and tunable values | |
cat /proc/mdstat # was md2. Getting about 30M/s | |
# Get original values: | |
echo "speed_limit_max: `cat /proc/sys/dev/raid/speed_limit_max`" #=> 200000 |