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
/** | |
* Add "Force Shortcodes" setting to specific blocks | |
* by @frzsombor - 2024 | |
*/ | |
(function() { | |
/* Basic config */ | |
const attributeNS = 'frzsombor/force-shortcodes'; // Namespace for JS filters | |
const attributeName = 'forceShortcodes'; // camelCasedName for storing data |
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
$ratios: ( | |
4 3, | |
3 2, | |
16 9, | |
); | |
@each $x, $y in $ratios { | |
.aspect-ratio-padding-#{$x}-#{$y} { | |
padding-bottom: ($y / $x * 100%); | |
} |
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
//Based on: https://stackoverflow.com/a/24441276/2953830 | |
//Few things fixed by frzsombor | |
$.fn.deserialize = function(serializedString) { | |
var $form = $(this); | |
$form[0].reset(); // (A) optional | |
serializedString = serializedString.replace(/\+/g, '%20'); // (B) | |
var formFieldArray = serializedString.split('&'); | |
if (!serializedString) { | |
return this; |
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 (!function_exists('mb_str_split')) { | |
/** | |
* Convert a multibyte string to an array | |
* | |
* @param string $string The input string. | |
* @param integer $split_length Maximum length of the chunk. | |
* @param string $encoding The encoding parameter is the character encoding. | |
* @return array |
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
#/bin/sh | |
ffmpeg -i input -c:v libx264 -preset slow -profile:v high -crf 18 -coder 1 -pix_fmt yuv420p -movflags +faststart -g 30 -bf 2 -c:a aac -b:a 384k -profile:a aac_low output |
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
http://superuser.com/a/74012 | |
http://stackoverflow.com/a/15076602 | |
- http://stackoverflow.com/questions/7580508/getting-chrome-to-accept-self-signed-localhost-certificate/15076602#comment44445682_15076602 | |
Add the exported .cer to keychain | |
In the .cer details, set "Secure Sockets Layer (SSL)" to "Always trust" | |
more details coming soon |
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 | |
/* | |
|-------------------------------------------------------------------------- | |
| Sharing Laravel's session and checking authentication | |
|-------------------------------------------------------------------------- | |
| | |
| Use the following code in any CMS (WordPress, Joomla, etc), filemanager (CKFinder, | |
| KCFinder, simogeos's Filemanager, etc), or any other non-Laravel project to boot into | |
| the Laravel framework, with session support, and check if the user is authenticated. |