This file contains hidden or 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
// ==UserScript== | |
// @name Hide Warnings in Request Log Window | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description try to take over the world! | |
// @author You | |
// @include */Sites-Site/-/ViewLogConsole-Start | |
// @grant none | |
// ==/UserScript== |
This file contains hidden or 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
[ | |
{"code":"ab","name":"Abkhaz","nativeName":"аҧсуа"}, | |
{"code":"aa","name":"Afar","nativeName":"Afaraf"}, | |
{"code":"af","name":"Afrikaans","nativeName":"Afrikaans"}, | |
{"code":"ak","name":"Akan","nativeName":"Akan"}, | |
{"code":"sq","name":"Albanian","nativeName":"Shqip"}, | |
{"code":"am","name":"Amharic","nativeName":"አማርኛ"}, | |
{"code":"ar","name":"Arabic","nativeName":"العربية"}, | |
{"code":"an","name":"Aragonese","nativeName":"Aragonés"}, | |
{"code":"hy","name":"Armenian","nativeName":"Հայերեն"}, |
This file contains hidden or 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 removeMember(member) { | |
pendingRemoves[ member.id ] = setTimeout(function() { | |
removeMemberFromUI(member); | |
}, 3000); // wait 3 seconds | |
}; | |
function addMember(member) { | |
var pendingRemoveTimeout = pendingRemoves[member.id]; | |
if(pendingRemoveTimeout) { | |
// user left, but has rejoined |
This file contains hidden or 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
location / { | |
add_header 'Cache-Control' 'no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0'; | |
expires off; | |
} |
This file contains hidden or 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 updateQueryStringParameter(uri, key, value) { | |
var re = new RegExp("([?&])" + key + "=.*?(&|$)", "i"); | |
var separator = uri.indexOf('?') !== -1 ? "&" : "?"; | |
if (uri.match(re)) { | |
return uri.replace(re, '$1' + key + "=" + value + '$2'); | |
} | |
else { | |
return uri + separator + key + "=" + value; | |
} | |
} |
This file contains hidden or 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
fabric.Canvas.prototype.getItem = function(id) { | |
var object = null, | |
objects = this.getObjects(); | |
for (var i = 0, len = this.size(); i < len; i++) { | |
if (objects[i].id && objects[i].id === id) { | |
object = objects[i]; | |
break; | |
} | |
} |
This file contains hidden or 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
.element{ | |
top: 50%; | |
left: 50%; | |
transform: translate(-50%, -50%); | |
} |
This file contains hidden or 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 | |
public function authenticated(Request $request, $user){ | |
if(!$user->authority){ | |
return redirect('/admin'); | |
}else{ | |
return redirect('/'); | |
} | |
} |
This file contains hidden or 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\Routing\Router; | |
use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider; | |
class RouteServiceProvider extends ServiceProvider | |
{ | |
/** |
This file contains hidden or 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
RewriteCond %{SERVER_PORT} ^80$ | |
RewriteRule ^(.*)$ https://%{SERVER_NAME}%{REQUEST_URI} [L,R] |