This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:{window.location='https://ohdear.app/tools/reachable?prefill='+encodeURIComponent(window.location.href)} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Providers; | |
use Illuminate\Support\Collection; | |
use Illuminate\Pagination\LengthAwarePaginator; | |
class AppServiceProvider extends ServiceProvider | |
{ | |
public function boot() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Automatically alias Laravel Model's to their base classname. | |
* Ex: "App\Models\User" now can just be accessed by "User" | |
*/ | |
if (! function_exists('aliasModels')) { | |
function aliasModels() { | |
$finder = new \Symfony\Component\Finder\Finder(); | |
$finder->files()->name('*.php')->in(base_path().'/app'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Support; | |
class Optional | |
{ | |
/** | |
* The target being transformed. | |
* Use _ prefix to avoid namespace conflict on __get() | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php // ~/.config/psysh/config.php | |
// Anything not Laravel - let's try to autoload something likely to exist | |
if (!defined('LARAVEL_START')) { | |
return [ | |
'defaultIncludes' => [ | |
getcwd().'/vendor/autoload.php', | |
getcwd().'/bootstrap/autoload.php', | |
], | |
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @license: | |
* The MIT License (MIT) | |
* | |
* Copyright (c) 2016 David Okusanya | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining a copy | |
* of this software and associated documentation files (the "Software"), to deal | |
* in the Software without restriction, including without limitation the rights | |
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Http\Controllers; | |
use Illuminate\Http\Request; | |
trait RestControllerTrait { | |
public function index() { | |
$model = self::MODEL; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
license, chosen_word, guesses, scaffold, man, guesses_left = 'https://opensource.org/licenses/MIT', ''.join(filter(str.isalpha, __import__('random').choice(open('/usr/share/dict/words').readlines()).upper())), set(), '|======\n| |\n| {3} {0} {5}\n| {2}{1}{4}\n| {6} {7}\n| {8} {9}\n|', list('OT-\\-//\\||'), 10 | |
while not all(letter in guesses for letter in chosen_word) and guesses_left: _, guesses_left = map(guesses.add, filter(str.isalpha, raw_input('%s(%s guesses left)\n%s\n%s:' % (','.join(sorted(guesses)), guesses_left, scaffold.format(*(man[:10-guesses_left] + [' '] * guesses_left)), ' '.join(letter if letter in guesses else '_' for letter in chosen_word))).upper())), max((10 - len(guesses - set(chosen_word))), 0) | |
print 'You', ['lose!\n' + scaffold.format(*man), 'win!'][bool(guesses_left)], '\nWord was', chosen_word |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function doGet(request) { | |
if (request.parameters.url != undefined && request.parameters.url != "") { | |
var imageBlob = UrlFetchApp.fetch(request.parameters.url).getBlob(); | |
var resource = { | |
title: imageBlob.getName(), | |
mimeType: imageBlob.getContentType() | |
}; | |
var options = { | |
ocr: true | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:: Removes most telemetry/data collection/potentially unwanted behavior from Windows 7 | |
:: Disables the automatic download of Windows 10 | |
:: Note : be careful to keep KB in descending order | |
:: Comment that line to restore prompts for uninstall/reboot | |
:: Thanks to https://gist.github.com/geoffroyjabouley | |
set WUSA_OPTIONS=/quiet /norestart | |
:: Removes Windows 7-8.1 telemetry (part 1) | |
wusa %WUSA_OPTIONS% /uninstall /kb:3080149 |
NewerOlder