The following regular expression will match:
- AB12 1234 1234 1234 1234
- AB12 1234 1234 1234 1234 1
- AB12 1234 1234 1234 1234 12
but also:
(function () { | |
'use strict' | |
self.addEventListener('fetch', event => { | |
let request = event.request | |
if (request.method !== 'GET') { | |
return | |
} | |
event.respondWith( | |
caches.match(request) | |
.then(response => { |
/usr/sbin/mysqld --verbose --help | grep -A 1 "Default options" |
#!/usr/bin/env bash | |
ids=$(vagrant global-status | grep 'running' | cut -d ' ' -f 1 | xargs) | |
vagrant suspend $ids |
* { | |
box-sizing: border-box; | |
text-rendering: optimizeLegibility; | |
-webkit-font-smoothing: antialiased; | |
-moz-osx-font-smoothing: grayscale; | |
font-kerning: auto; | |
} | |
html { | |
font-family: sans-serif; |
// Example to generate a random key with crypto/rand. | |
// It's useful to use it for example to prevent request forgery by comparing it | |
// inside requests. | |
package main | |
import ( | |
"crypto/rand" | |
"fmt" | |
"log" |
update wp_options set option_value = replace(option_value,'http://old_domain.com','http://new_domain.com'); | |
update wp_postmeta set meta_value = replace(meta_value,'http://old_domain.com','http://new_domain.com'); | |
update wp_posts set post_content = replace(post_content,'http://old_domain.com','http://new_domain.com'); | |
update wp_posts set guid = replace(guid,'http://old_domain.com','http://new_domain.com'); | |
update wp_posts set pinged = replace(pinged,'http://old_domain.com','http://new_domain.com'); | |
update wp_comments set comment_content = replace(comment_content,'http://old_domain.com','http://new_domain.com'); |
clone = x => [...x] | |
push = y => x => [...x, y] | |
pop = x => x.slice(0, -1) | |
unshift = y => x => [y, ...x] | |
shift = x => x.slice(1) | |
sort = f => x => [...x].sort(f) | |
del = i => x => [...x.slice(0, 1), ...x.slice(i + 1)] | |
splice = (s, c, ...y) => x => [...x.slice(0, s), ...y, ...x.slice(s + c)] |
package blockchain | |
import ( | |
"bytes" | |
"crypto/sha256" | |
"strconv" | |
"time" | |
) | |
type Blockchain struct { |
# Options | |
setopt emacs | |
setopt nobeep | |
setopt nonomatch | |
setopt shnullcmd | |
setopt extendedglob | |
setopt bashautolist | |
setopt noautomenu | |
setopt noalwayslastprompt |