This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Install Command line tools (requires Xcode from app store) | |
xcode-select --install | |
# install homebrew | |
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
mkdir ~/bin | |
mkdir ~/.composer | |
mkdir -p ~/.vim/swaps |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*! jQuery v1.7.2 jquery.com | jquery.org/license */ | |
(function(a,b){function cy(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cu(a){if(!cj[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){ck||(ck=c.createElement("iframe"),ck.frameBorder=ck.width=ck.height=0),b.appendChild(ck);if(!cl||!ck.createElement)cl=(ck.contentWindow||ck.contentDocument).document,cl.write((f.support.boxModel?"<!doctype html>":"")+"<html><body>"),cl.close();d=cl.createElement(a),cl.body.appendChild(d),e=f.css(d,"display"),b.removeChild(ck)}cj[a]=e}return cj[a]}function ct(a,b){var c={};f.each(cp.concat.apply([],cp.slice(0,b)),function(){c[this]=a});return c}function cs(){cq=b}function cr(){setTimeout(cs,0);return cq=f.now()}function ci(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ch(){try{return new a.XMLHttpRequest}catch(b){}}function cb(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script src="jquery.matchHeight.js" type="text/javascript"></script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function theme_form_alter(&$form, &$form_state, $form_id) { | |
if ($form_id == 'search_block_form') { | |
$form['search_block_form']['#title'] = t('Search'); // Change the text on the label element | |
$form['search_block_form']['#title_display'] = 'invisible'; // Toggle label visibilty | |
//$form['search_block_form']['#size'] = 40; // define size of the textfield | |
$form['search_block_form']['#default_value'] = t('Search'); // Set a default value for the textfield | |
//$form['actions']['submit']['#value'] = t('GO!'); // Change the text on the submit button | |
$form['actions']['submit']['#value'] = decode_entities(''); // Uses a unicode code (eg. useful when using awesomefonts) | |
//$form['actions']['submit'] = array('#type' => 'image_button', '#src' => base_path() . path_to_theme() . '/immagini/btnCerca.png'); // Adds an image |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Creates 'nodetype' pages. | |
* | |
* @param array $content | |
* Assoc array with machine names as key and node title. | |
*/ | |
function yourmodule_create_nodetype($content) { | |
foreach ($content as $machine_name => $content_item) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export CLICOLOR=1 | |
export LSCOLORS=GxFxCxDxBxegedabagaced | |
# Autocompletion for git. | |
# http://code-worrier.com/blog/autocomplete-git/ | |
# Download doing curl https://raw.github.com/git/git/master/contrib/completion/git-completion.bash -o ~/.git-completion.bash | |
if [ -f ~/.git-completion.bash ]; then | |
. ~/.git-completion.bash | |
fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.background-image { | |
background: image-url('image-name.png'); //image-url() is defined in config.rb file so its prefered | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//More info: http://css-tricks.com/how-nth-child-works/ | |
ul li:nth-child(3n+3) { | |
color: #ccc; | |
} | |
ul li:nth-child(5) { | |
color: #ccc; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Creates a copy of current database, deletes it and syncs it with dev | |
drush ard && drush sql-drop && drush sql-sync @site.dev @site.local | |
# Sync files | |
drush rsync @site.dev:%files @site.local:%files |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
drush php-eval 'print_r(module_implements("hook_name"))' |