Skip to content

Instantly share code, notes, and snippets.

View toofff's full-sized avatar
🙃

Toofff toofff

🙃
View GitHub Profile
@nrollr
nrollr / MySQL_macOS_Sierra.md
Last active January 31, 2024 14:45
Install MySQL on Sierra using Homebrew

Install MySQL on macOS Sierra

This procedure explains how to install MySQL using Homebrew on macOS Sierra 10.12

Install Homebrew

  • Installing Homebrew is effortless, open Terminal and enter :
    $ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  • Note: Homebrew will download and install Command Line Tools for Xcode 8.0 as part of the installation process.

Install MySQL

At this time of writing, Homebrew has MySQL version 5.7.15 as default formulae in its main repository :

@versedi
versedi / webpack.config.js
Last active January 18, 2024 13:21
Webpack Encore + Sass + MiniCSSExtractPlugin + PurgeCSS + OptimizeCss + Babel + Typescript
/* eslint-disable no-useless-escape */
const Encore = require('@symfony/webpack-encore');
const TerserPlugin = require('terser-webpack-plugin');
const CircularDependencyPlugin = require('circular-dependency-plugin');
const HtmlCriticalWebpackPlugin = require('html-critical-webpack-plugin');
const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const PurgeCssPlugin = require('purgecss-webpack-plugin');
const WebpackBar = require('webpackbar');
const path = require('path');
@p3t3r67x0
p3t3r67x0 / pseudo_elements.md
Last active January 16, 2024 01:17
A CSS pseudo-element is used to style specified parts of an element. In some cases you can style native HTML controls with vendor specific pseudo-elements. Here you will find an list of cross browser specific pseudo-element selectors.

Styling native elements

Native HTML controls are a challenge to style. You can style any element in the web platform that uses Shadow DOM with a pseudo element ::pseudo-element or the /deep/ path selector.

video::webkit-media-controls-timeline {
  background-color: lime;
}

video /deep/ input[type=range] {
@carlosspohr
carlosspohr / README.md
Last active August 31, 2023 00:35
Functional Apache2 route for Gitlab 5.0

For your Ruby, you'll must install this gems:

sudo gem install passenger

sudo passenger-install-apache2-module

At this moment, you'll asked to install some Apache2's deps (three deps):

sudo apt-get install apache2-prefork-dev

@whoisryosuke
whoisryosuke / nextjs-hoc-authorization.js
Created June 26, 2018 22:24
ReactJS - NextJS - A HOC for wrapping NextJS pages in an authentication check. Checks for getInitialProps on the child component and runs it, so you still get SSR from the page. Also includes a user agent for Material UI.
import React, {Component} from 'react'
import Router from 'next/router'
import AuthService from './AuthService'
export default function withAuth(AuthComponent) {
const Auth = new AuthService('http://localhost')
return class Authenticated extends Component {
static async getInitialProps(ctx) {
// Ensures material-ui renders the correct css prefixes server-side
@GregoireHebert
GregoireHebert / ApiResourcesConvertConfigurationCommand.php
Last active November 3, 2022 14:11
Transform ApiResource configuration to XML
<?php
declare(strict_types=1);
namespace App\Command;
use App\Command\DataTransformers\XmlTransformer;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
@radmen
radmen / README.md
Created September 10, 2012 08:15
Apache vhost config for gitlab

unicorn config file

Edit file /home/gitlab/gitlab/config/unicorn.rb

Find line listen "#{app_dir}/tmp/sockets/gitlab.socket" and comment it. Uncomment line listen "127.0.0.1:8080"

required modules for apache

  • sudo a2enmod proxy
  • sudo a2enmod proxy_balancer
@harikt
harikt / installing.sh
Created January 5, 2012 18:47
Compile and Install PHP 5.4 from Source
#Download Apache and extract it
$ ./configure --help
#You will get a list of options, run with enable-so
$ ./configure --enable-so
$ make

Doctrine Translatable

With Translatable you can translate the fields you like in your Doctrine Entity. Check out other Doctrine Extensions

  • Official Doctrine Extensions installation guide here.
  • Official Doctrine Translatable documentation over here.

Installation

composer.json

Liste d'acronymes utilisés dans la programmation

Acronyme Définition
Les principes SOLID :
• SRP Single Responsibility Principle
• OCP Open/Closed principle
• LSP Liskov Substitution Principle (un acronyme féministe, du nom de la mathématicienne Barbara Liskov !)
• ISP Interface Segregation Principle (tu vois que ça fait conflit avec "ISP - Internet Service Provider", LAULE)
• DIP Dependency Inversion Principle