Skip to content

Instantly share code, notes, and snippets.

View jjant's full-sized avatar
💥
λ

Julian Antonielli jjant

💥
λ
View GitHub Profile
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
nix-darwin = {
@jjant
jjant / ui.rs
Created December 27, 2021 13:23
use bevy::ecs::system::{IntoSystem, System};
use bevy::math::Rect;
use bevy::prelude::{
AssetServer, Assets, BuildChildren, ChildBuilder, Color, ImageBundle, NodeBundle, Res, ResMut,
TextBundle, VerticalAlign,
};
use bevy::sprite::ColorMaterial;
use bevy::text::{Text, TextAlignment, TextStyle};
use bevy::ui::{AlignContent, AlignItems, FlexWrap, JustifyContent, PositionType};
use bevy::{
@jjant
jjant / Lang.elm
Created July 5, 2021 17:51
linear types in elm v1
module Lang exposing (..)
import Dict exposing (Dict)
import Type exposing (..)
type Lit
= IntLit Int
| CharLit Char
module Main where
import qualified Data.List as List
import System.Environment
import System.IO
-- | Remove duplicates in sorted (descending order) list
dedupe :: [Int] -> [Int]
dedupe [] = []
dedupe (x : xs) = reverse $ dedupeX [] x xs
@jjant
jjant / config.js
Created August 5, 2020 21:21
Make elm use a div rather than the body
{
module: {
// ... other config
// We run this after compiling our elm code, you might have to modify this a bit
rules: [
{
test: /elmApp.js$/,
exclude: [/elm-stuff/, /node_modules/],
loaders: [
(function(scope){
'use strict';
function F(arity, fun, wrapper) {
wrapper.a = arity;
wrapper.f = fun;
return wrapper;
}
function F2(fun) {
multiply a b = a * b
double num = multiply num 2
greet name =
if name == "" then
"Hello world!"
else
"Hi " ++ name ++ "!"
@jjant
jjant / mut.hs
Created August 30, 2019 15:30
mutate leaves of tree
{-# LANGUAGE ScopedTypeVariables, DeriveFunctor, DeriveTraversable,
DeriveFoldable #-}
import Data.Foldable (traverse_)
import qualified Data.IORef as IORef
import Data.IORef (IORef)
data AST ident
= Var ident
| Lam ident
@jjant
jjant / hlist.hs
Last active March 17, 2019 01:16
{-# LANGUAGE TypeOperators, GADTs, DataKinds, KindSignatures #-}
import Data.Kind (Type)
data HList :: [Type] -> Type where
Empty :: HList []
HCons :: t -> HList ts -> HList (t ': ts)
myTuple2 :: HList '[Int, String] -- Analogous to (Int, String)
myTuple2 = HCons 2 (HCons "Hi!" Empty)

Guía introductoria a CodeMentor, por Marcos Casagrande (@marcosc90)

¿Que es CodeMentor?

Plataforma para freelancers.

Siempre que se hable de precio en esta guía será en USD

¿Qué lo diferencia de Upwork/Freelancer etc?