Skip to content

Instantly share code, notes, and snippets.

View jaimevalero's full-sized avatar

Jaime Valero jaimevalero

View GitHub Profile
import { writable } from "svelte/store";
import { browser } from "$app/environment";
//string
export const userName = writable(
(browser && localStorage.getItem("userName")) || "hello world"
);
userName.subscribe((val) => browser && (localStorage.userName = val));
// array
@xnuinside
xnuinside / postgres_check_table_exist_airflow.txt
Last active January 18, 2021 12:12
Apache Airflow: Check Table Exist and get schema name with Python callable and PostgresHook
from datetime import datetime
from airflow.hooks.postgres_hook import PostgresHook
from airflow.operators.python_operator import PythonOperator
from airflow import DAG
with DAG(dag_id="postgres_check_table", start_date=datetime(2018, 10, 12)) as dag:
def check_table_exist(sql_to_get_schema, sql_to_check_table_exist,
@jaimevalero
jaimevalero / extract_awesome.sh
Last active May 13, 2023 00:29
Which awesome resource has more awesomess in an awesome list
# Order an awesome list by number stars.
#
# Tis one liner scripts extracts the number of stars from each repo from a given awesome list, and order repos by the number of start
# This one liner uses jq command, so you should have it installed in your machine
# Parameter
# Awesome List to extract, in raw
AWESOME_LIST=https://raw.githubusercontent.com/pditommaso/awesome-pipeline/master/README.md
#CREDENTIALS="jaimevalero:mysecret"
CREDENTIALS="replace-for-your-github-user:replace-for-your-github-password"
@obahareth
obahareth / README.md
Created June 11, 2017 10:29
GitHub GraphQL API Starred Repositories With Pagination

GitHub GraphQL API Starred Repositories Examples With Pagination

You can play with the GraphQL API live here. It's pretty nice and has autocompletion based on the GraphQL schema.

The first example gets your first 3 starred repos, the cursor values can be used for pagination.

Here's an example response from the first query:

{

FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.


Effective Engineer - Notes

What's an Effective Engineer?