Skip to content

Instantly share code, notes, and snippets.

View kweestian's full-sized avatar

Christian Hamelin kweestian

View GitHub Profile
@kweestian
kweestian / mysql-docker.sh
Created November 16, 2022 16:33 — forked from spalladino/mysql-docker.sh
Backup and restore a mysql database from a running Docker mysql container
# 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
@kweestian
kweestian / example.md
Created October 8, 2021 13:28 — forked from devdrops/example.md
Mysqldump from Docker container

Mysqldump from Docker container

docker exec -i mysql_container mysqldump -uroot -proot --databases database_name --skip-comments > /path/to/my/dump.sql

OBS

  • This will generate a dump.sql file in your host machine. Awesome, eh?
  • Avoid using --compact on your dump. This will make MySQL check your constraints which will cause troubles when reading your file (damm you MySQL). And don't use --force to fix this scenario: recreate your dump without --compact ¯_(ツ)_/¯
import { LayoutAnimation, Keyboard, Platform } from 'react-native';
export default class KeyboardEventListener {
static subscribe(callback) {
const listener = new KeyboardEventListener(callback);
return () => {
listener.unsubscribe();
};
}
@kweestian
kweestian / GrowingTextInput.js
Created May 16, 2018 14:44 — forked from brentvatne/GrowingTextInput.js
React Europe Workshop Files
import React from 'react';
import { TextInput, View } from 'react-native';
// Try it: https://snack.expo.io/ByW4CFPx-
export default class GrowingTextInput extends React.Component {
static defaultProps = {
minHeight: 30,
};
constructor(props, context) {
@kweestian
kweestian / notes.md
Last active August 29, 2015 14:10 — forked from monicao/notes.md

Setting up the Ruby dev environment on Mavericks

Why would I want to do that?

  • You want to run guard
  • You want use Sublime plugins (like RSpec or Guard plugins)

1. Installing brew

Brew aka Homebrew is a package management system for Mac OSX.