Skip to content

Instantly share code, notes, and snippets.

View kekayan's full-sized avatar
:octocat:
Working from home

kekayan kekayan

:octocat:
Working from home
View GitHub Profile
@kekayan
kekayan / dd.md
Last active March 28, 2025 20:55

Build vs. Buy: Suggestic vs Tailored for Diet Delights

Criteria Suggestic White-Label Tailored Solution
Time to Launch ⚠️ 2–4 weeks* – for App with Pre-built features, Not satisfy DDs core needs 6+ months* – Requires full development cycle
Initial Investment ✅ Low – Subscription-based, no dev team needed designers, devs, infrastructure
Operational Fit ❌ Lacks kitchen, inventory, delivery & CRM modules ✅ Fully cust
import android.app.Notification;
import android.app.NotificationChannel;
import android.app.NotificationManager;
import android.app.Service;
import android.content.Context;
import android.content.Intent;
import android.hardware.Sensor;
import android.hardware.SensorEvent;
from flask import Flask,request
import requests
import json
app = Flask(__name__)
@app.route("/codetostate")
def getstate():
code = request.args.get('code')
url="http://dataservice.default.svc.cluster.local/codes"
response = requests.get(url)
@kekayan
kekayan / Data_Dockerfile
Last active May 3, 2019 16:13
sample docker file for data service
FROM tiangolo/uwsgi-nginx-flask:python3.6
# copy over our requirements.txt file
COPY requirements.txt /tmp/
# upgrade pip and install required python packages
RUN pip install -U pip
RUN pip install -r /tmp/requirements.txt
# copy over our app code
@kekayan
kekayan / data_main.py
Last active May 4, 2019 13:54
data service API flask example
from flask import Flask,json,jsonify
import requests
app = Flask(__name__)
@app.route("/<options>")
def getdata(options):
url="https://gist.githubusercontent.com/mshafrir/2646763/raw/8b0dbb93521f5d6889502305335104218454c2bf/states_titlecase.json"
if options=="codes":
url="https://gist.githubusercontent.com/mshafrir/2646763/raw/8b0dbb93521f5d6889502305335104218454c2bf/states_hash.json"
@kekayan
kekayan / gcc5install.txt
Created April 25, 2019 15:46
gcc 5 ubuntu 14.04
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install gcc-5 g++-5
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 60 --slave /usr/bin/g++ g++ /usr/bin/g++-5
@kekayan
kekayan / download_make.sh
Created March 20, 2019 05:27
script for download build-essential & make
sudo apt-get install -y make gcc build-essential
sudo apt-get update
sudo apt-get install make
sudo apt-get install gcc
cd deps
make hiredis jemalloc linenoise lua
cd ..
mkdir build && cd build
wget http://download.redis.io/releases/redis-5.0.4.tar.gz
tar -xvzf redis-5.0.4.tar.gz
cd redis-5.0.4/
apiVersion: operator.m3db.io/v1alpha1
kind: M3DBCluster
metadata:
name: m3db-cluster
spec:
image: quay.io/m3db/m3dbnode:latest
replicationFactor: 3
numberOfShards: 256
isolationGroups:
- name: us-east1-b