- Install Xcode (Avaliable on the Mac App Store)
- Install Xcode Command Line Tools (Preferences > Downloads)
- Install depot_tools
$ git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git$ nano ~/.zshrc- Add
path=('/path/to/depot_tools' $path)
| #!/usr/bin/env coffee | |
| fs = require 'fs' | |
| sh = require 'execSync' | |
| config = JSON.parse fs.readFileSync 'package.json' | |
| fs.renameSync 'package.json', 'package.json.real' | |
| name = config.name = "#{config.name}-semver" |
| http://eloquentjavascript.net/index.html | |
| http://eloquentjavascript.net/00_intro.html | |
| http://eloquentjavascript.net/01_values.html | |
| http://eloquentjavascript.net/02_program_structure.html | |
| http://eloquentjavascript.net/03_functions.html | |
| http://eloquentjavascript.net/04_data.html | |
| http://eloquentjavascript.net/05_higher_order.html | |
| http://eloquentjavascript.net/06_object.html | |
| http://eloquentjavascript.net/07_elife.html | |
| http://eloquentjavascript.net/08_error.html |
| var im = require('imagemagick-native'); | |
| var fs = require('fs'); | |
| var buffer = fs.readFileSync('./test.gif'); | |
| // test.gif --> http://c.2dr.me/Vckz | |
| var resizedBuffer = im.convert({ | |
| srcData: buffer, | |
| width: 48, | |
| height: 48, |
This entire guide is based on an old version of Homebrew/Node and no longer applies. It was only ever intended to fix a specific error message which has since been fixed. I've kept it here for historical purposes, but it should no longer be used. Homebrew maintainers have fixed things and the options mentioned don't exist and won't work.
I still believe it is better to manually install npm separately since having a generic package manager maintain another package manager is a bad idea, but the instructions below don't explain how to do that.
Installing node through Homebrew can cause problems with npm for globally installed packages. To fix it quickly, use the solution below. An explanation is also included at the end of this document.
| // need to npm install http-proxy | |
| require('http-proxy').createProxyServer({ | |
| port: 80, // if necessary | |
| secure: false, // disable for self-signed certs | |
| target: 'https://www.targetwebsite.com/' | |
| }).listen(9000); | |
| // boom baby, bye-bye development CORS issues! |
This should be one of the core features of Git, but for some reason it's impossible to figure out how to search for a string in your commit history and see the diffs that that string is in. Here's the best I've come up with:
To find which commits and which files a string was added or removed in:
git log -S'search string' --oneline --name-status
To see the diff of that
| # to generate your dhparam.pem file, run in the terminal | |
| openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
| # Basically the nginx configuration I use at konklone.com. | |
| # I check it using https://www.ssllabs.com/ssltest/analyze.html?d=konklone.com | |
| # | |
| # To provide feedback, please tweet at @konklone or email [email protected]. | |
| # Comments on gists don't notify the author. | |
| # | |
| # Thanks to WubTheCaptain (https://wubthecaptain.eu) for his help and ciphersuites. | |
| # Thanks to Ilya Grigorik (https://www.igvita.com) for constant inspiration. | |
| server { |