Skip to content

Instantly share code, notes, and snippets.

View gourab5139014's full-sized avatar

G Mitra gourab5139014

View GitHub Profile
@kconner
kconner / macOS Internals.md
Last active June 27, 2024 18:48
macOS Internals

macOS Internals

Understand your Mac and iPhone more deeply by tracing the evolution of Mac OS X from prelease to Swift. John Siracusa delivers the details.

Starting Points

How to use this gist

You've got two main options:

@monkeym4ster
monkeym4ster / docker.sh
Created July 6, 2017 06:04
Docker: save/load container using tgz file (tar.gz)
#for not running docker, use save:
docker save <dockernameortag> | gzip > mycontainer.tgz
#for running or paused docker, use export:
docker export <dockernameortag> | gzip > mycontainer.tgz
#load
gunzip -c mycontainer.tgz | docker load
@hiddentao
hiddentao / RoleBasedAcl.sol
Last active March 10, 2020 03:27
Ethereum solidity contract for role-based access control
pragma solidity ^0.4.10;
contract RoleBasedAcl {
address creator;
mapping(address => mapping(string => bool)) roles;
function RoleBasedAcl () {
creator = msg.sender;
}
@githoov
githoov / redshift_metadata.md
Last active September 21, 2022 01:57
Redshift Metadata

Redshift Tables Used

pg_table_def, stl_query, stl_querytext, stl_tr_conflict, stl_explain, stl_alert_event_log, stl_ddltext, stl_scan, stl_save, stl_hashjoin, stl_hash, stl_plan_info, stl_return, and information_schema.table_constraints.

Queries to Extract Features

  • execution time
select (endtime - starttime) as execution_time_in_ms 
from stl_query 
where query = QUERY_ID;
@meiamsome
meiamsome / hn_search.js
Last active May 4, 2022 13:23 — forked from kristopolous/hn_seach.js
hn job query search
/* Hacker News Search Script
*
* Original Script by Kristopolous:
* https://gist.github.com/kristopolous/19260ae54967c2219da8
*
* Usage:
* First, copy the script into your browser's console whilst on the Hacker News
* jobs page. Then, you can use the query function to filter the results.
*
* For example,
@mjhea0
mjhea0 / 1 - sql_interview_questions.md
Last active June 22, 2024 09:44
Jitbit's SQL interview questions