Skip to content

Instantly share code, notes, and snippets.

<?php
public function onLogin(LoginRequest $request, ResponseFactory $response, UrlGenerator $url, SessionStore $session)
{
$this->dispatchFrom(LoginCommand::class, $request);
return $response->json(['redirect'=>$url->to($session->pull('url.intended', '/'))]);
}
<?php
class TranslateCron {
/**
* @var string The cron expression.
*/
protected $expression;
// Just a reminder array for the positions in the expression.
@Garbee
Garbee / get-chromium.sh
Last active September 9, 2015 03:58
Get chromium script
#!/bin/bash
# Change program folder to where you want it stored
PROGFOLDER=/home/jonathan/programs
cd /tmp
# getting 64 bit version since that is what I use. Check appspot to get the link for your system/bit length.
wget -q https://download-chromium.appspot.com/dl/Linux_x64 -O chromium.zip
rm -rf $PROGFOLDER/chrome-linux
unzip -q chromium.zip -d $PROGFOLDER
The menu element is used to define a list as a menu of commands. The menu element has two specific attributes as well as can accept global and event attributes in HTML.
The '''menu''' element is currently unsupported by major browsers.
===Attributes===
The '''menu''' element will specifically accept the '''label''' attribute whose value is ''text'' and the '''type''' attribute whose value can be ''context'', ''toolbar'', or ''list''. ''list'' is the default value.
The '''menu''' element also accepts [[html/global_attributes | global attributes]] and [[html/event_attributes | event attributes]].
@Garbee
Garbee / info.txt
Created April 30, 2015 13:17
VSCode License Confusion
People are worried about the Visual Studio Family Privacy Policy ( https://www.visualstudio.com/en-us/dn948229 ).
Here is the main thing I've figured out as to why:
> This includes information about how you use the products and services, such as the features you use, the web pages you visit, and the search terms you enter.
Reasoning: They think that VS Code is somehow adding a proxy on your system or something to collect all your web traffic.
What I think: This policy is to cover the whole of the Visual Studio family. This part of the terms applies to the full VS products that have a web browser integrated for opening links, debugging, and documentation. So this part doesn't really apply to VS Code since it doens't have a browser, but people are freaking out about it anyways because they don't understand the policy covers everything VS.
#!/bin/bash
# Change program folder to where you want it stored
PROGFOLDER=$HOME/programs
cd /tmp
# getting 64 bit version since that is what I use. Check appspot to get the link for your system/bit length.
wget -q https://download-chromium.appspot.com/dl/Linux_x64 -O chromium.zip
# Clear out old install
rm -rf $PROGFOLDER/chrome-linux
<?php
namespace App\Http\Middleware;
use Closure;
use Illuminate\Contracts\Auth\Guard;
use Illuminate\Http\Request;
class RedirectIfAuthenticated
{
<?php
namespace App\Composers;
use Illuminate\Contracts\View\View;
interface Composer
{
public function compose(View $view);
  1. Go to chrome://flags#enable-devtools-experiments in your browser. Turn it on and restart Chrome.
  2. Install the DevTools Author extension.
  3. Open DevTools and go to Settings.
  4. Look in tabs to the left, find new "Experiments" tab.
  5. Enable the Allow custom UI themes one.
  6. Restart DevTools
  7. Go to new "Author Settings" panel.
  8. Select Solarized Dark in the dropdown, enter "Fira Code" for the font family, and select your desired text size.
  9. Restart DevTools.
  10. Enjoy the custom color theme in Elements, Sources, and Console. (Possibly other places, don't really know.)