Discover gists
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
print('''<header> | |
ここをもうちょっとシンプルに変えてっと | |
え、なにこのエラー・・・ | |
</header>''') | |
try: | |
uglyCode() | |
except: | |
print('よくあるError') | |
try: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$html = new THtmlEditor('texto'); | |
$html->setOption('toolbar',[ | |
['style', ['bold', 'italic', 'underline', 'clear']], | |
['font', ['strikethrough', 'superscript', 'subscript']], | |
['fontsize', ['fontsize']], | |
['color', ['color']], | |
['para', ['ul', 'ol', 'paragraph']], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$GruposCliente = GruposCliente::where('cliente_id', '=', $object->id)->getIndexedArray('grupo_cliente_id', 'grupo_cliente_id'); | |
/* | |
Array | |
( | |
[1] => 1 | |
[2] => 2 | |
[4] => 4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
import math | |
import argparse | |
from PIL import Image | |
def build_frames(gif, animation_seconds): | |
num_frames = math.floor(gif.n_frames) | |
frame_width, frame_height = gif.size |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$tr->addStyle('title', 'Courier', '10', 'B', '#000000', '#dbdbdb'); | |
if ($format == 'pdf') | |
{ | |
$tr->setHeaderCallback( | |
function($tr) | |
{ | |
$pdf = $tr->getNativeWriter(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
public function __construct($param = null) | |
{ | |
parent::__construct(); | |
$this->form = new BootstrapFormBuilder(self::$formName); | |
$this->form->setFormTitle("PEDIDOS - DELIVERY"); | |
$this->limit = 20; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#groups is list of integers in ascending order without gaps | |
def getRow(lists, row): | |
res = [] | |
for l in lists: | |
for i in range(len(l)): | |
if i==row: | |
res.append(l[i]) | |
return res |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
TScript::create('$("[name=\'NOME_CAMPO\']").blur();'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
# Simple script to remove dangling images from GHCR. | |
# You need to have installed gh cli and jq for this script to work properly | |
# You need to be logged to 'gh' first | |
container="debian/buildd" | |
temp_file="ghcr_prune.ids" | |
rm -rf $temp_file |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
COMANDOS: | |
1 - Windows PowerShell | |
2 - irm https://massgrave.dev/get | iex |
NewerOlder