Skip to content

Instantly share code, notes, and snippets.

@nabeelio
nabeelio / install-php.sh
Last active July 8, 2019 18:17
Install PHP on OSX
#!/bin/bash
# PHP Install Script
# Requires homebrew and phpbrew
# Minimum reqs for phpvms development
PHP_VERSION=7.3.7
# Prereqs
brew install bzip2 libzip libxml2 mhash mcrypt pcre autoconf
@nabeelio
nabeelio / maps.md
Last active August 15, 2020 08:14
phpVMS v2 Maps

Updating phpVMS Legacy to OSM

This updates the legacy phpVMS install to use Leaflet mapping library to replace the Google Maps integration. Using Leaflet, the base maps is interchangeable, the default setup uses the OpenStreetMap "Mapnik" style base layer. This can be changed (see the changes for MAP_TYPE below). I recommend reading through the entire pull request just to familiarize yourself with the changes.

When viewing the diffs below, red are the lines to delete, and green would be to add.


Copy new files:

-Dawt.useSystemAAFontSettings=lcd
-Dawt.java2d.opengl=true
# Only for people on Mac, it makes Java use an optimised graphics engine.
-Dapple.awt.graphics.UseQuartz=true
@nabeelio
nabeelio / Dockerfile
Created July 16, 2016 01:41
PyEnv Dockerfile
#
# Build a docker image and run the footbot application within
# with the python env being setup
#
# using debian jessie
FROM buildpack-deps:jessie
MAINTAINER Nabeel S <hi@nabs.io>
ENV APP_HOME /opt/footbot
@nabeelio
nabeelio / .gitignore
Last active July 14, 2016 19:59
python gitignore file
__pycache__/
build/
develop-eggs/
dist/
downloads/
docs/_build/
eggs/
.eggs/
*.egg-info/
ENV/
@nabeelio
nabeelio / base.py
Last active July 10, 2016 14:55
Create properties dynamically without having to create explicit setters and getters
#
# Instead of doing of this for tons of properties:
#
# @property
# def prop(self):
# return self._fields.get('prop')
#
# @prop.setter
# def prop(self, value):
# self._fields['prop'] = value
@nabeelio
nabeelio / download.py
Last active July 2, 2016 18:26
quick script for a friend to write out a reddit thread
# do a "pip install praw" on the command line
import sys
import praw
import textwrap
def print_thread(comment, indent=0):
"""
write out this comment, and then check if there are replies
and if there are replies, we call this recursively, adding another
@nabeelio
nabeelio / mt.sh
Last active August 29, 2015 14:24
multitail
#!/usr/bin/env python
import sys
import random
import argparse
from fabric.operations import local
COLORS = ['green', 'blue', 'yellow', 'red']
CMD = ['multitail -mb 10MB --follow-all -n 100']
@nabeelio
nabeelio / 0_reuse_code.js
Last active August 29, 2015 14:21
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console