- Text Content Generator - http://www.lipsum.com
- Favicon Generator - http://tools.dynamicdrive.com/favicon
- Data Generator - https://mockaroo.com/
- Mobile Mockup Generator - https://mockuphone.com
- Logo Generator - https://www.logaster.com
- UUID Generator - https://www.uuidgenerator.net/
- Hash Generator - https://passwordsgenerator.net/sha256-hash-generator/
This is the source code of one of my blog post. To read the full blog post please click here.
| { | |
| // required | |
| "name": "Name of the project. (e.g. Bedrock)", | |
| "description": "Awesome website of sweetness", | |
| "repository": { | |
| "type": "git", | |
| "url": "https://github.com/mozilla/bedrock" | |
| }, | |
| // optional |
This is a script that adds a fully functional Fork button to your own Gist.
If a Fork button is already present in the page, this bookmarklet will set focus to it instead of adding another one.
The change is temporary and the button will disappear as soon as you navigate away from that Gist (clicking the Fork button does this for you as well). Meaning you will have to run the script every new page load.
Copy the contents from bookmarklet.js, open Scracthpad (Ctrl+F4), paste it there. Back in browser, swwitch to tab with your Gist you want to fork. Back in Scratchpad, "Run" it. Save and/or bookmark the Scratchpad file for future use.
| pandoc -f markdown -t mediawiki test.md -o test.wiki | |
| # Thanks to @tillmanj for the updated formatting |
| // http://custombuttons.sf.net/forum/viewtopic.php?p=2905#p2905 | |
| // (c) Infocatcher 2012 | |
| // version 0.1.0 - 2012-12-20 | |
| // Repair Custom Buttons after save in Nightly with javascript.options.xml.chrome = false | |
| // Use at your own risk! | |
| // Backup your %profile%/custombuttons directory first! | |
| Components.utils.import("resource://gre/modules/NetUtil.jsm"); | |
| Components.utils.import("resource://gre/modules/FileUtils.jsm"); |
| function addButton(toolbarId, buttonId, label, iconPath, firstRun) { | |
| var toolbar = document.getElementById(toolbarId); | |
| var toolbarButton = document.createElement("toolbarbutton"); | |
| toolbarButton.setAttribute("id", buttonId); | |
| toolbarButton.setAttribute("type", "button"); | |
| toolbarButton.setAttribute("removable", "true"); | |
| toolbarButton.setAttribute("class", | |
| "toolbarbutton-1 chromeclass-toolbar-additional"); | |
| toolbarButton.setAttribute("label", label); | |
| toolbarButton.style.listStyleImage = "url(" + iconPath + ")"; |
If you must nest functions in a way that requires access to multiple this', alias outer this to something meaningful - describe the value it's holding. Treat this as the invisible first argument.
In general though, avoiding the situation (nested functions and frivolous use of this) will frequently produce clearer results.
I was accidentally included in a discussion on how to best name this in nested functions in JavaScript. +1's were given to this suggestion of using _this.
Giving style advice on naming nested this without a meaningful context isn't too helpful in my opinion. Examples below have been altered to have at least some context, although a completely contrived and stupid one.
| # With thanks to Stewart Brodie for the reminder: http://goo.gl/IHa4p | |
| # (See old version of this gist for a more roundabout hack I came up with) | |
| window.DocumentType::toString = -> (new XMLSerializer).serializeToString @ |