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
| function turn_find_shortcode($atts, $content=null) { | |
| ob_start(); | |
| extract( shortcode_atts( array( | |
| 'find' => '', | |
| ), $atts ) ); | |
| $string = $atts['find']; | |
| $args = array( | |
| 's' => $string, |
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
| # Your init script | |
| # | |
| # Atom will evaluate this file each time a new window is opened. It is run | |
| # after packages are loaded/activated and after the previous editor state | |
| # has been restored. | |
| # | |
| # An example hack to log to the console when each text editor is saved. | |
| # | |
| # atom.workspace.observeTextEditors (editor) -> | |
| # editor.onDidSave -> |
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
| <snippet> | |
| <content><![CDATA[ | |
| import React, { PropTypes } from 'react'; | |
| import styles from './${1}.css'; | |
| export const ${1} = (props) => { | |
| const { | |
| tagName:Tag, | |
| className, |
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
| <div class="thing"></div> | |
| <div class="other-thing"></div> | |
| <div class="thing-three"></div> |
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
| // @include on parent element | |
| // $child should be a selector passed as a string, ie: ".child" | |
| // example usage: http://codepen.io/elseloop/pen/Kkhmo/ | |
| @mixin ghost( $child, $child-width ) { | |
| &:before { | |
| content: ''; | |
| display: inline-block; | |
| vertical-align: middle; | |
| height: 100%; |
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
| /* | |
| Example usage in _example.scss: | |
| // set up sprite maps for mixin | |
| $sprites: sprite-map("icons/*.png"); | |
| $sprites2x: sprite-map("icons-2x/*.png"); | |
| // load up icon list for looping... | |
| $icon-names: ( aws, byod, cloud, intel, key, lock, organize, serve, store, wan ); | |
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
| /** | |
| * Add Styles dropdown to visual editor | |
| */ | |
| function themename_mce_styles_drop( $buttons ) { | |
| array_unshift( $buttons, 'styleselect' ); | |
| return $buttons; | |
| } | |
| add_filter( 'mce_buttons_2', 'themename_mce_styles_drop' ); |
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
| // Make elements align in a grid, regardless of height | |
| // Apply to elements you want as grid items | |
| // $cols = how many columns you want | |
| // $margin-right = margin-right, should be in percent | |
| // $ie8-height = an explicit height for all the elements, "off" by default, only applied to IE | |
| @mixin gridify($cols, $margin-right: 5%, $ie8-height: auto) { | |
| // Math for widths, margins, and clears | |
| $width: (100% / $cols) - $margin-right + ($margin-right / $cols); | |
| $ie-width: (100% / $cols) - $margin-right; | |
| $clearnum: $cols + 1; |
NewerOlder