Skip to content

Instantly share code, notes, and snippets.

View kmccarth's full-sized avatar

Kevin McCarthy kmccarth

View GitHub Profile
POST /api/v1/lane/subscriber/register HTTP/1.1
Host: app.joinlane.com
Content-Type: application/json
Connection: keep-alive
Accept: application/json
x-lane-flavour: lane
Accept-Language: en-us
Content-Length: 93
Accept-Encoding: br, gzip, deflate
User-Agent: Lane/45202 CFNetwork/975.0.3 Darwin/18.2.0
#!/bin/bash
# chmod a+x refreshDevApi.sh;
# ./refreshDevApi.sh;
# 1) get the latest prod data to the dev db
# 2) re-deploy dev api
# - kdm
#
# config
uname="YYYYY"
key="XXXXX"
@kmccarth
kmccarth / export-confluence-to-html.sh
Last active April 12, 2023 00:26
I needed to export our Confluence instance, here was a super easy way to get all pages, and create a file for each page (named after the article) and the page's resulting HTML.
#!/bin/bash
export CONFLUENCE_USERNAME="your_username"
export CONFLUENCE_PASSWORD="your_password"
function get_page_html()
{
mkdir ~/confluence;
result=$(curl --request GET \
--url "https://ventureapp.atlassian.net/wiki/rest/api/content/$1/?expand=body.export_view" \
--user $CONFLUENCE_USERNAME:$CONFLUENCE_PASSWORD \

CircleCi Intro

Set-up

  • Clone repo
git clone git@github.com:/Hqoapp/react-native.git ~/repos/hqo/react-native;
  • Checkout branch kdm_circle2
@kmccarth
kmccarth / Dockerfile
Last active September 14, 2018 13:37
CircleCi + Android 27 Alpha + HqO goodies
#
# Built From: https://github.com/CircleCI-Public/circleci-dockerfiles/blob/master/android/images/api-27-alpha/Dockerfile
#
FROM openjdk:8-jdk-slim
LABEL maintainer="marc@circleci.com"
# Initial Command run as `root`.
ADD https://raw.githubusercontent.com/circleci/circleci-images/master/android/bin/circle-android /bin/circle-android
#! bin/bash
docker login;
# ....
docker pull circleci/android:api-27-alpha;
docker images;
# find IMAGE_ID column for the pulled docker hub repository, and copy-and-paste the value (ex, b24d6d30803b)
export IMAGE_ID=b24d6d30803b;
docker tag $IMAGE_ID kmccarth/circleciandroid27alpha;
# docker push kmccarth/circleciandroid27alpha;
#!/bin/bash
echo "# grep with 5 lines after... ";
GREP_RESULTS=$(grep -r -H -A 5 "track({" ~/repos/hqo/react-native/app);
echo "$GREP_RESULTS";
@kmccarth
kmccarth / cmds-to-love.md
Last active September 24, 2018 13:09
Some of my favorite commands, including some for set-up at HqO Engineering

Cmds

You can follow these in order to get set-up

Docker

echo 'export HQO_REPOS_DIR="$HOME/hqo"' >> ~/.bash_profile; # add export HQO_REPOS_DIR="$HOME/hqo"
source ~./bash_profile;
docker-machine stop default;
docker-machine rm -f default;
<?php
// Sends Push notification for iOS users
public function iOS($data, $devicetoken)
{
$deviceToken = $devicetoken;
$ctx = stream_context_create();

Mac OS File Descriptor Limits

React Native apps require a lot of files open at once, so you need to up the allotment for your Mac's OS.

$ sudo atom -a /etc/sysctl.conf;
kern.maxfiles=10485760
kern.maxfilesperproc=1048576

node version

Needs to be 8.5 or above