Skip to content

Instantly share code, notes, and snippets.

View silvioq's full-sized avatar

Silvio silvioq

  • Argentina
  • 04:38 (UTC -03:00)
View GitHub Profile
@aadnk
aadnk / injectApi.py
Last active June 3, 2024 08:31
Inject a REST API into Streamlit by injecting into Tornado
import logging
import threading
from typing import Any, Dict, Iterable, Optional, Union
from tornado.routing import Rule, Matcher
_global_tornado_hook = None
_global_hook_lock = threading.RLock()
class CustomRule:
def __init__(self, path_pattern: Union[str, Matcher], handler_class: Any,
@tristanlins
tristanlins / iconv.docker
Created October 10, 2015 15:41
Docker PHP extension recipes
FROM php:5.6-cli
RUN apt-get update \
&& apt-get install -y \
libfreetype6-dev \
&& rm -rf /var/lib/apt/lists/* \
&& docker-php-ext-install iconv \
&& apt-get remove -y \
libfreetype6-dev \
&& apt-get install -y \
@silvioq
silvioq / openshift-symfony-creator.sh
Last active February 27, 2016 00:51
This script creates a Gear with symfony in Openshift
#!/bin/bash
read -p "Enter your app name: " APP
if [ q$APP == q ] ; then
echo "No app ... aborting"
exit 1
fi
read -p "Enter database engine [mysql|pgsql] (mysql): " ENG
if [ q$ENG == q ] ; then
ENG=mysql