Skip to content

Instantly share code, notes, and snippets.

View HendrikPetertje's full-sized avatar

Peter van der Meulen HendrikPetertje

View GitHub Profile
@HendrikPetertje
HendrikPetertje / gist:5952307
Created July 8, 2013 20:40
apt-key spotify
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 94558F59
@HendrikPetertje
HendrikPetertje / gist:6508550
Created September 10, 2013 12:14
Powershell extra's
# add SSH scripts to powershell
$env:path += ";" + (Get-Item "Env:ProgramFiles(x86)").Value + "\Git\bin"
# add sublime to powershell
Set-Alias subl 'C:\Program Files\Sublime Text 2\sublime_text.exe'
@HendrikPetertje
HendrikPetertje / Git console Instructions.md
Last active March 31, 2023 16:14
Ultimate Ubuntu Git console

#Ultimate Ubuntu Git console #instructions

  1. Go to your default ubuntu console by hitting ctrl + alt + T or selecting it from your applications list
  2. paste this and hit enter: gedit ~/.bashrc
  3. paste the code in the 'code' file (below) to the bottom of the now opened ~/.bashrc document on your desktop

##Customisation Line numbers in the description should be shown in relation to the code file

@HendrikPetertje
HendrikPetertje / Railsinstaller_ubuntu.md
Last active December 24, 2015 07:09
The big todo list for a perfect linux rails developement envirnoment

#Install Ubuntu with Rails on your developement machine Need to get Rails (4.0.0) running on your ubuntu pc, or are you tired of making rails applications in windows? Follow my guide below to get your own ubuntu developement pc running.

##installing Linux

Download Ubuntu desktop from www.ubuntu.com and install this to a computer.

  • Install the correct version (x86 or x64)
  • Make sure the / size is at least 10gb
@HendrikPetertje
HendrikPetertje / De Git Guide.md
Last active December 25, 2015 12:38
This gist describes the use of Git in Dutch and gives some tips for good practice

De Git Guide

Door Peter van der Meulen
www.picoreclame.nl

#Inhoudsopgave

  • [Git?][1]
  • [Best practises vooraf!][2]
  • [Git installeren en gebruiken][3]
  • [Git installeren][4]
@HendrikPetertje
HendrikPetertje / 1 - Readme.md
Last active October 14, 2022 04:21
Adding fields and values to your Devise MODEL in Rails 4+

If you experimented with Devise in Rails 4 recently and tried to edit or create accounts in the devise gem with extra values like name, phone and avatar you must have seen that Rails 4 silently ignores the extra fields you inserted in your forms. When you tried atrr_accesible in your model your rails app wouldn't even start or would leave you with screens of errors.

This is because Rails 4 uses a new kind of attr_accesible where you have to define all accessible or now called "required" values for each method they should be accessible from.

when defining for example your edit field you should add an extra line"

params.require(:model).permit(:extra_field1, :extra_field2)

##In Devise

@HendrikPetertje
HendrikPetertje / document.ready with turbolinks.md
Created October 29, 2013 01:38
How to document ready with turbolinks in Rails

Step # 1: Add a Linux/UNIX user called tom

Type the following commands to create a UNIX/Linux user called tom:

# adduser tom
# passwd tom

Step # 2: Becoming a superuser

You need to login as database super user under postgresql server. Again the simplest way to connect as the postgres user is to change to the postgres unix user on the database server using su command as follows:

@HendrikPetertje
HendrikPetertje / Concrete 5 gidsje.md
Created November 28, 2013 14:37
Alles over de design basis van Concrete 5. Bouw gemakkelijk je html ontwerpen om naar thema's voor content management system concrete5

#Concrete 5 gidsje ##Intro Je begint met het maken van een aantal vasste elementen:

Een perfecte mappen structuur

  • Themanaam
    • default.php
    • description.txt
    • thumbnail.png
  • assets
set :rbenv_ruby, "2.0.0-p353"
set :application, 'vivorbi'
set :repo_url, 'github ssh repo'
# ask :branch, proc { `git rev-parse --abbrev-ref HEAD`.chomp }
set :scm, :git
set :format, :pretty
set :log_level, :info