Skip to content

Instantly share code, notes, and snippets.

@hilja
hilja / gist:6192275
Created August 9, 2013 09:08
config.rb file for Compass projects
http_path = "/"
css_dir = ".."
sass_dir = ".."
images_dir = "images"
javascripts_dir = "js"
# output setup
# sass_options = { :sourcemap => true }
# sass_options = { :debug_info => true }
# output_style = :nested
@hilja
hilja / .csscomb.json
Created April 4, 2014 10:43
My csscomb conf file. Just basically brutally alphabetised.
{
"exclude": [
".git/**",
"node_modules/**"
],
"always-semicolon": true,
"block-indent": " ",
"colon-space": ["", " "],
"color-case": "lower",
"color-shorthand": true,
@hilja
hilja / create-mysql-db.sh
Last active August 17, 2020 06:21
Shell script to create MySQL database and user
#!/bin/bash
# Functions
ok() { echo -e '\e[32m'$1'\e[m'; } # Green
EXPECTED_ARGS=3
E_BADARGS=65
MYSQL=`which mysql`
Q1="CREATE DATABASE IF NOT EXISTS $1;"
@hilja
hilja / common.conf
Last active August 17, 2020 06:19
My NGinx configuration files. In no means the perfect setup. /etc/nginx/nginx.conf is the main conf file.
# Global configuration file.
# ESSENTIAL : Configure Nginx Listening Port
#listen 127.0.0.1:8080;
listen 80;
# ESSENTIAL : Default file to serve. If the first file isn't found
index index.php index.html index.htm;
# ESSENTIAL : no favicon logs
location = /favicon.ico {
@hilja
hilja / nginx-server-block.sh
Last active August 29, 2015 13:59
Shell script to make NGinx server blocks.
#!/usr/bin/env bash
#
# Nginx - new server block
# Functions
ok() { echo -e '\e[32m'$1'\e[m'; } # Green
die() { echo -e '\e[1;31m'$1'\e[m'; exit 1; }
# Variables
NGINX_AVAILABLE_VHOSTS='/etc/nginx/sites-available'
@hilja
hilja / SassMeister-input-HTML.html
Last active August 29, 2015 14:13
Generated by SassMeister.com.
<h2>nth()</h2>
<code>$hrs: pony, horse, mini-horse, maxi-pony;</code>
<div class="horses-nth-1"></div>
<div class="horses-nth-2"></div>
<div class="clear"></div>
<h2>Loop</h2>
@hilja
hilja / SassMeister-input-HTML.html
Last active January 12, 2019 11:00
Generated by SassMeister.com.
<h1>Horses with backgorunds!</h1>
<div class="horses--horse"></div>
<div class="horses--pony"></div>
<div class="horses--maxi-pony"></div>
<div class="horses--mini-horse"></div>
@hilja
hilja / SassMeister-input.scss
Last active August 29, 2015 14:14
Generated by SassMeister.com.
// ----
// Sass (v3.4.12)
// Compass (v1.0.3)
// ----
//--------------------------------------//
// Media queries
//--------------------------------------//
$breakpoints: (
"s": (min-width, 48em),
@hilja
hilja / SassMeister-input.scss
Last active August 22, 2016 21:22
Generated by SassMeister.com.
// ----
// Sass (v3.4.9)
// Compass (v1.0.1)
// ----
$primary-colors: (
"red": "#ff0000",
"green": "#00ff00",
"blue": "#0000ff"
);
@hilja
hilja / SassMeister-input.scss
Last active August 29, 2015 14:14
Generated by SassMeister.com.
// ----
// Sass (v3.4.9)
// Compass (v1.0.1)
// ----
$primary-colors: (
"red": (rbga(255, 0, 0, .5), rbg(255, 0, 0)),
"green": (rbga(255, 0, 0, .5), rbg(0, 255, 0)),
"blue": (rbga(255, 0, 0, .5), rbg(0, 0, 255))
);