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 | |
| /* | |
| I wrote this function to progressively obfuscate text in MAKEbook.io. When it KINDA worked, I just used it. | |
| It can take a lot of improvement. I kinda just tweaked the values until it was good enough. It's not SO progressive though. | |
| It takes all the output of your PHP scripts via ob_start(), reroutes that to the obfuscation function. | |
| You should check if user paid for book or not, then either run ob_start or not! | |
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 | |
| /* | |
| - Regex validation for slug | |
| - Re-generate slug when user leave the currente input | |
| */ | |
| TextInput::make('slug') | |
| ->maxLength(250) | |
| ->regex('/^[a-z0-9]+(?:[_-][a-z0-9]+)*$/') |
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 | |
| /* | |
| Create slug in other field called "slug" but only if the "slug" input is empty | |
| */ | |
| TextInput::make('title') | |
| ->maxLength(250) | |
| ->live(onBlur: true) | |
| ->afterStateUpdated(fn(Set $set, ?string $state, Get $get) => strlen($get('slug')) === 0 ? $set('slug', Str::slug($state)) : 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
| --- Use this for export db from terminal | |
| --- Comando para exportar base de datos desde la terminal | |
| mysqldump -u root -p data_base_name > exported_file_name.sql | |
| --- |
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 Youtube = (function () { | |
| 'use strict'; | |
| var video, results; | |
| var getThumb = function (url, size) { | |
| if (url === null) { | |
| return ''; | |
| } | |
| size = (size === null) ? 'big' : size; |
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 | |
| Route::get('/', function () { | |
| // Si el usuario está autenticado/ ha iniciado sesión redireccionará a la página de admin | |
| // if user is authenticated will redirecto to admin section | |
| if (Auth::check()) { | |
| return redirect()->to(route('admin')); | |
| } | |
| return view('public-home'); |
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 | |
| /** | |
| * Kullanicinin kullandigi isletim sistemi bilgisini alir. | |
| * | |
| * @since 2.0 | |
| */ | |
| function getOS() { | |
| $user_agent = $_SERVER['HTTP_USER_AGENT']; |
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 | |
| //Adding the Open Graph in the Language Attributes | |
| function add_opengraph_doctype($output) | |
| { | |
| return $output . ' xmlns:og="http://opengraphprotocol.org/schema/" xmlns:fb="http://www.facebook.com/2008/fbml"'; | |
| } | |
| add_filter('language_attributes', 'add_opengraph_doctype'); | |
| //Lets add Open Graph Meta Info |
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 | |
| add_filter( 'woocommerce_checkout_fields' , 'virtual_products_less_fields' ); | |
| /** | |
| * WooCommerce Remove Address Fields from checkout based on presence of virtual products in cart | |
| * @link https://www.skyverge.com/blog/checking-woocommerce-cart-contains-product-category/ | |
| * @link https://docs.woothemes.com/document/tutorial-customising-checkout-fields-using-actions-and-filters/ | |
| * @link https://businessbloomer.com/woocommerce-hide-checkout-billing-fields-if-virtual-product-cart/ | |
| */ | |
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
| <? | |
| // Se agregaron backslashes en la clase "work-position" | |
| echo "<li class=\"work-position\"> | |
| <h5>{$jobs[$idx]['title']}</h5> | |
| <p>{$jobs[$idx]['description']}</p> | |
| <strong>Achievements:</strong> | |
| <ul> | |
| <li>Lorem ipsum dolor sit amet, 80% consectetuer adipiscing elit.</li> | |
| <li>Lorem ipsum dolor sit amet, 80% consectetuer adipiscing elit.</li> |
NewerOlder