Skip to content

Instantly share code, notes, and snippets.

View daviinacio's full-sized avatar
🎯
Focusing

Davi Inácio daviinacio

🎯
Focusing
View GitHub Profile
@fdaciuk
fdaciuk / 00 - Tailwind Colors + Styled Components + TypeScript.md
Last active February 14, 2024 16:28
Tailwind Colors + Styled Components + TypeScript

Configuration to use TailwindCSS colors in a Styled Components theme with CRA + TypeScript.

Tailwind colors list: https://tailwindcss.com/docs/customizing-colors#generating-colors

Create files src/@types/styled.d.ts and src/resources/theme.ts with content below. Then add the theme on your project:

import { ThemeProvider } from 'styled-components'
import { theme } from 'resources/theme'
@oofnikj
oofnikj / answerfile
Last active May 4, 2024 12:20
Install Docker on Termux
KEYMAPOPTS="us us"
HOSTNAMEOPTS="-n alpine"
INTERFACESOPTS="auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
hostname alpine
"
TIMEZONEOPTS="-z UTC"
@gabrielfroes
gabrielfroes / capuccino-developer.php
Last active December 1, 2021 15:45
Recipe for Developer Daily Capuccino
<?php
/**
* Recipe for Developer Daily Capuccino
*
* @author Gabriel Froes & Vanessa Weber <contato@codigofonte.com.br>
* @version 1.0
* @copyright GPL © 2018, youtube.com/codigofontetv
* @access public
* @package CDFTV\Recipes
* @example Classe CapuccinoDev.
@maxim
maxim / gh-dl-release
Last active April 29, 2024 08:55
Download assets from private Github releases
#!/usr/bin/env bash
#
# gh-dl-release! It works!
#
# This script downloads an asset from latest or specific Github release of a
# private repo. Feel free to extract more of the variables into command line
# parameters.
#
# PREREQUISITES
#
@scy
scy / opening-and-closing-an-ssh-tunnel-in-a-shell-script-the-smart-way.md
Last active March 15, 2024 11:26
Opening and closing an SSH tunnel in a shell script the smart way

Opening and closing an SSH tunnel in a shell script the smart way

I recently had the following problem:

  • From an unattended shell script (called by Jenkins), run a command-line tool that accesses the MySQL database on another host.
  • That tool doesn't know that the database is on another host, plus the MySQL port on that host is firewalled and not accessible from other machines.

We didn't want to open the MySQL port to the network, but it's possible to SSH from the Jenkins machine to the MySQL machine. So, basically you would do something like

ssh -L 3306:localhost:3306 remotehost

@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active May 3, 2024 19:09
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname