Skip to content

Instantly share code, notes, and snippets.

View ericdfields's full-sized avatar
🏠
Working from home in Baltimore, sometimes in DC

Eric Brookfield ericdfields

🏠
Working from home in Baltimore, sometimes in DC
View GitHub Profile
@deathbearbrown
deathbearbrown / brief_format.md
Last active October 20, 2023 19:11
Brief format

Basics

Comments on tone and style:

  • Never apologize in a design brief
  • keep it succinct
  • Do not talk about design features that do not have a direct correlation with a problem

PRE DEFINE

Definition: A design report documents the solution to a unique problem.

#A brief intro into Stateless functions#

So stateless functions are new in React 0.14 which are quite interesting. They look a bit like this.

const Test = ({name, amount}) => {
 return <div className="test">{name} has £{amount}</div>;
};

ReactDOM.render(<Test name="ben" amount="-2000" />) //  <div className="test">ben has £-200</div> 
@Wilto
Wilto / layout.css
Last active September 11, 2015 13:16
/* Column Styles */
.col {
margin: 0 auto;
clear: both;
padding: 5.55555555% 3.7037037%;
}
.col-condensed {
clear: both;
padding: 7.4074074%;
}
@anthonysousa
anthonysousa / rename-multiple-files.md
Last active April 4, 2024 20:13
Rename multiple files on Mac Terminal to lowercase and replace the spaces

First, make sure you are on the right directory on mac terminal app.

If you want to change only jpg files you can use $ for f in *.JPG; instead of $ for f in *;

Renaming to lowercase

$ for f in *; do mv "$f" "`echo $f | tr "[:upper:]" "[:lower:]"`"; done

Replacing spaces in file names to hyphens

// Generate a set of 128x128 png icons for notifications from our color palette.
// Order must match .status-box:nth-of-type() declarations.
var color_data = {
"#1564f9": "UVZPl4Z7ha",
"#3fc41b": "U/xButvkTR",
"#fa8e1f": "X6jh83IXPs",
"#4ca8ea": "VMqOr4+3T5",
"#f71347": "X3E0eeps0u",
"#fcc124": "X8wST1RrWw"
};
@dankrause
dankrause / _hover_example.py
Last active March 8, 2024 18:31
Example code to use the (unofficial, unsupported, undocumented) hover.com DNS API.
import requests
class HoverException(Exception):
pass
class HoverAPI(object):
def __init__(self, username, password):
params = {"username": username, "password": password}
r = requests.post("https://www.hover.com/api/login", params=params)
@ericdfields
ericdfields / gist:1717578
Created February 1, 2012 15:38
Bash convert all your SCSS to SASS in one line (because you've seen the light)
for f in *.scss; do sass-convert -F scss -T sass $f ${f%%.*}.sass; done
@gwing33
gwing33 / .bash_profile
Created January 21, 2012 02:22
My git shortcuts in my ~/.bash_profile
# Git Shortcuts
alias gs='git status'
alias gst='git status -sb'
alias ga='git add'
alias gau='git add -u' # Removes deleted files
alias gp='git pull'
alias gpu='git push'
alias gc='git commit -v'
alias gca='git commit -v -a' # Does both add and commit in same command, add -m 'blah' for comment
alias gco='git checkout'