Skip to content

Instantly share code, notes, and snippets.

View nfhipona's full-sized avatar
:shipit:
Slacking remotely

Neil Francis Ramirez Hipona nfhipona

:shipit:
Slacking remotely
View GitHub Profile

For Xcode 8.2 or later

You can take videos and screenshots of Simulator using the xcrun Xcode command-line utility.

  1. Run your app on the simulator.

  2. Open Terminal.app

  3. Run the command

    • To take a screenshot, xcrun simctl io booted screenshot <filename>.<file extension>.
    • To take a video, xcrun simctl io booted recordVideo <filename>.<file extension>.

    For example screenshot: xcrun simctl io booted screenshot myScreenshot.png

@nfhipona
nfhipona / Install MongoDB Agent.md
Created June 10, 2020 08:07
Install New MongoDB Agent

Download the agent

curl -OL https://cloud.mongodb.com/download/agent/automation/mongodb-mms-automation-agent-manager_10.14.6.6374-1_amd64.ubuntu1604.deb

and install the package.

sudo dpkg -i mongodb-mms-automation-agent-manager_10.14.6.6374-1_amd64.ubuntu1604.deb
@nfhipona
nfhipona / Make MongoDB Dump.md
Last active June 10, 2020 11:09
MongoDB Dump File Command

Create dump mongodump

mongodump --host <DB_HOST> --port <DB_PORT> -u <DB_USER> -p <DB_PASS> -d <DB_NAME> --authenticationDatabase admin

Options

--quiet -- if system is running out of memory

--out -- output directory -- defaults to dump/<db_name>

@nfhipona
nfhipona / Upload dSYM.md
Last active July 25, 2020 05:17
Uploading dSYM File

Firebase Guide

find dSYM_directory -name "*.dSYM" | xargs -I \{\} $PODS_ROOT/FirebaseCrashlytics/upload-symbols -gsp /path/to/GoogleService-Info.plist -p platform \{\}

Project's Build Process: Run Script


"${PODS_ROOT}/FirebaseCrashlytics/run"

find dSYM_directory -name "*.dSYM" | xargs -I \{\} $(PODS_ROOT)/FirebaseCrashlytics/upload-symbols -gsp $(PROJECT_DIR)/PROJECT_FOLDER/GoogleService-Info.plist -p ios \{\}
@nfhipona
nfhipona / APNsAuthenticationKeyTestPush.sh
Last active January 20, 2021 06:17
[APNs Authentication Key] APNS Test PUSH Script for debugging
#!/bin/bash
# https://firebase.googleblog.com/2017/01/debugging-firebase-cloud-messaging-on.html
# https://developer.apple.com/library/archive/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/CommunicatingwithAPNs.html#//apple_ref/doc/uid/TP40008194-CH11-SW1
# https://developer.apple.com/videos/play/wwdc2016/724/
clear
echo
echo "------ Debug start ------"
echo
@nfhipona
nfhipona / FCMAuthenticationKeyTestPush.sh
Last active January 20, 2021 04:10
[APNs Authentication Key] FCM Test PUSH Script for debugging
#!/bin/bash
# https://firebase.googleblog.com/2017/01/debugging-firebase-cloud-messaging-on.html
# https://firebase.google.com/docs/cloud-messaging/http-server-ref#notification-payload-support
# https://firebase.google.com/docs/cloud-messaging/http-server-ref
# https://developer.apple.com/library/archive/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/CommunicatingwithAPNs.html#//apple_ref/doc/uid/TP40008194-CH11-SW1
clear
echo
echo "------ Debug start ------"
@nfhipona
nfhipona / Mac Terminal Alias.md
Last active September 12, 2022 15:15
Creating Alias in Mac Terminal

To create an alias, use alias ALIAS_NAME="ALIAS_VALUE":

alias ll="ls -al"

To remove the alias, use the unalias command:

unalias ll
@nfhipona
nfhipona / RFC1918.md
Last active September 12, 2022 15:15
RFC 1918 - Network(s)

RFC 1918 - Network(s)

  • 192.168.0.0/16
  • 172.16.0.0/12
  • 10.0.0.0/8

Calculator: click here

@nfhipona
nfhipona / Phone & Card Number Validator.md
Last active January 19, 2024 03:55
RegEx Pattern: Phone Number & Card Number Validator

RegEx Pattern: Phone Number & Card Number Validator

Useful for mobile and card number validation with specific format


Phone Number

(((\+91)+(\d{5}|\s){4})|((\d{5}|\s){3})) - will validate phone number with +91 12345 67890 or 12345 67890