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
--- App/Action/Plugin/Authentication.php.orig | |
+++ App/Action/Plugin/Authentication.php | |
@@ -225,10 +225,9 @@ | |
// Checks, whether secret key is required for admin access or request uri is explicitly set | |
if ($this->_url->useSecretKey()) { | |
- $requestParts = explode('/', trim($request->getRequestUri(), '/'), 3); | |
- $baseUrlPath = trim(parse_url($this->backendUrl->getBaseUrl(), PHP_URL_PATH), '/'); | |
- $routeIndex = empty($baseUrlPath) ? 0 : 1; | |
- $requestUri = $this->_url->getUrl($requestParts[$routeIndex]); |
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
/** | |
* Append the following to /Applications/Slack.app/Contents/Resources/app.asar.unpacked/src/static/ssb-interop.js | |
* Replace url with your own, or point to this url to responsively hide sidebar: | |
* https://gist.githubusercontent.com/rissajeanne/dc10be6272d223b778307dcd1d0028d9/raw/a6afd5fdac45e6b839da95c314acb3d8c7619553/slack-hide-sidebar.css | |
* Lastly, close and restart Slack | |
* | |
* Source: https://github.com/laCour/slack-night-mode/issues/73#issuecomment-287467332 | |
*/ | |
// Hides Slack sidebar if window is 720px or narrower |
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
class SomeController < ApplicationController | |
before_filter :protect | |
def protect | |
allowed = ['127.0.0.1', '123.456.78.9'] | |
if not allowed.include? request.remote_ip | |
# Render a 403 page | |
render(:file => File.join(Rails.root, 'public/403'), :status => 403, :layout => false) | |
return | |
end |
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
public/css/ | |
languages/ # these need to be included individually as needed | |
ell.css | |
grc.css | |
mya.css | |
layout/ | |
1140.scss | |
960.scss |
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 | |
private function httpRefererMatchesBaseUrl() { | |
if (!array_key_exists('HTTP_REFERER', $_SERVER) || | |
!get_instance()->config->item('base_url')) { | |
return false; | |
} | |
$baseUrl = parse_url(get_instance()->config->item('base_url')); | |
$referer = parse_url($_SERVER['HTTP_REFERER']); | |
$cleanHttpReferer = $referer['host']; |
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 | |
/** | |
* Loop through translation directory for given locale, find all PO files, | |
* and generate key/value pairs from ids and strings therein. | |
* | |
* @return array | |
* @params boolean $default | |
* @author Marissa Hogue | |
*/ | |
function i18nPOStrings($default = false) { |
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
ABS.View.PassagePanelBrowse = Backbone.View.extend({ | |
initialize : function() { | |
var that = this; | |
_.bindAll(this, 'render'); | |
this.bind('passage:change', this.render); | |
}, | |
render : function(options) { | |
var that = this; |
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
ABS.Model.PassagePanel = Backbone.Model.extend({ | |
initialize: function () { | |
this.updateBooks(); | |
}, | |
updateBooks: function () { | |
var that = this, | |
versions = new ABS.Collection.VersionList(ABS.bootstrap.versions), | |
getBookOrd = function (book) { return book.get('ord'); }; |
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
sortVersions: function() { | |
var getLang = function (ver) { | |
return ver.get('lang'); | |
}, | |
getLangAndAbbr = function (ver) { | |
return ver.get('lang') + ver.get('display_abbreviation'); | |
}; | |
this.sortedByLang = _.groupBy(this.sortBy(getLangAndAbbr), getLang); | |
} |
NewerOlder