Expressões regulares que normalmente uso.
^(\d{1,3}(\.\d{3})*,\d{2}|\d{1,2})$
Essa expressão captura o formato dos campos de preços. Ex.: 1.000.000,00
/** | |
* make testearr && ./testearr | |
*/ | |
#include <iostream> | |
#include <array> | |
template <typename T, std::size_t I, std::size_t J> | |
using Matrix = std::array< std::array<T, J>, I>; |
new -s tetris | |
renamew main | |
splitw -h -c build/ | |
splitw -v | |
selectp -t 1 | |
neww gvim | |
neww git gui & |
#!/usr/bin/env python | |
# encoding: utf-8 | |
import gi, sys | |
gi.require_version('Gtk', '3.0') | |
gi.require_version('WebKit2', '4.0') | |
from gi.repository import Gtk, WebKit2 |
#!/bin/bash | |
if [[ $# -lt 1 ]]; then | |
echo "Usage: $0 <app_name> [app]" | |
exit | |
fi | |
app=$1 | |
app_name=$1 |
extends KinematicBody2D | |
const GRAVITY = 20 | |
const SPEED = 300 | |
const JUMP_HEIGHT = -600 | |
const FLOOR_NORMAL = Vector2(0, -1) | |
var velocity = Vector2() | |
func _physics_process(delta): |
{ | |
"__version__": "1.0", | |
"application": { | |
"config": { | |
"name": "Fun with Vectors", | |
"icon": "res://icon.png", | |
}, | |
"run": { | |
"main_scene": "res://scenes/basic/basic.tscn" | |
} |
#!/bin/bash | |
apt-get update | |
apt-get install -y software-properties-common | |
LC_ALL=C.UTF-8 add-apt-repository -y ppa:ondrej/php | |
LC_ALL=C.UTF-8 add-apt-repository -y ppa:certbot/certbot | |
apt-get update | |
apt-get install -y git vim curl wget apache2 libapache2-mpm-itk |
#!/bin/bash | |
# 1GB swap | |
dd if=/dev/zero of=/swapfile1 bs=1024 count=1048576 | |
chown root:root /swapfile1 | |
chmod 0600 /swapfile1 | |
mkswap /swapfile1 | |
swapon /swapfile1 | |
# add to /etc/fstab |