This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- name: Add php7 | |
plugin: Script | |
script: | | |
echo 'exit 0' > /usr/sbin/policy-rc.d | |
apt-get update | |
apt-get install -y software-properties-common language-pack-en-base | |
LC_ALL=en_US.UTF-8 add-apt-repository ppa:ondrej/php | |
apt-get update | |
DEBIAN_FRONTEND=noninteractive apt-get install -y php7.0 libapache2-mod-php7.0 php7.0-gd php7.0-curl php7.0-json php7.0-mbstring php7.0-mysql php7.0-mcrypt php7.0-imagick php7.0-dev php7.0-gmp php7.0-xml php7.0-bcmath php7.0-redis php7.0-uploadprogress php7.0-soap php7.0-pgsql | |
cp /etc/php5/mods-available/general_settings.ini /etc/php/7.0/apache2/conf.d/20-general_settings.ini |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head><title>hello banana</title></head> | |
<style media="screen"> | |
div { | |
margin-bottom: 2px; | |
} | |
.outer-container { | |
position: relative; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Libraries We Use | |
The following sets forth attribution notices for third party software that may be contained in portions of the Instagram product. We thank the open source community for all of their contributions. | |
AFNetworking | |
The following software may be included in this product: AFNetworking. This software contains the following license and notice below: | |
Copyright (c) 2011 Gowalla (http://gowalla.com/) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT table_schema as `Database`, table_name AS `Table`, | |
round(((data_length + index_length) / 1024 / 1024), 2) `Size in MB` | |
FROM information_schema.TABLES | |
ORDER BY (data_length + index_length) DESC; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'date' | |
dates = Date.parse('2001-01-01')..Date.parse('2999-12-31') | |
dates.map do | date | | |
if (date.year - 2000) ** 2 - date.month ** 2 - date.mday ** 2 == 0 | |
puts date | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$map = function ($fun, $arr) { | |
return array_reduce($arr, function ($carry, $item) use ($fun) { | |
return array_merge($carry, [$fun($item)]); | |
}, []); | |
}; | |
$max = function ($arr) { | |
return array_reduce($arr, function ($carry, $item) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class ClassA {} | |
function foo(ClassA $bar) { | |
var_dump($bar); | |
} | |
foo('hi'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
include 'infra-puppet/files/drushrc.php'; | |
$tables = $options['structure-tables']['common']; | |
sort($tables); | |
print_r($tables); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Employee { | |
private $type; | |
const BASE_SALARY = 500; | |
function __construct(EmployeeType $type) { | |
$this->type = $type; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Employee { | |
private $type; | |
const BASE_SALARY = 500; | |
function __construct(EmployeeType $type) { | |
$this->type = $type; |