Skip to content

Instantly share code, notes, and snippets.

View insign's full-sized avatar
🇧🇷
being open-sourcerer

Hélio insign

🇧🇷
being open-sourcerer
View GitHub Profile
@insign
insign / AMD EPYC High Perf.md
Created March 19, 2022 01:24
Comparing new vultr servers

$ 100 to test vultr: (Use the link) https://www.vultr.com/?ref=9067267-8H

root@amd-epyc-high-perf:~# curl -sL yabs.sh | bash
# ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## #
#              Yet-Another-Bench-Script              #
#                     v2022-02-18                    #
# https://github.com/masonr/yet-another-bench-script #
# ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## #

Sat 19 Mar 2022 12:18:04 AM UTC
@insign
insign / curl.sh
Last active November 2, 2021 18:30 — forked from exAspArk/curl.sh
Test CORS with cURL (case insensitive)
curl -I -X OPTIONS \
-H "Origin: http://EXAMPLE.COM" \
-H 'Access-Control-Request-Method: GET' \
http://EXAMPLE.COM/SOMETHING 2>&1 | grep -i 'Access-Control-Allow-Origin'
@insign
insign / LaravelCommandVersion.php
Created May 6, 2021 17:44
PHP Benchmark of algorithms
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
class Benchmark extends Command
{
/**
* The name and signature of the console command.
@insign
insign / select-copy-middle-paste.ahk
Last active June 9, 2021 15:05
Auto copy on select paste with middle (no obstrutive)
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
#SingleInstance Force ; reloads if try to rerun
cos_mousedrag_treshold := 20 ; pixels
@insign
insign / 2018_02_13_142413_add_renews_at_column_to_subscriptions.php
Last active January 31, 2024 07:55 — forked from garygreen/2018_02_13_142413_add_renews_at_column_to_subscriptions.php
Sync Stripe Renewal Date for all subscriptions - Laravel Console Command
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class AddRenewsAtColumnToSubscriptions extends Migration
{
/**
* Run the migrations.
@insign
insign / QDbtn.vue
Last active September 13, 2018 01:24
Quasar Dynamic button - buttons for desktop, list for mobile
<template>
<q-btn v-if="!$q.platform.is.mobile"
@click="$emit('click')"
:color="color"
:flat="flat"
:outline="outline"
:icon="icon"
:loading="loading"
:to="to"
>
@insign
insign / change_dpi_for_4k_xfce.sh
Created July 25, 2018 01:59
XFCE script for adjust for HiDPI (4k) and rollback after
#!/bin/sh
DPI=$(xfconf-query -c xsettings -p /Xft/DPI)
if [ $DPI -ne 192 ];then
xfconf-query -c xsettings -p /Xft/DPI -s 192
xfconf-query -c xsettings -p /Gtk/CursorThemeName -s capitaine-cursors-hidpi
dconf write /net/launchpad/plank/docks/dock1/icon-size 120
else
### Keybase proof
I hereby claim:
* I am insign on github.
* I am insign (https://keybase.io/insign) on keybase.
* I have a public key ASD95NwQFKpuJz0-odbZAo1vxi6q-CpaUFQ6VY7PUa9A3Ao
To claim this, I am signing this object:
@insign
insign / ecv.vue
Created April 24, 2018 13:39
ecv.vue
<template>
<div>
<q-page padding>
<q-uploader ref="ecvUp" :url="url" extensions=".csv" auto-expand multiple @add="addedFiles" @uploaded="uploadedFile" :headers="{ Authorization: 'Bearer ' + $store.login.sessao.jwt, 'debug-token':'aaa'}"/>
<q-table :loading="table.loading" title="ECV" :data="table.data" :columns="table.columns" @request="request" :pagination.sync="table.pagination" row-key="name"/>
</q-page>
</div>
</template>
@insign
insign / aggregate.js
Created January 11, 2018 22:50
Faster alternative for Array.reduce()
Array.prototype.aggregate = function (fn, initialValue) {
let current
const length = this.length
if (length == 0 && initialValue) return initialValue
else if (length == 0) throw 'Reduce of empty array with no initial value'
else if (length == 1 && initialValue) return fn(initialValue, this[0])
else if (length == 1) return this[0]
else if (initialValue) current = fn(initialValue, this[0])
else current = this[0]