Skip to content

Instantly share code, notes, and snippets.

@webdev1001
webdev1001 / migrate_postgresql_database.md
Created December 20, 2015 22:30 — forked from olivierlacan/migrate_postgresql_database.md
How to migrate a Homebrew-installed PostgreSQL database to a new major version (9.3 to 9.4) on OS X

This guide assumes that you recently run brew upgrade postgresql and discovered to your dismay that you accidentally bumped from one major version to another: say 9.3.x to 9.4.x. Yes, that is a major version bump in PG land.

First let's check something.

brew info postgresql

The top of what gets printed as a result is the most important:

<?
/////////////////////
// slack2html
// by @levelsio
/////////////////////
//
/////////////////////
// WHAT DOES THIS DO?
/////////////////////
//
@webdev1001
webdev1001 / The difference between the junior and senior Rails developer
Created October 20, 2015 02:12 — forked from njonsson/The difference between the junior and senior Rails developer
The difference between the junior and senior Rails developer — an extract of the discussion forum at the Rubyists LinkedIn group
Someone recently asked the following question in the discussion forum of the Rubyists LinkedIn group: What separates a junior Rails developer from a senior one?
My response follows. Join us at http://www.linkedin.com/groups?gid=120725 to weigh in on this and other topics of interest to Rubyists. As of today there are almost 1,200 members, including numerous movers and shakers in the Ruby and Rails communities.
“Distinguishing between junior and senior people in the Rails world is not so different from making the distinction in other web development environments.
“Junior Rails people have not dealt with scaling issues to the degree that senior people have. Getting a public-facing Rails application to perform under significant stress is more challenging than doing the same with other building materials such as PHP. Senior people know how to performance-test Rails applications, where to look for bottlenecks, and how to eliminate them one after another until performance is acceptable in real conditions. The Ra
@webdev1001
webdev1001 / gist:04a459981d5f5ac27c62
Created October 17, 2015 21:45 — forked from briancicutti/gist:3035155
Ruby Warrior Beginner Level 4 Solution
class Player
def play_turn(warrior)
if warrior.feel.enemy?
warrior.attack!
else
if warrior.health < 20 && !taking_damage?(warrior)
warrior.rest!
else
warrior.walk!
end
@webdev1001
webdev1001 / gist:65c842d5270f0852ccf7
Created October 8, 2015 11:14 — forked from olistik/gist:3894072
Ubuntu 12.04 Terminator config: solarized theme + iTerm2-like key bindings
# place this file in ~/.config/terminator/config
[global_config]
title_transmit_bg_color = "#d30102"
focus = system
[keybindings]
reset_clear = <Ctrl>R
new_tab = <Ctrl>T
split_horiz = <Ctrl><Shift>E
split_vert = <Ctrl>E
close_term = <Ctrl><Shift>W
@webdev1001
webdev1001 / ruby_setup.md
Created October 8, 2015 09:05 — forked from julionc/ruby_setup.md
Deploy Ruby On Rails on Ubuntu 14.04

Deploy Ruby On Rails on Ubuntu 14.04

Server: Nginx with Phusion Passenger

Ruby Version: 2.1.3

User System: deploy

User System

@webdev1001
webdev1001 / cookies.js
Created October 1, 2015 16:32 — forked from dmitry-korolev/cookies.js
Simple functions to work with cookies. Plain JS.
/**
* @link https://learn.javascript.ru/cookie
*/
function setCookie(name, value, options) {
options = options || {};
var expires = options.expires;
if (typeof expires == "number" && expires) {
@dmitry-korolev
dmitry-korolev / cookies.js
Last active October 10, 2015 17:17
Simple functions to work with cookies. Plain JS.
/**
* @link https://learn.javascript.ru/cookie
*/
function setCookie(name, value, options) {
options = options || {};
var expires = options.expires;
if (typeof expires == "number" && expires) {
@webdev1001
webdev1001 / howto-manually-add-trust-cert-to-rubygems.md
Last active September 16, 2015 01:10
Workaround RubyGems' SSL errors on Ruby for Windows (RubyInstaller)

SSL upgrades on rubygems.org and RubyInstaller versions

UPDATE 2014-12-21: RubyGems 1.8.30, 2.0.15 and 2.2.3 have been released. It requires manual installation, please see instructions below.


Hello,

If you reached this page, means you've hit this SSL error when trying to

<?
/////////////////////
// slack2html
// by @levelsio
/////////////////////
//
/////////////////////
// WHAT DOES THIS DO?
/////////////////////
//