a list of slides from nodeconf
you may want to take a look at the jsconf-gist too!
| 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 |
| #!/bin/bash | |
| # | |
| # Copyright (C) 2010 Brady Miller <[email protected]> | |
| # | |
| # This program is free software; you can redistribute it and/or | |
| # modify it under the terms of the GNU General Public License | |
| # as published by the Free Software Foundation; either version 2 | |
| # of the License, or (at your option) any later version. | |
| # | |
| # |
| # install git | |
| sudo apt-get install g++ curl libssl-dev apache2-utils | |
| sudo apt-get install git-core | |
| # download the Node source, compile and install it | |
| git clone https://github.com/joyent/node.git | |
| cd node | |
| ./configure | |
| make | |
| sudo make install | |
| # install the Node package manager for later use |
a list of slides from nodeconf
you may want to take a look at the jsconf-gist too!
Some exercises from the Falsy Values workshops.
The good parts:
| #!/usr/bin/env sh | |
| ## | |
| # This is script with usefull tips taken from: | |
| # https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
| # | |
| # install it: | |
| # curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
| # |
| /* | |
| Copyright 2012-2021 Viktor Klang | |
| Licensed under the Apache License, Version 2.0 (the "License"); | |
| you may not use this file except in compliance with the License. | |
| You may obtain a copy of the License at | |
| http://www.apache.org/licenses/LICENSE-2.0 | |
| Unless required by applicable law or agreed to in writing, software |
| Latency Comparison Numbers (~2012) | |
| ---------------------------------- | |
| L1 cache reference 0.5 ns | |
| Branch mispredict 5 ns | |
| L2 cache reference 7 ns 14x L1 cache | |
| Mutex lock/unlock 25 ns | |
| Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
| Compress 1K bytes with Zippy 3,000 ns 3 us | |
| Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
| Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |
| #!/usr/bin/env python | |
| # | |
| # cocoa_keypress_monitor.py | |
| # Copyright © 2016 Bjarte Johansen <[email protected]> | |
| # | |
| # The MIT License (MIT) | |
| # | |
| # Permission is hereby granted, free of charge, to any person obtaining | |
| # a copy of this software and associated documentation files (the | |
| # “Software”), to deal in the Software without restriction, including |
| for i in $HOME/local/*; do | |
| [ -d $i/bin ] && PATH="${i}/bin:${PATH}" | |
| [ -d $i/sbin ] && PATH="${i}/sbin:${PATH}" | |
| [ -d $i/include ] && CPATH="${i}/include:${CPATH}" | |
| [ -d $i/lib ] && LD_LIBRARY_PATH="${i}/lib:${LD_LIBRARY_PATH}" | |
| [ -d $i/lib ] && LD_RUN_PATH="${i}/lib:${LD_RUN_PATH}" | |
| # uncomment the following if you use macintosh | |
| # [ -d $i/lib ] && DYLD_LIBRARY_PATH="${i}/lib:${DYLD_LIBRARY_PATH}" | |
| [ -d $i/lib/pkgconfig ] && PKG_CONFIG_PATH="${i}/lib/pkgconfig:${PKG_CONFIG_PATH}" | |
| [ -d $i/share/man ] && MANPATH="${i}/share/man:${MANPATH}" |