Skip to content

Instantly share code, notes, and snippets.

View merqurio's full-sized avatar

Gabi Maeztu merqurio

View GitHub Profile
#/bin/sh
#
# Setup Kiosk mode for Alpine Linux
#
#!/bin/sh
USER=kiosk
KEYBOARD_LAYOUT=fr
KEYBOARD_MODEL=mac
WIDTH=1024
@merqurio
merqurio / psql_useful_stat_queries.sql
Created March 12, 2020 09:32 — forked from anvk/psql_useful_stat_queries.sql
List of some useful Stat Queries for PSQL
--- PSQL queries which also duplicated from https://github.com/anvk/AwesomePSQLList/blob/master/README.md
--- some of them taken from https://www.slideshare.net/alexeylesovsky/deep-dive-into-postgresql-statistics-54594192
-- I'm not an expert in PSQL. Just a developer who is trying to accumulate useful stat queries which could potentially explain problems in your Postgres DB.
------------
-- Basics --
------------
-- Get indexes of tables
@merqurio
merqurio / postgres_queries_and_commands.sql
Last active June 18, 2019 15:21 — forked from rgreenjr/postgres_queries_and_commands.sql
Useful PostgreSQL Queries and Commands
-- show running queries (9.2)
SELECT pid, age(clock_timestamp(), query_start), usename, query
FROM pg_stat_activity
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'
ORDER BY query_start desc;
-- kill running query
SELECT pg_cancel_backend(procpid);
-- kill idle query
@merqurio
merqurio / CLA.md
Created November 7, 2017 07:42
CLA Template

Contributor License Agreement

The following terms are used throughout this agreement:

  • You - the person or legal entity including its affiliates asked to accept this agreement. An affiliate is any entity that controls or is controlled by the legal entity, or is under common control with it.
  • Project - is an umbrella term that refers to any and all IOMED Medical Solution S.L. open source projects.
  • Contribution - any type of work that is submitted to a Project, including any modifications or additions to existing work.
  • Submitted - conveyed to a Project via a pull request, commit, issue, or any form of electronic, written, or verbal communication with IOMED Medical Solution S.L., contributors or maintainers.

1. Grant of Copyright License.

@merqurio
merqurio / iotheme.vim
Created October 22, 2017 18:12
Own NeoVim theme
hi clear
syntax reset
let g:colors_name = "iotheme"
if &background == "light"
hi Boolean gui=NONE guifg=#fec51b guibg=NONE
hi ColorColumn gui=NONE guifg=NONE guibg=#f5f5f5
hi Comment gui=NONE guifg=#969696 guibg=NONE
hi Conceal gui=NONE guifg=#707070 guibg=NONE
hi Conditional gui=NONE guifg=#4a4a4a guibg=NONE
hi Constant gui=NONE guifg=#707070 guibg=NONE
@merqurio
merqurio / offline_nologo_plotly.py
Created June 4, 2017 09:43
Plot with plotly offline and without any logo or reference to their site
def plotter(*data):
try:
from plotly.offline import iplot
except ImportError:
print("Try to install plotly first: \n > pip install plotly")
return iplot(*data, config={"displaylogo":False, "showLink":False, 'modeBarButtonsToRemove':['sendDataToCloud']})
from plotly.graph_objs import Scatter
"")
if [[ $($0 status) == *"stopped"* ]]; then
$0 start
else
$0 stop
fi
;;
@merqurio
merqurio / README.md
Created May 7, 2017 17:09 — forked from ndarville/README.md
Confidence Interval

(This chart is a part of the d3-charts collection available [here][collection].)


This chart displays the share of votes over time between two Danish parliamentary coalitions using placeholder data. The chart here has been used for two coalitions, but can also be used for two candidates.

You will notice something enveloping the line charts, which is the [confidence interval][ci], which indicates the spectrum of the confidence in our displayed results---to use a completely unscientific definition.

Compare this to [Sam Wang's chart for the U.S. 2012 election][wang] and [Drew Linzer's charts for individual states][votamatic].

{
"resourceType": "Observation",
"contained": [
{
"resourceType": "Patient",
"id": this.props.patientID,
}
],
"status": "final", // THIS SHOULD BE FINAL ONLY IF ALL QUESTIONS ARE ANSWERED
"category": [
{
"resourceType": "Observation",
"contained": [
{
"resourceType": "Observation",
"status": "final", //////// THIS MUST BE CHANGED DEPENDING IF IT'S COMPLETLY FULLFILLED
"code": {
"coding": [
{
"system": "http://loinc.org",