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 | |
| # Author: Guillermo Fernandez Castellanos | |
| # <guillermo.fernandez.castellanos AT gmail.com> | |
| # | |
| # Altered by David Reynolds for Debian Stable <david AT reynoldsfamily.org.uk> | |
| # Further altered by Michael Whalen <michael at whalesalad.com> | |
| # | |
| # In this example, my django projects are stored in /usr/local | |
| # one is named siteone and the other is named sitetwo. |
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
| // Rough method to determining a file's type based upon it's extension. | |
| // Requires jQuery | |
| function getFileType(filename) { | |
| // Get the extension of the file | |
| var extension = filename.split('.').pop().toLowerCase(); | |
| // File types and their corresponding possible extensions. | |
| var types = { | |
| 'image': ['jpg', 'jpeg', 'gif', 'png', 'bmp'], | |
| 'audio': ['wav', 'mp3', 'wma'], |
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
| var BAZoom = new Cobra.Class({ | |
| __init__: function(self) { | |
| // Create the BAZoom container | |
| self.container = $('<div/>').attr({ id: 'BAZoom' }); | |
| self.container.hide(); | |
| // Create inner table | |
| var table = new Array( | |
| '<table id="BAZoom_table">', | |
| '<tbody>', |
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 | |
| /** | |
| * @package Word-Press | |
| * @subpackage Tasty | |
| */ | |
| class Settings { | |
| function __construct() { | |
| $this->get_settings(); | |
| // update_option('tasty_settings', NULL); |
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 tasty_title($length = 35){ | |
| $title = get_the_title(); | |
| // Shorten | |
| if (strlen($title) > $length) { | |
| $suffix = '...'; | |
| $short_desc = trim(str_replace(array("\r","\n", "\t"), ' ', strip_tags($title))); | |
| $desc = trim(substr($short_desc, 0, $length)); | |
| $lastchar = substr($desc, -1, 1); | |
| if ($lastchar == '.' || $lastchar == '!' || $lastchar == '?') $suffix=''; |
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
| from django.contrib import admin | |
| from whalesalad.asides import models as asides_models | |
| class AsideAdmin(admin.ModelAdmin): | |
| date_hierarchy = 'published' | |
| list_display = ('title', 'published', ) | |
| prepopulated_fields = { 'slug': ('title', ) } | |
| search_fields = ('title', 'slug', 'url', ) | |
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
| const PKSupportsTouches = ("createTouch" in document); | |
| const PKStartEvent = PKSupportsTouches ? "touchstart": "mousedown"; | |
| const PKMoveEvent = PKSupportsTouches ? "touchmove": "mousemove"; | |
| const PKEndEvent = PKSupportsTouches ? "touchend": "mouseup"; | |
| function PKUtils() {} | |
| PKUtils.assetsPath = ""; | |
| PKUtils.t = function(b, a) { | |
| return "translate3d(" + b + "px, " + a + "px, 0)" | |
| }; | |
| PKUtils.px = function(a) { |
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 | |
| /* | |
| This creates a global variable called SG_STATIC with the full absolute URL to the static directory. | |
| Note: this will only work if you're creating the statement inside of the base directory of your plugin | |
| */ | |
| define('SG_STATIC', WP_PLUGIN_URL.'/'.basename(dirname(__FILE__)).'/static'); | |
| // For example: | |
| echo SG_STATIC; |
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
| 3002.pdf | |
| CSI.S10E09.720p.HDTV.x264-CTU.nfo | |
| Community.S01E11.720p.HDTV.X264-DIMENSION.nfo | |
| Dispatcher.pdf | |
| Estimate-0000001.pdf | |
| Group_PowerPoint_Presentation_Outline.docx | |
| Half A4 - Ad.tif | |
| Images | |
| Invoice-0000002.pdf | |
| K1RVhGOv6n-latest.html |
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 | |
| public static function primary_nav() { | |
| // The site-wide navigation | |
| // wp_list_pages(array('depth' => '1', 'title_li' => false)); | |
| $p = get_pages(array('parent' => 0, 'sort_column' => 'menu_order', 'hierarchical' => 0)); | |
| $pages = array(); | |
| global $wp_query; | |
| if (is_page() || is_attachment() || $wp_query->is_posts_page) | |
| $current_page = $wp_query->get_queried_object_id(); |