Skip to content

Instantly share code, notes, and snippets.

@Triztan
Triztan / component.php
Created June 15, 2021 23:02 — forked from eklundkristoffer/component.php
Laravel dusk + Vue multiselect
<?php
namespace Tests\Browser\Components;
use Laravel\Dusk\Browser;
use Laravel\Dusk\Component as BaseComponent;
class Multiselect extends BaseComponent
{
/**
@Triztan
Triztan / bladeCompile.php
Last active September 16, 2019 23:49 — forked from AlexR1712/bladeCompile.php
Compile a string like Blade Template in Laravel
<?php
// Only you need to add in your controller.
public function bladeCompile($value, array $args = array())
{
$generated = \Blade::compileString($value);
ob_start() and extract($args, EXTR_SKIP);
// We'll include the view contents for parsing within a catcher
// so we can avoid any WSOD errors. If an exception occurs we
@Triztan
Triztan / linux-usb-file-copy-fix.md
Created June 3, 2019 23:03 — forked from 2E0PGS/linux-usb-file-copy-fix.md
Fix Ubuntu and other Linux slow/hanging file copying via USB.

If your running a x64 bit Ubuntu or other Linux and find USB transfers hang at the end apply this fix:

echo $((16*1024*1024)) > /proc/sys/vm/dirty_background_bytes
echo $((48*1024*1024)) > /proc/sys/vm/dirty_bytes

I suggest you edit your /etc/rc.local file to make this change persistant across reboots.

sudo nano /etc/rc.local

@Triztan
Triztan / CatchAllOptionsRequestsProvider.php
Created August 31, 2017 21:07 — forked from danharper/CatchAllOptionsRequestsProvider.php
Lumen with CORS and OPTIONS requests
<?php namespace App\Providers;
use Illuminate\Support\ServiceProvider;
/**
* If the incoming request is an OPTIONS request
* we will register a handler for the requested route
*/
class CatchAllOptionsRequestsProvider extends ServiceProvider {
@Triztan
Triztan / API.md
Created July 11, 2017 18:09 — forked from iros/API.md
Documenting your REST API

Title

<Additional information about your API call. Try to use verbs that match both request type (fetching vs modifying) and plurality (one vs multiple).>

  • URL

    <The URL Structure (path only, no root url)>

  • Method:

@Triztan
Triztan / weather.sh
Created February 15, 2017 19:12 — forked from taylorotwell/weather.sh
Weather CLI
alias weather='curl -s wttr.in | sed -n "1,7p"'
FFmpeg has been removed from Ubuntu 14.04 and was replaced by Libav. This decision has been reversed so that FFmpeg is available now in Ubuntu 15.04 again, but there is still no official package for 14.04. In this tutorial, I will show you how to install FFmpeg from mc3man ppa. Add the mc3man ppa:
sudo add-apt-repository ppa:mc3man/trusty-media
And confirm the following message by pressing <enter>:
Also note that with apt-get a sudo apt-get dist-upgrade is needed for initial setup & with some package upgrades
More info: https://launchpad.net/~mc3man/+archive/ubuntu/trusty-media
Press [ENTER] to continue or ctrl-c to cancel adding it
Update the package list.
@Triztan
Triztan / reset.css
Created February 5, 2016 20:34 — forked from marulango/reset.css
Hoja de estilo para eliminar inconsistencias a través de navegadores
/* http://meyerweb.com/eric/tools/css/reset/
v2.0 | 20110126
License: none (public domain)
*/
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,