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
diff --git a/ckan/config/middleware/__init__.py b/ckan/config/middleware/__init__.py | |
index 73af42fa2..a958d8e42 100644 | |
--- a/ckan/config/middleware/__init__.py | |
+++ b/ckan/config/middleware/__init__.py | |
@@ -127,8 +127,19 @@ class AskAppDispatcherMiddleware(object): | |
* CKAN_CURRENT_URL is set to the current application url | |
''' | |
+ # Ensure URL encoding | |
+ for var in ('PATH_INFO', 'REQUEST_URI', 'QUERY_STRING'): |
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
mod opengl; | |
mod data; | |
use opengl::*; | |
extern { | |
//fn consoleLog(x: u32); | |
fn playAudio(audio_ptr: *const f32, audio_len: u32); | |
fn setScore(left: u32, right: u32); | |
} |
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
const token = process.env.SLACK_TOKEN | |
const Slack = require('slack') | |
const bot = new Slack({token}) | |
const CHANNEL = process.argv[2]; | |
const SINCE = process.argv[3]; | |
const UNTIL = process.argv[4]; | |
function toSlackTime(t) { | |
return new Date(t).getTime() / 1000.0; |
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
snd-bcm2835 | |
vc4 |
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
gpu_mem=256 | |
dtoverlay=vc4-kms-v3d | |
lcd_rotate=2 |
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
Timer { | |
id: backlightTimer | |
interval: 1000*60*5 | |
onTriggered: backlight.state = false | |
running: backlight.state | |
repeat: false | |
} |
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
#include <QGuiApplication> | |
#include <QQmlApplicationEngine> | |
#include <QQmlContext> | |
#include <QCursor> | |
#include "key_emitter.h" | |
#include "raspberrybacklight.h" | |
int main(int argc, char *argv[]) |
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
import QtQuick 2.0 | |
Rectangle { | |
property color unpressedColor: "gray" | |
property color pressedColor: "lightgray" | |
property alias pressed: ma.pressed | |
property alias text: label.text | |
property real size: 1 | |
signal clicked() |
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
{reverse, sum, empty, all, fold, concat-map, flatten, span, Obj, sort-by, head} = require 'prelude-ls' | |
# [[String]] -> Bool | |
in-order = (xss) -> all (-> it.length == 1), xss | |
# [[String] -> Data -> [[String]]] -> Data -> [String] -> [[String]] | |
order-by-one = (fs, d, xs) --> | |
| xs.length < 2 => [xs] | |
| otherwise => | |
fold ((ys, f) -> if ys.length == 1 then f(ys[0], d) else ys), [xs], fs |
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
import ckan.plugins as plugins | |
import logging | |
log = logging.getLogger(__name__) | |
def admin_only(context, data_dict=None): | |
return {'success': False, 'msg': 'Access restricted to system administrators'} | |
NewerOlder