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
@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);
@Propaganistas
Propaganistas / MailHog configuration
Last active November 20, 2025 04:09
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
@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()
@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 () {
@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 |

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]}
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