Skip to content

Instantly share code, notes, and snippets.

View Davoodeh's full-sized avatar

M. Yas. Davoodeh Davoodeh

View GitHub Profile
@waylan
waylan / sqlite_pivot_tables.md
Last active November 17, 2022 08:43
Sqlite pivot tables.

Given the following table:

CREATE TABLE "venue" 
(
    "id" INTEGER NOT NULL PRIMARY KEY, 
    "name" VARCHAR(255) NOT NULL
);

INSERT INTO "venue" ("name") VALUES ('V1');
@ondrek
ondrek / gist:7413434
Created November 11, 2013 13:48
Smallest Base64 image
data:image/gif;base64,R0lGODlhAQABAAAAACw=
@abtrout
abtrout / pass.md
Created July 8, 2014 14:51
Using password-store with git repository synching

Password-store keeps your passwords (or any other sensitive information) saved in GnuPG encrypted files organized in ~/.password-store. For more information about GPG, consult the GNU Privacy Handbook.

Getting started

To get started, install pass and generate a keypair.

$ brew install pass
$ gpg --gen-key
$ gpg --list-keys
@rduplain
rduplain / match.hy
Last active December 22, 2020 06:22
Getting started with hy (hylang.org), a simple example.
#!/usr/bin/env hy
;; match.hy - Getting started with hy (hylang.org), a simple example.
;;
;; As executable, `chmod +x match.hy`:
;;
;; $ ./match.hy '(.*), (.*)!' 'Hello, world!'
;; ('Hello', 'world')
;;
;; Developed on hy master 14c412c (after 0.11.1) on Python 3.5.
;;
@QuantumGhost
QuantumGhost / example.puml
Last active September 21, 2024 19:19
A simple template for PlantUML to draw ER diagram.The basic idea comes from http://plantuml.sourceforge.net/qa/?qa=331/database-modeling
@startuml
' uncomment the line below if you're using computer with a retina display
' skinparam dpi 300
!define Table(name,desc) class name as "desc" << (T,#FFAAAA) >>
' we use bold for primary key
' green color for unique
' and underscore for not_null
!define primary_key(x) <b>x</b>
!define unique(x) <color:green>x</color>
!define not_null(x) <u>x</u>