Skip to content

Instantly share code, notes, and snippets.

View vctrtvfrrr's full-sized avatar
🇧🇷
(╯°□°)╯︵ ┻━┻

Victor Otávio Ferreira vctrtvfrrr

🇧🇷
(╯°□°)╯︵ ┻━┻
View GitHub Profile
@JosXa
JosXa / typed-objects.ts
Last active August 2, 2024 12:18
Type-safe Object keys, values, entries, fromEntries, and mappings
/* Type-safe alternatives to the builtin `Object` functions:
* - Object.keys = typedObjectKeys
* - Object.values = typedObjectValues
*
* mapObjectEntries to combine:
* - Object.entries = typedObjectEntries
* - Object.fromEntries = typedFromEntries
*
* For motivation, see: https://www.totaltypescript.com/iterate-over-object-keys-in-typescript
*
@Makeshift
Makeshift / tutorial.md
Last active April 19, 2025 15:42
Tutorial for automatically syncing an Obsidian vault with Git on an Android device

How to sync Obsidian with Git on Android

Limitations

  • If Termux is closed in the background by Android, the cron service will stop updating your repository and you must open Termux again. Refer to instructions for your device model to disable the killing of certain background applications.
  • This may negatively affect your devices battery life. I'm not entirely sure yet.

Setup

@saniyathossain
saniyathossain / vue-datatable.md
Created April 22, 2021 00:19 — 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"
    ],
@canvural
canvural / ValidateOpenAPISpec.php
Last active December 14, 2021 17:14
Laravel middleware to validate the incoming request against OpenAPI spec
<?php
declare(strict_types=1);
namespace App\Http\Middleware;
use Closure;
use Exception;
use Illuminate\Http\Request;
use Illuminate\Validation\ValidationException;
@vukhanhtruong
vukhanhtruong / ._README.md
Last active March 24, 2025 01:14
Setup Javascript / Nodejs Project with ES6 + Babel 7 + ESLint + Airbnb + Prettier

Project Setup

Create a directory and run the following command.

npm init 

For this tutorial, I will be adding an index.js file to the src folder, and this will be our entry point. Our file directory should look like this.

@zanechua
zanechua / azure-pipelines.yml
Last active September 23, 2024 09:41
Azure Pipeline + Laravel + MySQL + PHPUnit + Laravel Dusk
# PHP
# Test and package your PHP project.
# Add steps that run tests, save build artifacts, deploy, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/php
pool:
vmImage: 'Ubuntu 16.04'
variables:
phpVersion: 7.2
@wrabit
wrabit / _bootstrap_bulma_helpers.scss
Last active September 8, 2020 17:21
Bootstrap style responsive helper utilities for Bulma
/*
Start Bootstrap style responsive spacer helper
Utilities for spacing, text and float
*/
$spacer: 1rem !default;
$spacers: () !default;
$spacers: map-merge((
@chetanppatil
chetanppatil / set-dbeaver-timezone-to-UTC.md
Last active December 19, 2023 01:34
Set dbeaver timezone to UTC (default timezone)

For Linux Users

  1. Go to directory: /usr/share/dbeaver
  2. Edit dbeaver.ini file
  3. In that file add -Duser.timezone=UTC this line under -vmargs tag
  4. Save it and restart dbeaver.
  5. Enjoy with correct date without any date conversion.

Finally your dbeaver.ini file will look like this:

@mohanpedala
mohanpedala / bash_strict_mode.md
Last active April 17, 2025 09:00
set -e, -u, -o, -x pipefail explanation

A fresh xUbuntu 18.04 LTS installation

The newest Ubuntu LTS version code named Bionic Beaver was released a few months ago and I thought it was finally time to upgrade. I also thought I would take this opportunity to write down the steps taken for my reference and anyone else who might find it useful.


Making sure all your software is up to date and all per-requisites are installed.

First things first, we want to make sure we are fully up-to-date on our fresh system. This will allow us to install the newest versions of all packages currently installed on the system from the sources file at /etc/apt/sources.list.

sudo apt-get upgrade