Skip to content

Instantly share code, notes, and snippets.

View uriannrima's full-sized avatar

Luciano Lima uriannrima

  • Lisbon, Portugal
View GitHub Profile
@tangentstorm
tangentstorm / sh.mjs
Last active May 20, 2024 08:49
shorthand javascript
// sh.mjs: javascript shorthand
// array helpers (apl/j/k)
export const id=x=>x
export const af=(n,x)=>Array(n).fill(x) // TODO: make this 'afl' or 'fil' (aa?)
export const ii=(n,f)=>{for(let i=0;i<n;i++)f(i)}
export const im=(n,f)=>af(n,0).map((_,i)=>f(i))
export const ia=(n,f)=>im(n,id)
export const at=(a,ixs)=>ixs.map(i=>a[i])
export const io=(xs,ys)=>ys.map([].indexOf.bind(xs))
@sebastiancarlos
sebastiancarlos / bible.json
Created August 22, 2022 16:39
New Revised Standard Version Updated Edition (NRSVUE) of the Bible in JSON
This file has been truncated, but you can view the full file.
{
"Old Testament": {
"Genesis": {
"1": {
"1": "¹ When God began to create the heavens and the earth, ",
"2": "² the earth was complete chaos, and darkness covered the face of the deep, while a wind from God swept over the face of the waters. ",
"3": "³ Then God said, “Let there be light,” and there was light. ",
"4": "⁴ And God saw that the light was good, and God separated the light from the darkness. ",
"5": "⁵ God called the light Day, and the darkness he called Night. And there was evening and there was morning, the first day. \n",
"6": "⁶ And God said, “Let there be a dome in the midst of the waters, and let it separate the waters from the waters.” ",
// This file is based on the code from the ASP.NET Core repository
// https://github.com/aspnet/AspNetCore/tree/master/src/Middleware/SpaServices.Extensions/src
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Net;
@kuanee
kuanee / example_form.jsx
Last active October 12, 2020 11:51
Using Joi Validation with redux-form
import createValidator from 'joi_redux_form.js';
import { reduxForm } from 'redux-form';
const schema = {
name: Joi.string().required(),
description: Joi.string().required(),
};
function ExampleForm(props) {
return (
@MarcDiethelm
MarcDiethelm / Contributing.md
Last active July 6, 2024 13:12
How to contribute to a project on Github

This text now lives at https://github.com/MarcDiethelm/contributing/blob/master/README.md. I turned it into a Github repo so you can, you know, contribute to it by making pull requests.


Contributing

If you want to contribute to a project and make it better, your help is very welcome. Contributing is also a great way to learn more about social coding on Github, new technologies and and their ecosystems and how to make constructive, helpful bug reports, feature requests and the noblest of all contributions: a good, clean pull request.

@jed
jed / LICENSE.txt
Created May 20, 2011 13:27 — forked from 140bytes/LICENSE.txt
generate random UUIDs
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Jed Schmidt <http://jed.is>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE