- regex101 Online regex tester for PHP, PCRE, JavaScript and Python that highlights pattern and matches on the fly. Also features a code generator and a regex debugger!
- myregextester Sports a separate regex split tester and allows to optimize patterns (I guess this is based on Perl's Regexp::Optimizer module).
- regexr Online regex tester with good regex replace and explain functionality.
- debuggex Shows neat expression diagrams (not active anymore).
- regexper translates regular expressions into an SVG image (for documentation or embedding)
- RexV2 Evaluator for PHP PCRE, PHP Posix!, Perl, Python, Javascript, Node.JS!
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
LIBVIRT_POOL = 'fast' | |
Vagrant.configure("2") do |config| | |
config.vm.box = "generic/ubuntu1604" | |
config.vm.synced_folder ".", "/vagrant", type: "nfs", nfs_udp: false | |
#config.vm.synced_folder "../../datastore/spindle/ML/datasets/", "/mnt", type: "nfs", nfs_udp: false | |
config.vm.network "private_network", :dev => "br0", :mode => 'bridge', :ip => "192.168.17.25" |
This is just a small post in response to [this tweet][tweet] by Julien Pauli (who by the way is the release manager for PHP 5.5). In the tweet he claims that objects use more memory than arrays in PHP. Even though it can be like that, it's not true in most cases. (Note: This only applies to PHP 5.4 or newer.)
The reason why it's easy to assume that objects are larger than arrays is because objects can be seen as an array of properties and a bit of additional information (like the class it belongs to). And as array + additional info > array
it obviously follows that objects are larger. The thing is that in most cases PHP can optimize the array
part of it away. So how does that work?
The key here is that objects usually have a predefined set of keys, whereas arrays don't:
// ==UserScript== | |
// @name Rutracker.org Magnet URLs | |
// @namespace rutrackerorg-magnet-urls | |
// @description Transforms torrent hash into a magnet url | |
// @include https://rutracker.org/* | |
// @include https://rutracker.cr/* | |
// @include https://rutracker.net/* | |
// @include https://rutracker.nl/* | |
// @include http://rutrackerripnext.onion/* | |
// @version 9 |
import axios from 'axios'; | |
class Service { | |
constructor() { | |
let service = axios.create({ | |
headers: {csrf: 'token'} | |
}); | |
service.interceptors.response.use(this.handleSuccess, this.handleError); | |
this.service = service; | |
} |
LVM on LUKS Arch installation with systemd-boot
Sources:
#!/bin/bash | |
if [[ "$1" == "" ]]; then | |
file_name=$(basename $0) | |
echo "Add dir to PATH global var" | |
echo " $file_name dir" | |
exit 1 | |
fi | |
PATHRC_file_path="$HOME/.pathrc" |
export function fnGenerateColor(sText, bDarkMode=false) { | |
var iL = sText.length; | |
var iSum = 0; | |
for (var iI=0; iI<iL; iI++) { | |
iSum += iI*iI*sText.charCodeAt(iI); | |
} | |
var iH = iSum % 365; | |
var iS = 100; |