Skip to content

Instantly share code, notes, and snippets.

View jeremyquinton's full-sized avatar

Jeremy Quinton jeremyquinton

View GitHub Profile
@akirattii
akirattii / docker-mysql-slow-query-log.md
Last active July 14, 2023 22:12
memo: MySQL docker container settings for slow query log

Check running mysql container:

$ sudo docker ps
CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS              PORTS                    NAMES
26137efa979f        mysql               "docker-entrypoint..."   8 months ago        Up 10 minutes       0.0.0.0:3306->3306/tcp   container-mysql

Check docker container mysql version:

$ sudo docker exec container-mysql mysqld --version`
mysqld  Ver 5.7.15 for Linux on x86_64 (MySQL Community Server (GPL))
@ebachter
ebachter / iframe_handling_in_react.js
Last active October 6, 2019 10:58
iframe handling in react
import React from 'react';
import { connect } from 'react-redux';
class PageWidget extends React.Component {
componentDidMount() {
this.ifr.onload = () => {
this.ifr.contentWindow.postMessage('hello', '*');
};
window.addEventListener("message", this.handleFrameTasks);
}
#!/bin/sh
KERNEL_VERSION="3.13.0-29"
sudo apt-get update
sudo aptitude install -y linux-image-${KERNEL_VERSION}-generic \
linux-headers-${KERNEL_VERSION} linux-image-extra-${KERNEL_VERSION}-generic
sudo sed -i "s/GRUB_DEFAULT=.*/GRUB_DEFAULT=\"Advanced options for Ubuntu>Ubuntu, with Linux ${KERNEL_VERSION}-generic\"/" /etc/default/grub
sudo update-grub
@josephspurrier
josephspurrier / values_pointers.go
Last active April 28, 2024 16:41
Golang - Asterisk and Ampersand Cheatsheet
/*
********************************************************************************
Golang - Asterisk and Ampersand Cheatsheet
********************************************************************************
Also available at: https://play.golang.org/p/lNpnS9j1ma
Allowed:
--------
p := Person{"Steve", 28} stores the value
@barrysteyn
barrysteyn / svn-to-git.md
Last active December 26, 2022 22:32
Migrate From SVN To GIT
@jakzal
jakzal / selenium.sh
Last active February 16, 2018 17:32
Selenium grid runner
#!/bin/sh
command=${1:-"help"}
SELENIUM_VERSION="2.39.0"
NODE_OPTIONS="-browser browserName=phantomjs"
download() {
[ -f selenium-server-standalone.jar ] || wget http://selenium.googlecode.com/files/selenium-server-standalone-${SELENIUM_VERSION}.jar -Oselenium-server-standalone.jar
}
@progrium
progrium / sshmany
Last active April 20, 2016 12:37
bash script for executing a command via ssh in parallel on multiple servers with colored output
#!/bin/bash
#
# Usage:
# $ echo "host1 host2 host3" | ./sshmany uname -a
# $ cat myservers | ./sshmany echo Hello world
#
cmd="$@"
servers="$(cat)"
i=37
for server in $servers; do
@Ocramius
Ocramius / User.php
Last active February 16, 2024 14:57
Doctrine 2 ManyToMany - the correct way
<?php
use Doctrine\ORM\Mapping as ORM;
use Doctrine\Common\Collections\ArrayCollection;
/**
* @ORM\Entity()
* @ORM\Table(name="user")
*/
class User
@ziadoz
ziadoz / awesome-php.md
Last active May 10, 2024 15:06
Awesome PHP — A curated list of amazingly awesome PHP libraries, resources and shiny things.
@munhitsu
munhitsu / gist:1034876
Last active November 29, 2020 09:10
python 2.7.5 install on OSX (10.8+) using brew (pip, easy_install, virtualenv, virtualenvwrapper)
# In case you had some strange python installation
# NOTE: .pydistutils.cfg seems to be not compatible with brew install python
# areas I needed to clean before installation
# clean up ~/Library/Python
# clean up .local
# preconditions:
# xcode with command line tools installed
xcode-select --install