# Add pinned tabs in Google Chrome | |
# add as argument to Google Chrome : --pinned-tab-count=2 http://google.com/ http://www.google.com/reader/view/ | |
# example: /opt/google/chrome/google-chrome %U --pinned-tab-count=2 http://google.com/ http://www.google.com/reader/view/ |
require 'artoo' | |
connection :sphero, adaptor: :sphero, port: '4560' | |
device :sphero, driver: :sphero | |
work do | |
every(3.seconds) do | |
puts "Rolling..." | |
sphero.roll 60, rand(360) | |
end |
pool: number indicating size of connection pool (default 5) | |
checkout_timeout: number of seconds to block and wait for a connection before giving up and raising a timeout error (default 5 seconds). | |
reaping_frequency: frequency in seconds to periodically run the Reaper, which attempts to find and close dead connections, which can occur if a programmer forgets to close a connection at the end of a thread or a thread dies unexpectedly. (Default nil, which means don't run the Reaper). | |
dead_connection_timeout: number of seconds from last checkout after which the Reaper will consider a connection reapable. (default 5 seconds). | |
encoding: (Optional) Sets the client encoding by executing "SET NAMES <encoding>" after connection. | |
reconnect: Defaults to false (See MySQL documentation: dev.mysql.com/doc/refman/5.0/en/auto-reconnect.html). | |
strict: Defaults to true. Enable STRICT_ALL_TABLES. (See MySQL documentation: dev.mysql.com/doc/refman/5.0/en |
Rich Hickey • 3 years ago
Sorry, I have to disagree with the entire premise here.
A wide variety of experiences might lead to well-roundedness, but not to greatness, nor even goodness. By constantly switching from one thing to another you are always reaching above your comfort zone, yes, but doing so by resetting your skill and knowledge level to zero.
Mastery comes from a combination of at least several of the following:
def currency_euro(item) | |
number_to_currency(item, :unit => "€", :separator => ",", :delimiter => "", :format => "%n %u") | |
end |
#!/bin/bash | |
# | |
# This is an IPv6 RA flood attack that kills iPads and Macs and Android. | |
# For videos and details: | |
# http://samsclass.info/ipv6/proj/RA_flood2.htm | |
# | |
if [ "$#" -ne 3 ] | |
then | |
echo "Usage: ./6shooter1.7 P d t" |
package demo | |
import io.vertx.core.Vertx | |
import io.vertx.core.http.HttpServer | |
import io.vertx.core.http.HttpServerResponse | |
import io.vertx.ext.web.Route | |
import io.vertx.ext.web.Router | |
import io.vertx.ext.web.RoutingContext | |
fun Router.get(path: String, handler: (RoutingContext) -> Unit): Route { |
It's pretty easy to do polymorphic associations in Rails: A Picture can belong to either a BlogPost or an Article. But what if you need the relationship the other way around? A Picture, a Text and a Video can belong to an Article, and that article can find all media by calling @article.media
This example shows how to create an ArticleElement join model that handles the polymorphic relationship. To add fields that are common to all polymorphic models, add fields to the join model.
FROM elixir:1.2.3 | |
MAINTAINER Sergey Gernyak <sergeg1990@gmail.com> | |
ENV MIX_ENV=prod | |
RUN apt-get update && apt-get install -y build-essential git-core | |
RUN mkdir -p /app | |
WORKDIR /app |