Skip to content

Instantly share code, notes, and snippets.

@eliashussary
eliashussary / metabase-postgres.docker-compose.yml
Created December 11, 2018 16:45
A docker-compose file for metabase with postgres.
version: "3"
services:
postgres-db:
image: postgres
restart: always
ports:
- 5432:5432
environment:
POSTGRES_PASSWORD: postgres
@fernandoaleman
fernandoaleman / install-rabbitmq-centos-7.md
Last active April 22, 2024 19:00
Install RabbitMQ on CentOS 7

Install RabbitMQ on CentOS 7

sudo yum -y install epel-release
sudo yum -y update

Install Erlang

Download repository

@sergiotabanelli
sergiotabanelli / REVAMPED.md
Last active March 26, 2022 17:55
MYSQLND_MS REVAMPED: Single and multi-master read/write consistency enforcing in MySQL asynchronous clusters with PHP and mysqlnd_ms extension

MYSQLND_MS REVAMPED: Single and multi-master read/write consistency enforcing in MySQL asynchronous clusters with PHP and mysqlnd_ms extension

NOTE: The service level and consistency feature is one of the most changed areas of the mymysqlnd_ms fork. Functionalities like server side read consistency and server side write consistency allow transparent migration to MySQL asyncronous clusters in almost all use cases with no or at most extremely small effort and application changes.

Different types of MySQL cluster solutions offer different service and data consistency levels to their users. Any asynchronous MySQL replication cluster offers eventual consistency by default. A read executed on an asynchronous slave may return current, stale or no data at all, depending

@peatiscoding
peatiscoding / build-tag-push.py
Created January 24, 2018 15:20
a script to convert your docker-compose.yml (version 2) with build node to image node; this script required DOCKERHUB_USER environment available.
#!/usr/bin/python
import os
import subprocess
import time
import yaml
import re
user_name = os.environ.get("DOCKERHUB_USER")
@abstractart
abstractart / books.md
Last active April 13, 2024 00:01
Free Programming Ebooks - O'Reilly Media. Codeship free ebooks here - https://bit.ly/2oQ0knQ
@JustinSencion
JustinSencion / usefull_comands.md
Last active May 22, 2017 22:29
Usefull commands

CentOS 7 Fails to Boot - XFS Corrupt - Enters Emergency Mode

bash xfs_repair -L /dev/mapper/centos-root

Networking Issues

Stop NetworkManager.

bash service NetworkManager stop

min_discount_order_amount = Money.new(cents:100) * 50
total = Input.cart.subtotal_price_was
discount = if total > min_discount_order_amount
1
else
0
end
message = "Free shipping if order is over $50"
Input.shipping_rates.each do |shipping_rate|
@motss
motss / tips_increase_memory_limit_nodejs.md
Last active April 9, 2024 06:24
[TIPS] Increase memory limit in Node.js

By default the memory limit in Node.js is 512MB.

This will cause FATAL ERROR- JS Allocation failed – process out of memory when processing large data files.

It can be avoided by increasing the memory limit.

See Command-line options for more details.

node --max-old-space-size=1024 server.js # increase to 1gb
@Dillie-O
Dillie-O / get_all_media.ps1
Created October 20, 2016 22:57
PowerShell script to iterate all containers and blobs in a storage account and download it.
$destination_path = 'C:\Users\dilli\Downloads\media_dump'
$connection_string = '[AZURE_STORAGE_CONNECTION_STRING]'
$storage_account = New-AzureStorageContext -ConnectionString $connection_string
$containers = Get-AzureStorageContainer -Context $storage_account
Write-Host 'Starting Storage Dump...'
foreach ($container in $containers)
@francois-blanchard
francois-blanchard / debug_travis_build.md
Last active September 15, 2020 08:55
How to debug a failed travis.ci build

How to debug a failed travis.ci build

1/ Go to travais build

https://travis-ci.com/gitUser/gitRepo/builds/XXXXXX

build

2/ Connect to travis build with ssh