Skip to content

Instantly share code, notes, and snippets.

View onnoysomoy's full-sized avatar

Jabed Shoeb onnoysomoy

View GitHub Profile
@onnoysomoy
onnoysomoy / sqs_modals.html
Created June 21, 2017 10:22 — forked from simonhaenisch/sqs_modals.html
Custom modals as header injection for default Squarespace templates
<script>
// --
// Enter Data Here
var data = {
header: "Title",
paragraph: "Lorem ipsum..."
}
@onnoysomoy
onnoysomoy / 0_reuse_code.js
Created January 28, 2017 05:21
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@onnoysomoy
onnoysomoy / gist:d07bc39e396f30a6fefb
Last active August 29, 2015 14:26 — forked from pitch-gist/gist:2999707
HTML: Simple Maintenance Page
<!doctype html>
<title>Site Maintenance</title>
<style>
body { text-align: center; padding: 150px; }
h1 { font-size: 50px; }
body { font: 20px Helvetica, sans-serif; color: #333; }
article { display: block; text-align: left; width: 650px; margin: 0 auto; }
a { color: #dc8100; text-decoration: none; }
a:hover { color: #333; text-decoration: none; }
</style>
## EXPIRES CACHING ##
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg "access 1 year"
ExpiresByType image/jpeg "access 1 year"
ExpiresByType image/gif "access 1 year"
ExpiresByType image/png "access 1 year"
ExpiresByType text/css "access 1 month"
ExpiresByType application/pdf "access 1 month"
ExpiresByType text/x-javascript "access 1 month"
<?php
add_filter( 'genesis_post_date_shortcode', 'child_post_date_shortcode', 10, 2 );
/**
* Customize Post Date format and add extra markup for CSS targeting.
*
* @author Gary Jones
* @link http://code.garyjones.co.uk/style-post-info/
*
* @param string $output Current HTML markup.
@onnoysomoy
onnoysomoy / removing genesis_post_info
Created November 22, 2011 15:21
Removing genesis post_info from a Single or multiple Category
add_action( 'genesis_before_post', 'auc_conditional_post_actions' );
function auc_conditional_post_actions() {
if( in_category( '1' ) ) {
remove_action( 'genesis_before_post_content', 'genesis_post_info' );
}
else {
add_action( 'genesis_before_post_content', 'genesis_post_info' );
}
}