Skip to content

Instantly share code, notes, and snippets.

View vinicius73's full-sized avatar
🤓
"Those who cannot acknowledge themselves, will eventually fail."

Vinicius Reis vinicius73

🤓
"Those who cannot acknowledge themselves, will eventually fail."
View GitHub Profile
<form>
<div class="btn-group" data-toggle-name="is_private" data-toggle="buttons-radio" >
<button type="button" value="0" class="btn" data-toggle="button">Public</button>
<button type="button" value="1" class="btn" data-toggle="button">Private</button>
</div>
<input type="hidden" name="is_private" value="0" />
</form>
@vinicius73
vinicius73 / material-laravel.md
Last active August 28, 2015 16:18 — forked from rafa-acioly/material-laravel.md
Todos os links abaixo contem conteudo em texto e video para estudo do framework Laravel, aproveite com moderação.
@vinicius73
vinicius73 / DateField.php
Created January 18, 2016 14:43 — forked from emtudo/DateField.php
Helper para datas Laravel
<?php
namespace App\Support\Validators\Rules;
use App\Support\Helpers\Dates as DateHelper;
class DateField
{
/**
* @param string $attribute
@vinicius73
vinicius73 / perfectelementary.bash
Created October 18, 2016 03:51
HowTo Install the perfect Elementary-OS
#Download Elementary OS from here:
#http://sourceforge.net/projects/elementaryos/files/stable/
#First you update your system
sudo apt-get update && sudo apt-get dist-upgrade
#Install Google Chrome
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
sudo sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list'
@vinicius73
vinicius73 / async-examples.js
Created October 21, 2016 09:58 — forked from developit/async-examples.js
Async Array utilities in async/await. Now available as an npm package: https://github.com/developit/asyncro
/** Async version of Array.prototype.reduce()
* await reduce(['/foo', '/bar', '/baz'], async (acc, v) => {
* acc[v] = await (await fetch(v)).json();
* return acc;
* }, {});
*/
export async function reduce(arr, fn, val, pure) {
for (let i=0; i<arr.length; i++) {
let v = await fn(val, arr[i], i, arr);
if (pure!==false) val = v;
@vinicius73
vinicius73 / npm-cheat-sheet.md
Last active April 5, 2019 07:32 — forked from AvnerCohen/npm-cheat-sheet.md
Node.js - npm Cheat Sheet

Node.js - npm Cheat Sheet

(Descrição completa e mais comandos aqui - https://npmjs.org/doc/index.html)

Instale um pacote e também atualize o package.json com a versão instalada e o nome do pacote.
npm install <module-name> --save
@vinicius73
vinicius73 / gist:4088c95bf8bacb37bfc8c1c587f5c0eb
Created March 25, 2017 16:21 — forked from thursby/gist:8ac6cb96c84b6d20a3fb1bf3048d46ed
Set the sensitivity for the Logitech M570 in Linux. For whatever reason most controls won't let you set sensitivity less than 1. My trackball likes 0.4. The way this is set is weird because the IDs seem to change whenever the USB is connected and disconnected. I wrote this oneliner to find 'em and change it.
xinput list --short | grep Logitech | awk '{print $5}' | cut -f2 -d"=" | xargs -I id xinput set-prop id "Device Accel Constant Deceleration" 0.4
@vinicius73
vinicius73 / Cargo.toml
Created October 18, 2023 12:56 — forked from vchernetskyi993/Cargo.toml
Rust - Single testcontainer for multiple test functions
[package]
name = "testcontainers-sample"
version = "0.1.0"
edition = "2021"
[dev-dependencies]
async_once = "0.2.6"
aws-sdk-s3 = "0.28.0"
ctor = "0.2.4"
lazy_static = "1.4.0"