Skip to content

Instantly share code, notes, and snippets.

Phuoc Nguyen nghuuphuoc

Block or report user

Report or block nghuuphuoc

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@nghuuphuoc
nghuuphuoc / codegolf.md
Created Oct 15, 2017 — forked from xem/codegolf.md
JS code golfing
View codegolf.md

codegolf JS

Mini projects by Maxime Euzière (xem), subzey, Martin Kleppe (aemkei), Mathieu Henri (p01), Litterallylara, Tommy Hodgins (innovati), Veu(beke), Anders Kaare, Keith Clark, Addy Osmani, bburky, rlauck, cmoreau, maettig, thiemowmde, ilesinge, adlq, solinca, xen_the,...

(For more info and other projects, visit http://xem.github.io)

(Official Slack room: http://jsgolf.club / join us on http://register.jsgolf.club)

View react_samples_list.md
@nghuuphuoc
nghuuphuoc / package.json
Created Jul 21, 2016 — forked from addyosmani/package.json
npm run-scripts boilerplate
View package.json
{
"name": "my-app",
"version": "1.0.0",
"description": "My test app",
"main": "src/js/index.js",
"scripts": {
"jshint:dist": "jshint src/js/*.js'",
"jshint": "npm run jshint:dist",
"jscs": "jscs src/*.js",
"browserify": "browserify -s Validating -o ./dist/js/build.js ./lib/index.js",
View trello-css-guide.md

Trello CSS Guide

“I perfectly understand our CSS. I never have any issues with cascading rules. I never have to use !important or inline styles. Even though somebody else wrote this bit of CSS, I know exactly how it works and how to extend it. Fixes are easy! I have a hard time breaking our CSS. I know exactly where to put new CSS. We use all of our CSS and it’s pretty small overall. When I delete a template, I know the exact corresponding CSS file and I can delete it all at once. Nothing gets left behind.”

You often hear updog saying stuff like this. Who’s updog? Not much, who is up with you?

This is where any fun you might have been having ends. Now it’s time to get serious and talk about rules.

Writing CSS is hard. Even if you know all the intricacies of position and float and overflow and z-index, it’s easy to end up with spaghetti code where you need inline styles, !important rules, unused cruft, and general confusion. This guide provides some architecture for writing CSS so it stays clean and ma

View node-and-npm-in-30-seconds.sh
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl https://www.npmjs.org/install.sh | sh
View markdown.css
* {
font-size: 12pt;
font-family: monospace;
font-weight: normal;
font-style: normal;
text-decoration: none;
color: black;
cursor: default;
}
View gist:5a9322bd2fcf84c7cd46
for package in $(rpm -qa); do rpm --setperms $package; done
for package in $(rpm -qa); do rpm --setugids $package; done
@nghuuphuoc
nghuuphuoc / newFile1.txt
Created Apr 17, 2014
Change Wordpress domain name
View newFile1.txt
update wp_options set option_value='http://ri-zone.zoodemo.com' where option_name='siteurl';
@nghuuphuoc
nghuuphuoc / gist:10518179
Created Apr 12, 2014
Change Magento domain name
View gist:10518179
update core_config_data set value = 'http://domainname/' where path = 'web/unsecure/base_url';
update core_config_data set value = 'http://domainname/' where path = 'web/secure/base_url';
You can’t perform that action at this time.