Skip to content

Instantly share code, notes, and snippets.

View PhatDang's full-sized avatar
🎯
Focusing

PHAT DANG MINH PhatDang

🎯
Focusing
View GitHub Profile
@aviaryan
aviaryan / zsh-on-windows.md
Last active February 9, 2024 03:22
Installing zsh and oh-my-zsh on Windows
  1. Install zsh from cygwin
  2. Install oh-my-zsh from https://github.com/robbyrussell/oh-my-zsh . Follow the manual instructions
  3. To make zsh default on ConEmu, create a task with C:\cygwin64\bin\mintty.exe /usr/bin/zsh - . Make it the defaut shell.
  4. To start a zsh shell on demand, add this batch script to your path or start menu or wherever.
start C:\cygwin64\bin\mintty.exe /usr/bin/zsh -
@PhatDang
PhatDang / iOS Media Queries.css
Last active August 29, 2015 14:26
iOS Media Queries for iPhone/iPod vs iPad & Retina vs Non-Retina Devices
.ipad-only, .iphone-only, .retina-only, .non-retina-only, .retina-iphone-only, .non-retina-iphone-only { display: none; }
/* ---------- iPad Only ---------- */
@media only screen and (device-width: 768px) {
.ipad-only { display: block; }
}
/* ---------- iPhone/iPod Only ---------- */
@media only screen and (device-width: 320px) {
.iphone-only { display: block; }
@alefteris
alefteris / .eslintrc
Created May 9, 2015 17:01
ESLint default config in YAML format
---
parser: espree
env:
amd: false
browser: false
es6: false
jasmine: false
jquery: false
meteor: false
mocha: false
@Kartones
Kartones / postgres-cheatsheet.md
Last active May 24, 2024 09:21
PostgreSQL command line cheatsheet

PSQL

Magic words:

psql -U postgres

Some interesting flags (to see all, use -h or --help depending on your psql version):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)
@stevenyap
stevenyap / Heroku_Staging.md
Last active June 11, 2019 16:09
Staging workflow on Heroku

This describes the workflow to use Heroku as a staging environment. It assumes you already have an existing heroku app in production.

# rename your git remote heroku to something else like production
git remote rename heroku production

# so now you will push as: git push production master

# create the staging app
heroku apps:create staging-appname
@adamjohnson
adamjohnson / skeleton_wide.css
Created February 21, 2012 16:15
1200px Media Query for the Skeleton Grid
/* 1200px Media Query for the Skeleton Grid - http://getskeleton.com
* Adapted from http://www.aliaspooryorik.com/blog/index.cfm/e/posts.details/post/responsive-css-grid-systems-345
* Added .alpha.omega combo classes. Hope to see that fixed in later versions of Skeleton: https://github.com/dhgamache/Skeleton/issues/68
*/
@media only screen and (min-width: 1200px) {
.container { width: 1200px;}
.container .column,
.container .columns { margin-left: 10px; margin-right: 10px; }