Skip to content

Instantly share code, notes, and snippets.

View unsign3d's full-sized avatar
🏠

Luca Bruzzone unsign3d

🏠
View GitHub Profile
@unsign3d
unsign3d / circleci.yml
Created April 26, 2019 10:09
A simple circleci config for building and deploy a parcel build
# Javascript Node CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-javascript/ for more details
#
version: 2
jobs:
build:
docker:
# specify the version you desire here
- image: circleci/node:10.15
import React from 'react';
const Cat = ({name, family}) => (
<div>
<p>I'm a cat and my name is {name} <br /> and my family is {family}</p>
</div>
)
export default Cat
import connect from '../connect'
import Cat from './Cat'
const mapContextToProps = (props) => (context) => ({
name: props.name,
family: context.data.family
})
const ConnectedCat = (props) => (connect(Cat, mapContextToProps(props)))
import React from 'react'
import {AppContextConsumer} from './AppContext'
const connect = (consumer, mapContextToProps = () => ({})) => (
<AppContextConsumer>{(context) => (
React.createElement(consumer, mapContextToProps(context))
)}
</AppContextConsumer>
)
import React from 'react'
const AppContext = React.createContext({})
export class AppContextProvider extends React.Component {
constructor(props) {
super(props)
this.updateState = this.updateState.bind(this)
this.state = {
@unsign3d
unsign3d / kata.test.js
Created September 15, 2017 13:58
kata from TDD workshop
// FUNCTION
const add = (input) => {
if (input=="")return 0;
input = input.substr(2,input.lenght);
var numbers=input.split(/\D+/g).map((num) => parseInt(num));
var sum = 0;
for (var i = 0; i < numbers.length; i++) {
sum += numbers[i];
}
return sum;
set nocompatible
set runtimepath+=~/.nvim/bundle/neobundle.vim/
call neobundle#begin(expand('~/.nvim/bundle/'))
NeoBundleFetch 'Shougo/neobundle.vim'
NeoBundle 'tpope/vim-fugitive'
NeoBundle 'sheerun/vim-polyglot'
NeoBundle 'tpope/vim-sensible'
NeoBundle 'mhinz/vim-signify'

Keybase proof

I hereby claim:

  • I am unsign3d on github.
  • I am unsigned (https://keybase.io/unsigned) on keybase.
  • I have a public key whose fingerprint is 0C01 DF63 ED2B 6760 8826 D79D FF7D 9F73 0203 8D72

To claim this, I am signing this object:

@unsign3d
unsign3d / rc4.rb
Last active August 29, 2015 13:56
rc4 not standard implementation
#!/usr/bin/env ruby
# simple RC4 implementation
# NO WARRANTY, IT COULD BE WRONG
def rc4 (str_key, str_plaintext)
## KSA
#holding key and plaintext
@unsign3d
unsign3d / hw.c
Created November 21, 2013 21:20
yolo_swag hello world
#include <stdio.h>
#include "swag.h"
so factorial(so n) {
yeah_bitch(n == 1) {
yolo n;
}
yolo n * factorial(n - 1);