https://developer.apple.com/wwdc/schedule/#/
https://developer.apple.com/videos/wwdc2016/
Interesting videos:
| class ExpressionValidator < ActiveModel::EachValidator | |
| def validate_each(record, attribute, value) | |
| begin | |
| Dentaku(value) | |
| rescue Exception => e | |
| record.errors[attribute] << (options[:message] || e.message) | |
| end | |
| end | |
| end |
I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!
\
| #config/initializers/carrierwave.rb | |
| module CarrierWave | |
| module MiniMagick | |
| # Rotates the image based on the EXIF Orientation | |
| def exif_rotation | |
| manipulate! do |img| | |
| img.auto_orient | |
| img = yield(img) if block_given? | |
| img | |
| end |
| # to generate your dhparam.pem file, run in the terminal | |
| openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
| gem 'thin' | |
| gem 'sevenhelpers', git: 'https://github.com/sevenview/sevenhelpers.git' | |
| #gem_group :assets do | |
| # gem 'zurb-foundation', '~>4.0.0' | |
| #end | |
| gem_group :test, :development, :staging do | |
| gem 'factory_girl_rails', '~> 4.2' | |
| gem 'ffaker' |
| function whichTransitionEvent(){ | |
| var t; | |
| var el = document.createElement('fakeelement'); | |
| var transitions = { | |
| 'transition':'transitionend', | |
| 'MSTransition':'msTransitionEnd', | |
| 'MozTransition':'transitionend', | |
| 'WebkitTransition':'webkitTransitionEnd' | |
| } |
| sudo add-apt-repository ppa:pitti/postgresql | |
| sudo apt-get update | |
| sudo apt-get install postgresql-9.2 postgresql-server-dev-9.2 postgresql-contrib-9.2 | |
| sudo su -l postgres | |
| psql -d template1 -p 5433 | |
| CREATE EXTENSION IF NOT EXISTS hstore; | |
| CREATE EXTENSION IF NOT EXISTS "uuid-ossp"; | |
| service postgresql stop | |
| /usr/lib/postgresql/9.2/bin/pg_upgrade -b /usr/lib/postgresql/9.1/bin -B /usr/lib/postgresql/9.2/bin -d /var/lib/postgresql/9.1/main/ -D /var/lib/postgresql/9.2/main/ -O "-c config_file=/etc/postgresql/9.2/main/postgresql.conf" -o "-c config_file=/etc/postgresql/9.1/main/postgresql.conf" |