Skip to content

Instantly share code, notes, and snippets.

View mstaack's full-sized avatar
🎯
Focusing

Max mstaack

🎯
Focusing
View GitHub Profile
[
'$facet' => [
'data' => [
['$skip' => 30],
['$limit' => 30],
],
'total' => [
['$count' => 'count'],
]
]
$builder->where('rentables.prices', 'elemMatch', [
'type' => 'daily_rent',
'total_in_euro' => [
'$gte' => 60
],
]);
#!/bin/bash
# Simple Server Setup Script
# M. Staack - 2020
set -e
# Base
sudo apt update
sudo apt upgrade -y
sudo apt-get install -y software-properties-common git curl zip unzip nginx glances htop nethogs
<?php
namespace App\Providers;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\ServiceProvider;
use Jenssegers\Mongodb\Connection;
use Jenssegers\Mongodb\Queue\MongoConnector;
class MongodbServiceProvider extends \Jenssegers\Mongodb\MongodbServiceProvider
@mstaack
mstaack / error.md
Created November 12, 2019 11:28
error on frehs 6.5
➜  vimeo-demo composer require "vimeo/laravel"
Using version ^5.4 for vimeo/laravel
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - vimeo/laravel 5.4.1 requires vimeo/vimeo-api ^3.0.2 -> satisfiable by vimeo/vimeo-api[3.0.2].
@mstaack
mstaack / issue.md
Created November 7, 2019 22:43
fresh-install-vimeo-3.0.2

laravel version

➜  demo composer -i show | grep laravel
You are using the deprecated option "installed". Only installed packages are shown by default now. The --all option can be used to show all packages.
laravel/framework                     v6.5.0     The Laravel Framework.
laravel/tinker                        v1.0.10    Powerful REPL for the Laravel framework.

direct require of vimeo php client 3.0.2

@mstaack
mstaack / bug.md
Created November 7, 2019 18:47
laravel-6.4-vimeo-issue
➜  demo composer -i show | grep laravel
You are using the deprecated option "installed". Only installed packages are shown by default now. The --all option can be used to show all packages.
laravel/framework                     v6.4.0     The Laravel Framework.
laravel/tinker                        v1.0.10    Powerful REPL for the Laravel framework.
➜  demo composer require vimeo/laravel
Using version ^5.4 for vimeo/laravel
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
service: bref-demo-lumen
provider:
name: aws
region: eu-central-1
runtime: provided
environment:
# Laravel environment variables
APP_STORAGE: '/tmp'
@mstaack
mstaack / .screenrc
Created July 22, 2019 07:43 — forked from Coomer/.screenrc
Coomer's .screenrc for GNU Screen on Mac OS X. Save this as .screenrc in your home directory.
altscreen on
hardstatus on
hardstatus alwayslastline
startup_message off
termcapinfo xterm ti@:te@
hardstatus string " %{= kC}%-w%{.rW}%n %t%{-}%+w %=%{..C} %H %{..C} %m/%d "
defscrollback 1000
# Bind C-a v to copy buffer to Mac OS X clipboard.
bind v eval "writebuf" "exec sh -c 'pbcopy < /tmp/screen-exchange'"
@mstaack
mstaack / index.html
Created July 10, 2019 17:58
Quasar Framework v1
<div id="q-app">
<div class="q-ma-md">
Fork and make your own!
Do NOT use self-closing tags here on Codepen.
</div>
<div class="q-ma-md">
<q-btn label="Notify" color="primary" @click="notify"></q-btn>
</div>