Skip to content

Instantly share code, notes, and snippets.

@hammadzz
hammadzz / installables_list.md
Last active September 12, 2019 02:07
OSX Setup: Installables

Essentials

  • brew
  • Chrome
  • iTerm + zsh(Oh-My-Z-Shell) + scm_breeze (git aliases + more)
  • Clipy: copy paste clipboard

Utilities:

  • Postico: postgresql client with ssh tunneling
  • Cyberduck: ftp + s3 client
  • LastPass: password manager
@hammadzz
hammadzz / amzn_linux_postgis_libs.sh
Created February 5, 2018 00:25
Installing GEOS PROJ.4 GDAL for PostGIS GeoDjango
sudo yum -y update
sudo yum -y install make cmake gcc gcc-c++ libtool libcurl-devel libxml2-devel curl-devel python-devel
#GEOS
wget http://download.osgeo.org/geos/geos-3.4.2.tar.bz2
tar xvf geos-3.4.2.tar.bz2
cd geos-3.4.2/
./configure
make
sudo make install
@hammadzz
hammadzz / pyspark_help.md
Last active August 23, 2020 12:13
PySpark HelpSheet

Do you have any open source projects on Github or Bitbucket?

How many react native projects have you worked on?

What is your background, is your past experience in web or native or something else?

What is you core compentancy iOS + ReactNative or Android + ReactNative?

How much experience do you have with react-native for Android side?

@hammadzz
hammadzz / navigationbarcolor.swift
Created August 13, 2017 23:52
iOS Navigation Bar Color
UINavigationBar.appearance().barTintColor = UIColor.hzmi_blue_300
UINavigationBar.appearance().tintColor = UIColor.white
UINavigationBar.appearance().titleTextAttributes = [NSForegroundColorAttributeName: UIColor.hzmi_white_100]
What you need to get started:
1. Github account setup with TradeRev team
2. Altassian account JIRA
3. AWS Keys (Access and Secret Key)
Install pip to install AWS CLI:
easy_install pip
Install AWSCLI:
pip install awscli --ignore-installed six
@hammadzz
hammadzz / newrelic_run_script.sh
Last active March 29, 2017 21:08
This script uploads the dSYMs to new relic as needed to symbolicate crashes on iOS
# New Relic's script that uploads dSYMs automatically (required to symbolicate crashes)
SCRIPT=`/usr/bin/find "${SRCROOT}" -name newrelic_postbuild.sh | head -n 1`
# Reading tokens from info.plist for this target from keys are "NewRelicToken[Prod/Dev/Debug]"
PROD_TOKEN="$(defaults read "${PRODUCT_SETTINGS_PATH}" NewRelicTokenProd)"
DEV_TOKEN="$(defaults read "${PRODUCT_SETTINGS_PATH}" NewRelicTokenDev)"
# Select token for configuration
if [ ${CONFIGURATION} = "AppStore" ]; then
echo "Using Production Agent Token"
@hammadzz
hammadzz / xcodebuild_print_build_settings.sh
Created March 17, 2017 13:29
xcodebuild print build settings
xcodebuild -project myProj.xcodeproj -target "myTarg" -showBuildSettings
xcodebuild -workspace WORKSPACE.xcworkspace -scheme SCHEME -showBuildSettings
@hammadzz
hammadzz / lldb printHierarchy
Created March 16, 2017 19:12
Print View Controller Hierarchy
# See http://stackoverflow.com/questions/27966453/how-to-use-printhierarchy-in-lldb-console-with-swift
# Only Obj-C when pressing pause button
po [[[UIWindow keyWindow] rootViewController] _printHierarchy]
# Can use Swift when on breakpoint
po UIApplication.sharedApplication().keyWindow!.rootViewController!._printHierarchy
# Force Obj-C on breakpoint
expr -l objc++ -O -- [[[UIWindow keyWindow] rootViewController] _printHierarchy]
@hammadzz
hammadzz / custom_osmgeoadmin.py
Last active March 17, 2017 00:45
Custom OSMGeoAdmin
from django.contrib.gis import admin
from django.contrib.gis.geos import Point
from .models import Location
class CustomGeoAdmin(admin.OSMGeoAdmin):
map_width = 800
map_height = 500
# Toronto
lon = -79.3832