background preloader

Startup

Facebook Twitter

Npm cheatsheet. For the full table of contents see below, but first here is a quick cheatsheet of several npm commands: Installing npm back to top curl | sh Update npm There are several ways you can update npm. or npm install npm -g Search for npm packages npm search hook.io Protip: Try searching via the browser with View details of a npm package npm view hook.io Installing a npm package locally back to top For the purpose of this demo, we will use http-server. http-server is a package we've written which provides an easy to use wrapper around node's core http.Server class.

npm cheatsheet

Npm install http-server This performs a local install of http-server in our current working directory You may also notice a new node_modules/ folder. Installing a npm package into an application mkdir mynewapp/ cd mynewapp npm install http-server touch test.js run script node test.js Notice how we: require('http-server')? Http-server is not the name of a native node.js module. Understanding Global versus Local installs in npm back to top test.js. PhoneGap. 6 CSS Shorthand Tricks Every Developer Should Know. Recently, I decided that I needed a refresher in all of the various CSS shorthand properties.

6 CSS Shorthand Tricks Every Developer Should Know

The best way to learn something is to teach it so here’s my attempt at exactly that. Today we’ll learn how to use CSS shorthand for backgrounds, margins & padding, borders, fonts, list-styles and transitions. Background CSS background images are one of the most common places that I see CSS shorthand being implemented. There might be a little more functionality here though than people take advantage of. Background: The Long Way background-color: #eee; background-image: url(background.jpg); background-repeat: no-repeat; Background Shorthand From here, most of us know how to take these three properties and throw them all inside the background property. Background: #eee url(background.jpg) no-repeat; Attachment and Position Two other properties that you don't see in the shorthand as often are position and attachment. Background-position refers to where the image is placed within the element. Margin: 10px; How to Center Anything With CSS.

Recently, we took a dive into the very core concepts behind CSS layout and explored the differences between absolute and relative positioning.

How to Center Anything With CSS

We’re going to follow that up with another CSS layout talk, this time based around a fundamental question that almost every new developer asks: how do you center something? There are a bunch of different types of web elements and layout situations, each calling for a unique solution for centering (both vertically and horizontally). Today we’ll go over a bunch of these scenarios so you can wrap your mind around how they work and come away with the confidence to center anything! Who’s This For? I’ve gotten a lot of commenter feedback lately from designers who struggle with the basic methods and concepts of layout in CSS.

Having been there quite a few times myself, I know that this is an immensely frustrating period of your professional growth. Horizontally Center an Element As you can see, by default, our div pops up in the top left of the viewport. Getting Started With Bitcoin. So, you’ve read a bit about Bitcoin and want to get involved.

Getting Started With Bitcoin

This guide is meant to make Bitcoin as easy as possible to get started. Step 1: Get a Bitcoin Wallet – It’s Free There are a variety of bitcoin wallets online and they each have their own pros and cons. To make things easy, we’re going to use Coinbase. All you need is an email address and you’ll have a Bitcoin wallet in a matter of seconds. As you can see in the image below, you can access your Bitcoin wallet address at: Account Settings -> Integrations -> Bitcoin Addresses The address you see there is how people can send you Bitcoins.

Step 2: Get Bitcoins Now that you have a Bitcoin wallet, it’s time to get some Bitcoins. Trickle Programs – There are a variety of websites you can use to get small amounts of Bitcoin by doing little tasks. Step 3: Spend Bitcoins You have your wallet. You can download books, music, graphics and a bunch of other digital content at CoinDL.