How to add Bower component when it’s not in the repository?

Sometimes component that you want to use in your project isn’t available in Bower repo. There is a way to install it, even in very specified version. Go to project’s Github, in my case it’s here. Copy URL from the browser, and paste it somewhere. Now go to relases and click commit id that you’re interested in (this random blue colored string):

After that you’ll see full commit id, in this case it’s fef978b279c546923ad4f4118acea4d503e7596c. Paste that to the end of repository URL you’ve copied earlier. Remember to prefix it with # char and add .git to the URL:

https://github.com/bfintal/Counter-Up.git#fef978b279c546923ad4f4118acea4d503e7596c

Finally mix it with your bower.json file. Here’s full example:

{
	"name": "Realhero report",
	"description": "Report template based on New Age",
	"main": "index.js",
	"authors": ["Konrad Fedorczyk"],
	"license": "ISC",
	"homepage": "http://realhe.ro",
	"private": true,
	"ignore": ["**/.*", "node_modules", "bower_components", "test", "tests"],
	"dependencies": {
	    "bootstrap": "^3.3.7",
	    "font-awesome": "^4.6.3",
   	 	"jquery": "^1.11.3",
   	 	"simple-line-icons": "^2.3.2",
   	 	"morris.js": "^0.5.1",
   	 	"jqvmap-fedek6": "https://github.com/fedek6/jqvmap.git#774c12a57916ab82e17406203bb41522dfe0e38b",
   	 	"Counter-Up": "https://github.com/bfintal/Counter-Up.git#fef978b279c546923ad4f4118acea4d503e7596c"
	}
}

Look at the last line of dependencies part, here’s component that I’ve added.

SEO Friendly Gists

In case you ever wondered if Github’s Gists are indexed when they are embedded on your website, ther aren’t 🙂

But there is a simple tool to avoid loss of traffic from Google. Go to http://seo-friendly-gist.herokuapp.com/ and simply paste your gist’s id into form on this website. It will generate code that you should paste unchanged  to your WordPress post (in text mode) or whatever.

gist id
URL segment with Gist’s id.