This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<style> | |
.item1 { | |
grid-area: myArea; | |
} | |
.grid-container { | |
display: grid; | |
grid-template-areas: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdint.h> | |
typedef struct __attribute__((__packed__)) data_block_t { | |
uint8_t a; | |
uint8_t b : 1; | |
uint8_t c : 1; | |
uint8_t d : 1; | |
uint8_t e : 1; | |
uint8_t f : 1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdbool.h> | |
#define NAME_ID_LIST(ENTRY) \ | |
ENTRY(MOSHE, 0, true) \ | |
ENTRY(DROR, 1, false) | |
#define NAME_ID_LIST_EXPAND_AS_ENUM(enum_name, enum_value, ...) enum_name = enum_value, | |
typedef enum name_id { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
// https://gcc.gnu.org/onlinedocs/cpp/Concatenation.html | |
#define test(a) b ## a | |
int main(void) { | |
char* bc = "Hello World\n"; | |
printf(test(c)); | |
return 0; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Python.h> | |
#include <string.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#define bail_null(obj) \ | |
if (NULL == obj) { err = 1; goto bail; } | |
#define bail_require(cond) \ | |
if (!(cond)) { err = 1; goto bail; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const MAX_QUERY_RETRIES = 200; | |
const DEFAULT_MAX_AGE = 9999; | |
export interface GetRedashQueryDataProps<QParams = { [key in string]: string }> { | |
redashURL: string; // e.g. https://app.redash.io/hasadna | |
queryId: number; // e.g. 185581 | |
queryParams?: QParams; // e.g. {"userCityID": 123121} | |
/* If query results less than `max_age` seconds old are available, | |
* return them, otherwise execute the query; if omitted or - 1, returns | |
* any cached result, or executes if not available.Set to zero to |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Based on an answer from https://stackoverflow.com/questions/2771171/control-the-dashed-border-stroke-length-and-distance-between-strokes | |
.dashed { | |
background-image: repeating-linear-gradient(to right, #990000 0%, #990000 50%, transparent 50%, transparent 100%), | |
repeating-linear-gradient(to right, #990000 0%, #990000 50%, transparent 50%, transparent 100%), | |
repeating-linear-gradient(to bottom, #990000 0%, #990000 50%, transparent 50%, transparent 100%), | |
repeating-linear-gradient(to bottom, #990000 0%, #990000 50%, transparent 50%, transparent 100%); | |
background-position: -1px -1px, //left top, | |
-1px 23px, //left bottom, | |
-1px -1px, //left top, |
I made this because each doc on it's own discusses localizing one part of the pipeline - and I couldn't find a single place to see the whole process.
Do steps 1, 2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!bash | |
psql -d old_db -c "\COPY (SELECT * FROM conditions) TO old_db.csv DELIMITER ',' CSV" |