Skip to content

Instantly share code, notes, and snippets.

@cy-park
cy-park / .eslintrc
Created February 16, 2016 03:38 — forked from cletusw/.eslintrc
ESLint Reset - A starter .eslintrc file that resets all rules to off and includes a description of what each rule does. From here, enable the rules that you care about by changing the 0 to a 1 or 2. 1 means warning (will not affect exit code) and 2 means error (will affect exit code).
{
// http://eslint.org/docs/rules/
"ecmaFeatures": {
"binaryLiterals": false, // enable binary literals
"blockBindings": false, // enable let and const (aka block bindings)
"defaultParams": false, // enable default function parameters
"forOf": false, // enable for-of loops
"generators": false, // enable generators
"objectLiteralComputedProperties": false, // enable computed object literal property names
@cy-park
cy-park / list-files-with-years.md
Last active June 6, 2017 15:22
List files with years

List files with years

Linux

$ ls -la --full-time

Mac

$ ls -laT

@cy-park
cy-park / zip-excluding-specific-directories-and-files.md
Created February 17, 2016 03:13
Zip excluding specific directories and files

Zip excluding specific directories

Exclude .git file and node_modules directory

$ zip -r9 [target_file] [source_file] -x *.git* node_modules/\*

Exclude .git file and files in node_modules directory, but keep node_modules directory

$ zip -r9 [target_file] [source_file] -x *.git* node_modules/**\*
@cy-park
cy-park / export-and-import-mysql-database.md
Created February 17, 2016 03:17
Export and import MySQL Database

Export & import MySQL Database

This process requires 'mysqldump', a freeware to backup mysql databases.

Export data from MySQL DB to file

$ mysqldump -u [db_username] -p[db_password] [db_name] > [file_name]

Import data from file to MySQL DB

@cy-park
cy-park / essential-git-commands-for-web-designers.md
Last active June 6, 2017 15:19
Essential Git commands for web designers

Essential Git commands for web designers

Git is an open source version control system. Git is often considered as a software only for programmers and developers, however, it is very useful for web designers as well. If you are a UX/UI designer who can use Git, it would be much easier for you to work with developers. In addition, they will love you.

This is an article for essential Git commands that I use very often. I will not cover the basic concept of it here. Instead, I will list up essential and useful Git commands that I use very often to save your time to look up those commands.

I assume you are using git hosting services such as Github or Bitbucket, and able to use git commands through terminal.

1. Setup local and remote Git repository

@cy-park
cy-park / setting-up-apache-php-mysql-environment-in-os-x.md
Last active May 9, 2019 03:06
Setting up Apache/PHP/MySQL environment in OS X

Setting up Apache/PHP/MySQL environment in OS X

This article is not only to help those who are entering front-end development world but also organize what I have in my brain and advance to the next level. The process is obviously not optimal but personal and full of mistakes. However, I think there might be a couple of lessons even in mistakes.

1. Get ready with your local environment

It is essential to get familiar with terminal environment if you decide to become a front-end developer. Most of the configurations for development are under the hood and terminal is the gateway to reach them.

1.1 Update OS X and install Xcode

SSH RSA Key Generation

Mac

ssh-keygen -t rsa -b 4096 -C "<email_address>"
pbcopy < ~/.ssh/id_rsa.pub

WSL

ssh-keygen -t rsa -b 4096 -C ""

@cy-park
cy-park / babel-sublime-function-call-highlighting.md
Last active July 9, 2017 20:19
Fix for babel-sublime not highlighting function calls

Add below in .tmTheme file

<dict>
  <key>name</key>
  <string>Function call</string>
  <key>scope</key>
  <string>meta.function-call variable.function</string>
  <key>settings</key>
  <dict>

fontStyle

(document.documentElement || document.body.parentNode || document.body).scrollTop;

1. install C++ compiler

$ xcode-select --install
$ sudo xcodebuild -license
$ curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.6/install.sh | bash

Restart terminal