In Git you can add a submodule to a repository. This is basically a repository embedded in your main repository. This can be very useful. A couple of usecases of submodules:
- Separate big codebases into multiple repositories.
#!C:/Python27/python.exe | |
# | |
# Convert PDF files to Microsoft Office Word compatible doc/docx files, | |
# using LibreOffice's command line interface. | |
# | |
# http://stackoverflow.com/questions/26358281/convert-pdf-to-doc-python-bash | |
# http://ask.libreoffice.org/en/question/20111/converting-files-using-soffice-convert-to-with-embedded-images-html-to-doc/ | |
# http://cgit.freedesktop.org/libreoffice/core/tree/filter/source/config/fragments/filters | |
# |
// This will open up a prompt for text to send to a console session on digital ocean | |
// Useful for long passwords | |
(function () { | |
var t = prompt("Enter text to be sent to console, (This wont send the enter keystroke)").split(""); | |
function f() { | |
var character = t.shift(); | |
var i=[]; | |
var code = character.charCodeAt(); | |
var needs_shift = "!@#$%^&*()_+{}:\"<>?~|".indexOf(character) !== -1 |
# Backup | |
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql | |
# Restore | |
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE | |
AWS_CLIENT_SECRET_KEY=FILLIN | |
AWS_SERVER_PUBLIC_KEY=FILLIN | |
AWS_SERVER_PRIVATE_KEY=FILLIN | |
S3_BUCKET_NAME=FILLIN | |
S3_HOST_NAME=FILLIN | |
S3_MAX_FILE_SIZE=5242880 FILLIN | |
S3_BUCKET_REGION=us-east-1 FILLIN | |
S3_BUCKET_VERSION=2006-03-01 FILLIN |
<?php | |
namespace App\Services; | |
use App\Post; | |
class Slug | |
{ | |
/** | |
* @param $title |
<?php | |
// Created by Rafael Corrêa Gomes | |
// Reference http://devdocs.magento.com/guides/m1x/api/rest/introduction.html#RESTAPIIntroduction-RESTResources | |
// Custom Resource | |
$apiResources = "products?limit=2"; | |
// Custom Values | |
$isAdminUser = true; | |
$adminUrl = "admin"; |
#!/bin/bash | |
MYSQL_USER="root" | |
MYSQL_PASS="1234" | |
MAIL="[email protected]" | |
REMOTE_REPOSITORY=https://bitbucket.org/username/backup-banco | |
DIRECTORY="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | |
cd "$DIRECTORY" | |
COMMIT_COUNT=`git rev-list HEAD --count` |