Skip to content

Instantly share code, notes, and snippets.

View brocard's full-sized avatar
🏠
Working from home...

Yusniel Brocard brocard

🏠
Working from home...
View GitHub Profile
@brocard
brocard / settings.json
Created January 30, 2023 14:55 — forked from danielroe/settings.json
VScode settings for a minimal UI
{
// Disable telemetry
"telemetry.telemetryLevel": "off",
// Zen mode
"zenMode.fullScreen": false,
"zenMode.hideTabs": true,
"zenMode.centerLayout": false,
// Theming
"workbench.iconTheme": "city-lights-icons-vsc",
"editor.fontFamily": "Dank Mono",
@brocard
brocard / vue-datatable.md
Created January 7, 2022 15:31 — forked from Bunix/vue-datatable.md
Datatable component for Vue and Tailwind CSS

Keep in mind that this implementation requires an api for fetching data, and assumes the following response schema:

{
    "perPageOptions": [
        15, 50, 100
    ],
    "actions": [
        "Delete all", "Publish All", "Unpublish All"
    ],
@brocard
brocard / mac-setup-redis.md
Created October 4, 2020 16:23 — forked from tomysmile/mac-setup-redis.md
Brew install Redis on Mac

type below:

brew update
brew install redis

To have launchd start redis now and restart at login:

brew services start redis
@brocard
brocard / chunk.js
Created June 28, 2020 18:18
chunk array javascript
chunkArray(arr, n) {
return arr.length ? [arr.slice(0, n), ...this.chunkArray(arr.slice(n), n)] : [];
},
@brocard
brocard / js
Created June 28, 2020 18:17
chunk array javascript
chunkArray(arr, n) {
return arr.length ? [arr.slice(0, n), ...this.chunkArray(arr.slice(n), n)] : [];
},
@brocard
brocard / index.html
Created June 13, 2019 14:20
Table with fixed header, footer and left column using position:sticky
<h1 class="intro">Table with fluid height and width fixed header, footer and first column using position:sticky </h1>
<p class="intro">This example uses position:sticky on the th elements in the thead, tfoot and left column to achieve the fixed effect. Browsers that don't support position:sticky will just get a normal table so no harm done. Resize browser smaller to see fixed first column.</p>
<div id="table-scroll" class="table-scroll">
<table id="main-table" class="main-table">
<thead>
<tr>
<th scope="col">Header 1</th>
<th scope="col">Header 2</th>
<th scope="col">Header 3 with longer content</th>
<th scope="col">Header 4 text</th>
@brocard
brocard / troubleshooting.md
Created March 19, 2019 03:08 — forked from adamwathan/troubleshooting.md
Troubleshooting Valet on macOS Sierra

Troubleshooting Valet on Sierra

Common Problems

Problem: I just see "It works!"

Apache is running on port 80 and interfering with Valet.

  1. Stop Apache: sudo /usr/sbin/apachectl stop
  2. Restart Valet: valet restart
@brocard
brocard / webpack-for-node-modules.js
Created October 9, 2018 18:24 — forked from mxstbr/webpack-for-node-modules.js
How to use webpack to compile node modules
/* eslint-disable no-var */
var path = require('path');
var autoprefixer = require('autoprefixer');
const MATCH_ALL_NON_RELATIVE_IMPORTS = /^\w.*$/i;
module.exports = [{
output: {
filename: '[name].js',
library: 'atrium-react-plugin-beta',
@brocard
brocard / GoogleDriveServiceProvider.php
Created May 1, 2018 05:20 — forked from sergomet/GoogleDriveServiceProvider.php
Setup a Laravel Storage driver with Google Drive API
<?php
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
class GoogleDriveServiceProvider extends ServiceProvider
{
/**
* Bootstrap the application services.
(function ($) {
'use strict';
var pr1 = pr1 || {};
pr1 = {
init: function () {
}
};