Skip to content

Instantly share code, notes, and snippets.

View ylogx's full-sized avatar
🤘
<div><ståtús/></div>

Shubham Chaudhary ylogx

🤘
<div><ståtús/></div>
View GitHub Profile
@kconner
kconner / macOS Internals.md
Last active April 19, 2024 20:06
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:

@dikiaap
dikiaap / git-io-custom-url.md
Last active August 5, 2023 04:21
git.io custom URL

Update: As of 11 January 2022, git.io no longer accepts new URLs.

Command:

curl https://git.io/ -i -F "url=https://github.com/YOUR_GITHUB_URL" -F "code=YOUR_CUSTOM_NAME"

URLs that can be created is from:

  • https://github.com/*
  • https://*.github.com
@foklepoint
foklepoint / .gitlab-ci.yml
Created July 8, 2017 20:25
Build and Push images to GCP Container Registry with Gitlab CI
image: docker:latest
# When using dind, it's wise to use the overlayfs driver for
# improved performance.
variables:
DOCKER_DRIVER: overlay
GCP_PROJECT_ID: CHANGE-TO-GCP-PROJECT-ID
IMAGE_NAME: image_id
services:
@vmarkovtsev
vmarkovtsev / notebook.ipynb
Created March 10, 2017 10:40
lapjv blog post
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@hallettj
hallettj / Makefile
Last active December 10, 2023 13:32
Makefile for transpiling with Babel & Flow in a Node app, or in a client- or server-side shared library
# Makefile for transpiling with Babel in a Node app, or in a client- or
# server-side shared library.
.PHONY: all clean
# Install `babel-cli` in a project to get the transpiler.
babel := node_modules/.bin/babel
# Identify modules to be transpiled by recursively searching the `src/`
# directory.
@ylogx
ylogx / zomato_bookmarklet.js
Last active September 26, 2018 06:24
A bookmarklet to find various zomato resource properties. To use, copy this code and paste it in URL field of a new bookmark.
javascript: void
function($) {
var loadBookmarklet = function($) {
(function() {
if ("www.zomato.com" == document.domain) {
var msg = "";
try {
splits = $('meta[property="al:android:url"]').attr("content").split("/");
const id = splits[3],
page_type = splits[2];
@ylogx
ylogx / load_and_cache.py
Created July 21, 2016 12:56
Load a dataset and cache it for further calls
import numpy as np
import pickle
def load_and_cache(filename):
output = None
cache_dir = '/tmp/my_project_cache/'
os.makedirs(cache_dir, mode=0o744, exist_ok=True)
cache = cache_dir + filename + '.pkl'
if not os.path.exists(cache):
output = np.genfromtxt(filename, dtype=float, delimiter=',') # TODO: Fill your logic
import okhttp3.ResponseBody;
import okhttp3.mockwebserver.MockResponse;
import okhttp3.mockwebserver.MockWebServer;
import okhttp3.mockwebserver.RecordedRequest;
import org.junit.Rule;
import org.junit.Test;
import retrofit2.Call;
import retrofit2.Response;
import retrofit2.Retrofit;
import retrofit2.http.GET;
@swankjesse
swankjesse / OkHttpBug.java
Created February 21, 2016 16:45
Sample bug report for OkHttp
import okhttp3.Call;
import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.Response;
import okhttp3.mockwebserver.MockResponse;
import okhttp3.mockwebserver.MockWebServer;
import okhttp3.mockwebserver.RecordedRequest;
import org.junit.Rule;
import org.junit.Test;
@zachwill
zachwill / 538_colors.py
Created October 10, 2015 21:20
A simple FiveThirtyEight palette for Seaborn plots.
"""
A simple FiveThirtyEight palette for Seaborn plots.
"""
import seaborn as sns
import matplotlib.pyplot as plt
five_thirty_eight = [
"#30a2da",
"#fc4f30",