Skip to content

Instantly share code, notes, and snippets.

@monbang
monbang / The Best Medium-Hard Data Analyst SQL Interview Questions
Created May 3, 2020 16:15
The Best Medium-Hard Data Analyst SQL Interview Questions
# The Best Medium-Hard Data Analyst SQL Interview Questions
By Zachary Thomas ([zthomas.nc@gmail.com](mailto:zthomas.nc@gmail.com), [Twitter](https://twitter.com/zach_i_thomas), [LinkedIn](https://www.linkedin.com/in/thomaszi/))
**Tip: **See the Table of Contents (document outline) by hovering over the vertical line on the right side of the page
## Background & Motivation
> The first 70% of SQL is pretty straightforward but the remaining 30% can be pretty tricky.
@rosiehoyem
rosiehoyem / getting-started-with-airflow.md
Last active January 14, 2023 18:09
Getting Started With Airflow

Install Airflow

1. Install Airflow

Follow the installation instructions on the Airflow website.

Update Airflow Configurations

To configure Airflow to use Postgres rather than the default Sqlite3, go to airflow.cfg and update this configuration to LocalExecutor:

# The executor class that airflow should use. Choices include
@LoyEgor
LoyEgor / gulpfile.js
Last active March 13, 2023 17:22
best image compression settings (gulp-imagemin)
// install
// npm i gulp-cache gulp-imagemin imagemin-pngquant imagemin-zopfli imagemin-mozjpeg imagemin-giflossy -f
// node node_modules/jpegtran-bin/lib/install.js
// node node_modules/gifsicle/lib/install.js
// node node_modules/zopflipng-bin/lib/install.js
// node node_modules/mozjpeg/lib/install.js
// node node_modules/giflossy/lib/install.js
// node node_modules/pngquant-bin/lib/install.js
@Aeonitis
Aeonitis / Android - Screen Overlay Detected Resolution
Last active October 28, 2023 06:05
Resolve Android 'Screen Overlay Detected' issue
Message of Issue: "Screen overlay detected - To change this permission setting you first have to turn off the screen overlay from Settings > Apps"
Scope of issue: This only applies to Android M (6.0/API v23) Or Over
Explanation: Other apps installed on the users device may be utilizing a screen overlay on your phone (e.g. Twilight, Red Moon, etc...)
Screen overlays are virtual layers that cover part or all of screen while another app is in the foreground.
It may be dangerous for android to allow you to to change a sensitive setting while an overlay is active because you may prone to 'tap-jacking'
(i.e. a malicious application displays a fake user interface that seems like it can be interacted with, but actually passes interaction events such as finger taps to a hidden user interface behind it.).
Therefore to improve security, android doesn't allow you to change sensitive settings while an active overlay is detected, unless the user permits the app to do so.
Source: https://commonsware.com/blog/2016/03/24/
@Rich-Harris
Rich-Harris / service-workers.md
Last active April 21, 2024 16:24
Stuff I wish I'd known sooner about service workers

Stuff I wish I'd known sooner about service workers

I recently had several days of extremely frustrating experiences with service workers. Here are a few things I've since learned which would have made my life much easier but which isn't particularly obvious from most of the blog posts and videos I've seen.

I'll add to this list over time – suggested additions welcome in the comments or via twitter.com/rich_harris.

Use Canary for development instead of Chrome stable

Chrome 51 has some pretty wild behaviour related to console.log in service workers. Canary doesn't, and it has a load of really good service worker related stuff in devtools.

@gunjanpatel
gunjanpatel / revert-a-commit.md
Last active April 21, 2024 22:10
Git HowTo: revert a commit already pushed to a remote repository

Revert the full commit

Sometimes you may want to undo a whole commit with all changes. Instead of going through all the changes manually, you can simply tell git to revert a commit, which does not even have to be the last one. Reverting a commit means to create a new commit that undoes all changes that were made in the bad commit. Just like above, the bad commit remains there, but it no longer affects the the current master and any future commits on top of it.

git revert {commit_id}

About History Rewriting

Delete the last commit

Deleting the last commit is the easiest case. Let's say we have a remote origin with branch master that currently points to commit dd61ab32. We want to remove the top commit. Translated to git terminology, we want to force the master branch of the origin remote repository to the parent of dd61ab32:

@rtablada
rtablada / comic-book.md
Last active June 13, 2018 12:52
Hackathon Ideas

Comic Book Creator

Description

This application allows users to create basic storyboards for comic books or movies. Each comic books should have many tiles. A user should be able to manage (create, read, update, and destroy) comic book tiles. Users can go into "Dark Mode" so that the UI simplifies so that you can focus on reading/presenting your storyboard.

Deliverables

@anvaka
anvaka / 00.Intro.md
Last active March 7, 2024 13:07
npm rank

npm rank

This gist is updated daily via cron job and lists stats for npm packages:

  1. Top 1,000 most depended-upon packages
  2. Top 1,000 packages with largest number of dependencies
  3. Top 1,000 packages with highest PageRank score
@ratpik
ratpik / MainActivity.java
Last active July 9, 2018 05:56
PayTM Android Integration
package com.drc.paytm_example;
import java.util.HashMap;
import java.util.Map;
import java.util.Random;
import android.app.Activity;
import android.os.Bundle;
import android.util.Log;
import android.view.Window;