The setup installs the following software:
The setup installs the following software:
- Apache
- MySQL
- PHP
- Node
# comprovem el swapfile | |
sudo swapon -s | |
# si no hi ha cap | |
# swapoff -a | |
sudo dd if=/dev/zero of=/swapfile bs=1024 count=1024k | |
sudo mkswap /swapfile | |
sudo swapon /swapfile | |
# ara hauria de mostrar el swapfile amb: | |
swapon -s | |
# config final |
apt-get update && apt-get dist-upgrade -y
apt-get autoremove -y
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 |
⇐ back to the gist-blog at jrw.fi
Or, 16 cool things you may not have known your stylesheets could do. I'd rather have kept it to a nice round number like 10, but they just kept coming. Sorry.
I've been using SCSS/SASS for most of my styling work since 2009, and I'm a huge fan of Compass (by the great @chriseppstein). It really helped many of us through the darkest cross-browser crap. Even though browsers are increasingly playing nice with CSS, another problem has become very topical: managing the complexity in stylesheets as our in-browser apps get larger and larger. SCSS is an indispensable tool for dealing with this.
This isn't an introduction to the language by a long shot; many things probably won't make sense unless you have some SCSS under your belt already. That said, if you're not yet comfy with the basics, check out the aweso
function slugify(text) | |
{ | |
return text.toString().toLowerCase() | |
.replace(/\s+/g, '-') // Replace spaces with - | |
.replace(/[^\w\-]+/g, '') // Remove all non-word chars | |
.replace(/\-\-+/g, '-') // Replace multiple - with single - | |
.replace(/^-+/, '') // Trim - from start of text | |
.replace(/-+$/, ''); // Trim - from end of text | |
} |
server { | |
listen 80; | |
server_name demo.example.com; | |
return 301 https://demo.example.com$request_uri; | |
} | |
server { | |
listen 443 ssl spdy; | |
server_name demo.example.com; | |
ssl on; |