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 parseQueryString(queryString) { | |
var params = {}, queries, temp, i, l; | |
// Split into key/value pairs | |
queries = queryString.split("&"); | |
// Convert the array of strings into an object | |
for ( i = 0, l = queries.length; i < l; i++ ) { | |
temp = queries[i].split('='); | |
params[temp[0]] = temp[1]; |
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
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
# redirect to non-www | |
RewriteCond %{HTTP_HOST} ^www\.(.*) [NC] | |
RewriteRule ^(.*)$ http://%1/$1 [R=301,L] | |
</IfModule> |
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
Disallow: /humans/harm | |
Disallow: /orders/ignore_human | |
Disallow: /admin/self_harm |
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 | |
/** | |
* Implements hook_entity_view_alter() | |
* | |
* Task: change child field_collection view mode depending on parent | |
* field_block_layout value | |
* | |
* Solution: Screw that. Instead change the image style for | |
* field_collection_imagecaption in the field_collection_content_block |
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
#!/bin/bash | |
# http://richardkmiller.com/925/script-to-enabledisable-socks-proxy-on-mac-os-x | |
disable_proxy() | |
{ | |
networksetup -setsocksfirewallproxystate Wi-Fi off | |
networksetup -setsocksfirewallproxystate Ethernet off | |
echo "SOCKS proxy disabled." | |
} |
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
Show hidden characters
{ | |
"user": { | |
"debug": false, | |
"delay": 0.25, | |
"error_color": "D02000", | |
"gutter_theme": "Packages/SublimeLinter/gutter-themes/Default/Default.gutter-theme", | |
"gutter_theme_excludes": [], | |
"lint_mode": "background", | |
"linters": { | |
"pep8": { |
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 ($) { | |
$(document).bind('MY_EVENT', function() { | |
console.log('Original event'); | |
// STRING FROM EVENT FUNCTION | |
}); | |
// List all events and bound functions | |
$.each($._data(document, 'events'), function(i, e) { | |
console.log(i, e); | |
}); |
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
<script> | |
// Parent | |
function onMessage (event) { | |
if (event.source != document.getElementById('iframe').contentWindow) return; | |
eval('var message = ' + event.data); | |
resizeIframe(message.height); | |
} | |
if (typeof(window.attachEvent) != "undefined") { | |
window.attachEvent('onmessage', onMessage); | |
} else if (typeof(window.addEventListener) != "undefined") { |
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
From 30a31eae993d24aa5e4887e6ae8a0dab026f5c5d Mon Sep 17 00:00:00 2001 | |
From: Dan Braghis <zerolab@354424.no-reply.drupal.org> | |
Date: Mon, 20 Apr 2015 09:14:37 +0100 | |
Subject: [PATCH] Fix content access issues on first login | |
--- | |
shib_auth.module | 25 ++++++++++++++++++++----- | |
1 file changed, 20 insertions(+), 5 deletions(-) | |
diff --git a/shib_auth.module b/shib_auth.module |
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
scp user@server:/var/log/uwsgi/site.log . | |
gnuplot | |
gnuplot> bin(x) = 5*(floor(x/5)+0.5) | |
gnuplot> set boxwidth 5 | |
gnuplot> plot "site.log" using (bin($33)):(1.0) smooth freq with boxes |