Skip to content

Instantly share code, notes, and snippets.

View LucWollants's full-sized avatar

Luc Wollants LucWollants

View GitHub Profile
@LucWollants
LucWollants / create_contact.php
Last active March 31, 2023 06:28
Insightly Tests
<?php
$apiEndpoint = 'https://api.na1.insightly.com/v3.1/Contacts';
$apiKey = 'your-api-key';
//
// Create a new contact
//
$data = [
@LucWollants
LucWollants / UserSettingsController.php
Last active January 27, 2023 09:41
UserSettingsController review
<?php
use Illuminate\Http\Request;
use Illuminate\Http\Response;
class UserSettingsController extends Controller
{
// Do not expose a secret key
public const API_KEY = 'a0080664-f443-49b7-8cf8-582f25cfd0e6';
<?php declare(strict_types=1);
namespace CultuurNet\UDB3\ReadModel;
final class OfferDocumentRepository implements DocumentRepository
{
/**
* @var DocumentRepository
*/
private $eventDocumentRepository;
->select('*')
->from('users u')
->where(
[
'is_admin'=>true
]
)
->andWhere(
[
'OR',
@LucWollants
LucWollants / divider.dart
Created April 17, 2017 21:24
Simple example to show the invisible divider.
import 'package:flutter/material.dart';
void main() {
runApp(new MaterialApp(
title: 'divider',
home: new ExpandedWidget(),
));
}
class ExpandedWidget extends StatelessWidget {
@LucWollants
LucWollants / horizontal_sliding_page_route.dart
Created April 17, 2017 19:44
Class to slide a route horizontal from right to left.
class HorizontalSlidingPageRoute<T> extends MaterialPageRoute<T> {
HorizontalSlidingPageRoute({
WidgetBuilder builder,
RouteSettings settings: const RouteSettings(),
maintainState: true,
})
: super(builder: builder, settings: settings, maintainState: maintainState);
@override
Widget buildTransitions(BuildContext context, Animation<double> animation,