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
// ---- | |
// Sass (v3.3.14) | |
// Compass (v1.0.0.rc.0) | |
// ---- | |
%header { | |
h2 { | |
color: yellow; | |
} | |
h3 { |
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
// ---- | |
// Sass (v3.3.10) | |
// Compass (v1.0.0.alpha.20) | |
// ---- | |
@mixin x-rem($property, $values) { | |
$base-font-size: 10px; | |
$px-values: (); | |
$rem-values: (); | |
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
// ---- | |
// Sass (v3.3.10) | |
// Compass (v1.0.0.alpha.20) | |
// ---- | |
@mixin x-rem($property, $values) { | |
$base-font-size: 10px; | |
$px-values: (); | |
$rem-values: (); | |
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
// Find some words with numbers numbers | |
1) breakpoint\((\d+)\) |
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
/** | |
* Inspired by lea verou's cleanest spinner. | |
* http://lea.verou.me/2013/11/cleanest-css-spinner-ever/ | |
* | |
* Configurable with 4 variables. | |
* $closeness: gap between bars. | |
* $length: length of each bars in px. | |
* $thickness: thickness of each spinner bars. | |
* $color: color of bars. In some color it won't work properly eg. "red". | |
*/ |
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
/** | |
* variables:- | |
* @width: horizontal length of arrow. | |
* @height: vertical length of arrow. | |
* @dir: dirction of arrow. eg. top, right, bottom, left. | |
* @bg: color of arrow. | |
*/ | |
@mixin arrows($width, $height, $dir, $bg) { | |
width: $width; |
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 | |
exec('git pull && drush cc all', $output); | |
/** | |
* Pull from specific branch. | |
* eg. exec('git pull origin <branchname> && drush cc all', $output); | |
*/ | |
print_r($output); |
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/bash | |
#This is very simple script. All commands will run one by one. So If any command will fail, Script will not stop. | |
#You Should have install drush on server and provide ssh password. | |
ssh <USER>@<SERVER> "drush -r <DRUPAL_ROOT_DIR> sql-dump|bzip2 -c" > db.sql.bz2 | |
echo 'db dump from server'; | |
bunzip2 db.sql.bz2 | |
echo 'unziped db'; | |
#Delete the old db replace <password> with original password (without any space after -p). |
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
We have to change a field value when changing other field. Drupal Ajax menu is right method, but I found other way easier. | |
hook_menu :- Create a url with hook_menu. | |
page_callback :- In page callback we have to process all things and return data (in json format) that will need in javascript. | |
drupal_add_js :- Now use $.get method in js and hit that url and parse json ($.parseJSON) data from response and perform other actions. | |
/*======== Code Example==========*/ |