#How to create a .file
or .folder
on Windows
There are several ways
- Create
file.txt
- Rename to
.file.
, the last dot will be dropped, you'll have.file
Works the same with a file or a directory.
var FormRepo = function (namespace) { | |
/// <summary>Persistent form values, saves to localStorage</summary> | |
/// <param name="namespace" type="String">the namespace to store values in localStorage</param> | |
// should also protect per page, since we could have the same forms in various places | |
this.N = namespace + '.' + window.location.pathname; | |
}; | |
$.extend(FormRepo.prototype, { | |
namespace: function (key) { | |
return this.N + '.' + key; |
$ cd ~/Downloads/redis-2.4.14 | |
$ make test | |
$ make |
function isOnScreen(elem) { | |
// if the element doesn't exist, abort | |
if( elem.length == 0 ) { | |
return; | |
} | |
var $window = jQuery(window) | |
var viewport_top = $window.scrollTop() | |
var viewport_height = $window.height() | |
var viewport_bottom = viewport_top + viewport_height | |
var $elem = jQuery(elem) |
type FilterOperator = 'AND' | 'OR'; | |
type FiltersBy<T> = { | |
[K in keyof T]?: (value: T[K]) => boolean; | |
}; | |
/** | |
* Factory function that creates a specialized function to filter | |
* arrays, by validating all filters (AND operator), | |
* or validating just one of the filters (OR operator). | |
* @param operator Method to validate all filters: AND, OR |
###Sketch trial non stop
Open hosts files:
$ open /private/etc/hosts
Edit the file adding:
127.0.0.1 backend.bohemiancoding.com
127.0.0.1 bohemiancoding.sketch.analytics.s3-website-us-east-1.amazonaws.com
// check version | |
node -v || node --version | |
// list locally installed versions of node | |
nvm ls | |
// list remove available versions of node | |
nvm ls-remote | |
// install specific version of node |
Regex to validate password strength | |
^(?=.*[A-Z].*[A-Z])(?=.*[!@#$&*])(?=.*[0-9].*[0-9])(?=.*[a-z].*[a-z].*[a-z]).{8}$ | |
Explanation: | |
^ Start anchor | |
(?=.*[A-Z].*[A-Z]) Ensure string has two uppercase letters. | |
(?=.*[!@#$&*]) Ensure string has one special case letter. | |
(?=.*[0-9].*[0-9]) Ensure string has two digits. |