Skip to content

Instantly share code, notes, and snippets.

View davidyeiser's full-sized avatar

David Yeiser davidyeiser

View GitHub Profile
@nathansmith
nathansmith / email_about_react.md
Last active September 21, 2016 01:57
This is an email I sent to a friend from church, about React.
@joecritch
joecritch / MyComponent.js
Last active September 29, 2021 15:16
Passing specific props in React / JSX
class MyComponent extends React.Component {
render() {
const {location, todos, users} = this.props;
//
// ... do things with your variables!
//
return (
<MyChild {...{location, todos, user}} />
// equivalent to:
// <MyChild location={location} todos={todos} user={user} />
@myusuf3
myusuf3 / delete_git_submodule.md
Created November 3, 2014 17:36
How effectively delete a git submodule.

To remove a submodule you need to:

  • Delete the relevant section from the .gitmodules file.
  • Stage the .gitmodules changes git add .gitmodules
  • Delete the relevant section from .git/config.
  • Run git rm --cached path_to_submodule (no trailing slash).
  • Run rm -rf .git/modules/path_to_submodule (no trailing slash).
  • Commit git commit -m "Removed submodule "
  • Delete the now untracked submodule files rm -rf path_to_submodule
@paulallies
paulallies / gist:0052fab554b14bbfa3ef
Last active November 12, 2023 23:00
Remove node_modules from git repo
#add 'node_modules' to .gitignore file
git rm -r --cached node_modules
git commit -m 'Remove the now ignored directory node_modules'
git push origin <branch-name>
@tomciopp
tomciopp / gist:1805852
Created February 12, 2012 02:25
Sinatra contact form
-------------------------------
The code for the contact form
-------------------------------
<div id='contact-box' class="group">
<div class="span6 clear">
<form action="/" method="post" class="well">
<label for="name">Your Name:</label>
<input type="text" name="name" class="span4" placeholder="John Smith...">
<label for="email">Your email address:</label>