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",
@vs0uz4
vs0uz4 / arquivo.js
Created December 8, 2018 01:03 — forked from tuliofaria/arquivo.js
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)))
@vs0uz4
vs0uz4 / LoginController.php
Created April 25, 2018 01:35 — forked from SaeedPrez/LoginController.php
Laravel 5.4 Additional Login Conditions - Add custom error message.
<?php
// This is code to return custom error message
// for Youtube tutorial: Laravel 5.4 Additional Login Conditions
// https://www.youtube.com/watch?v=Z8s6uhhD1Pk
namespace App\Http\Controllers\Auth;
@vs0uz4
vs0uz4 / gist:c75ec3349895077aeb0ef9de5bf2c1ff
Created November 12, 2017 11:51 — forked from jagregory/gist:710671
How to move to a fork after cloning
So you've cloned somebody's repo from github, but now you want to fork it and contribute back. Never fear!
Technically, when you fork "origin" should be your fork and "upstream" should be the project you forked; however, if you're willing to break this convention then it's easy.
* Off the top of my head *
1. Fork their repo on Github
2. In your local, add a new remote to your fork; then fetch it, and push your changes up to it
git remote add my-fork git@github...my-fork.git
@vs0uz4
vs0uz4 / ts-to-mp4.py
Created November 2, 2017 13:55 — forked from nhtera/ts-to-mp4.py
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:
@vs0uz4
vs0uz4 / Interceptor.js
Created October 28, 2017 07:47 — forked from kirkbushell/Interceptor.js
Handling JWT, Vue JS and token refreshes
import Unauthorised from './Unauthorised'
export default function() {
return {
response: function(response) {
switch (response.status) {
case 401: return Unauthorised.handle();
}
return response;
<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
@vs0uz4
vs0uz4 / download-egghead-io-videos.md
Created October 15, 2017 21:30 — forked from shivamkr19/download-egghead-io-videos.md
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.

@vs0uz4
vs0uz4 / PKGBUILD
Created September 30, 2017 13:12 — forked from agentsib/PKGBUILD
DBeaver EE 4.0.4
# Maintainer: Joseph Post <joe@jcpst.com>
# Previous Maintainer: Stephan Wienczny <stephan@wienczny.de>
pkgname=dbeaver-ee
pkgver=4.0.4
pkgrel=1
pkgdesc="A free universal database tool for developers and database administrators. Enterprise Edition includes NoSQL database support"
arch=('i686' 'x86_64')
url="http://dbeaver.jkiss.org/"
license=("GPL")