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 | |
| $path = '/path/to/directory/'; // remeber trailing slash! | |
| $handle = opendir ($path); | |
| while (($filename = readdir ($handle)) !== false) | |
| { | |
| if ($filename != '.' && $filename != '..') | |
| { | |
| $file_array[] = $filename; | |
| } | |
| } |
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
| import sublime, sublime_plugin, os, subprocess | |
| class ConemuCommand(sublime_plugin.TextCommand): | |
| def run(self, edit): | |
| if os.name == "nt": | |
| startupinfo = subprocess.STARTUPINFO() | |
| startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW | |
| process = subprocess.Popen(('c:/Program Files (x86)/ConEmu/ConEmu.exe', '/single', self.view.file_name()), |
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
| /** @jsx React.DOM */ | |
| 'use strict'; | |
| var React = require('react'); | |
| var ContentEditableLabel = React.createClass({ | |
| propTypes: { | |
| tag: React.PropTypes.func, |
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
| .rgba(@colour, @alpha) { | |
| @alphaColour: hsla(hue(@colour), saturation(@colour), lightness(@colour), @alpha); | |
| @ieAlphaColour: argb(@alphaColour); | |
| background-color: @colour; // Fallback for older browsers | |
| // IE hacks | |
| zoom: 1; // hasLayout | |
| background-color: transparent\9; | |
| -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=@{ieAlphaColour}, endColorstr=@{ieAlphaColour})"; // IE 8+ |
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
| @font-face { | |
| font-family: 'font_name'; | |
| src: url('font_name.eot'); | |
| src: local('font_name'), local('font_name'), | |
| url('font_name.eot?#iefix') format('embedded-opentype'), | |
| url('font_name.woff') format('woff'); | |
| } |
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
| //============================================================ | |
| // | |
| // linear-gradient | |
| // | |
| // @param dir : top, left, 90deg | |
| // @param start-color : #000, rgba(255,255,255,0.5) | |
| // @param end-color : #000, rgba(255,255,255,0.5) | |
| // | |
| // NOTE: The direction for the IE gradient is automagically | |
| // worked out for you based either on the direction or the |
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() { | |
| // To keep track of how many images have loaded | |
| var loaded = 0; | |
| // Let's retrieve how many images there are | |
| var numImages = $("img").length; | |
| // Let's bind a function to the loading of EACH image | |
| $("img").load(function() { | |
| // One more image has loaded | |
| ++loaded; | |
| // Only if ALL the images have loaded |
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 http://stackoverflow.com/a/11381730/989439 | |
| function mobilecheck() { | |
| var check = false; | |
| (function(a){if(/(android|ipad|playbook|silk|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(a)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-| |
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
| <IfModule mod_deflate.c> | |
| # Compress all output labeled with one of the following MIME-types | |
| # (for Apache versions below 2.3.7, you don't need to enable `mod_filter` | |
| # and can remove the `<IfModule mod_filter.c>` and `</IfModule>` lines | |
| # as `AddOutputFilterByType` is still in the core directives). | |
| <IfModule mod_filter.c> | |
| AddOutputFilterByType DEFLATE application/atom+xml \ | |
| application/javascript \ | |
| application/json \ |
OlderNewer