Skip to content

Instantly share code, notes, and snippets.

@ahelja
ahelja / keybase.md
Last active November 21, 2020 08:02
Keybase

Keybase proof

I hereby claim:

  • I am arnelh on github.
  • I am arnel (https://keybase.io/arnel) on keybase.
  • I have a public key ASB_TBoBWqxd3XG29y0REywJ2_5DFug0h5soMEVcaBYJWAo

To claim this, I am signing this object:

@ahelja
ahelja / Gruntfile.js
Last active November 21, 2020 08:01
Gruntfile file
/* global module */
'use strict';
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
less: {
development: {
@ahelja
ahelja / dbsync.php
Last active November 21, 2020 08:16
Sync Local And Remote Databases
#!/usr/bin/php
<?php
/**
* This script enables you to copy the structure and content of databases back and
* forth between remote and local databases. Remote databases are accessed through
* SSH tunnels.
*
* This script operates in two modes. The mode is passed in the first parameter
* -- put: Copy a local database to a remote server
* -- get: Copy a remote database to a local server
@ahelja
ahelja / svn_import_update
Last active November 21, 2020 08:19 — forked from degami/svn_import_update
Svn import update
sviluppo@dev:~$ cat /usr/local/bin/update_svn_proj.sh
#/bin/bash
VHOSTSDIR="/var/www/vhosts/";
if [ "$(id -u)" != "0" ]; then
echo "This script must be run as root" 1>&2
exit 1
fi
@ahelja
ahelja / untitled.m
Last active November 21, 2020 08:18
Step by step Drupal install with drush
› drush dl drupal --drupal-project-rename="projectname"
• Install site
› cd projectname/sites/all/modules/
› mkdir contrib custom
› drush dl adminimal_theme adminimal_admin_menu module_filter
› drush en -y adminimal_admin_menu module_filter
› drush variable-set admin_theme adminimal
@ahelja
ahelja / Installing Drupal with drush
Created September 9, 2016 13:17
Installing Drupal with drush
› drush dl drupal --drupal-project-rename="projectname"
• Install site
› cd projectname/sites/all/modules/
› mkdir contrib custom
› drush dl adminimal_theme adminimal_admin_menu module_filter
› drush en -y adminimal_admin_menu module_filter
› drush variable-set admin_theme adminimal
@ahelja
ahelja / Welcome to Ubuntu 12.10
Created September 9, 2016 13:27
Welcome to Ubuntu 12.10
-
Welcome to Ubuntu 12.10 (GNU/Linux 3.5.0-51-generic i686)
mysql Ver 14.14 Distrib 5.5.37, for debian-linux-gnu (i686) using readline 6.2
PHP 5.4.6-1ubuntu1.8 (cli) (built: Apr 4 2014 01:34:09)
Server version: Apache/2.2.22 (Ubuntu)
@ahelja
ahelja / my.cnf
Last active November 21, 2020 08:01
Mamp config
# Custom my.cnf for use with MAMP. Place this file in `/Application/MAMP/conf/` and restart MAMP
# Example MySQL config file for large systems.
#
# This is for a large system with memory = 512M where the system runs mainly
# MySQL.
#
# MySQL programs look for option files in a set of
# locations which depend on the deployment platform.
# You can copy this option file to one of those
# locations. For information about these locations, see:
@ahelja
ahelja / drush-ckeditor
Last active November 21, 2020 08:18
Drush dl ckeditor
- downloads the module.
- enables the module. If you skip this step, the next one won't work.
- downloads the library.
- clears cache on your site.
drush dl ckeditor
drush en -y ckeditor
drush ckeditor-download
drush cc all
@ahelja
ahelja / selectors.js
Last active November 21, 2020 08:18
Selectors
var SELECTORS = {
state: [
'inverse',
'toggled',
'switched',
'original',
'initial',
'identified',
'disabled',
'loading',