Skip to content

Instantly share code, notes, and snippets.

View welcoMattic's full-sized avatar

Mathieu Santostefano welcoMattic

View GitHub Profile
@lyrixx
lyrixx / run.php
Last active November 9, 2023 13:51
Updated your templates with the new twig include
<?php
<<<CONFIG
packages:
- "symfony/finder: ~3.0"
- "symfony/console: ~3.0"
CONFIG;
use Symfony\Component\Console\Application;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
@damienalexandre
damienalexandre / DatabaseSchemaTest.php
Created October 9, 2015 10:17
Test doctrine schema automatically for missing / broken migrations.
<?php
namespace AppBundle\Tests;
use Doctrine\ORM\Tools\SchemaTool;
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
/**
* Use Doctrine default entity manager and compare it's metadata to the actual database schema.
*
@paulirish
paulirish / bling.js
Last active May 1, 2024 19:56
bling dot js
/* bling.js */
window.$ = document.querySelectorAll.bind(document);
Node.prototype.on = window.on = function (name, fn) {
this.addEventListener(name, fn);
}
NodeList.prototype.__proto__ = Array.prototype;
@dhoko
dhoko / gist:c810679812d0585ef08c
Last active August 29, 2015 14:05
Github Emoji emoticons
javascript:(function(){function doRequest(url,cb){cb=cb||function(){};var xhr=new XMLHttpRequest;var requestUrl=url;xhr.open("GET",requestUrl,true);xhr.onreadystatechange=function(){var status;var data;if(xhr.readyState==4){status=xhr.status;if(status==200){cb(JSON.parse(xhr.responseText))}}};xhr.send()}var body=["<style>ul {margin:0; padding:0; text-align:center} li { display: inline-block; vertical-align: top; list-style: none; background: #eee; margin: 2em; border: 1px solid rgb(217, 217, 217); width: 15%;}</style><ul><!--"];var figure='--><li><figure><img src="%img%" alt=""><figcaption><b>:%txt%:</b></figcaption></figure></li><!--';doRequest("https://api.github.com/emojis",function(data){for(var key in data){body.push(figure.replace("%txt%",key).replace("%img%",data[key]))}body.push("--></ul>");document.body.innerHTML=body.join("")});})();
@tashian
tashian / circle.yml
Last active August 24, 2017 07:47
Rails/Heroku CircleCI deploy script
checkout:
post:
- git submodule sync
- git submodule update --init # use submodules
deployment:
production:
branch: production
commands:
- ./bin/heroku_deploy.sh yerdle:
timeout: 300
@chrisb
chrisb / gist:4d6a09c6cc1ca2e1b14e
Last active November 25, 2022 04:15
Homebrew, Ruby, and Rails on OS X 10.10

OS X 10.10 Guide

Here's what I did to get things working.

1. Install Xcode 6

Yep, over at: https://developer.apple.com

2. Install the Command Line Tools (CLT)

@airportyh
airportyh / jsconf_slides_codes_and_notes.md
Last active June 19, 2017 20:51
JSConf 2014 Slides, Codes and Notes.

JSConf Slides, Codes and Notes

These are all the JSConf 2014 slides, codes, and notes I was able to cull together from twitter. Thanks to the speakers who posted them and thanks to @chantastic for posting his wonderful notes.

Modular frontend with NPM - Jake Verbaten (@Raynos)

@cam8001
cam8001 / dapply
Last active December 20, 2023 19:40
Apply a patch directly from a URL without downloading it first.
#!/bin/bash
# Downloads and applies a patch from Drupal.org.
if [ -z "$1" ]
then
echo "You need to supply a URL to a patch file."
exit
fi
URL=$1;
@laracasts
laracasts / gulpfile.js
Last active February 10, 2024 10:57
Example Laravel-specific Gulpfile from Laracasts.com
var gulp = require('gulp');
var gutil = require('gulp-util');
var notify = require('gulp-notify');
var sass = require('gulp-ruby-sass');
var autoprefix = require('gulp-autoprefixer');
var minifyCSS = require('gulp-minify-css')
var coffee = require('gulp-coffee');
var exec = require('child_process').exec;
var sys = require('sys');
@zenorocha
zenorocha / .hyper.js
Last active November 12, 2023 15:13 — forked from millermedeiros/osx_setup.md
Setup macOS Sierra (10.12)
// Future versions of Hyper may add additional config options,
// which will not automatically be merged into this file.
// See https://hyper.is#cfg for all currently supported options.
module.exports = {
config: {
// default font size in pixels for all tabs
fontSize: 14,
// font family with optional fallbacks