Skip to content

Instantly share code, notes, and snippets.

import {
Accordion,
AccordionItem,
AccordionItemProps,
AccordionProps,
ComponentWithAs,
ExpandedIndex,
forwardRef,
SystemStyleObject,
} from "@chakra-ui/react";
@n1xx1
n1xx1 / entry.client.tsx
Created December 23, 2021 09:22
Remix With Helmet and Chakra-UI
import { ChakraProvider } from "@chakra-ui/react";
import { hydrate } from "react-dom";
import { RemixBrowser } from "remix";
hydrate(
<ChakraProvider>
<RemixBrowser />
</ChakraProvider>,
document.getElementById("wrapper")
);
@n1xx1
n1xx1 / webpack.config.js
Last active September 12, 2019 00:47
Alt:V webpack configuration
const WrapperPlugin = require('wrapper-webpack-plugin');
const path = require("path");
const resolve = require("resolve");
const notResolved = {};
const CONFIG = module.exports = {
mode: "development",
devtool: "",
entry: {
@n1xx1
n1xx1 / main.rs
Created January 29, 2019 02:00
Rust return generic Iterator
fn wrap_vec<'a, T>(v: &'a Vec<T>) -> impl Iterator<Item = String> + 'a where T: std::fmt::Display {
v.iter().map(|s| format!("<{}>", s))
}
fn main() {
let a = vec!["a", "b", "c"];
for s in wrap_vec(&a) {
println!("{}", s);
}
@n1xx1
n1xx1 / MyThing.cs
Last active December 9, 2018 17:50
public class MyThing {
private void DebugDrawLine(Vector4 a, Vector4 b) {
a = a / a.w;
b = b / b.w;
Gizmos.DrawLine(new Vector3(a.x, a.y), new Vector3(b.x, b.y));
}
private void DebugDrawPolygon(List<Vector4> poly) {
for (int i = 0; i < poly.Count; i++) {
package it.inrebus.skyte.rtcclient;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Matrix;
import android.graphics.Paint;
import android.opengl.GLES20;
import android.opengl.GLUtils;
package it.inrebus.skyte.rtcclient;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import org.webrtc.JavaI420Buffer;
import org.webrtc.SurfaceTextureHelper;
macro_rules! linq {
(from ($from:expr) $fromident:ident select ($($select:expr), +) where ($where:expr)) => {{
let mut vec = Vec::new();
for $fromident in &($from) {
if $where {
vec.push(( $( $select ), * ));
}
}
vec
}};
<!DOCTYPE html>
<html>
<head>
<title>Calcola biglietto</title>
</head>
<body>
<form action="http://requestb.in/veydfzve" method="POST">
Cognome: <input name="cognome" value="{{info.cognome if info.post else ''}}"><br>
Nome: <input name="nome" value="{{info.nome if info.post else ''}}"><br>
Numero Persone: <input name="num" value="{{info.num if info.post else ''}}"><br>

Keybase proof

I hereby claim:

  • I am n1xx1 on github.
  • I am n1xx1 (https://keybase.io/n1xx1) on keybase.
  • I have a public key whose fingerprint is A6B4 186F 5308 92F7 8BEB E95F B973 78AD 2375 778D

To claim this, I am signing this object: