Skip to content

Instantly share code, notes, and snippets.

View eclectic-coding's full-sized avatar
🏠
Working from home

Chuck eclectic-coding

🏠
Working from home
View GitHub Profile
@susanta96
susanta96 / NavBarHightlight.js
Created April 14, 2020 15:26
Navbar Style Changes using Intersection Observer API without scroll
const NavHighlight = (navbar, mobileNav, section, options) => {
const observer = new IntersectionObserver((entries) => {
entries.forEach(entry => {
if(!entry.isIntersecting){
console.log('not');
mobileNav.classList.add('box-shadow');
navbar.classList.add('box-shadow');
}else {
console.log('yes');
mobileNav.classList.remove('box-shadow');
@jmolivas
jmolivas / script.js
Last active February 6, 2021 16:21
Trigger Netlify build from a Google Spreadsheet
# From your Google Spreadsheet, select the menu item Tools > Script editor.
# Copy and paste this code.
# Replace uuid with the build_hooks uuid from your Netlify project.
function onOpen() {
SpreadsheetApp.getUi()
.createMenu('Scripts')
.addItem('Build', 'build')
.addToUi();
}
@sidharthachatterjee
sidharthachatterjee / gatsby-node.js
Created April 1, 2019 10:40
Dynamic GraphQL queries with String interpolation
exports.createPages = ({ graphql, actions }) => {
return graphql(`
{
site {
siteMetadata {
githubOrgs
}
}
}
`).then(result => {
@vielhuber
vielhuber / Component.vue
Last active January 17, 2023 21:29
global helpers helper functions #vue
<template>
<div :test="$helpers.foo1()" :test2="bar()"></div>
</template>
<script>
import { bar } from '@/helpers/utils';
</script>
@bradtraversy
bradtraversy / docker_wordpress.md
Last active December 4, 2025 14:35
Docker Compose FIle For Wordpress, MySQL & phpmyadmin

Wordpress & Docker

This file will setup Wordpress, MySQL & PHPMyAdmin with a single command. Add the code below to a file called "docker-compose.yaml" and run the command

$ docker-compose up -d

# To Tear Down
$ docker-compose down --volumes
@bradpotter
bradpotter / onboarding.php
Created December 20, 2018 21:34
Modify onboarding.php to include additional pages
return array(
'dependencies' => array(
'plugins' => array(
array(
'name' => __( 'Atomic Blocks', 'genesis-sample' ),
'slug' => 'atomic-blocks/atomicblocks.php',
),
),
),
'content' => array(
<?php
class MyTheme
{
private function actionAfterSetup($function)
{
add_action('after_setup_theme', function() use ($function) {
$function();
});
}
@bradtraversy
bradtraversy / django_cheat_sheet.md
Last active March 23, 2025 20:59
Django command cheat sheet

Django 2.x Cheat Sheet

Creating a virtual environment

We need to create a virtual env for our app to run in: More Here Run this command in whatever folder you want to create your venv folder

python -m venv ./venv
// ==UserScript==
// @name Udemy "List All Courses" And Course Planning Checkmarks
// @namespace salembeats
// @version 1.31
// @description .
// @author Cuyler Stuwe (salembeats)
// @grant GM_setValue
// @grant GM_getValue
// @require file:///C:\private-keys-for-public-tampermonkey-scripts\udemy-list-all-courses.js
// @include https://www.udemy.com/home/my-courses/learning/*
@hellofromtonya
hellofromtonya / .gitconfig
Last active December 27, 2019 13:59
Git Productive - Global .gitconfig aliases
[alias]
# Opens the Atom editor.
atom = ! atom
# ===================================
# Viewing history
# ===================================
# Shows a graphical log.
logone = log --oneline --decorate --all --graph