Skip to content

Instantly share code, notes, and snippets.

# Ubuntu setup.
## Preparations
First of all you should download and install Ubuntu 16.04 LTS. Then open software center, navigate to
[ edit / software sources / other software tab ] and check “Canonical Partners” for the software sources.
Then:
```
# recruitment-web-app
This is a spec for an app which purpose is to evaluate a Rails-wannabe.
## App requirements
1. After navigating to the root directory using a web browser, the app should display a login page. If the user is logged in, then user listing is being displayed.
Hint: it is usually a good idea to use a gem / working component to solve "standard" problems for a web app. In this context: https://github.com/plataformatec/devise
2. Userbase consists of two types of users: regular and admin.
Hint: Do not overcomplicate this. Also stuff that may come handy later: https://github.com/ryanb/cancan
36686 verbose afterAdd /home/socjopata/.npm/querystringify/0.0.3/package/package.json not in flight; writing
36687 verbose afterAdd /home/socjopata/.npm/querystringify/0.0.3/package/package.json written
36688 verbose stack TypeError: Cannot read property 'localeCompare' of undefined
36688 verbose stack at installOrder (/home/socjopata/.nvm/versions/node/v5.0.0/lib/node_modules/npm/lib/install/deps.js:241:32)
36688 verbose stack at Array.sort (native)
36688 verbose stack at /home/socjopata/.nvm/versions/node/v5.0.0/lib/node_modules/npm/lib/install/deps.js:240:27
36688 verbose stack at cb (/home/socjopata/.nvm/versions/node/v5.0.0/lib/node_modules/npm/node_modules/slide/lib/async-map.js:47:24)
36688 verbose stack at resolveWithExistingModule (/home/socjopata/.nvm/versions/node/v5.0.0/lib/node_modules/npm/lib/install/deps.js:377:3)
36688 verbose stack at /home/socjopata/.nvm/versions/node/v5.0.0/lib/node_modules/npm/lib/install/deps.js:347:5
36688 verbose stack at /home/socjopata/.nvm
#<InternalEmail:0x00000007d59f88
id: 13,
template_id: nil,
addressable_id: 16010,
addressable_type: "SuppliersProject",
sender_id: nil,
body:
"--001a11414a98a49cbb051f4e9b16\nContent-Type: text/plain; charset=UTF-8\nContent-Transfer-Encoding: quoted-printable\n\n--=20\nKind regards,\nRadek J=C4=99dryszczak\nwww.selleo.com\n\n--001a11414a98a49cbb051f4e9b16\nContent-Type: text/html; charset=UTF-8\nContent-Transfer-Encoding: quoted-printable\n\n<div dir=3D\"ltr\"><br clear=3D\"all\"><br>-- <br><div class=3D\"gmail_signature=\n\">Kind regards,<br>Radek J=C4=99dryszczak<br><a href=3D\"http://www.selleo.c=\nom\" target=3D\"_blank\">www.selleo.com</a><br></div>\n</div>\n\n--001a11414a98a49cbb051f4e9b16--\n",
name: "Internal email",
created_at: Wed, 09 Sep 2015 11:16:32 UTC +00:00,
class Hehe #service object
def initialize(scope)
@scope ||= SuppliersProject.where('przekazany scope do service objecta')
end
def call
#STEPS_LIST_FOR_CHART <-- customowa lsita stepow do wyswietlenia charta
STEPS_LIST_FOR_CHART.each do |step|
if step == :pre_screening
= content_for(:scripts) do
:coffeescript
$(document).ready ->
RfxQuestions.init()
$(document).on 'page:change', ->
RfxQuestions.init()
= content_tag(:div, '', data: { 'no-turbolink' => true }) do
- content_for(:video_library) do
javascript:
src = "#{ Rails.application.secrets.reembed_url }";
range = 1..Float::INFINITY
puts range.map(&:to_s).first(6)
@socjopata
socjopata / gist:4153799
Created November 27, 2012 11:32
Everything you can override in a refinerycms project with refinerycms-blog
When starting a project that includes refinerycms-blog:
$ rake refinery:override view=refinery/pages/*
$ rake refinery:override view=layouts/*
$ rake refinery:override view=refinery/blog/shared/*
$ rake refinery:override view=refinery/blog/posts/*
$ rake refinery:override view=refinery/*
$ rake refinery:override controller=refinery/blog/*
$ rake refinery:override controller=refinery/*
@socjopata
socjopata / uilabel_adjustable.rb
Created September 5, 2012 12:03 — forked from ParkinT/uilabel_adjustable.rb
RubyMotion class to auto-size font for text in a multi-line UILabel
class UILabel_Adjustable
# Borrowed and modified the excellent example at http://www.11pixel.com/blog/28/resize-multi-line-text-to-fit-uilabel-on-iphone/
# adapting it for RubyMotion
# This applies only to a multi-line label. You can use '.adjustsFontSizeToFitWidth = true' for a single-line label
# usage is:
# text = "It's bad luck to be superstitious"
# text_label = UILabel.alloc.initWithFrame([[20, 20], [70, 120]])
# text_label.numberOfLines = 0 # set 0 for word wrap
# text_label.lineBreakMode = UILineBreakModeWordWrap