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
| .shadow { | |
| -moz-box-shadow: inset 0px 40px 40px -40px #ccc; | |
| -webkit-box-shadow: inset 0px 40px 40px -40px #ccc; | |
| box-shadow: inset 0px 40px 40px -40px #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
| function getParameterByName(name) { | |
| name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]"); | |
| var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"), | |
| results = regex.exec(location.search); | |
| return results == null ? "" : decodeURIComponent(results[1].replace(/\+/g, " ")); | |
| } |
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
| RewriteEngine On | |
| RewriteBase / | |
| RewriteCond %{REQUEST_FILENAME} !-f | |
| RewriteCond %{REQUEST_FILENAME} !-d | |
| RewriteRule ^(.+)$ /power.php?story=$1 [L] |
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
| .some-element{ | |
| position: relative; | |
| letter-spacing: 0px; | |
| text-shadow: -1.5px -1px 0px #3a3a3a; | |
| text-decoration: none; | |
| } | |
| .btn-send:before, .btn-send:after { | |
| content: attr(title); | |
| color: rgba(255,255,255,1); |
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
| // Sökvägar | |
| define('WP_SITEURL', 'http://' . DOMAIN . '/wordpress'); | |
| define('WP_HOME', 'http://' . DOMAIN); | |
| define('WP_CONTENT_DIR', dirname( __FILE__ ) . '/content'); | |
| define('WP_CONTENT_URL', 'http://' . DOMAIN . '/content'); | |
| define('WP_DEBUG',false); |
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
| sudo chown -R `whoami` ~/.npm |
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 for ($currentPost=0; $currentPost < count($the_posts); $currentPost++) { | |
| setup_postdata( $GLOBALS['post'] =& $the_posts[$currentPost] ); | |
| ?> | |
| <article class="bit-3 box-<?php echo $box_matrix[$currentPost] ?>"> | |
| <header> | |
| <h2><?php the_title(); ?></h2> | |
| </header> | |
| <p><?php the_content();?></p> | |
| </article> | |
| <?php |
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 myplugin_settings() { | |
| // Add tag metabox to page | |
| register_taxonomy_for_object_type('post_tag', 'page'); | |
| // Add category metabox to page | |
| register_taxonomy_for_object_type('category', 'page'); | |
| } | |
| // Add to the admin_init hook of your theme functions.php file | |
| add_action( 'admin_init', 'myplugin_settings' ); |
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
| <!-- Google Analytics --> | |
| <script> | |
| (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ | |
| (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), | |
| m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) | |
| })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); | |
| ga('create', 'INSERT KEY HERE', 'auto'); | |
| ga('send', 'pageview'); |
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
| * Wrap your actions in this function to throttle the frequency of firing them off, for better performance, esp. on mobile. | |
| * ( source: http://stackoverflow.com/questions/2854407/javascript-jquery-window-resize-how-to-fire-after-the-resize-is-completed ) | |
| var waitForFinalEvent = (function () { | |
| var timers = {}; | |
| return function (callback, ms, uniqueId) { | |
| if (!uniqueId) { uniqueId = "Don't call this twice without a uniqueId"; } | |
| if (timers[uniqueId]) { clearTimeout (timers[uniqueId]); } | |
| timers[uniqueId] = setTimeout(callback, ms); | |
| }; |