Skip to content

Instantly share code, notes, and snippets.

View vs0uz4's full-sized avatar
🏠
Working from home

Vitor Rodrigues vs0uz4

🏠
Working from home
View GitHub Profile
{
"folders": [
{
"path": "."
}
],
"settings": {
"workbench.colorCustomizations": {
"titleBar.activeBackground": "#007c27",
"titleBar.activeForeground": "#ffffff",
@tuliofaria
tuliofaria / arquivo.js
Created December 7, 2018 22:05
Trecho de código utilizado no Hands-on React-native do DevPleno
regionFrom = (lat, lon, distance) => {
distance = distance/2
const circumference = 40075
const oneDegreeOfLatitudeInMeters = 111.32 * 1000
const angularDistance = distance/circumference
const latitudeDelta = distance / oneDegreeOfLatitudeInMeters
const longitudeDelta = Math.abs(Math.atan2(
Math.sin(angularDistance)*Math.cos(lat),
Math.cos(angularDistance) - Math.sin(lat) * Math.sin(lat)))
@danielschmitz
danielschmitz / index.md
Last active March 14, 2018 14:27
Configuração rápida para o eslint funcionar no VSCode, no template webpack do vue-cli

Configuração rápida para o eslint funcionar no VSCode, no template webpack do vue-cli

Projeto:

npx vue-cli init webpack <nomedoprojeto>
cd <nomedoprojeto>
npm install
@antonioribeiro
antonioribeiro / phpx.sh
Created January 23, 2018 19:59
phpx - run php without Xdebug
function phpx {
phpPath=/usr/local/etc/php/$PHP_VERSION
find $phpPath/php.ini $phpPath/conf.d/*.ini ! -name ext-xdebug.ini | xargs cat > $phpPath/php-no-xdebug.ini
php -n -c $phpPath/php-no-xdebug.ini "$@"
}
@zabaala
zabaala / BindDatabaseServiceProvider.php
Last active March 2, 2021 07:50
php artisan db:log <start> <stop>
<?php
namespace App\Commands\Database;
use Illuminate\Support\ServiceProvider;
class BindDatabaseServiceProvider extends ServiceProvider
{
public function boot()
{
@farnetani
farnetani / gist:b81b6c4946a2fccf1c427e3fdabb8c49
Created October 21, 2017 10:21
API Restful com MongoDB e Express
<p class="tip">**Nota Importante**
API em desenvolvimento.
</p>
## Repositório no github
[https://github.com/RaulSBunicenha/api-ts](https://github.com/RaulSBunicenha/api-ts)
```
Instalando o repositório
@shivamkr19
shivamkr19 / download-egghead-io-videos.md
Last active February 4, 2022 09:48
Download free egghead.io videos

Download free egghead.io videos

Download Egghead.io videos using Lynx Browser and youtube-dl. This method will only work for videos that do not require a pro account.

Prerequesits

You need a Unix/Linux box with Lynx console browser and Youtube-dl installed.

@nhtera
nhtera / ts-to-mp4.py
Created April 9, 2017 18:42
Convert all videos .ts to .mp4 using ffmpeg
#!/usr/local/opt/python/bin/python2.7
# Required ffmpeg
import os
import sys
walk_dir = os.getcwd()
count = 0
for root, subdirs, files in os.walk(walk_dir):
for file in files: