Skip to content

Instantly share code, notes, and snippets.

View jamesryan-dev's full-sized avatar

James jamesryan-dev

View GitHub Profile
@nickberens360
nickberens360 / gist:6719590
Last active April 10, 2017 15:12
Simple jQuery FAQ / Accordion code
jQuery( document ).ready(function( $ ) {
var question = $('.nAccordian .question');
var answer = $('.nAccordian .answer');
$(question).click(function(){
$(answer).slideUp();
$(this).next().slideToggle('fast');
});
@ifamily
ifamily / Clear fix for Genesis Column Classes
Last active April 1, 2018 20:40
This CSS will fix problems caused by Genesis Column Classes of uneven height. Just add a div with the class name of clear-line to your code. Then add this to your .css file.
/*
Clear fix for column classes
---------------------------------------------------------------------------------------------------- */
.clear-line:after {
content: ".";
display: block;
clear: both;
visibility: hidden;
line-height: 0;
height: 0;
@DanHerbert
DanHerbert / fix-homebrew-npm.md
Last active September 15, 2024 20:33
Instructions on how to fix npm if you've installed Node through Homebrew on Mac OS X or Linuxbrew

OBSOLETE

This entire guide is based on an old version of Homebrew/Node and no longer applies. It was only ever intended to fix a specific error message which has since been fixed. I've kept it here for historical purposes, but it should no longer be used. Homebrew maintainers have fixed things and the options mentioned don't exist and won't work.

I still believe it is better to manually install npm separately since having a generic package manager maintain another package manager is a bad idea, but the instructions below don't explain how to do that.

Fixing npm On Mac OS X for Homebrew Users

Installing node through Homebrew can cause problems with npm for globally installed packages. To fix it quickly, use the solution below. An explanation is also included at the end of this document.

@BFTrick
BFTrick / install-wp.sh
Last active April 1, 2024 04:14
Download & Install WordPress via Curl
curl -O https://wordpress.org/latest.zip
unzip latest.zip
mv wordpress site
rm latest.zip
@michaelbrazell
michaelbrazell / WP Loop Through Custom Post Type with JSON
Last active September 24, 2018 06:21
Using WP REST API to Loop through Custom Post type with JSON
<html>
<head>
<title>Looping through json object</title>
<script type="text/javascript">
/*
Looping through your custom post type data using Wordpress rest API
You'll need this plugin as of 1/15/2015. http://wp-api.org/
Eventually this will be included in the WP Core. Supposed to be with 4.1, but that didn't happen.
*/
</script>
@domenic
domenic / 0-github-actions.md
Last active May 26, 2024 07:43
Auto-deploying built products to gh-pages with Travis

Auto-deploying built products to gh-pages with GitHub Actions

This is a set up for projects which want to check in only their source files, but have their gh-pages branch automatically updated with some compiled output every time they push.

A file below this one contains the steps for doing this with Travis CI. However, these days I recommend GitHub Actions, for the following reasons:

  • It is much easier and requires less steps, because you are already authenticated with GitHub, so you don't need to share secret keys across services like you do when coordinate Travis CI and GitHub.
  • It is free, with no quotas.
  • Anecdotally, builds are much faster with GitHub Actions than with Travis CI, especially in terms of time spent waiting for a builder.
@wpscholar
wpscholar / vagrant-cheat-sheet.md
Last active November 11, 2024 15:23
Vagrant Cheat Sheet

Typing vagrant from the command line will display a list of all available commands.

Be sure that you are in the same directory as the Vagrantfile when running these commands!

Creating a VM

  • vagrant init -- Initialize Vagrant with a Vagrantfile and ./.vagrant directory, using no specified base image. Before you can do vagrant up, you'll need to specify a base image in the Vagrantfile.
  • vagrant init <boxpath> -- Initialize Vagrant with a specific box. To find a box, go to the public Vagrant box catalog. When you find one you like, just replace it's name with boxpath. For example, vagrant init ubuntu/trusty64.

Starting a VM

  • vagrant up -- starts vagrant environment (also provisions only on the FIRST vagrant up)
@tjbenton
tjbenton / virtualbox-vagrant-nuclear-option.sh
Created April 6, 2016 17:28
Completely uninstall VirtualBox and Vagrant and reinstall through brew
# update brew because `brew update` is broken after updating to El Capitan
cd `brew --prefix`
git fetch origin
git reset --hard origin/master
sudo shutdown -r now # restart the computer
# open terminal and run the following
brew update
brew cleanup

Happy with your CSS files in your big app?

OOCSS, BEM, SMACSS, ITCSS, ACSS, ITCSS under attack.

Hello, my name is Albino Tonnina.
I’m a senior front-end developer based in London.

I work daily with a bunch of talented people. Young developers and people who

{
"styles": {
"html": {
"box-sizing": "border-box"
},
"body": {
"box-sizing": "border-box"
},
"article": {
"box-sizing": "border-box"