Skip to content

Instantly share code, notes, and snippets.

View debugger pause beforeunload
// Run this in the F12 javascript console in chrome
// if a redirect happens, the page will pause
// this helps because chrome's network tab's
// "preserve log" seems to technically preserve the log
// but you can't actually LOOK at it...
// also the "replay xhr" feature does not work after reload
// even if you "preserve log".
window.addEventListener("beforeunload", function() { debugger; }, false)
View gist:1eee62e2a0dfb005a9c86b6ce6a2b331
<script>
$(".schedule-listing-btn a").click (function(){
var type = $(this).data('type');
$("#subscribe_type").val(type);
});
View gist:eacaa84e02fe92a23d15091a634d9896
{
"shops": [
{
"id": 8,
"name": "Kashmir",
"email": "r.cheema1973@gmail.com",
"phone": "030126948654",
"avatar": "https://www.foodcabby.de/storage/shops/nYBF3oPAC8NlIOyYXve5SQTLmLJvb54TbfGcDVSL.png",
"default_banner": null,
"description": "Kashmir Indische Spezialitäten, Vegan,Vegetarisch, Halal",
View gist:a173b5c48e39f97deefef870afe7de08
https://themeforest.net/item/jnews-one-stop-solution-for-web-publishing/20566392
https://themeforest.net/item/digiqole-news-magazine-wordpress-theme/24304706
https://themeforest.net/item/kolyoum-newspaper-wordpress-theme/19703399
https://themeforest.net/item/diginex-magazineblog-wordpress-theme/17068263
https://themeforest.net/item/cheerup-blog-magazine-wordpress-blog-theme/16430770
https://themeforest.net/item/saxon-viral-content-blog-magazine-wordpress-theme/22955117
View gist:9cb38140163bf4d87d2b7d68712ec63a
<!-- get all the posts loop -->
<?php if ( have_posts() ) { while ( have_posts() ) { the_post(); ?>
<!-- echo the post image -->
<?php the_post_thumbnail(get_the_ID(),'large'); ?>
<!-- echo the title -->
<?php the_title(); ?>
@TakiDDine
TakiDDine / laravellocal.md
Created Aug 3, 2019 — forked from hootlex/laravellocal.md
Run laravel project locally
View laravellocal.md

##Windows users:

cmder will be refered as console

##Mac Os, Ubuntu and windows users continue here:

  • Create a database locally named homestead utf8_general_ci
View header_meta_tages.md

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta charset='UTF-8'>
<meta name='keywords' content='your, tags'>
<meta name='description' content='150 words'>
<meta name='subject' content='your website's subject'>
<meta name='copyright' content='company name'>
@TakiDDine
TakiDDine / robots.txt
Created Jun 11, 2019
robots.txt file
View robots.txt
User-agent: *
Disallow: /wp-admin/
Allow: /wp-admin/admin-ajax.php
@TakiDDine
TakiDDine / Optimization using .htaccess file
Created Jun 11, 2019
Optimization using .htaccess file
View Optimization using .htaccess file
# ------------------------------------------------------------------------------
# | Web fonts access |
# ------------------------------------------------------------------------------
# Allow access from all domains for web fonts
<IfModule mod_headers.c>
<FilesMatch "\.(eot|font.css|otf|ttc|ttf|woff)$">
Header set Access-Control-Allow-Origin "*"
</FilesMatch>