Skip to content

Instantly share code, notes, and snippets.

View ilyasKerbal's full-sized avatar

ILYAS KERBAL ilyasKerbal

View GitHub Profile
@ilyasKerbal
ilyasKerbal / scrape_with_logs.py
Created December 1, 2023 23:52 — forked from rengler33/scrape_with_logs.py
How to Capture Network Traffic When Scraping with Selenium & Python
# see rkengler.com for related blog post
# https://www.rkengler.com/how-to-capture-network-traffic-when-scraping-with-selenium-and-python/
import json
import pprint
from selenium import webdriver
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
capabilities = DesiredCapabilities.CHROME
@ilyasKerbal
ilyasKerbal / free_m3u8.m3u
Created September 27, 2023 23:10 — forked from Fazzani/free_m3u8.m3u
Free m3u8 streams
http://sample.vodobox.net/skate_phantom_flex_4k/skate_phantom_flex_4k.m3u8
http://playertest.longtailvideo.com/adaptive/wowzaid3/playlist.m3u8
http://cdn-fms.rbs.com.br/vod/hls_sample1_manifest.m3u8
http://nasatv-lh.akamaihd.net/i/NASA_101@319270/index_1000_av-p.m3u8?sd=10&rebase=on
http://content.jwplatform.com/manifests/vM7nH0Kl.m3u8
@ilyasKerbal
ilyasKerbal / README.md
Created August 5, 2022 00:13 — forked from felixhammerl/README.md
MitM TLS encrypted traffic in macOS using SSLKEYLOGFILE

Option 1: Via macOS environment variable:

  1. mkdir -p ~/Library/LaunchAgents
  2. Put tlskeylogger.plist at ~/Library/LaunchAgents/tlskeylogger.plist
  3. launchctl load ~/Library/LaunchAgents/tlskeylogger.plist, so it will load on the next restart
  4. launchctl start ~/Library/LaunchAgents/tlskeylogger.plist, so it will load the environment variable immediately
  5. Restart your browser(s)
  6. See how TLS keys are being written to ~/.tlskeyfile via tail -f ~/.tlskeyfile

NB: This may be hit or miss and many apps do not respect the env var.

@ilyasKerbal
ilyasKerbal / NetworkException.java
Created July 28, 2022 10:47 — forked from naturalwarren/NetworkException.java
Retrofit 2 CallAdapterFactory that Wraps Network Errors
package com.uber.retrofit2.adapters.network.exception;
import android.support.annotation.NonNull;
import java.io.IOException;
import okhttp3.Call;
import okhttp3.Callback;
import okhttp3.Request;
@ilyasKerbal
ilyasKerbal / gist:7711351458959b5ddb189a582a6d79b1
Created March 28, 2022 19:33 — forked from appoll/gist:d863a09f25076061e881
Working sample of fragment inside CoordinatorLayout
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/main_content"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.design.widget.AppBarLayout
android:id="@+id/appbar"
android:layout_width="match_parent"
@ilyasKerbal
ilyasKerbal / .procmailrc
Created November 26, 2021 18:59 — forked from leifdenby/.procmailrc
Forwarding emails to a Python script with procmail
:0Wc:
| env python mail_receiver.py
@ilyasKerbal
ilyasKerbal / request-picture-in-picture.js
Created May 21, 2020 12:33 — forked from iamandrewluca/request-picture-in-picture.js
Request picture in picture on first found video that is playing #bookmarklet
javascript: void ((function() {
/** @type {NodeListOf<HTMLIFrameElement>} */
const iFrames = window.document.querySelectorAll('iframe');
/** @type {Document[]} */
const allDocuments = [
window.document,
...Array.from(iFrames)
.map(i => i.contentDocument)
/**
@ilyasKerbal
ilyasKerbal / config.js
Created April 13, 2020 15:26 — forked from codediodeio/config.js
Snippets from the Firestore Data Modeling Course
import * as firebase from 'firebase/app';
import 'firebase/firestore';
var firebaseConfig = {
// your firebase credentials
};
// Initialize Firebase
firebase.initializeApp(firebaseConfig);
@ilyasKerbal
ilyasKerbal / _decimal.scss
Created March 13, 2020 18:37 — forked from terkel/_decimal.scss
Rounding decimals in Sass
// _decimal.scss | MIT License | gist.github.com/terkel/4373420
// Round a number to specified digits.
//
// @param {Number} $number A number to round
// @param {Number} [$digits:0] Digits to output
// @param {String} [$mode:round] (round|ceil|floor) How to round a number
// @return {Number} A rounded number
// @example
// decimal-round(0.333) => 0
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="black">#000000</color>
<color name="white">#FFFFFF</color>
<color name="red_50">#FFEBEE</color>
<color name="red_100">#FFCDD2</color>
<color name="red_200">#EF9A9A</color>
<color name="red_300">#E57373</color>