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
1 shallot, minced | |
4 cloves garlic, minced | |
12oz jar roasted red peppers, drained | |
2tbsp butter or olive oil | |
2tbsp flour | |
4 Russet potatoes | |
32 oz vegetable stock | |
8 oz heavy cream | |
salt to taste |
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
Phantom Thread (2017) | |
Magnolia (1999) | |
The Master (2012) | |
Licorice Pizza (2021) | |
Dead Snow (2009) | |
Saw (2004) | |
Pearl (2022) | |
Decision To Leave (2022) | |
Moneyball (2011) | |
The Menu (2022) |
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
iex(1)> fib = Stream.resource(fn -> {1, 1} end, fn {a, b} -> {[a], {b, a + b}} end, fn _ -> nil end) | |
#Function<55.117072283/2 in Stream.resource/3> | |
iex(2)> fib |> Stream.drop(1_000_000) |> Enum.take(1) |> hd | |
316047687386689873445841912205309135498634108692606224172472108580534025848569370587890230652222526981847193617015721557536203552456068969866014863500715572554770147092754408476591962812151867770833598893606284783794751267655857868703498300911592852046591798998476142791189284321649128453120074513906823461458089546266348664774612038230972762871588830264026154213890485679867290129263139050605467325382187840381963213393604034259391700832520481403316741034200745983468857711205941315407009984361489998967030518893751545424742280777250153351359040899067081352966753335906525794668634061302595281686768458472563818660774905328897473529318190672071313898962519880309772296817195701701459901339907145886184677696388330384326382250596056087391789256033290135579319989071778642559224085888600122661003631519405786542501179 |
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 ChooseFrom do | |
defmacro __using__(options) do | |
Enum.map(options, fn {name, alphabet} -> | |
function_name = :"choose_#{name}" | |
chars = String.graphemes(alphabet) | |
build_alphabet(name, function_name, chars) | |
end) ++ [ | |
quote do | |
defp generate_minimums(chars, _options), do: chars |
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
#!/usr/bin/env python | |
import os | |
import sys | |
import numpy as np | |
import cv2 | |
FRAME_DELAY = int(sys.argv[1]) if len(sys.argv) > 1 else 30 | |
foreground = cv2.VideoCapture('glowy_eyes.gif') | |
background = cv2.VideoCapture('matrix.gif') |
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
// Requires Enhanced Steam Chrome Plugin | |
// Clicks Nth item (after skipping unsellable coupons/gems/etc...), causing ES to pop up Quick/Instant sell buttons | |
// Clicks on next item after ms_til_next milliseconds | |
function clickQuickSell(items_to_skip, ms_til_next) { | |
jQuery("div.item:not(.btn_disabled) a.inventory_item_link").eq(items_to_skip).click(); | |
setTimeout(function() { | |
clickQuickSell(items_to_skip, ms_til_next); | |
}, ms_til_next); | |
} |
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 TimeUtils do | |
@ms_filetime_offset 116444736000000000 | |
def filetime_to_unix(filetime) do | |
div(filetime - @ms_filetime_offset, 10000) | |
end | |
def unix_to_filetime(datetime) do | |
@ms_filetime_offset + (datetime * 10000) | |
end |
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 PdfObjectGrammar do | |
use Neotomex.ExGrammar | |
defp describe_object(o, prefix) do | |
IO.puts "#{prefix} received" | |
IO.inspect o | |
end | |
@root true | |
define :object, "bool / numeric_object / string_object / name / array / dictionary" |
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
for {base, name} <- (2..62 |> Enum.map(&({&1, "Base#{&1}" |> String.to_atom}))) do | |
# NOTE: Modules will be named :Base2, :Base3, ..., :Base62 | |
defmodule name do | |
@moduledoc """ | |
Automatically generated #{name} encode/decode functions | |
""" | |
@base base | |
@alphabet [?0..?9, ?a..?z, ?A..?Z] | |
|> Enum.flat_map(fn x -> x end) | |
|> to_string |
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
/// <summary> | |
/// Given a password and salt string, along with an algorithm (MVC4 defaults to HMACSHA256), calculates the password's | |
/// hash value as stored in the DB. | |
/// </summary> | |
/// <param name="password">Plaintext password</param> | |
/// <param name="salt">Base64 string containing user's salt value</param> | |
/// <param name="hashingAlgorithm">Known .NET crypto algorithm name. Defaults to MVC4's default of HMACSHA256.</param> | |
/// <returns>Base64-encoded password hash string</returns> | |
/// <exception cref="CryptographicException">If hashingAlgorithm is unknown to .NET</exception> | |
private string HashPassword(string password, string salt, string hashingAlgorithm = "HMACSHA256") { |
NewerOlder