Standard escape codes are prefixed with Escape
:
- Ctrl-Key:
^[
- Octal:
\033
- Unicode:
\u001b
- Hexadecimal:
\x1B
- Decimal:
27
# If you come from bash you might have to change your $PATH. | |
# export PATH=$HOME/bin:/usr/local/bin:$PATH | |
# Path to your oh-my-zsh installation. | |
export ZSH="/home/riverfount/.oh-my-zsh" | |
# Set name of the theme to load --- if set to "random", it will | |
# load a random theme each time oh-my-zsh is loaded, in which case, | |
# to know which specific one was loaded, run: echo $RANDOM_THEME | |
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes |
import uuid | |
from django.contrib.auth.models import User | |
from django.db import models | |
from localflavor.br.br_states import STATE_CHOICES | |
class UuidModel(models.Model): | |
uuid = models.UUIDField(unique=True, editable=False, default=uuid.uuid4) | |
class Meta: |
import boto3 | |
s3 = boto3.resource('s3') | |
for bucket in s3.buckets.all(): | |
for oh_noes in s3.BucketAcl(bucket.name).grants: | |
if oh_noes['Grantee']['Type'] == 'Group' and oh_noes['Grantee']['URI'] == 'http://acs.amazonaws.com/groups/global/AllUsers': | |
print(bucket) |
Find what:
(href|src)="([a-zA-Z0-9/.-]+[^.html])"
Replace with:
$1=\"{% static "assets/$2" %}"
#!/bin/bash | |
date -d "$(curl -s --head http://google.com | grep ^Date: | sed 's/Date: //g')" | |
Batch converter for Windows using Inkscape with the command line
InkscapeBatchConvert is an easy to use solution to quickly convert all files of a folder to another type without the need to open Inkscape. The program uses Windows Batch scripting and will only work on Windows.
Tested with Inkscape 1.0.x - 1.3.x ✅ (The last version that supports Inkscape 0.9.x can be found here)
_InkscapeBatchConvert.bat
""" | |
Autores: | |
Tiago Henrique da Cruz Pereira | |
João Felipe de Moraes Borges | |
""" | |
import threading | |
import time | |
import os | |
from urllib.request import urlopen |
A personal diary of DataFrame munging over the years.
Convert Series datatype to numeric (will error if column has non-numeric values)
(h/t @makmanalp)
<?php | |
function custom_woocommerce_loop_add_to_cart_link( $html, $product ) { | |
return '<a href="' . get_permalink( $product->id ) . '" class="button">' . __( 'Texto do botão' ) . '</a>'; | |
} | |
add_filter( 'woocommerce_loop_add_to_cart_link', 'custom_woocommerce_loop_add_to_cart_link', 10, 2 ); |