Skip to content

Instantly share code, notes, and snippets.

🚲
Pedaling

Jérôme Tamarelle GromNaN

🚲
Pedaling
Block or report user

Report or block GromNaN

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View Effective_Engineer.md

FWIW: I didn't produce the content presented here (the outline from Edmond Lau's book). I've just copy-pasted it from somewhere over the Internet, but I cannot remember what exactly the original source is. I was also not able to find the author's name, so I cannot give him/her the proper credits.


Effective Engineer - Notes

What's an Effective Engineer?

View EmbedIframe.js
import React from 'react';
class EmbedIframe extends React.Component {
resizeIframe = () => {
const height = Math.max(this.props.minHeight, this.iframe.contentWindow.document.body.offsetHeight);
this.iframe.height = `${height}px`;
}
componentDidMount = () => {
@marcw
marcw / deploy.sh
Created Sep 9, 2016
Symfony deployment bash script
View deploy.sh
#!/bin/bash
# some configurations values
host="foobar-web00" # the name of the host in my ssh config file
project_path="/var/www/foobar"
user="web"
key_filename="/path/to/.ssh/web-deploy-key"
dry_run="--dry-run"
assets_differ=""
@jehaby
jehaby / README.md
Last active Sep 6, 2019 — forked from chadrien/README.md
Debug PHP in Docker with PHPStorm and Xdebug
View README.md

Debug your PHP in Docker with Intellij/PHPStorm and Xdebug

  1. For your local dev, create a Dockerfile that is based on your production image and simply install xdebug into it. Exemple:
FROM php:5

RUN yes | pecl install xdebug \
    && echo "zend_extension=$(find /usr/local/lib/php/extensions/ -name xdebug.so)" > /usr/local/etc/php/conf.d/xdebug.ini \
@juliendufresne
juliendufresne / analyze.sh
Created Apr 16, 2016
Remove large files and directories from git history
View analyze.sh
#!/bin/bash
# First we need to find the big files
# source: https://stackoverflow.com/questions/10622179/how-to-find-identify-large-files-commits-in-git-history/20460121#20460121
REPO_URL="git@domain.tld:your-repo-here.git"
WORKING_DIR=$(mktemp -d);
cd "${WORKING_DIR}"
git clone --mirror "${REPO_URL}" source.git;
@pjedrzejewski
pjedrzejewski / Symfony3Forms.php
Created Dec 11, 2015
Issues with removing form type names in Symfony 3.0.
View Symfony3Forms.php
<?php
class ResourceAutocompleteType extends AbstractType
{
// ...
private $resourceName;
public function __construct($resourceName)
{
@OlegIlyenko
OlegIlyenko / Event-stream based GraphQL subscriptions.md
Last active Nov 18, 2019
Event-stream based GraphQL subscriptions for real-time updates
View Event-stream based GraphQL subscriptions.md

In this gist I would like to describe an idea for GraphQL subscriptions. It was inspired by conversations about subscriptions in the GraphQL slack channel and different GH issues, like #89 and #411.

Conceptual Model

At the moment GraphQL allows 2 types of queries:

  • query
  • mutation

Reference implementation also adds the third type: subscription. It does not have any semantics yet, so here I would like to propose one possible semantics interpretation and the reasoning behind it.

@GromNaN
GromNaN / build.sh
Last active Jul 11, 2019
Split Composer Satis repositories into smaller packages
View build.sh
#!/bin/sh
# For each sub-package, run the Satis build command.
php bin/satis build repositories-mirrors.json ./web/mirrors
php bin/satis build repositories-pear.json ./web/pear
php bin/satis build repositoriesp-rojects.json ./web/projects
# Merge all the package files.
php web/packages.php > web/packages.json
View MoneyType.php
class MoneyType extends AbstractType implements DataMapperInterface
{
public function buildForm(FormBuilder $builder, array $options)
{
$builder
->add('amount', 'integer')
->add('currency', 'string')
->setDataMapper($this)
;
}
@JeremyJames
JeremyJames / Shortcuts.md
Last active Aug 29, 2015
SublimeText shortcuts
View Shortcuts.md

Packages

  • Alignment (CMD + CTRL + A)
  • DocBlockR (Start commenting + push tab or enter)
  • GitGutter (Highlight lines changed, compare files, etc.)
  • Package control (Mandatory on Sublime)
  • Php-Twig
  • PhpNamespace (ALT + I, ALT + U)
  • TrailingSpaces (Can be triggered on save, check user config)
  • Unicode Character Highlither (Highlight non breaking spaces for example)
You can’t perform that action at this time.