Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Hélio insign

🎯
Focusing
Block or report user

Report or block insign

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@insign
insign / 2018_02_13_142413_add_renews_at_column_to_subscriptions.php Sync Stripe Renewal Date for all subscriptions - Laravel Console Command
View 2018_02_13_142413_add_renews_at_column_to_subscriptions.php
<?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 Sep 13, 2018
Quasar Dynamic button - buttons for desktop, list for mobile
View QDbtn.vue
<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 Jul 25, 2018
XFCE script for adjust for HiDPI (4k) and rollback after
View change_dpi_for_4k_xfce.sh
#!/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
@insign
insign / watchlist.php
Created Nov 7, 2015
Sync IMDb watchlist to trakt.tv watchlist. Usage: php -f watchlist.php trakt_apikey trakt_username trakt_passwordhash imdb_login imdb_password imdb_uid (IMDb login is email adress or nickname, it's NOT the ur12345678 bit, that's the imdb_uid)
View watchlist.php
<?php
define('TRAKT_APIKEY', $argv[1]);
define('TRAKT_USERNAME', $argv[2]);
define('TRAKT_PASSWORD', $argv[3]);
define('IMDB_EMAIL', $argv[4]);
define('IMDB_PASSWORD', $argv[5]);
define('IMDB_UID', $argv[6]);
function curl_post($urlpre, $data, $urlpost = '')
View Keybase
### 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:
View 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 Jan 11, 2018
Faster alternative for Array.reduce()
View aggregate.js
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]
@insign
insign / all.js
Created Jun 7, 2017
Teste de promisses
View all.js
let os = require('os')
let nativefier = require('nativefier').default
let c = require('colors')
let icon = './src/icon.png'
let options = {
name: 'Gmail Desktop',
targetUrl: 'https://mail.google.com/mail/mu/?mui=ca',
View casa.vue
<template>
<!-- root node required -->
<div>
<grid-layout :layout="layout" :col-num="12" :row-height="30" :is-draggable="true" :is-resizable="true" :vertical-compact="true" :margin="[10,10]" :use-css-transforms="true">
<grid-item v-for="item in layout" :x="item.x" :y="item.y" :w="item.w" :h="item.h" :i="item.i">
{{content[item.i].text}}
</grid-item>
</grid-layout>
</div>
</template>
You can’t perform that action at this time.