> set mykey somevalue
OK
> get mykey
"somevalue"
Multiple set o get (MSET and MGET commands) (for reduced latency):
> mset a 10 b 20 c 30
> set mykey somevalue
OK
> get mykey
"somevalue"
Multiple set o get (MSET and MGET commands) (for reduced latency):
> mset a 10 b 20 c 30
LPUSH (adds on the left (at the head)), RPUSH (on the right (at the tail)), LRANGE (extracts ranges of elements from lists). Note that LRANGE takes two indexes, the first and the last element of the range to return. Both the indexes can be negative, telling Redis to start counting from the end: so -1 is the last element, -2 is the penultimate element of the list, and so forth.:
> rpush mylist A
(integer) 1
> rpush mylist B
(integer) 2
> lpush mylist first
(integer) 3
> lrange mylist 0 -1
/* Service */
.factory('ServiceContainer', ['$resource', function($resource) {
var defaultParams = {
'page': 0,
'size': 8
};
return {
getResource: function (customParams) {
.wrapped-line { width: 2rem; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
<script> | |
// At the controller: | |
$scope.redirectToSystemApp = function (url, protocol) { | |
if (typeof protocol == 'undefined') { | |
window.open(encodeURI(url), '_system', 'location=yes'); | |
preventDefault(); | |
} else { | |
window.open(protocol + ':' + url, '_system'); | |
} | |
}; |
# Para que el servidor no te muestre un error de 'You don't have permission to access / on this server' necesitas comentar o eliminar en apache2.conf estas líneas: | |
#<Directory /> | |
# Options FollowSymLinks | |
# AllowOverride None | |
# Require all denied | |
#</Directory> | |
<VirtualHost *:80> | |
ServerName miweb.local |
# Info seen at: https://gist.github.com/maakor/8972566 | |
# | |
# Sometimes you need to move your existing git repository | |
# to a new remote repository (/new remote origin). | |
# Here are a simple and quick steps that does exactly this. | |
# | |
# Let's assume we call "old repo" the repository you wish | |
# to move, and "new repo" the one you wish to move to. | |
# | |
### Step 1. Make sure you have a local copy of all "old repo" |
Credits to Ofir Luzon at http://stackoverflow.com/questions/15491894/regex-to-validate-date-format-dd-mm-yyyy
^(?:(?:31(/|-|.)(?:0?[13578]|1[02]))\1|(?:(?:29|30)(/|-|.)(?:0?[1,3-9]|1[0-2])\2))(?:(?:1[6-9]|[2-9]\d)?\d{2})$|^(?:29(/|-|.)0?2\3(?:(?:(?:1[6-9]|[2-9]\d)?(?:0[48]|[2468][048]|[13579][26])|(?:(?:16|[2468][048]|[3579][26])00))))$|^(?:0?[1-9]|1\d|2[0-8])(/|-|.)(?:(?:0?[1-9])|(?:1[0-2]))\4(?:(?:1[6-9]|[2-9]\d)?\d{2})$