Skip to content

Instantly share code, notes, and snippets.

View bkenny's full-sized avatar
💭
Shipping Products

Brian Kenny bkenny

💭
Shipping Products
View GitHub Profile
@bkenny
bkenny / dockup.markdown
Created April 12, 2017 10:59
Handy Dokku Goodies

File upload error

When you get the error: 413 “Request Entity Too Large” error with uploading a file

mkdir /home/dokku/appname/nginx.conf.d/
echo 'client_max_body_size 50M;' > /home/dokku/appname/nginx.conf.d/upload.conf
chown dokku:dokku /home/dokku/appname/nginx.conf.d/upload.conf #I don't know if this is needed
service nginx reload

No turbo links on a link

<%= link_to "View More", search_path, id: "showMore", class: "btn btn-lg btn-outline primary ripple", data: { no_turbolink: true } %>

Crazy Selects

<%= f.text_field :townland_id, value: f.object.townland.name, placeholder: "What area do you live in? E.g. Dundrum" %>
@bkenny
bkenny / meta.html
Created June 20, 2016 12:37
META Tags
<meta name="description" content="We partner with startups to design, build and ship your concept into a product and drive engagement.">
<meta name="keywords" content="app, development, design, startups, dublin, ireland, user experience, UX, usability, design, web design, training, courses, classes, online training, mobile UX, product design, application design, responsive design">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta property="og:title" content="MiniCorp | Startup Studio" />
<meta property="og:type" content="website" />
<meta property="og:description" content="We partner with startups to design, build and ship your concept into a product and drive engagement." />
<meta property="og:image" content="http://minicorp.ie/assets/colab-4336cb491fb0ba0ce1294d234ea456ba34df72919a6ca139905dd9d4685c9b87.png"/>
<meta name="twitter:card" content="summary" />

Introduction

MiniCorp is a startup studio from Dublin, Ireland. We partner with startup founders to help them create new products, services, craft new brands and create successful companies. We get in at the early stage of developing a company and product where we can make the most impact. These people are passionate about solving problems through technology. We are too.

Our Ruby on Rails Engineer internship allows us to find great talent. Teach and mentor them through problem solving and business development. This is not just an engineering role, you’ll discover how to create businesses, find target markets and above all else, ship great products.

Our prerequisites are simple:

Write great quality code.

We’ll need to see a GitHub profile or similar. Something where we can take a peak and the genius in your work. We’re not talking Enigma cryptography here, but something to show you understand good coding practices.

List of Ruby Awesome

Install gems without a specific group

If you had a group in your GemFile e.g.

group :awesome
  gem 'super_awesome
end

You could exclude that with

@media only screen and (min-width: 1024px) {
/* Add your custom styles here for Desktop */
}
@media only screen and (max-width: 1023px) {
/* Add your custom styles here for Tablet */
}
@media only screen and (max-width: 640px) {
/* Add your custom styles here for Large Mobile */
@bkenny
bkenny / code_generator.rb
Created November 25, 2015 11:48
Generate unique codes in a CSV
require 'bazaar'
require 'rails'
require "csv"
tokens_array = []
array_complete = false
while array_complete == false do
token = Bazaar.object
tokens_array << token unless tokens_array.include?(token)
@bkenny
bkenny / grab_and_store_heroku_pg_backup.markdown
Last active March 17, 2017 18:50
Grab and Store PG Backup from Heroku

Exporting from Heroku

heroku pg:backups capture && curl -o ~/Desktop/app_latest.dump `heroku pg:backups public-url`

Importing locally

pg_restore --verbose --clean --no-acl --no-owner -h localhost -d app_db ~/Desktop/app_latest.dump
{
"status" : 200,
"requestId" : "2169c690-212e-463e-9541-0cf973cbcefd",
"likelihood" : 0.9,
"photos" : [ {
"type" : "facebook",
"typeId" : "facebook",
"typeName" : "Facebook",
"url" : "https://d2ojpxxtu63wzl.cloudfront.net/static/555a603ab9c1da4c20228b9a012750c5_5b7615c73e2e850b15e74964b6bb8c948dedc92e3fccee391927802ac30e0115",
"isPrimary" : true
{
"activity_feed": [
{
"action": "content_like",
"activity_details": [
{
"activated": true,
"anonymous": false,
"comments": [],
"content_type": "image",