Skip to content

Instantly share code, notes, and snippets.

View unsign3d's full-sized avatar
🏠

Luca Bruzzone unsign3d

🏠
View GitHub Profile
@unsign3d
unsign3d / MergeSort.java
Created March 15, 2013 17:43
recursive merge sort in java, just for study
import java.util.Arrays;
public class MergeSort{
public static void main(String[] args) {
int a[]= { 5, 7, 2, 8, 11, 34, 2, 0, 7};
System.out.println("Prima: "+Arrays.toString(a)+"\n");
merge_sort(a);
System.out.println("Dopo: "+Arrays.toString(a));
@unsign3d
unsign3d / SpaceDuino.ino
Created April 7, 2013 18:17
Just an arduino's demo of a space shooter in a 16x2 lcd display
#include <LiquidCrystal.h>
byte nave_t[8] = {
B01000,
B11100,
B11110,
B01111,
B11110,
B11100,
B01000,
#!/usr/bin/env ruby
# Head ends here
def displayPathtoPrincess(m,grid)
#find the princess
mid = (m/2).ceil + 1
man = [mid,mid]
m -=1
if grid[0][0] == 'p'
#walk up
@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);
@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

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:

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'
@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;
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 = {
import React from 'react'
import {AppContextConsumer} from './AppContext'
const connect = (consumer, mapContextToProps = () => ({})) => (
<AppContextConsumer>{(context) => (
React.createElement(consumer, mapContextToProps(context))
)}
</AppContextConsumer>
)