This file contains 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 | |
/* The new responsive image feature in wordpress 4.4 causes image sourceset attribuet | |
to insert images as HTTP rather than HTTPS. This completely breaks images on sites where | |
the site is loaded ( and in sometimes force-loaded) to be served via HTTPS | |
The following plugin changes these images to be HTTPS if the site is served via HTTPS | |
*/ | |
if ( is_ssl() ) { | |
add_filter('wp_calculate_image_srcset', 'psu_https_srcset_fix' , 100 , 5); | |
} | |
function psu_https_srcset_fix( $sources, $size_array, $image_src, $image_meta, $attachment_id ){ |
This file contains 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
@echo off | |
:: set code-page for UTF-8 charset. | |
chcp 65001 | |
:: normalise to fully qualified path. short path (8.3) is used for testing the path. | |
set FOLDER=%~s1 | |
for /f %%a in ("%FOLDER%") do ( set "FOLDER=%%~fsa" ) | |
:: verify existing folder. | |
if ["%FOLDER%"]==[""] ( goto RUN_STANDARD ) |
This file contains 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
<code_scheme name="Laravel"> | |
<option name="SOFT_MARGINS" value="120" /> | |
<CssCodeStyleSettings> | |
<option name="HEX_COLOR_LOWER_CASE" value="true" /> | |
<option name="HEX_COLOR_SHORT_FORMAT" value="true" /> | |
</CssCodeStyleSettings> | |
<JSCodeStyleSettings version="0"> | |
<option name="FORCE_SEMICOLON_STYLE" value="true" /> | |
<option name="FIELD_PREFIX" value="" /> | |
<option name="FILE_NAME_STYLE" value="CAMEL_CASE" /> |
This file contains 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
<? | |
/* This file is released under the GPL, any version you like | |
* | |
* PHP PSD reader class, v1.3 | |
* | |
* By Tim de Koning | |
* | |
* Kingsquare Information Services, 22 jan 2007 | |
* | |
* example use: |
This file contains 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
/*! | |
* ZeroClipboard | |
* The ZeroClipboard library provides an easy way to copy text to the clipboard using an invisible Adobe Flash movie and a JavaScript interface. | |
* Copyright (c) 2014 Jon Rohan, James M. Greene | |
* Licensed MIT | |
* http://zeroclipboard.org/ | |
* v2.1.6 | |
*/ | |
(function(window, undefined) { | |
"use strict"; |
This file contains 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 | |
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ | |
/** | |
* Pure-PHP PKCS#1 (v2.1) compliant implementation of RSA. | |
* | |
* PHP versions 4 and 5 | |
* | |
* Here's an example of how to encrypt and decrypt text with this library: | |
* <code> |
This file contains 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 | |
$num = 1000; | |
$times = 3; | |
$algorithms = array('insert', 'shell', 'bubble', 'quick', 'select', 'heap', 'merge', 'radix'); | |
$arr = array(); | |
while (count($arr) < $num) { | |
$key = rand(1, $num * 10); | |
$arr[$key] = 1; |
This file contains 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 | |
if(!file_exists(__DIR__ . '/' . $_SERVER['REQUEST_URI'])){ | |
$_GET['_url'] = $_SERVER['REQUEST_URI']; | |
} | |
return false; |
NewerOlder