Skip to content

Instantly share code, notes, and snippets.

View FinalAngel's full-sized avatar
🖐️
>

Angelo Dini FinalAngel

🖐️
>
View GitHub Profile
#!/bin/bash
NODE_VERSION=0.4.7
NPM_VERSION=1.0.94
# Save script's current directory
DIR="$( cd -P "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
#cd "${DIR}"
#
@FinalAngel
FinalAngel / gist:6807136
Last active December 24, 2015 13:39
Migrating old projects to Makefile structure

Updating to Makefile

To make it easier for everyone to setup projects, we use the following commands to init, update and running:

make init (creating startup point, requires additional infos within the readme) make update (autoupdates project, commit all changes) make run (runs the project)

Frontend Testing Setup

Ideally this is the following we want to achieve:

  • Project setup works flawelessly, when running divio setup and divio run everything should work (We might also want to test that essential divio api commands are working)
  • We define a set of "core templates" which are tested agains:
    • Screenshot differences when changing code
Django Template
===============
{# our styleguide would provide an API to load templates #}
{% load styleguide %}
{# we loop over our regular object, and assign the appropriate variables #}
{% for card in cards %}
styleguide.load('components/cards', {
'type': 'simple',
@FinalAngel
FinalAngel / osx-setup.rst
Last active August 29, 2015 14:04
Divio OSX Setup

Setup Guide for new Laptops

Configuration Setup

Install a fresh version of OSX and use the following configurations:

  • Username: divio
  • Password: stionave
@FinalAngel
FinalAngel / localdevstorage.rst
Last active August 29, 2015 14:06
Local Dev Storage

Instructions

Go to your projects src/settings_local.py and add the following code at the end:

DEFAULT_FILE_STORAGE = 'localdevstorage.http.HttpStorage'
LOCALDEVSTORAGE_HTTP_FALLBACK_DOMAIN = 'http://divio-live.divio.ch/'
LOCALDEVSTORAGE_HTTP_USERNAME = 'divio'
@FinalAngel
FinalAngel / SassMeister-input.scss
Created December 11, 2014 11:37
Generated by SassMeister.com.
// ----
// Sass (v3.4.7)
// Compass (v1.0.1)
// ----
$brand-list:
"primary" "secondary" "sucess" "info" "warning" "danger" "muted"
"gray-darker" "gray-dark" "gray" "gray-light" "gray-lighter";
@each $brand-name in $brand-list {
.brand-#{$brand-name} {
from cms.api import add_plugin
placeholder = page.placeholders.get(slot='content')
add_plugin(placeholder,
'TextPlugin',
self.language_code,
body=self.cleaned_data['content'])