This file contains hidden or 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
| [Adblock Plus 2.0] | |
| ! Title: cbs adblock | |
| ! Version: 1 | |
| ! Expires: 1 days | |
| ! cbs https://adblockplus.org/forum/viewtopic.php?f=2&t=21002&sid=44caa2415db4ba23cdd8bd503379dd03&start=390#p150134 | |
| @@||pubads.g.doubleclick.net/gampad/ads?*rule=$domain=cbs.com | |
| @@|http://$xmlhttprequest,image,domain=cbs.com | |
| @@/adblock$domain=cbs.com | |
| @@||ifmnwi.club$domain=cbs.com |
This file contains hidden or 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
| defp html_encode(text) do | |
| [_ | xml] = :xmerl.export_simple([{:xmlText, [], 0, [], text, :text}], :xmerl_xml) | |
| :erlang.iolist_to_binary(xml) | |
| end |
This file contains hidden or 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
| -module(encode_uri_rfc3986_binary). | |
| -author('Renato Albano <[email protected]>'). | |
| -author('JLarky <[email protected]>'). | |
| -export([encode/1]). | |
| %% Taken from <http://erlangexamples.com/>, | |
| %% from <http://github.com/CapnKernul/httparadise> | |
| %% and <http://www.erlang.org/doc/man/edoc_lib.html> |
This file contains hidden or 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
| // import GraphemeSplitter = require("grapheme-splitter"); | |
| // console.log((new GraphemeSplitter()).splitGraphemes("🌷🎁💩😜👍🏳️🌈")); | |
| declare module 'grapheme-splitter' { | |
| class GraphemeSplitter { | |
| constructor(); | |
| public splitGraphemes(input: string): string[]; | |
| public countGraphemes(input: string): number; | |
| } |
This file contains hidden or 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
| // like typesafe-actions | |
| export type AnyAction<T extends string, A> = A & { | |
| type: T; | |
| }; | |
| export function createAction<T extends string, P, AC extends (...args: any[]) => AnyAction<T, P>>( | |
| type: T, | |
| map: AC | |
| ): AC & { type: T } { |
This file contains hidden or 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
| export type Left<L> = { left: L }; | |
| export type Right<R> = { right: R }; | |
| export type Either<L, R> = Left<L> | Right<R>; | |
| export function isLeft<L, R>(value: Either<L, R>): value is Left<L> { | |
| return "left" in value; | |
| } | |
| export function isRight<L, R>(value: Either<L, R>): value is Right<R> { | |
| return "right" in value; |
This file contains hidden or 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
| var fs = require("fs"); | |
| var path = require("path"); | |
| var pdf2img = require("pdf2img-lambda-friendly"); | |
| var input = __dirname + "/test.pdf"; | |
| pdf2img.setOptions({ | |
| type: "png", // png or jpg, default jpg | |
| density: 600, // default 600 | |
| outputdir: __dirname + path.sep + "output", // output folder, default null (if null given, then it will create folder name same as file name) |
This file contains hidden or 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
| $$(".s-search-results .s-result-item").map(x => {try{const name = x.querySelector(".a-price").parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.previousElementSibling.innerText.split("\n")[0]; const v = parseInt(name.replace(/(.*) ([0-9+]+)[TG]B(.*)/, '$2')); const p = parseFloat(x.querySelector(".a-price .a-offscreen").innerText.replace("$", "")); return {name, s: p/v, p, v}} catch(e) {return {}}}).sort((a,b) => a.s - b.s) | |
| // OR | |
| $$(".s-search-results .s-result-item") | |
| .map(x => { | |
| try { | |
| const name = x | |
| .querySelector(".a-price") | |
| .parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.previousElementSibling.innerText.split( |
This file contains hidden or 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 Console.Implementation do | |
| defmacro __using__(_opts) do | |
| quote do | |
| @not_set :this_parameter_was_NoT_set | |
| require Logger | |
| def f(args) do | |
| values = Enum.take_while(args, &(&1 != @not_set)) | |
| values = Enum.map(values, &Kernel.inspect/1) | |
| Enum.join(values, ", ") |
This file contains hidden or 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
| { stdenv, fetchurl, unzip }: | |
| # this is more stupid version of https://github.com/denoland/deno_install/blob/master/install.sh | |
| # Run this to get last version: | |
| # curl -sSf https://github.com/denoland/deno/releases | grep denoland/deno/releases/downloa | grep -e x86_64-apple-darwin -e x86_64-unknown-linux-gnu | head -2 | |
| # based on https://qiita.com/kimagure/items/de2a4ff45dd8fe8be4b1 | |
| stdenv.mkDerivation rec { | |
| name = "deno-${version}"; |