- Site: euruko2015.org
- Activity:
version: 2 | |
jobs: | |
build: | |
environment: | |
working_directory: ~/circleci-myapp | |
docker: | |
- image: circleci/ruby:2.4.2-node-browsers | |
environment: | |
CC_TEST_REPORTER_ID: XXXYYY | |
RAILS_ENV: test |
'use strict'; | |
/* | |
* The purpose of this function is to convert an ES6 class to either: | |
* 1) A test suite if it has "tests" as a property | |
* 2) A page object with optional "elements", "commands" and "url" | |
* @param es6Class The actual class object (not instance of the class) to convert | |
*/ | |
module.exports = function(es6Class) { | |
let properties = Object.getOwnPropertyNames(es6Class.prototype); |
#views/users/_form.html.erb | |
<%= simple_form_for @form do |f| %> | |
<%= f.error_notification %> | |
<%= f.input :name %> | |
<%= f.input :email %> | |
<h4> | |
<%= link_to_add_fields icon(:plus), |
You should never let passwords or private data be transmitted over an untrusted network (your neighbor’s, the one at Starbucks or the company) anyway, but on a hacker congress like the #30C3, this rule is almost vital.
Hackers get bored easily, and when they’re bored, they’re starting to look for things to play with. And a network with several thousand connected users is certainly an interesting thing to play with. Some of them might start intercepting the data on the network or do other nasty things with the packets that they can get.
If these packets are encrypted, messing with them is much harder (but not impossible! – see the end of this article). So you want your packets to be always encrypted. And the best way to do that is by using a VPN.
# Stick this in lib/tasks/assets.rake or similar | |
# | |
# A bug was introduced in rails in 7f1a666d causing the whole application cache | |
# to be cleared everytime a precompile is run, but it is not neccesary and just | |
# slows down precompiling. | |
# | |
# Secondary consequences are the clearing of the whole cache, which if using | |
# the default file cache could cause an application level performance hit. | |
# | |
# This is already fixed in sprockets-rails for rails 4, but we patch here for |
# app/controllers/users/password_controller.rb | |
class Users::PasswordsController < Devise::PasswordsController | |
def resource_params | |
params.require(:user).permit(:email, :password, :password_confirmation) | |
end | |
private :resource_params | |
end |
This little post aims to help you to translate Objective-C Blocks into Ruby blocks. Let's start by taking a look at few examples of iOS API call where blocks are used for animations and enumeration
Im Rubymotion and MacRuby you can use all the Ruby Lambda syntaxes that are:
block = lambda { |param| ... }
TIL when you drill in your wall (eg to hang up a shelf), these are ways to avoid drilling into a power | |
supply: | |
- I always thought this rule of thumb would suffice: do not drill within a straight vertical or | |
horizontal line from power sockets. TIL in Germany to be on the safe side, you need to add a 20cm safety | |
distance to each side of these lines. Within this distance can be supply lines too! | |
- Power supply line detectors are worthless when they are cheap, the pricier ones can help you a bit, but | |
they still are no guarantee: when the lines are deeper within the wall, they can not be detected exactly | |
at all. |
#!/usr/bin/env ruby | |
=begin | |
= Geographic Searches With Postgres's Earthdistance and Cube Extensions | |
This program shows how to easily create a Postgres database that uses the Cube | |
and Earthdistance extensions to perform fast queries on geographic data. | |
Briefly, the problem this code solves is "show me all places within 50 | |
kilometers of New York City." |