Skip to content

Instantly share code, notes, and snippets.

View joemar-tagpuno's full-sized avatar

Joemar Tagpuno joemar-tagpuno

View GitHub Profile
@joemar-tagpuno
joemar-tagpuno / GitCommitEmoji.md
Created March 13, 2024 14:24 — forked from parmentf/GitCommitEmoji.md
Git Commit message Emoji
FROM php:7.1-fpm-alpine
RUN apk --no-cache add \
autoconf \
build-base \
geoip \
geoip-dev
RUN mkdir -p /usr/share/GeoIP && cd /usr/share/GeoIP/ && \
wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz && \
@joemar-tagpuno
joemar-tagpuno / com.apple.finder
Created March 12, 2023 17:35
Macbook - Hide all icons from Desktop
defaults write com.apple.finder CreateDesktop false && killall Finder
@joemar-tagpuno
joemar-tagpuno / curl-websocket.sh
Created February 7, 2023 21:49 — forked from htp/curl-websocket.sh
Test a WebSocket using curl.
curl --include \
--no-buffer \
--header "Connection: Upgrade" \
--header "Upgrade: websocket" \
--header "Host: example.com:80" \
--header "Origin: http://example.com:80" \
--header "Sec-WebSocket-Key: SGVsbG8sIHdvcmxkIQ==" \
--header "Sec-WebSocket-Version: 13" \
http://example.com:80/
@joemar-tagpuno
joemar-tagpuno / gist:3244693b6c91fe9d03d9eece9a27a585
Last active April 10, 2023 19:48
IP aliasing on Mac OS for react-native development
# @link https://osxdaily.com/2009/08/05/how-to-create-an-ip-alias-in-mac-os-x-using-ifconfig/
# In react-native development I create IP alias for the ios and android emulators.
# sudo ifconfig en0 alias 192.168.0.101 255.255.255.0
# automate the script with [launchd](https://developer.apple.com/library/archive/documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/CreatingLaunchdJobs.html)
# https://www.macstadium.com/blog/automating-login-and-startup-events-in-macos
@joemar-tagpuno
joemar-tagpuno / generate-ssh-key.sh
Created January 4, 2022 03:33 — forked from adelynx/generate-ssh-key.sh
Correct file permissions for ssh keys and config.
ssh-keygen -t rsa -b 4096 -N '' -C "rthijssen@gmail.com" -f ~/.ssh/id_rsa
ssh-keygen -t rsa -b 4096 -N '' -C "rthijssen@gmail.com" -f ~/.ssh/github_rsa
ssh-keygen -t rsa -b 4096 -N '' -C "rthijssen@gmail.com" -f ~/.ssh/mozilla_rsa
@joemar-tagpuno
joemar-tagpuno / postgres-cheatsheet.md
Last active June 26, 2023 09:59 — forked from Kartones/postgres-cheatsheet.md
PostgreSQL command line cheatsheet

PSQL

Magic words:

psql -U postgres

Some interesting flags (to see all, use -h or --help depending on your psql version):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)
@joemar-tagpuno
joemar-tagpuno / readme-mde.md
Created August 17, 2021 08:45 — forked from ThePredators/readme-mde.md
Setup Mobile Development Environment

⭐ Setup Mobile Development Environment

Install HomeBrew

## Install xcode utils
xcode-select --install
## Install Brew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
## Check that everything is Ok
brew doctor
@joemar-tagpuno
joemar-tagpuno / mysqldump-notes.md
Created March 14, 2021 10:36
MySQL Dump Notes

Using mysqldump

First see the documentation here.

You can do with the --no-data option with mysqldump command

mysqldump -u <db-user> -p --no-data <db-name> > <filename>.sql

You can also extract an individual table with the --no-data option

Encode in base64

echo -n 'username' | base64

Decode in base64

base64 --decode