Skip to content

Instantly share code, notes, and snippets.

View mardix's full-sized avatar

Mardix mardix

View GitHub Profile
@mardix
mardix / OpenSourceBaas.md
Created June 29, 2023 03:35 — forked from PARC6502/OpenSourceBaas.md
List of open source, self hosted BaaS - Backend as a service

Backend as a Service

Supabase - ~52K stars

  • Designed explicitly as an open source firebase alternative
  • Typescript based
  • Docker support

Appwrite - ~32K stars

  • Written in JavaScript and PHP
  • Docker based
  • Realtime support across all services
@mardix
mardix / python_over_ssh
Created March 21, 2017 07:05 — forked from mattyjones/python_over_ssh
Execute a script located on a remote server over ssh using python
#! /usr/bin/env python
import secure
import pexpect
# the file containing the list of servers to log into
input_file = "script_list"
# The login creds
user = secure.USER
@mardix
mardix / awesome-php.md
Created November 2, 2012 14:34 — forked from ziadoz/awesome-php.md
Awesome PHP Libraries
@mardix
mardix / php-cs-fixer-pre-commit.php
Created September 4, 2012 17:06
A pre-commit hook to make PHP code PSR-2 compliant, check for syntax error
#!/usr/bin/php
<?php
/**
* .git/hooks/pre-commit
*
* This pre-commit hooks will check for PHP error (lint), and make sure the code
* is PSR compliant.
*
* Dependecy: PHP-CS-Fixer (https://github.com/fabpot/PHP-CS-Fixer)
*
@mardix
mardix / autocomplete.py
Created September 16, 2020 01:13 — forked from jedp/autocomplete.py
autocomplete.py - redis autocompleter
"""
A redis autocomplete example for multi-word phrases.
Based on:
Ruby original: http://gist.github.com/574044
Python original: https://gist.github.com/577852
See options below for usage
Requires http://github.com/andymccurdy/redis-py/
<?php
/**
* CSVReader
* Class to parse and iterate CSV files on the fly
*
* <code>
* $myCsv = new CSVReader("$path/csv.csv");
*
* foreach ($myCsv as $data) {
* echo $data[2] ."\n";
@mardix
mardix / Voodoo\CanOfSpam.php
Last active May 8, 2020 22:33
Voodoo\CanOfSpam, a PHP 5.4 implementation to parse and get random spam text for blog comments
<?php
/**
* CanOfSpam, a PHP 5.4 implementation to parse and get random spam text for blog comments
* -> https://gist.github.com/shanselman/5422230
*
* License: MIT
* Author : Mardix - http://github.com/mardix
*
* How to use
*
# coding=UTF-8
from __future__ import division
import re
# This is a naive text summarization algorithm
# Created by Shlomi Babluki
# April, 2013
class SummaryTool(object):
Remove culprit server
ssh-keygen -R remote-server-name-here
Install Dokku
# must have dokku as username
git remote add dokku dokku@example.com:flask-example
# Edit Procfile
...
# Push