Skip to content

Instantly share code, notes, and snippets.

View pferreir's full-sized avatar
💭
Hacking

Pedro Ferreira pferreir

💭
Hacking
View GitHub Profile
diff --git a/Cargo.toml b/Cargo.toml
index ddcf743..5ca90f2 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -11,9 +11,10 @@ reqwest = "0.9.19"
serde = "1.0.98"
serde_json = "1.0.40"
regex = "1.2.0"
-diesel = {version = "1.4.2", features = ["sqlite"]}
+diesel = {version = "1.4.2", features = ["sqlite", "r2d2"]}
diff --git a/Cargo.toml b/Cargo.toml
index ddcf743..5ca90f2 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -11,9 +11,10 @@ reqwest = "0.9.19"
serde = "1.0.98"
serde_json = "1.0.40"
regex = "1.2.0"
-diesel = {version = "1.4.2", features = ["sqlite"]}
+diesel = {version = "1.4.2", features = ["sqlite", "r2d2"]}
commit ea33b7f7fa1dca084a4a10bd989919c1ca002ca1
Author: Pedro Ferreira <[email protected]>
Date: Thu Aug 1 11:45:03 2019 +0200
Add .eslintrc to integrate with editors
diff --git a/newdle/client/.eslintrc.json b/newdle/client/.eslintrc.json
new file mode 100644
index 0000000..e0217a1
--- /dev/null
{
"python.venvPath": "/home/pedro/.virtualenvs"
}
version: "3.7"
services:
cern-search-api:
build: .
networks:
- default
environment:
- "INVENIO_ACCOUNTS_SESSION_REDIS_URL=redis://redis:6379/1"
- "INVENIO_CACHE_REDIS_URL=redis://redis:6379/0"
- "INVENIO_SEARCH_ELASTIC_HOSTS=elasticsearch"
# just accept all licenses
sdkmanager --licenses
# install emulator
sdkmanager emulator
# install HW acceleration for emulator
sdkmanager 'extras;intel;Hardware_Accelerated_Execution_Manager'
sudo /path/to/.../android-sdk/extras/intel/Hardware_Accelerated_Execution_Manager/silent_install.sh
# install emulator image
sdkmanager 'system-images;android-28;google_apis_playstore;x86_64'
# create AVD
[package]
authors = ["John Doe <[email protected]>"]
edition = "2018"
readme = "README.md"
name = "embed"
version = "0.1.0"
[dependencies]
cortex-m = "0.5.8"
cortex-m-rt = "0.6.7"
#include <libopencm3/stm32/gpio.h>
#include <libopencm3/stm32/dac.h>
#include <libopencm3/stm32/dma.h>
#include <libopencm3/cm3/nvic.h>
void dac_setup(void)
{
/* Setup the DAC channel 1, with timer 2 as trigger source.
* Assume the DAC has woken up by the time the first transfer occurs */
dac_trigger_enable(CHANNEL_1);
/* This file is part of Indico.
* Copyright (C) 2002 - 2018 European Organization for Nuclear Research (CERN).
*
* Indico is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 3 of the
* License, or (at your option) any later version.
*
* Indico is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
import bleach
import re
import HTMLParser
h = HTMLParser.HTMLParser()
queries = [
Contribution.query.filter(Contribution.title.like('%</%>%') | Contribution.title.like('%&%;%')),
Session.query.filter(Session.title.like('%</%>%') | Session.title.like('%&%;%')),
SessionBlock.query.filter(SessionBlock.title.like('%</%>%') | SessionBlock.title.like('%&%;%')),