Skip to content

Instantly share code, notes, and snippets.

View currentcreative's full-sized avatar

Current Creative currentcreative

View GitHub Profile
@currentcreative
currentcreative / git_and_github_instructions.md
Last active January 14, 2022 05:16 — forked from mindplace/git_and_github_instructions.md
Pushing your first project to github

Make sure git is tracking your project.

  1. Using your terminal/command line, get inside the folder where your project files are kept: cd /path/to/my/codebase.

You cannot do this simply by opening the folder normally, you must do this with the command line/terminal.

Do you need a refresher on using your command line/terminal? I've compiled my favorite resources here.

  1. Check if git is already initialized: git status
@currentcreative
currentcreative / style.css
Created May 4, 2019 02:13 — forked from NatalieMac/style.css
Sticky footer w/ Underscores markup
html {
height: 100%;
overflow: hidden;
}
body {
height: 100%;
overflow: scroll;
}
@currentcreative
currentcreative / sample-plugin.php
Created January 5, 2017 21:01 — forked from brianhogg/sample-plugin.php
Example of is_new
<?php
/*
Plugin Name: Sample Plugin
Plugin URI: https://brianhogg.com/
Description: Showing is_new
Version: 1.0
Author: Brian Hogg
Author URI: https://brianhogg.com
License: GPLv2 or later
*/
@currentcreative
currentcreative / digitalroot.js
Created November 12, 2016 06:24 — forked from johnstew/digitalroot.js
JS Digital Root
function root(num){
var total = 0;
if(num.toString().length == 1){
var iNum = parseInt(num);
return iNum;
}else{
num.toString().split("").forEach( function(value){
var iValue = parseInt(value);
return total += iValue;
});
-- Change Siteurl & Homeurl
UPDATE wp_options SET option_value = replace(option_value, 'http://www.oldsiteurl.com', 'http://www.newsiteurl.com') WHERE option_name = 'home' OR option_name = 'siteurl'
-- Change GUID
UPDATE wp_posts SET guid = REPLACE (guid, 'http://www.oldsiteurl.com', 'http://www.newsiteurl.com')
-- Change URL in Content
UPDATE wp_posts SET post_content = REPLACE (post_content, 'http://www.oldsiteurl.com', 'http://www.newsiteurl.com')
-- Change Image Path Only