Skip to content

Instantly share code, notes, and snippets.

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

Samuel Gomes Link2k5

🏠
Working from home
View GitHub Profile
Assuming you have followed all the steps to install / setup WSL2 -> https://docs.microsoft.com/en-us/windows/wsl/install-win10
**Tested on Ubuntu 20.04**
Step 1 - Find out default gateway and DNS servers
- Navigate to `Control Panel\Network and Internet\Network Connections`
- Right click on relevant connection type WiFi or Ethernet and select `Status`
- Status screen will be displayed, click on `Details` button
- Network Connection details screen will be displayed
- Note down `IPv4 default gateway` and `IPv4 DNS Servers` if available

ZSH CheatSheet

This is a cheat sheet for how to perform various actions to ZSH, which can be tricky to find on the web as the syntax is not intuitive and it is generally not very well-documented.

Strings

Description Syntax
Get the length of a string ${#VARNAME}
Get a single character ${VARNAME[index]}
@dnlcorrea
dnlcorrea / comandos-git.md
Last active March 16, 2022 15:23 — forked from thiagoalvesfoz/comandos-git.md
Comandos úteis para se dar bem no git

Comandos úteis para git
Comandos úteis para se dar bem no git

um guia prático do dia a dia para ajudar você a contribuir em projetos open source


| PROBLEMA | COMANDO |

@danganf
danganf / Curl.php
Last active September 27, 2018 13:56
<?php
namespace IntercaseDefault\MyClass;
class Curl{
private $timeout = 15;
private $connectionTimeout = 10;
public function __construct () {
@webdevilopers
webdevilopers / DefaultController.php
Last active March 23, 2022 15:58
Sending JWT Token in Guzzle POST with LexikJWTAuthenticationBundle
<?php
namespace AppBundle\Controller;
class DefaultController extends Controller
{
/**
* @Route("/gettoken")
*/
public function getToken()
@Propaganistas
Propaganistas / MailHog configuration
Last active March 23, 2025 02:17
Laravel MailHog SMTP configuration
# Mailhog
MAIL_MAILER=smtp
MAIL_HOST=0.0.0.0
MAIL_PORT=1025
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
@VitorLuizC
VitorLuizC / without.js
Last active December 10, 2018 22:39
"without" module exports a function. It returns a new object without specified properties.
/**
* Returns new object without specified properties.
* @param {Array.<string>} keys
* @param {Object.<string, *>} object
* @returns {Object.<string, *>}
*/
const without = (
[ key, ...keys ] = [],
{ [key]: _, ...object } = {}
) => keys.length ? object : without(keys, object);
@matthewzring
matthewzring / markdown-text-101.md
Last active November 7, 2025 19:21
A guide to Markdown on Discord.

Markdown Text 101

Want to inject some flavor into your everyday text chat? You're in luck! Discord uses Markdown, a simple plain text formatting system that'll help you make your sentences stand out. Here's how to do it! Just add a few characters before & after your desired text to change your text! I'll show you some examples...

What this guide covers:

@dnlcorrea
dnlcorrea / validation.php
Created February 21, 2017 05:56
Arquivo com mensagens de erro de validações para Laravel em português.
<?php
// resources/lant/pt/validation.php
return [
/*
|--------------------------------------------------------------------------
| Validation Language Lines
|--------------------------------------------------------------------------
@jjcodes78
jjcodes78 / laravel.cmd
Created February 21, 2016 08:47
Batch script para instalação do Laravel Framework via prompt no Windows
@echo off
echo Laravel Installer
if "%1" == "init" goto init
if "%1" == "new" goto new
echo Uso:
echo laravel init [versao] - instala uma nova aplicacao na pasta atual (precisa estar vazia a pasta!)
echo laravel new [nome] [versao] - instala uma nova aplicacao na pasta 'nome'. Se nome nao for indicado ele criara na pasta 'laravel' por padrao.