Skip to content

Instantly share code, notes, and snippets.

View richistron's full-sized avatar
:octocat:
Coding like a baws

Ricardo Rivas richistron

:octocat:
Coding like a baws
View GitHub Profile
@richistron
richistron / tcp-dump.sh
Created February 8, 2022 20:53 — forked from scalopus/tcp-dump.sh
TCPDump: Monitoring `locahost` for Graylog, statsd, fluentd (MacOS)
sudo tcpdump -A -s0 -ilo0 port 24224 or port 12201 or port 8125
@skozz
skozz / TZInfo
Created February 22, 2019 14:28
[Solution Rails + Docker] TZInfo::DataSourceNotFound: tzinfo-data is not present. Please add gem 'tzinfo-data' to your Gemfile and run bundle install
- Add `gem 'tzinfo-data'` to the Gemfile.
- Add `tzdata` to the Dockerfile
```
RUN apk update \
&& apk add build-base \
tzdata
```
- Build `docker-compose build` or `docker-compose up --build`
- Enjoy the life
@Mohamed3on
Mohamed3on / batchPrettier.md
Last active April 5, 2024 17:03
Run prettier on all JS files in a directory
  1. Install prettier
  2. Make a .prettierignore file, and add directories you'd like prettier to not format, for example: **/node_modules
  3. Run prettier --write "**/*.js" *Don't forget the quotes.
  4. Optional: if you want to format JSON/SCSS files too, replace js with json/scss.
@szydan
szydan / gist:b225749445b3602083ed
Last active February 5, 2024 15:16
<U+FEFF> character showing up in files. How to remove them?
1) In your terminal, open the file using vim:
vim file_name
2) Remove all BOM characters:
:set nobomb
3) Save the file:
:wq
@grenade
grenade / 01-generate-ed25519-ssh-key.sh
Last active April 14, 2024 14:27
generate ed25519 ssh and gpg/pgp keys and set file permissions for ssh keys and config
#!/bin/bash
# generate new personal ed25519 ssh key
ssh-keygen -o -a 100 -t ed25519 -f ~/.ssh/id_ed25519 -C "rob thijssen <rthijssen@gmail.com>"
# generate new host cert authority (host_ca) ed25519 ssh key
# used for signing host keys and creating host certs
ssh-keygen -t ed25519 -f manta_host_ca -C manta.network
eval "$(ssh-agent -s)"
@andreyvit
andreyvit / tmux.md
Created June 13, 2012 03:41
tmux cheatsheet

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a