A (more) complete cheatsheet for Arel, including NamedFunction functions, raw SQL and window functions.
posts = Arel::Table.new(:posts)
posts = Post.arel_table # ActiveRecord
module multiHull(){ | |
for (i = [1 : $children-1]) | |
hull(){ | |
children(0); | |
children(i); | |
} | |
} | |
module sequentialHull(){ | |
for (i = [0: $children-2]) |
# This describes how you can connect your ninjablock to your own mqtt server | |
# It is not the best manual, so please provide feedback | |
# First of you have to start with the "beta" image found at: https://discuss.ninjablocks.com/t/unstable-brand-new-image-for-your-block/1666 | |
# Or direct link if you must: http://ninjablocks-nightly.s3.amazonaws.com/block/ubuntu_armhf_trusty_sterling_block-unstable_2014-07-16_1044.img.gz | |
# Then put that on an sdcard (like you normally would) | |
# Put it in the ninjablock | |
# Let it boot!! | |
# power off (upon first boot it creates a ssh key (needed for enabling ssh)) | |
# power on |
#!/bin/sh | |
say -v cello i am a cat and i\'m small very small oh so small i am a cat and i\'m probably eating pancakes om nom nom nom nom nom nom om nom nom nom nom nom om nom nom nom nom nom nom nom om nom nom nom nom |
If your system is running slowly, perhaps a process is using too much CPU time and won't let other processes run smoothly. To find out which processes are taking up a lot of CPU time, you can use Apple's Activity Monitor.
The CPU pane shows how processes are affecting CPU (processor) activity:
alias fucking='sudo ' | |
alias doit='$(history -p !!)' |
# 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 |
There are a lot of ways to serve a Go HTTP application. The best choices depend on each use case. Currently nginx looks to be the standard web server for every new project even though there are other great web servers as well. However, how much is the overhead of serving a Go application behind an nginx server? Do we need some nginx features (vhosts, load balancing, cache, etc) or can you serve directly from Go? If you need nginx, what is the fastest connection mechanism? This are the kind of questions I'm intended to answer here. The purpose of this benchmark is not to tell that Go is faster or slower than nginx. That would be stupid.
So, these are the different settings we are going to compare:
Hi there!
The docker cheat sheet has moved to a Github project under https://github.com/wsargent/docker-cheat-sheet.
Please click on the link above to go to the cheat sheet.
# to generate your dhparam.pem file, run in the terminal | |
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |