Skip to content

Instantly share code, notes, and snippets.

@luisfc
luisfc / install nodejs, npm and gulp
Last active October 3, 2020 16:37
Install nodejs, npm and gulp ubuntu 16.04
sudo apt-get update
sudo apt-get install nodejs
sudo apt-get install npm
## Use n module from npm in order to upgrade node
sudo npm cache clean -f
sudo npm install -g n
sudo n stable
@joshkoenig
joshkoenig / spiderme.sh
Last active May 23, 2018 22:50
Spider-based Benchmarking with wget
#!/bin/sh
# Spiderme - quick and clean benchmarking for website performance on Pantheon.
#
# This script uses wget to "spider" your website to provide a good set of data
# on site performance. It will automatically bypass Pantheon's edge cache, and
# skip images, javascript, css, etc. It will also only spider links that are
# under the multidev environment you are spidering.
#
#
@ModulesUnraveled
ModulesUnraveled / drushrc.php
Last active May 14, 2017 23:34
Useful Drush shell-aliases for Drupal 8 development.
<?php
/**
* These aliases (while working) are NO LONGER MAINTAINED.
*
* Development has moved to a full github repo here:
* https://github.com/ModulesUnraveled/Drush-Shell-Aliases
*
* I'm doing this to make it more easy to include them in your Drupal 8 projects.
@Greg-Boggs
Greg-Boggs / README.md
Last active August 30, 2023 10:09
Drupal Site Building Best Practices

Better Drupal Building

  • Custom glue should be accomplished with configuration first and PHP code second.

Configuration Management and Dependencies

  • Use Composer (or Drush Make) to build your project and it's depencies.
  • Store your work in files.
  • Set your config directory above the webroot.
  • Sync UUIDs across all developers.

Theming

@Mulkave
Mulkave / drupal-nginx-virtualhost.conf
Created July 29, 2013 09:08
drupal virtual host configuration for Nginx
server {
server_name [host];
root /var/www/[document_root]; ## <-- Your only path reference.
# Enable compression, this will help if you have for instance advagg module
# by serving Gzip versions of the files.
gzip_static on;
location = /favicon.ico {
@webchick
webchick / drupal-hooks-by-implementation
Last active April 9, 2020 10:00
A list of hooks in all* Drupal contrib modules (6.x and 7.x), in descending order of how often they're implemented. (Consolidated a few that were renamed between 6 and 7) * Within a rounding error. :P
Array
(
[hook_menu] => 6744
[hook_uninstall] => 4742
[hook_perm(ission)] => 4012
[hook_install] => 3751
[hook_theme] => 3525
[hook_schema] => 3003
[hook_help] => 2465
[hook_form_alter] => 2273
@johnkary
johnkary / WSSoapClient.php
Created June 27, 2012 20:08
WS-Security for PHP SoapClient
<?php
/**
* Copyright (c) 2007, Roger Veciana
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice, this
@nyergler
nyergler / maildir2mbox.py
Created January 31, 2012 05:39
Convert maildirs (including subfolders) to mbox format
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Frédéric Grosshans, 19 January 2012
Nathan R. Yergler, 6 June 2010
This file does not contain sufficient creative expression to invoke
assertion of copyright. No warranty is expressed or implied; use at
your own risk.
@benbuckman
benbuckman / drupal-syslog-parser.js
Created November 29, 2011 17:56
node.js script to parse Drupal logs in linux syslog (and find distinct 404'd URLs)
// drupal log parser w/ node.js
// takes a filtered syslog file
// run as node `drupal-syslog-parser.js LOGPATH`
// [install dependencies (lazy,underscore) first with `npm install ___`]
var lazy = require('lazy')
, fs = require('fs')
, path = require('path')
, _ = require('underscore');
@bentruyman
bentruyman / Custom.css
Created August 17, 2011 00:30
IR_Black Theme for Chrome Developer Tools
/**********************************************/
/*
/* IR_Black Skin by Ben Truyman - 2011
/*
/* Based on Todd Werth's IR_Black:
/* http://blog.toddwerth.com/entries/2
/*
/* Inspired by Darcy Clarke's blog post:
/* http://darcyclarke.me/design/skin-your-chrome-inspector/
/*