Skip to content

Instantly share code, notes, and snippets.

View humayunahmed8's full-sized avatar
🤡
code fool

Humayun Ahmed humayunahmed8

🤡
code fool
View GitHub Profile
@maxxscho
maxxscho / style.css
Created April 19, 2012 07:34
Wordpress Default CSS Styles
/* !-------- WORDPRESS CLASSES ------------------- */
/*------------------------------------------------------------ *\
\*------------------------------------------------------------ */
/* !-- WP WYSIWYG Editor Styles -- */
.entry-content img {
margin: 0 0 1.5em 0;
}
.alignleft, img.alignleft {
margin-right: 1.5em;
@EmranAhmed
EmranAhmed / style.css
Last active March 21, 2024 13:34 — forked from luetkemj/style.css
WordPress Default Style.css file styling
/* =============================================================================
WordPress WYSIWYG Editor Styles
========================================================================== */
.entry-content img {
margin: 0 0 1.5em 0;
max-width: 100%;
height: auto;
}
.alignleft, img.alignleft {
@maxxscho
maxxscho / extras.php
Created February 7, 2015 09:30
Wordpress Redirect Post Type archive
<?php
if ( ! function_exists( 'redirect_post_type_archive' ) ) {
/**
* Redirect to 404 if we are querying an post_type archive, we won't
* @author Markus Schober
*/
function redirect_post_type_archive() {
global $wp_query, $post;
if (is_post_type_archive(array('post-type'))) {
@jonschr
jonschr / gist:6bc52166db037e880772
Last active April 5, 2023 05:09
Conditional logic with select2 (addon for the Beautiful taxonomy filters plugin)
jQuery(document).ready(function($) {
/**
* If the value is preselected (runs when the the doc is ready)
*/
// get the starting value of the field; empty means no selection is made and conditional fields should hide by default
var startingval = $('select#select-job-industry').val();
if ( startingval == '' ) {
@maxxscho
maxxscho / plugin-class-demo.php
Last active October 18, 2023 14:28 — forked from thefuxia/plugin-class-demo.php
Plugin Class Demo
<?php # -*- coding: utf-8 -*-
/**
* Plugin Name: Plugin Class Demo
* Description: How I am using the base class in plugins.
* Plugin URI:
* Version: 2012.09.29
* Author: Thomas Scholz
* Author URI: http://toscho.de
* License: GPL
* Text Domain: plugin_unique_name
@rveitch
rveitch / sass-7-1-pattern.scss
Last active April 23, 2024 08:10
Sass 7-1 Pattern
sass/
|
|– base/
| |– _reset.scss # Reset/normalize
| |– _typography.scss # Typography rules
| ... # Etc…
|
|– components/
| |– _buttons.scss # Buttons
| |– _carousel.scss # Carousel

Direct copy of pre-encoded file:

$ ffmpeg -i filename.mp4 -codec: copy -start_number 0 -hls_time 10 -hls_list_size 0 -f hls filename.m3u8

@raselahmed7
raselahmed7 / google-fonts.php
Last active November 11, 2022 10:22
How to call google fonts from theme option in best way
<?php
$frozen_body_font_get = cs_get_option('frozen_body_font');
$frozen_heading_font_get = cs_get_option('frozen_headding_font');
function frozen_crazycafe_body_gf_url() {
$font_url = '';
$frozen_body_font_get = cs_get_option('frozen_body_font');
if(array_key_exists('family', $frozen_body_font_get)) {
$frozen_body_font_get_family = $frozen_body_font_get['family'];
Use WordPress default function to get next and previous post title with permalink something like this:
<?php // FOR PREVIOUS POST
$prev_post = get_previous_post();
$id = $prev_post->ID ;
$permalink = get_permalink( $id );
?>
<?php // FOR NEXT POST
$next_post = get_next_post();
$nid = $next_post->ID ;
@xrman
xrman / gist:4468f545b169969466bceb694d742dad
Created March 12, 2019 21:47
FastStone Capture Full Serial Key
Registration Code
Name : www.xyraclius.com
Serial : OOCRYIMDMDPWRETFPSUZ