Skip to content

Instantly share code, notes, and snippets.

View Paulmicha's full-sized avatar

Paul Michalet Paulmicha

  • Apprenti redirectionniste
  • Porto Alegre, Brasil
  • X @Paulmicha
View GitHub Profile
@zetagraph
zetagraph / gulp-drupal-theme
Created November 15, 2014 20:09
gulp drupal theme
var gulp = require("gulp");
var sass = require("gulp-sass");
var filter = require('gulp-filter');
var sourcemaps = require('gulp-sourcemaps');
var browserSync = require("browser-sync");
var reload = browserSync.reload;
var shell = require('gulp-shell');
// sass task
gulp.task('sass', function () {
@pburtchaell
pburtchaell / styles.css
Last active February 25, 2024 12:24
VH and VW units can cause issues on iOS devices. To overcome this, create media queries that target the width, height, and orientation of iOS devices.
/**
* VH and VW units can cause issues on iOS devices: http://caniuse.com/#feat=viewport-units
*
* To overcome this, create media queries that target the width, height, and orientation of iOS devices.
* It isn't optimal, but there is really no other way to solve the problem. In this example, I am fixing
* the height of element `.foo` —which is a full width and height cover image.
*
* iOS Resolution Quick Reference: http://www.iosres.com/
*/
@jmafc
jmafc / component.json
Last active August 29, 2015 14:02
hello_component - update http://smalljs.org/package-managers/component-part-1/ to work with component@1.0.0-rc5
{
"name": "hello_component",
"dependencies": {
"component/dialog": "~0.2.0"
},
"scripts": ["index.js"]
}
---
# Vars is a list of variables, some will be required for the component library, others are specific to the custom tasks.
vars:
default_source: drupal
drupal_version: 7
static_root: static
dev_root: dev
bitbucket_user: username
github_user: username
@benosman
benosman / library.ini
Last active December 31, 2015 05:49
Example library file for Drupal workflow tool.
# Example component library file.
#
# Repo is set to drupal by default, so you can use the short form of the projects
#
# Components are separated into [groups]
#
# Components should be in form:
# source=version
##
# Available Sources (set using _source):
@EvaldasUzkuras
EvaldasUzkuras / drupal-deploy.php
Last active December 19, 2015 08:49 — forked from krisnoble/deploy.php
Drupal deploy script
<?php
date_default_timezone_set('Europe/Vilnius'); // Set this to your local timezone - http://www.php.net/manual/en/timezones.php
/**
* The root directory where the repos live.
*
* @var string
*/
$root_dir = '/your/root/dir/';

Lesson's learnt building the Guardian

Below is a collection of my favourite responses I gathered from Guardian engineers when asked the question: What have you learnt starting from scratch and building a mobile-first next generation web platform for the Guardian?

Daithi O Crualaoich

  • Work with great people.
  • Deploy like crazy. This means the team has to control the infrastructure as well as code.
  • Design is not a service. Designers have to sit in the team.
  • Infrastructure is intrinsically unreliable. Discard and replace is the robust strategy.
  • Use your CDN for HTML too.
  • Don't always do as you are told.
@krisnoble
krisnoble / deploy.php
Last active April 25, 2023 15:52
A slightly modified version of Brandon Summers' script. For more information: http://simianstudios.com/blog/post/using-bitbucket-for-automated-deployment-of-multiple-repositories
<?php
date_default_timezone_set('Europe/London'); // Set this to your local timezone - http://www.php.net/manual/en/timezones.php
/**
* The root directory where the repos live.
*
* @var string
*/
$root_dir = '/your/root/dir/';
@mbostock
mbostock / .block
Last active March 26, 2024 18:26 — forked from mbostock/.block
Curved Links
license: gpl-3.0
@cbmd
cbmd / default.conf
Created December 9, 2012 21:13
nginx config - dynamic virtual hosts
server {
index index.php;
set $basepath "/var/www";
set $domain $host;
# check one name domain for simple application
if ($domain ~ "^(.[^.]*)\.dev$") {
set $domain $1;
set $rootpath "${domain}";