Skip to content

Instantly share code, notes, and snippets.

@Rende11
Rende11 / clojure-learning-list.md
Created December 4, 2022 17:06 — forked from ssrihari/clojure-learning-list.md
An opinionated list of excellent Clojure learning materials

An opinionated list of excellent Clojure learning materials

These resources (articles, books, and videos) are useful when you're starting to learn the language, or when you're learning a specific part of the language. This an opinionated list, no doubt. I've compiled this list from writing and teaching Clojure over the last 10 years.

  • 🔴 Mandatory (for both beginners and intermediates)
  • 🟩 For beginners
  • 🟨 For intermediates

Table of contents

  1. Getting into the language
postgres=# select * from testing;
id | name | password
----+-------+----------
1 | admin | secret
(1 row)
postgres=# select * from testing where name = 'admin' and password = 'secret';
id | name | password
----+-------+----------
1 | admin | secret

QOPT

vacuum analyze;

Find the most oldest patient

HW week 2

Extract database usage statistics for all tables in one query that return single JSONB object

with tbs as (
  select 
  ts.table_schema
, pc.oid
, pc.relname

Week 1

Create tables

create table codes (
  id serial,
  code text not null,
  "desc" text not null
);
```
select s.relname, s.indexrelname, s.idx_scan, i.indexdef
from pg_stat_all_indexes s
join pg_indexes i
on i.indexname = s.indexrelname
where s.schemaname = 'public' and s.indexrelname not like '%pkey'
order by s.relname;
```
https://www.dropbox.com/s/3gx72f5yswm2e70/Screenshot%202020-01-29%2014.25.56.png?dl=0
@Rende11
Rende11 / .emacs
Created October 10, 2019 16:36
emacs
;; Global Emacs config
(tool-bar-mode -1)
(setq ring-tell-function 'ignore)
;; Packages: Melpa Elpla
(require 'package)
(add-to-list 'package-archives (cons "melpa" "https://melpa.org/packages/") t)
(add-to-list 'package-archives (cons "gnu" "https://elpa.gnu.org/packages/"))
(package-initialize)
;; Custom Railscasts
@Rende11
Rende11 / read-access.sql
Created September 17, 2019 12:14 — forked from oinopion/read-access.sql
How to create read only user in PostgreSQL
-- Create a group
CREATE ROLE readaccess;
-- Grant access to existing tables
GRANT USAGE ON SCHEMA public TO readaccess;
GRANT SELECT ON ALL TABLES IN SCHEMA public TO readaccess;
-- Grant access to future tables
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT ON TABLES TO readaccess;
(defn form1 []
[:div.row.m-4
[:div.col-md-6
[craft-input "client-id" [:password-page :basic :client-id]]
[craft-input "secure-code" [:password-page :basic :secure-code]]
[craft-input "username" [:password-page :basic :username]]
[craft-input "password" [:password-page :basic :password]]
[:p "ololo"]]
[:div.col-md-6
[:div

Pre: node, npm, npx, git

  1. Clone repository git clone https://github.com/Navimize/yourwaitsapp.git

  2. Install dependeisies

cd yourwaitsapp
npm install