Skip to content

Instantly share code, notes, and snippets.

View chibani's full-sized avatar

Loïc Gerbaud chibani

View GitHub Profile

How to use cozy cloud in a persistent way with docker.

First, simply creating a docker container with cozy running in it can be done this way.

dockrer run -d --restart=always --name cozy -p 6500:443 cozy/full

-d makes it run in background (you can remove it to see the logs at startup, but you can also use docker logs cozy to see them either way).

--restart=always means that if the docker service is restarted, or even the server, the container will be restarted right away, making for less maintainance for you.

@Godefroy
Godefroy / backup-mysql.sh
Created August 21, 2015 09:19
Instant backup of a MySQL database with LVM snapshot
#! /bin/bash
## Instant backup of a MySQL database with LVM snapshot
## Author: Godefroy de Compreignac (@Godefroy)
## License: Beerware
# Instructions:
# - MySQL Data on DB server must be an logical LVM partition
# - Backup server must have ssh root access to DB server
# - Master status is saved at the exact moment of snapshot to allow restoration of master-slave replication
@gaspanik
gaspanik / bs-config.js
Created June 3, 2014 09:08
Browser-Sync Config for WordPress Theme Dev.
/*
|--------------------------------------------------------------------------
| Browser-sync config file
|--------------------------------------------------------------------------
|
| Please report any issues you encounter:
| https://github.com/shakyShane/browser-sync/issues
|
| For up-to-date information about the options:
| https://github.com/shakyShane/browser-sync/wiki/Working-with-a-Config-File
@lukaswhite
lukaswhite / ClearBeanstalkdQueueCommand.php
Last active March 20, 2023 08:11
Clear a Beanstalkd Queue in Laravel
<?php
use Illuminate\Console\Command;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Input\InputArgument;
class ClearBeanstalkdQueueCommand extends Command {
/**
@tinabeans
tinabeans / template.html
Last active February 13, 2024 09:18
A super-barebones single-column responsive email template, assuming a max-width of 540px. Read about it on the Fog Creek blog.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Single-Column Responsive Email Template</title>
<style>
@media only screen and (min-device-width: 541px) {
.content {
@davidbgk
davidbgk / plugin.js
Last active December 17, 2015 11:39
Boutez les ignominieuses fonctions anonymes hors de vos jQuery lors de SudWeb 2013
"use strict";
(function($, undefined) {
var Plugin, defaults, namespace;
namespace = 'myPopin';
defaults = {
duration: 1000,
onOpen: function() {}
};
@naholyr
naholyr / 0.github-backed-comments.md
Last active August 25, 2022 17:44
Git(Hub)-backed comments system

General context

  • A static website using a generator (like Jekyll)
  • Comments are in a folder, one comment = one JSON file (attached to article based on path + filename)
  • website is versionned using git, repository hosted by github (cool for pull-requests)

Posting a new comment

OK here we need some dynamism ;)

@p01
p01 / LICENSE.txt
Last active May 23, 2024 13:46 — forked from 140bytes/LICENSE.txt
Sudoku Solver in 140bytes
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Mathieu 'p01' Henri - http://www.p01.org/releases/
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE