Skip to content

Instantly share code, notes, and snippets.

View stanwmusic's full-sized avatar
🏠
Working from home

Stan Williams stanwmusic

🏠
Working from home
View GitHub Profile
@stanwmusic
stanwmusic / up-and-atom
Created December 3, 2019 02:15 — forked from jaygooby/up-and-atom
opens all your currently uncommitted files from the pwd in Atom, ready for a shiny new day of productive work
# I've got this as an alias, but you could just save it to ~/bin etc
#
# You don't have to use atom either, it would work just as well with subl or vim or whatever,
# only the pun's not as good then...
atom . $(git status --porcelain | cut -d" " -f3 | xargs -I {} echo './'{} | xargs)
@stanwmusic
stanwmusic / git_notes.md
Created December 3, 2019 02:12 — forked from jaygooby/git_notes.md
Git, you bloody git

Remove all local tracking branches to a remote & then delete the remote

git remote prune origin && git remote rm origin

Force checkout a branch to avoid the commit or stash your changes warning

Sometimes when you want to checkout a branch, even though your current branch is clean, you'll get a failed partial checkout, because a file in your current branch will be changed by the new branch (Looking at you .xcodeproj files). As long as you know your current branch is clean and up-to-date, -f force the checkout

git checkout -f the_branch

@stanwmusic
stanwmusic / gist:908629a5f19d51de9adb8d42a8a2c3cd
Created October 23, 2019 06:31 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@stanwmusic
stanwmusic / wp_custom_toolbar_link.php
Created March 11, 2019 13:31 — forked from bavington/wp_custom_toolbar_link.php
Adding a custom link to the WordPress Admin/Toolbar complete with icon.
@stanwmusic
stanwmusic / eu_cookie_banner.js
Created March 11, 2019 13:30 — forked from bavington/eu_cookie_banner.js
Simple EU Cookie Law Banner JavaScript
@stanwmusic
stanwmusic / Contract Killer 3.md
Created December 13, 2018 00:08
The latest version of my ‘killer contract’ for web designers and developers

Contract Killer

The popular open-source contract for web professionals by Stuff & Nonsense

  • Originally published: 23rd December 2008
  • Revised date: March 15th 2016
  • Original post

@stanwmusic
stanwmusic / adding-css-to-wordpress-theme.php
Created August 29, 2018 03:52 — forked from zgordon/adding-css-to-wordpress-theme.php
A simple example of Adding CSS to WordPress Theme Via functions.php File
// Load the theme stylesheets
function theme_styles()
{
// Example of loading a jQuery slideshow plugin just on the homepage
wp_register_style( 'flexslider', get_template_directory_uri() . '/css/flexslider.css' );
// Load all of the styles that need to appear on all pages
wp_enqueue_style( 'main', get_template_directory_uri() . '/style.css' );
@stanwmusic
stanwmusic / rename.py
Created July 15, 2018 18:59 — forked from metalox/rename.py
Python script to rename files in directory, transforming spaces to hyphens and the chars to lowercase
import os
"""
Renames the filenames within the same directory to be Unix friendly
(1) Changes spaces to hyphens
(2) Makes lowercase (not a Unix requirement, just looks better ;)
Usage:
python rename.py
"""
@stanwmusic
stanwmusic / meta-tags.md
Created July 15, 2018 18:52 — forked from adamesss/meta-tags.md
List of Usable HTML Meta and Link Tags

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta charset='UTF-8'>
<meta name='keywords' content='your, tags'>
<meta name='description' content='150 words'>
<meta name='subject' content='your website's subject'>
<meta name='copyright' content='company name'>
@stanwmusic
stanwmusic / rebuild-cache.php
Created April 30, 2018 21:53 — forked from phpdreams/rebuild-cache.php
Speaker List Cache Generation
<?php
// this will read in all the speakers, sort them by date, then store in a file for use later
$speakerList = [
'speaker-file',
];
$speakers_all = [];
foreach($speakerList as $speaker) {
$speakers_all[$speaker] = include_once("./speakers/{$speaker}.php");
$speakers_all[$speaker]['bullet-points'] = text2bullets($speakers_all[$speaker]['bullet-points']);