Skip to content

Instantly share code, notes, and snippets.

View inkeliz's full-sized avatar
🎯
Focusing

inkeliz inkeliz

🎯
Focusing
View GitHub Profile
@inkeliz
inkeliz / keybase.md
Created March 1, 2017 18:05
keybase.md

Keybase proof

I hereby claim:

  • I am inkeliz on github.
  • I am inkeliz (https://keybase.io/inkeliz) on keybase.
  • I have a public key ASBxbAip1iXhWnNVhkj70dQf7-H4qamf0IVjtplZwyMx7Qo

To claim this, I am signing this object:

@inkeliz
inkeliz / snippet.php
Last active March 13, 2017 23:06 — forked from TiuTalk/snippet.php
<?php
const LOCAL_ARQUIVO = 'pasta/do/arquivo/';
$nomeArquivo = 'imagem.jpg';
if(!preg_match('/^(?:[a-z0-9_-]|\.(?!\.))+$/iD', $nomeArquivo)){
echo 'Arquivo é inválido';
exit;
// Isto é feito para evitar ataques para ler aquivos internos (ex. "../etc/"...), na pior das hipóteses.
<?php
/**
* Created by PhpStorm.
* User: lucas
* Date: 21/08/2017
* Time: 20:21
*/
// Endpoint:
$url = 'https://api.nasa.gov/planetary/sounds';
// This function need the mb_string;
// This function is based on the native str_pad from PHP (https://github.com/php/php-src/blob/master/ext/standard/string.c#L5332);
const STR_PAD_INSERT_ALL = 4;
function mb_str_pad(string $input, int $pad_length, string $pad_string, int $pad_type, string $pad_encoding = 'utf8') : string {
$result = '';
$pad_insert_all = 0;
$pad_inset_limit = 1;
@inkeliz
inkeliz / simple-totp.go
Created March 24, 2019 01:39
simple-totp
package main
import (
"crypto/hmac"
"crypto/sha1"
"crypto/sha256"
"crypto/sha512"
"crypto/subtle"
"encoding/binary"
"fmt"
@inkeliz
inkeliz / SVG_to_IVG.go
Created May 14, 2020 17:57
Convert basic SVG to IVG
// Copyright 2016 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// That is an modification from https://github.com/golang/exp/blob/00229845015e38294862ecd9909318241789d41c/shiny/materialdesign/icons/gen.go
// DON'T supports all types of SVG.
package icon
import (
package main
import (
"fmt"
"image/color"
"os"
"gioui.org/app"
"gioui.org/font/gofont"
"gioui.org/io/system"