⚠️ Note 2023-01-21
Some things have changed since I originally wrote this in 2016. I have updated a few minor details, and the advice is still broadly the same, but there are some new Cloudflare features you can (and should) take advantage of. In particular, pay attention to Trevor Stevens' comment here from 22 January 2022, and Matt Stenson's useful caching advice. In addition, Backblaze, with whom Cloudflare are a Bandwidth Alliance partner, have published their own guide detailing how to use Cloudflare's Web Workers to cache content from B2 private buckets. That is worth reading,
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# The bash command `history | grep abc` is a neat tool. I abuse it alot. | |
# So, I wrote a module that would list or search through iex history. | |
# https://dev.to/sushant12/list-all-history-in-iex-408b | |
# I prefer to put this module in my .iex.exs file and then import the .iex.exs file into my project. | |
defmodule History do | |
def search do | |
load_history() | |
|> Enum.with_index(1) | |
|> Enum.each(fn {value, index} -> |
- Open Chrome Developer tools and click the Network tab.
- Navigate to the page with the video and get it to start playing.
- Filter the list of files to "m3u8".
- Find master.m3u8 or index.m3u8 and click on it.
- Save the file to disk and look inside it.
- If the file contains a single m3u8 master url, copy that one instead.
- Run the program m3u8x.
- Paste the same m3u8 url in both textboxes (URL and Quality URL) and click "Headers" and set the referral url and user-agent from the request as found in Chrome.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# EditorConfig is awesome: http://EditorConfig.org | |
# .editorconfig for Elixir projects | |
# https://git.io/elixir-editorconfig | |
# top-most EditorConfig file | |
root = true | |
[*] | |
indent_style = space |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule ForLoop do | |
@doc ~S""" | |
Iterates over `term`, while `condition` between `term` and `final` is truthy, | |
applying `fun`. It returns the accumulated terms. | |
- `term` is any that will be iterated over. | |
- `final_term` is the element that will be run against `term` in `condition`. | |
- `condition` can take 1 argument: `term`, or two arguments: `term` and `final`. | |
- `fun` is run every time a `condition` is evaluated to truthy. | |
- `transform` is applied to `term` at the end of every loop, before the next iteration. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# make-test-file | |
# https://git.io/make-test-file | |
# | |
# DESCRIPTION: | |
# make-test-file is a script to ease development of the Elixir programming code | |
# base. Allowing the developer to run selected tests. | |
# | |
# INTRODUCTION: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
####################################################################### | |
# `ag` list file with first match line number | |
# Returns a list of files including the first line matched in the file | |
# emulates the non-implemented option: `ag --files-with-matches-line-number` | |
# for `ag` (the silver searcher) https://github.com/ggreer/the_silver_searcher | |
# feature request: https://github.com/ggreer/the_silver_searcher/issues/715 | |
# Usage: just simple use it as you would use `ag -l`, but ommit the -l option | |
# $ ag-l1 "(pattern)?.*" | |
# Installation: add this function to your ~/.bash_funcs file | |
# Download: https://git.io/ag-l1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# ./check_not_linked_exdoc.sh – http://git.io/check_not_linked_exdoc.sh | |
# | |
# Description: | |
# Check for references to exiting modules in the documentation, that is actually not being liked | |
# by ExDoc. | |
# | |
# Instructions | |
# Run from the root folder in the elixir project – https://github.com/elixir-lang/elixir/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Map over a tuple in normal order | |
def tuple_map1(tuple, function), do: | |
tuple_map(tuple, function, 0, []) | |
def tuple_map1(tuple, function, index, acc) when index < tuple_size(tuple) do | |
item = function.(elem(tuple, index)) | |
tuple_map1(tuple, function, index + 1, [item | acc]) | |
end | |
def tuple_map1(tuple, function, index, acc) do | |
Enum.reverse(acc) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@binkmail.com | |
@bobmail.info | |
@chammy.info | |
@devnullmail.com | |
@letthemeatspam.com | |
@mailinater.com | |
@mailinator.net | |
@mailinator2.com | |
@notmailinator.com | |
@reallymymail.com |
NewerOlder