Skip to content

Instantly share code, notes, and snippets.

@lancejpollard
lancejpollard / meta-tags.md
Created March 5, 2012 13:54
Complete List of HTML Meta Tags

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

Basic HTML Meta Tags

<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">
<meta name="language" content="ES">
@oodavid
oodavid / README.md
Created March 26, 2012 17:05
Backup MySQL to Amazon S3

Backup MySQL to Amazon S3

This is a simple way to backup your MySQL tables to Amazon S3 for a nightly backup - this is all to be done on your server :-)

Sister Document - Restore MySQL from Amazon S3 - read that next

1 - Install s3cmd

this is for Centos 5.6, see http://s3tools.org/repositories for other systems like ubuntu etc

@clarle
clarle / app.js
Created July 26, 2012 07:35
Short tutorial on how to use Express and node-mysql
// Module dependencies
var express = require('express'),
mysql = require('mysql');
// Application initialization
var connection = mysql.createConnection({
host : 'localhost',
user : 'root',
@tonymtz
tonymtz / gist:d75101d9bdf764c890ef
Last active July 24, 2025 16:11
Uninstall nodejs from OSX Yosemite
# first:
lsbom -f -l -s -pf /var/db/receipts/org.nodejs.pkg.bom | while read f; do sudo rm /usr/local/${f}; done
sudo rm -rf /usr/local/lib/node /usr/local/lib/node_modules /var/db/receipts/org.nodejs.*
# To recap, the best way (I've found) to completely uninstall node + npm is to do the following:
# go to /usr/local/lib and delete any node and node_modules
cd /usr/local/lib
sudo rm -rf node*
@Miserlou
Miserlou / cities.json
Created April 30, 2015 06:58
1000 Largest US Cities By Population With Geographic Coordinates, in JSON
[
{
"city": "New York",
"growth_from_2000_to_2013": "4.8%",
"latitude": 40.7127837,
"longitude": -74.0059413,
"population": "8405837",
"rank": "1",
"state": "New York"
},
@fisherwebdev
fisherwebdev / React Lifecycle Methods
Created May 5, 2015 18:38
Cheatsheet for React lifecycle and update cycle methods
Lifecycle: | Update:
Mounting and Unmounting | New Props or State
--------------------------------+-----------------------------------
|
getDefaultProps() | componentWillReceiveProps()*
|
getInitialState() | shouldComponentUpdate()
|
componentWillMount() | componentWillUpdate()
|
@jondlm
jondlm / README.md
Last active January 3, 2018 05:59
React shallow render lifecycle breakdown

React introduced shallow rendering in 0.13. This is an excellent feature that I wish was included earlier in React. It aims to solve the problem of unit testing components without going through a real, or jsdom mocked, DOM. I couldn't find any info online about what lifecycle events it actually fires. So I did some testing of my own. To reproduce, put component.js and test.js into a folder and run node test.js.

TLDR; shallow rendering only invokes the following lifecycle hooks (in order):

  1. getDefaultProps
  2. getInitialState
  3. componentWillMount stops here until re-render
  4. componentWillReceiveProps
  5. shouldComponentUpdate
  6. componentWillUpdate

FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.


Effective Engineer - Notes

What's an Effective Engineer?

===============================================================================
= ๋น” ๊ธธ์žก์ด (VIM Tutor) ์— ์˜ค์‹  ๊ฒƒ์„ ํ™˜์˜ํ•ฉ๋‹ˆ๋‹ค - Version 1.5 =
===============================================================================
๋น”(Vim)์€ ์ด ๊ธธ์žก์ด์—์„œ ๋‹ค ์„ค๋ช…ํ•  ์ˆ˜ ์—†์„ ๋งŒํผ ๋งŽ์€ ๋ช…๋ น์„ ๊ฐ€์ง„
๋งค์šฐ ๊ฐ•๋ ฅํ•œ ํŽธ์ง‘๊ธฐ์ž…๋‹ˆ๋‹ค. ์ด ๊ธธ์žก์ด๋Š” ๋น”์„ ์‰ฝ๊ฒŒ ์ „์ฒœํ›„ ํŽธ์ง‘๊ธฐ๋กœ ์‚ฌ์šฉํ• 
์ˆ˜ ์žˆ๋„๋ก ์ถฉ๋ถ„ํ•œ ๋ช…๋ น์— ๋Œ€ํ•ด ์„ค๋ช…ํ•˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค.
์ด ๊ธธ์žก์ด๋ฅผ ๋–ผ๋Š” ๋ฐ์—๋Š” ์‹ค์Šตํ•˜๋Š” ๋ฐ์— ์–ผ๋งˆ๋‚˜ ์‹œ๊ฐ„์„ ์“ฐ๋Š” ๊ฐ€์— ๋”ฐ๋ผ์„œ
25-30 ๋ถ„ ์ •๋„๊ฐ€ ๊ฑธ๋ฆฝ๋‹ˆ๋‹ค.
@falsy
falsy / nvm_quick_start.md
Last active December 3, 2025 01:51
NVM(Node Version Manager) ๋งฅOS์—์„œ ์„ค์น˜ & ์‚ฌ์šฉํ•˜๊ธฐ

NVM(Node Version Manager) Quick Start

๋งฅOS์—์„œ NVM ์‚ฌ์šฉํ•˜๊ธฐ

NVM ์„ค์น˜

1. ์„ค์น˜

$ sudo curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash