Skip to content

Instantly share code, notes, and snippets.

2015-01-16 10:09:00.037 WindowLevels[72050:11476115] 0 (kCGBaseWindowLevelKey) : -2147483648
2015-01-16 10:09:00.039 WindowLevels[72050:11476115] 1 (kCGMinimumWindowLevelKey) : -2147483643
2015-01-16 10:09:00.039 WindowLevels[72050:11476115] 2 (kCGDesktopWindowLevelKey) : -2147483623
2015-01-16 10:09:00.039 WindowLevels[72050:11476115] 3 (kCGBackstopMenuLevelKey) : -20
2015-01-16 10:09:00.039 WindowLevels[72050:11476115] 4 (kCGNormalWindowLevelKey) : 0
2015-01-16 10:09:00.040 WindowLevels[72050:11476115] 5 (kCGFloatingWindowLevelKey) : 3
2015-01-16 10:09:00.040 WindowLevels[72050:11476115] 6 (kCGTornOffMenuWindowLevelKey) : 3
2015-01-16 10:09:00.040 WindowLevels[72050:11476115] 7 (kCGDockWindowLevelKey) : 20
2015-01-16 10:09:00.040 WindowLevels[72050:11476115] 8 (kCGMainMenuWindowLevelKey) : 24
2015-01-16 10:09:00.040 WindowLevels[72050:11476115] 9 (kCGStatusWindowLevelKey) : 25
@nghuuphuoc
nghuuphuoc / codegolf.md
Created October 15, 2017 09:15 — forked from xem/codegolf.md
JS code golfing

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)

@nghuuphuoc
nghuuphuoc / package.json
Created July 21, 2016 04:33 — forked from addyosmani/package.json
npm run-scripts boilerplate
{
"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",
@nghuuphuoc
nghuuphuoc / trello-css-guide.md
Last active August 29, 2015 14:26 — forked from bobbygrace/trello-css-guide.md
Trello CSS Guide

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

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
* {
font-size: 12pt;
font-family: monospace;
font-weight: normal;
font-style: normal;
text-decoration: none;
color: black;
cursor: default;
}
@nghuuphuoc
nghuuphuoc / gist:5a9322bd2fcf84c7cd46
Created September 10, 2014 05:58
Reset file permissions
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 April 17, 2014 02:37
Change Wordpress domain name
update wp_options set option_value='http://ri-zone.zoodemo.com' where option_name='siteurl';