Skip to content

Instantly share code, notes, and snippets.

View Garbee's full-sized avatar

Jonathan Garbee Garbee

View GitHub Profile
<?php
namespace App\Http\Middleware;
use Closure;
use Illuminate\Contracts\Auth\Guard;
use Illuminate\Http\Request;
class RedirectIfAuthenticated
{
#!/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
@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.
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 / 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
<?php
class TranslateCron {
/**
* @var string The cron expression.
*/
protected $expression;
// Just a reminder array for the positions in the expression.
<?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', '/'))]);
}
var kuary = new Kuary(window);
kuary.add({
"keys": [
'alt',
'shift',
's'
],
"execute": function() {
window.alert('Alt, Shift, and S pressed');
@Garbee
Garbee / program.conf
Last active August 29, 2015 14:11
Misc things
[program:{program}]
; command example "php artisan queue:listen --tries=2 --queue=beanstalkd"
command={command}
; Example directory = /srv/web/{site}
directory={directory}
; Example logfile = /srv/web/{site}/storage/logs/supervisor.log
stdout_logfile={logfile}
; Example errlogfile = /srv/web/{site}/storage/logs/supervisor-error.log
stderr_logfile={errlogfile}
redirect_stderr=false