As a freelancer, I build a lot of web sites. That's a lot of code changes to track. Thankfully, a Git-enabled workflow with proper branching makes short work of project tracking. I can easily see development features in branches as well as a snapshot of the sites' production code. A nice addition to that workflow is that ability to use Git to push updates to any of the various sites I work on while committing changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
states = { | |
'AK': 'Alaska', | |
'AL': 'Alabama', | |
'AR': 'Arkansas', | |
'AZ': 'Arizona', | |
'CA': 'California', | |
'CO': 'Colorado', | |
'CT': 'Connecticut', | |
'DC': 'District of Columbia', | |
'DE': 'Delaware', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, {useState, useEffect} from "react" | |
import {useRouter} from 'next/router' | |
const Event = ({embed}) => { | |
const router = useRouter() | |
const [embedSRC, setEmbedSRC] = useState(embed); | |
// useEffect(() => { | |
// const handleRouteChange = () => { | |
// setEmbedSRC(embed) | |
// } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Get first paragraph from a WordPress post. Use inside the Loop. | |
* | |
* @return string | |
*/ | |
function get_first_paragraph(){ | |
global $post; | |
$str = wpautop( get_the_content() ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import time | |
document = open("My Clippings.txt","r") | |
data = "".join(document.readlines()) | |
notes = [] | |
try: | |
clippings = data.split('==========') | |
for clip in clippings: |