Skip to content

Instantly share code, notes, and snippets.

View nickpish's full-sized avatar

Nick Pishvanov nickpish

View GitHub Profile
@wiegertschouten
wiegertschouten / grid.scss
Created October 1, 2020 18:38
A very simple grid system built with SASS and CSS grid
$columns: 12;
$gap: 30px;
$breakpoints: (
xs: 480px,
sm: 768px,
md: 960px,
lg: 1170px,
xl: 1280px
);
@rhcarlosweb
rhcarlosweb / animations.js
Last active May 24, 2025 17:40
new animations with gsap 3
import gsap from 'gsap'
import ScrollTrigger from 'gsap/ScrollTrigger'
import {SplitText} from 'gsap/SplitText'
import CustomEase from 'gsap/CustomEase'
gsap.registerPlugin(ScrollTrigger)
gsap.registerPlugin(SplitText)
document.addEventListener('DOMContentLoaded', () => {
const animations = {
@feliciaceballos
feliciaceballos / functions.php
Created March 11, 2019 20:00
Add custom stylesheet to WordPress Login Page
<?php
//If you're using this in your functions.php file, remove the opening <?php
//Replace style-login.css with the name of your custom CSS file
function my_custom_login_stylesheet() {
wp_enqueue_style( 'custom-login', get_stylesheet_directory_uri() . '/style-login.css' );
}
//This loads the function above on the login page
add_action( 'login_enqueue_scripts', 'my_custom_login_stylesheet' );
@Inzman
Inzman / gist:bb76adca93fdc9b7cbfff04d1598c862
Created December 10, 2018 06:24
WordPress: save `get_template_part()` to variable
function load_template_part($template_name, $part_name=null) {
ob_start();
get_template_part($template_name, $part_name);
$var = ob_get_contents();
ob_end_clean();
return $var;
}
@omushpapa
omushpapa / letsencrypt_apache_2018.md
Last active February 1, 2024 06:15
How to configure SSL using LetsEncrypt and Certbot on Apache in Ubuntu 16.04

How to setup Let's Encrypt for Apache on Ubuntu 16.04

In the following, we're setting up mydomain.com.

Challenges are served from /var/www/letsencrypt.

Apache snippets

First we create two snippets (to avoid duplicating code in every virtual host configuration).

@ffoodd
ffoodd / mu-fSelect.js
Created December 4, 2017 13:27
FacetWP accessibility improvements
(function($) {
$.fn.fSelect = function(options) {
if ('string' === typeof options) {
var settings = options;
}
else {
var settings = $.extend({
placeholder: 'Select some options',
@ghosh
ghosh / micromodal.css
Last active April 14, 2025 16:32
Demo modal styles for micromodal.js and corresponding expected html. If using this, set the `awaitCloseAnimation` in config to true
/**************************\
Basic Modal Styles
\**************************/
.modal {
font-family: -apple-system,BlinkMacSystemFont,avenir next,avenir,helvetica neue,helvetica,ubuntu,roboto,noto,segoe ui,arial,sans-serif;
}
.modal__overlay {
position: fixed;
@bmoredrew
bmoredrew / sort-by-acf-repeater-field.php
Last active May 5, 2025 12:18
Sort Posts by ACF Repeater Field Using Multidimensional Array
<?php
// Create an empty array for storage
$post_data = array();
// Set arguments for your query
$args = array(
'post_type' => 'trips',
'posts_per_page' => 999
);
@topleague
topleague / inline-mobile-responsive-menu-genesis.php
Last active March 20, 2018 18:59
Inline Mobile Responsive Menu in Genesis
// Add the following to your functions.php
// Source: https://sridharkatakam.com/add-inline-mobile-responsive-menu-genesis-sample/
// Note: Before adding the code, remove or comment out the following line (on Line Number 117)
// add_theme_support( 'genesis-menus', array( 'primary' => __( 'After Header Menu', 'genesis-sample' ), 'secondary' => __( 'Footer Menu', 'genesis-sample' ) ) );
// Rename primary and secondary navigation menus.
add_theme_support( 'genesis-menus', array(
'primary' => __( 'Primary Navigation Menu', 'genesis-sample' ),
'secondary' => __( 'Footer Menu', 'genesis-sample' ) )
);
@nielslange
nielslange / README.md
Last active April 15, 2024 18:25
Genesis Framework snippets

Genesis Framework snippets

Accessibility

Enable Accessibility Features

  • functions.php:
//* Enable Genesis Accessibility Components
add_theme_support( 'genesis-accessibility', array( '404-page', 'drop-down-menu', 'headings', 'rems', 'search-form', 'skip-links' ) );