with mysql pgsql intl support
$ brew install php --with-apache --with-mysql --with-pgsql --with-intl
date.timezone = Europe/Vienna
# Add this snippet to the top of your playbook. | |
# It will install python2 if missing (but checks first so no expensive repeated apt updates) | |
# gwillem@gmail.com | |
- hosts: all | |
gather_facts: False | |
tasks: | |
- name: install python 2 | |
raw: test -e /usr/bin/python || (apt -y update && apt install -y python-minimal) |
import requests | |
import time | |
import json | |
token = '' | |
#Delete files older than this: | |
ts_to = int(time.time()) - 30 * 24 * 60 * 60 | |
def list_files(): |
To prevent this situation it is recommended to increase the watches limit (to, say, 512K): | |
1. Add the following line to either /etc/sysctl.conf file or a new *.conf file (e.g. idea.conf) under /etc/sysctl.d/ directory: | |
fs.inotify.max_user_watches = 524288 | |
2. Then run this command to apply the change: | |
sudo sysctl -p --system | |
And don't forget to restart your IDE. |
<?php | |
namespace AppBundle\Form; | |
use Symfony\Component\Form\AbstractType; | |
use Symfony\Component\Form\Extension\Core\Type\PasswordType; | |
use Symfony\Component\Form\Extension\Core\Type\RepeatedType; | |
use Symfony\Component\Form\Extension\Core\Type\SubmitType; | |
use Symfony\Component\Form\FormBuilderInterface; |
const log = new Proxy({}, { | |
get: (_, colour) => function() { | |
console.log(`%c ${[].slice.call(arguments).join(' ')}`, `color: ${colour}`) | |
} | |
}) | |
// example | |
log.tomato('I am tomato') | |
log.chocolate('I am chocolate') | |
log.cornflowerblue('I am cornflowerblue') |
<?php | |
<<<CONFIG | |
packages: | |
- "kriswallsmith/buzz: ^0.15.0" | |
- "symfony/console: ^3.2@dev" | |
CONFIG; | |
// Find you token on https://api.slack.com/docs/oauth-test-tokens | |
use Buzz\Message\Response; |
<?php | |
/** | |
* User: bekco (Behçet Mutlu) | |
* Date: 17/11/16 | |
* Time: 17:52 | |
*/ | |
namespace Acme\Oauth2Bundle\Oauth\Extension; |
# This file means nothing. It's just here to give the Gist a name I can understand. | |
# This configuration requires the KNP Snappy Bundle [https://github.com/KnpLabs/KnpSnappyBundle] |
sudo apt-get update | |
sudo apt-get upgrade | |
sudo apt-get -y install git zsh tig curl vim htop vlc tlp tlp-rdw build-essential automake | |
# Battery management | |
sudo tlp start | |
# install node js | |
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash - | |
sudo apt-get install -y nodejs |