Skip to content

Instantly share code, notes, and snippets.

View llaine's full-sized avatar
🚀

Louis Lainé llaine

🚀
View GitHub Profile
@llaine
llaine / explain.txt
Last active July 6, 2016 07:56
Performance issue
Unique (cost=3734212.16..3738684.24 rows=223604 width=280) (actual time=38566.370..52206.283 rows=1856 loops=1)
-> Sort (cost=3734212.16..3734771.17 rows=223604 width=280) (actual time=38566.368..52040.284 rows=385764 loops=1)
Sort Key: t.id, (CASE t.fileable_type WHEN 'ProductTask'::text THEN pt.task_type WHEN 'DocumentTask'::text THEN dt.task_type ELSE ''::character varying END), (CASE t.fileable_type WHEN 'ProductTask'::text THEN pt.aasm_state WHEN 'DocumentTask'::text THEN dt.aasm_state ELSE ''::character varying END), (COALESCE(t.file_file_name, ''::character varying)), t.aws_path, (COALESCE(t.fileable_type, ''::character varying)), u.email
Sort Method: external merge Disk: 105752kB
-> Hash Join (cost=439.15..3685301.29 rows=223604 width=280) (actual time=4.706..1827.931 rows=385764 loops=1)
Hash Cond: (t.user_id = u.id)
-> Nested Loop (cost=74.62..3677949.14 rows=223604 width=258) (actual time=0.226..1470.227 rows=385764 loops=1)
-- Neil young :
3 - On The Way Home
4 - Tell Me Why : OK
1 - Don't Let It Bring You Down : OK
2 - Cowgirl In The Sand : OK
5 - Helpless
6 - Bad Fog Of Loneliness
7 - Ohio : OK
8 - Down By The River
9 - I Am A Child
@llaine
llaine / song-list.md
Last active June 23, 2016 10:23
Classic Jazz
REALLY goods albums :
  • Ballads, John Coltrane
  • Live at the kennedy center hall, Mulgrew Miller
  • Stan Getz, Gets for lovers
  • Giant Steps, John Coltrane
  • Blue Trane, John Coltrane
  • Portraits in Jazz, Bill Evans
  • You must believe in Spring, Bill Evans
  • Stan Getz & Bill Evans, Bill Evans Stan Getz
@llaine
llaine / gist:72b519621658513d1fde0307259f97e7
Last active June 23, 2016 09:40
Jimmy's songs to learn
- ain't no telling
- if 6 was 9
- who knows
- machine guns
- may this be loved
- fire
- stone free
struct Validation {
int min;
int max;
}
struct FieldArray{
Field[] fields; alias fields this;
this(string s){
fields = s.deserialize!(Field[]);
}
[{"required": true, "input_name": "address", "input_type": "text_input", "validations": {"max": 100, "min": 2}}, {"required": true, "input_name": "city", "input_type": "text_input", "validations": {"max": 100, "min": 2}}]
[{"required": true, "input_name": "address", "input_type": "text_input", "validations": {"max": 100, "min": 2}}, {"required": true, "input_name": "city", "input_type": "text_input", "validations": {"max": 100, "min": 2}}]
14 [{"required": true, "input_name": "address", "input_type": "text_input", "validations": {"max": 100, "min": 2}}, {"required": true, "input_name": "city", "input_type": "text_input", "validations": {"max": 100, "min": 2}}] 0
@llaine
llaine / code.d
Created June 9, 2016 15:14
code.d
struct Validation {
int min;
int max;
}
struct Field {
bool required;
string inputName;
string inputType;
[
{
"required":true,
"input_name":"address",
"input_type":"text_input",
"validations":{
"max":100,
"min":2
}
},
struct Question {
int id;
string name;
Json dynamicFields;
int answerType;
this(int _id, string _name, string _dynamicFields, int _asnwerType) {
this.id = _id;
this.name = _name;