Skip to content

Instantly share code, notes, and snippets.

@konklone
konklone / ssl.rules
Last active December 19, 2025 07:54
nginx TLS / SSL configuration options for konklone.com
# Basically the nginx configuration I use at konklone.com.
# I check it using https://www.ssllabs.com/ssltest/analyze.html?d=konklone.com
#
# To provide feedback, please tweet at @konklone or email [email protected].
# Comments on gists don't notify the author.
#
# Thanks to WubTheCaptain (https://wubthecaptain.eu) for his help and ciphersuites.
# Thanks to Ilya Grigorik (https://www.igvita.com) for constant inspiration.
server {
@GoZOo
GoZOo / install-lamp.bash
Last active December 22, 2015 19:39
Installation d'un serveur lamp basique pour drupal
apt-get install apache2 php5 mysql-server phpmyadmin git-core vim curl php5-curl sendmail
# active apache mods
a2enmod rewrite headers expires
# install pear
wget http://pear.php.net/go-pear.phar
php go-pear.phar
# install drush
@DuaelFr
DuaelFr / i18n_check.drush.inc
Last active December 20, 2015 00:18
Drush i18ncheck
<?php
/**
* @file
* Drush module to check if all translatable strings are safe to translate.
*/
/**
* Implements hook_drush_help().
*/
function i18n_check_drush_help($section) {
@anavarre
anavarre / parser.php
Created June 27, 2013 13:17
Dummy PHP parser to output SQL queries showing which files aren't managed by Drupal
<?php
/**********************************************************************************/
/* Generate a list of filenames to parse in filenames.txt (1 per line) */
/* => running "$ ls -1 > filenames.txt" will output just what you need */
/* */
/* Run the parser.php script from the same directory or change the TXT file path */
/* => Ideally, you just need to run it from the command line: "$ php parser.php" */
/* */
/* Copy/paste the queries that are returned in the MySQL prompt */
/* => MySQL will then return files that are managed by Drupal */
@juampynr
juampynr / mymodule.info
Last active June 9, 2023 21:53
Drupal 7 Views 3 custom field handler
dependencies[] = ctools
; Views Handlers
files[] = views/mymodule_handler_handlername.inc
@hatefulcrawdad
hatefulcrawdad / foundation5-grid.css
Created June 18, 2013 17:31
Sneak peek at what we're thinking about for the Foundation 5 Grid.
/* Row and Column defaults */
.row { margin-left: auto; margin-right: auto; margin-top: 0; margin-bottom: 0; max-width: 62.5em; width: 100%; }
.row .row.collapse { margin-left: 0; margin-right: 0; max-width: none; width: auto; }
.row .row { margin-left: -0.9375em; margin-right: -0.9375em; max-width: none; width: auto; }
.row.collapse .column, .row.collapse .columns { padding-left: 0; padding-right: 0; float: left; }
.column, .columns { padding-left: 0.9375em; padding-right: 0.9375em; width: 100%; float: left; position: relative; }
/* Up to 640px */
@media only screen {
.small-1 { width: 8.33333% }
@DuaelFr
DuaelFr / .gitconfig
Last active February 1, 2023 23:34
Useful git config
[alias]
a = add
aa = add -A
ac = "!f() { curl $@ | git apply --index; }; f"
ac3 = "!f() { curl $@ | git apply -3 --index; }; f"
amend = commit --amend -C HEAD
ap = add -p
app = apply --index
br = branch
cb = checkout -b
@GoZOo
GoZOo / createUserVirtualhostDb.bash
Last active December 15, 2015 16:49
Script bash pour créer un utilisateur, son virtualhost (avec SSL) et sa base de données. Nécessite que le fichier à partir duquel la configuration VirtualHost existe déjà (/root/apache2-default et /root/apache2-default-ssl) Idem pour le .bashrc : /etc/root/.bashrc-default
#! /bin/bash
######################
## Script de création de virtualhost + utilisateur + base de données
######################
## /!\ Penser a modifier [ROOTPASSWORD] pour mysql
######################
## USER
# Prompt user informations
@courgette
courgette / gist:5292061
Created April 2, 2013 13:06
Hook_css_alter custom
function theme_css_alter(&$css) {
// Css Not allowed for theming
$not_allowed_css = array(
'modules/system/system.base.css',
'modules/system/system.menus.css',
'modules/system/system.messages.css',
'modules/system/system.theme.css',
'sites/all/modules/contrib/ctools/css/ctools.css',
);
foreach ($css as $css_filename => $css_settings) {
@davereid
davereid / settings.local.php
Created February 25, 2013 23:05
settings.local.php for development
<?php
// Twig development settings.
$settings['twig_debug'] = TRUE;
$settings['twig_auto_reload'] = TRUE;
$settings['twig_cache'] = FALSE;
// Use FileStorage.
// @see http://drupal.org/node/1908440
// @see http://drupal.org/node/1899842