Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.
# 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 |
Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.
<?php | |
use Doctrine\ORM\Mapping as ORM; | |
use Doctrine\Common\Collections\ArrayCollection; | |
/** | |
* @ORM\Entity() | |
* @ORM\Table(name="user") | |
*/ | |
class User |
#!/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 |
#!/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 | |
} |
This gist details the following:
/* | |
******************************************************************************** | |
Golang - Asterisk and Ampersand Cheatsheet | |
******************************************************************************** | |
Also available at: https://play.golang.org/p/lNpnS9j1ma | |
Allowed: | |
-------- | |
p := Person{"Steve", 28} stores the value |
#!/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 |
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); | |
} |
$ 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
$ sudo docker exec container-mysql mysqld --version`
mysqld Ver 5.7.15 for Linux on x86_64 (MySQL Community Server (GPL))