Skip to content

Instantly share code, notes, and snippets.

View Nolwennig's full-sized avatar
🐘
Focusing

Nolwennig Nolwennig

🐘
Focusing
View GitHub Profile
@Nolwennig
Nolwennig / mysql_splitdump.sh
Created May 23, 2018 13:26 — forked from jasny/mysql_splitdump.sh
Split MySQL dump SQL file into one file per table or extract a single table
#!/bin/bash
####
# Split MySQL dump SQL file into one file per table
# based on http://blog.tty.nl/2011/12/28/splitting-a-database-dump
####
if [ $# -lt 1 ] ; then
echo "USAGE $0 DUMP_FILE [TABLE]"
exit
@Nolwennig
Nolwennig / symfony3-rest-api.md
Created March 1, 2018 13:07 — forked from diegonobre/symfony3-rest-api.md
Basic RESTful API with Symfony 3 + FOSRestBundle (JSON format only) + FOSUserBundle + FOSOauthServerBundle

Basic RESTful API with Symfony 3 + FOSRestBundle (JSON format only) + FOSUserBundle + FOSOauthServerBundle

The API we are creating in this gist will follow these rules :

  • The API only returns JSON responses
  • All API routes require authenticationu
  • Authentication is handled via OAuth2 with password Grant Type only (no need for Authorization pages and such).
  • API versioning is managed via a subdomain (e.g. v1.api.example.com)

The API will be written in PHP with the Symfony 3 framework. The following SF2 bundles are used :

@Nolwennig
Nolwennig / docker-https.md
Created January 23, 2018 13:34 — forked from zalexki/docker-https.md
Docker Apache2.4 HTTPS

Open port 443 on container, with a docker-compose file just add :

ports:
  - 443:443

Add virtualhost config :

Listen 443 https
  
@Nolwennig
Nolwennig / shopping.php
Created June 7, 2017 21:23 — forked from mklooss/shopping.php
Magento Google Shopping - Simple Script
<?php
if(php_sapi_name() != 'cli')
{
die('only via cli');
}
require 'app/Mage.php';
umask(0);