π§βπ»
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
vim.g.mapleader = "," | |
vim.g.maplocalleader = "," | |
vim.g.have_nerd_font = true | |
-- ====================================================================== | |
-- ========================== Basic Options ============================= | |
-- ====================================================================== | |
-- Set leader key. | |
vim.opt.updatetime = 250 | |
vim.opt.undofile = true |
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
package main | |
import ( | |
"fmt" | |
"log" | |
"github.com/panjf2000/gnet/v2" | |
) | |
func main() { |
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
package server | |
import ( | |
"context" | |
"log" | |
"time" | |
"github.com/panjf2000/gnet/v2" | |
) |
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
/// An expression that can be evaluated using eval(). | |
#[derive(Debug, Clone, PartialEq, PartialOrd)] | |
pub enum Expr { | |
// Atoms - These evaluate to themselves. | |
Null, | |
Bool(bool), | |
Int(i64), | |
Float(f64), | |
// Eval types - These require logic for evaluation. |
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
use std::collections::HashMap; | |
use strum_macros::Display; | |
/// EvalErr is returned by eval() if evaluation fails. | |
#[derive(Debug)] | |
pub enum EvalErr { | |
WrongExpr { wanted: Expr, got: Expr }, | |
WrongArity { wanted: usize, got: usize }, | |
UnknownSymbol { symbol: String }, | |
NotInvokable { got: Expr }, |
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
version: '3.2' | |
services: | |
aerospike: | |
image: aerospike:ee-6.3.0.4_1 | |
ports: | |
- "3000:3000" | |
volumes: | |
- type: "bind" | |
source: "./volumes/aerospike/data" |
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
curl https://ducky-afkqinpvla-uc.a.run.app/v1/search \ | |
-d '{"text": "link"}' \ | |
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoiUmFodWwiLCJlbWFpbCI6ImJhbnNhbC5yYWh1bDE0QGdtYWlsLmNvbSIsInN1YiI6ImQ1ZTlkNGY0ZTllNmIzOWQ5MTY3ODRiNjAxZTQ4MTZlIiwiZXhwIjoxNjY0ODgxMjQ0LCJpYXQiOjE2NjQ3OTQ4NDR9.fVQ1duy8RpLB5XBe1uJ2vz6QwZw7KHSw4de3KIXlTec" |
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
package main | |
import ( | |
"encoding/json" | |
"log" | |
"net/http" | |
"github.com/gorilla/mux" | |
) |
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
format = """ | |
$directory($rust$package$golang$python$ruby$git_branch$git_status$git_state$status)$cmd_duration$character | |
""" | |
scan_timeout = 10 | |
add_newline = false | |
[cmd_duration] | |
min_time = 500 | |
format = "( π [$duration](bold yellow))" |
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
opposites = { | |
")": "(", | |
"]": "[", | |
"}": "{", | |
} | |
def check(s): | |
stack = [] | |
for c in s: |
NewerOlder