Skip to content

Instantly share code, notes, and snippets.

View samukasmk's full-sized avatar

Samuel Sampaio samukasmk

View GitHub Profile

MongoDB Cheat Sheet

Show All Databases

show dbs

Show Current Database

@python-consulting
python-consulting / django-model.py
Created October 20, 2016 16:23
Django dynamic import of model from app
from django.apps import apps
app_config = apps.get_app_config('mainApp')
LogLine = app_config.get_model('ModelName')
@samukasmk
samukasmk / backup-mysql-magento-stores.sh
Last active August 29, 2015 13:57
backup-mysql-magento-stores.sh - Make easy backups of mysql databases for magento stores
#!/bin/bash
#
# Goal: Make backup of mysql databases for magento stores
# Created by: Samuel Maciel Sampaio [20120901] [20140321]
# Contact: samukasmk@gmail.com <smktecnologia.com.br>
# Needed Applications:
# - mysql
# - mysqldump
# - s3put
@samukasmk
samukasmk / check_git_remote_changes.sh
Created January 17, 2014 17:54
Cron Job like git hook, to inform the Jenkins|Hudson ScriptTrigger Plugin to do a build. - by Samuel Maciel Sampaio
#!/bin/bash#
#
# check_git_remote_changes.sh
# By: Samuel Maciel Sampaio <20140115>
#
# Cron Job like git hook, to inform the Jenkins|Hudson
# ScriptTrigger Plugin to do a build.
# Plugin: https://wiki.jenkins-ci.org/display/JENKINS/ScriptTrigger+Plugin
GIT_REPO_FOLDER=$1