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 / json
Created January 17, 2015 18:47
sublime settings
{
"atomic_save": false,
"caret_extra_width": 1,
"caret_style": "phase",
"color_scheme": "Packages/User/SublimeLinter/predawn (SL).tmTheme",
"copy_with_empty_selection": false,
"drag_text": false,
"enable_tab_scrolling": false,
"ensure_newline_at_eof_on_save": true,
"font_options":
@HendrikPetertje
HendrikPetertje / changeColumn.md
Last active August 29, 2015 14:04
Een column aanpassen in je app

Een column naam veranderen in je DB zonder oude omgevingen kappot te maken en data te behouden

1 maak een migratie met de naam van je nieuwe column.. in dit geval test_number in tabel Article die al test heeft

rails g migration AddTestNumberToArticle test_number:integer

2 maak een migratie waarin je een task gaat zetten

rails g migration ChangeArticle
@HendrikPetertje
HendrikPetertje / Musthaves.md
Created May 13, 2014 09:05
Ubuntu must have list 2014

calendar

kleine calendar app boven in je scherm die google calendar laat zien.

sudo add-apt-repository ppa:atareao/atareao
sudo apt-get update
sudo apt-get install calendar-indicator
calendar-indicator

wallpaper shuffle

Zeker de life earth is mooi, maar zowieso meer controle op shuffelende wallpapers is goed (plus de awesome auto-download natuurlijk)

@HendrikPetertje
HendrikPetertje / 14.04-post-install.sh
Last active January 27, 2016 06:44
Ubuntu 14.04 post-install
#!/bin/bash
# -*- Mode: sh; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
#
# Authors:
# Sam Hewitt <hewittsamuel@gmail.com>
# Peter van der Meulen <peter@picoreclame.nl>
#
# Description:
# A post-installation bash script for Ubuntu (14.04)
#
@HendrikPetertje
HendrikPetertje / Create-hotspot.md
Last active January 3, 2016 10:09
Infrastructure hotspot with internet share from ubuntu

Interface-Hotspot in ubuntu maken

Installatie

sudo add-apt-repository ppa:nilarimogard/webupd8
sudo apt-get update
sudo apt-get install ap-hotspot

Starten

@HendrikPetertje
HendrikPetertje / Gitlabserver.md
Last active August 26, 2018 06:09
Create your own GitLab server

#Setup Your own Gitlab server from the on-click install image ##Create the server image Login to Digital Ocean and create click the "New Droplet" button. In the page fill out the details for your new droplet. The best thing is to choose $10.- server since this server has the necessary RAM of 1GB. You can however choose for the $5.- server to but this will require setting up Swap once your server is deployed. Now when selecting your image choose "Application" and select GitLab. Create the droplet and wait for your ssh keys to come in.

##Modify the Ubuntu environment. ###Change login details Log in to your root account using your version of the command below

@HendrikPetertje
HendrikPetertje / WildcardDNS.md
Last active December 31, 2015 22:19
Dit mini gidsje (engels) helpt je met het implementeren van wildcard DNS op je rails server met pPassenger en nginx

#Intro Sometimes it can happen that you need a subdomain on your website were you test new features of the site. If this subdomain points to the same server you feel that you wasted time by going trough all those DNS stuff. guess what.. you are. many websites (including Wordpress) have this neat function that when you misstype a subdomain it points to a page 404. Are they making more domains while you are visiting that broken link, or did they in fact register all possible names? no. Meet "wildcard DNS" a system that let's your server create the subdomains and not DNS.

#The steps This guide will help you setup wildcard DNS on your Rails server with Passenger and Nginx.

##1. Domain settings First of all, let's go to the DNS settings within your domain settings on the website were you bought your Domain.

@HendrikPetertje
HendrikPetertje / swap file ubuntu.md
Last active January 26, 2021 07:52
Create a swap file in ubuntu

Is your digitalocean server getting overheated on memory when more and more visitors visit your site while cpu usage stays somehow normal? Chances are that you are not using a swap partition or file on your server. Swap is linux's way of pagefiling. When the server runs out of RAM it will start saving things to a swap partition.

In this small guide I will describe the creation of a swap partition under Linux.

You could create a disk image file (like a daemontools virtual disk) that is filled with zeros. 1GB of zero's in this case:

dd if=/dev/zero of=/mnt/swap.img bs=1M count=1024
But don't do this, keep reading ;)
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
@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