Skip to content

Instantly share code, notes, and snippets.

View luizperes's full-sized avatar

Luiz Fernando Peres luizperes

  • Simon Fraser University
  • Vancouver, BC
View GitHub Profile
//
// AppDelegate.m
// UITests
//
// Created by Luiz Fernando Peres on 2016-02-23.
// Copyright © 2016 Ideia do Luiz. All rights reserved.
//
#import "AppDelegate.h"
#import "ViewController.h"
//
// BEENewGameView.m
// beezy-bee
//
// Created by Hiroshi on 1/27/16.
// Copyright © 2016 Ideia do Luiz. All rights reserved.
//
#import "BEENewGameView.h"
#import "BEESessionHelper.h"
@luizperes
luizperes / io.c
Last active July 10, 2016 19:33
Gist for syntax highlight in brain
#include <stdio.h>
#include <termios.h>
#include <unistd.h>
// you can overwrite those functions! :)
void b_putchar(int idx, int *cells);
#define KNRM "\x1B[0m"
#define KRED "\x1B[31m"
this code stops when the user press the space key
the only chars accepted are the brain chars | tabs and spaces
[65][65][32] continue loop
[32][32][32] end program
+ add one to the 0th cell to start the while
[ while (true)
, read input at 1st cell
#include <stddef.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/types.h>
#include <signal.h>
#include <stdio.h>
#define PROGRAM "docker run jaca -a google -u username -p password -l 'Vancouver, British Columbia' -m all -w 25 -c 0"
++++++++++ make number 10 at cell 0
>+++*++ make number 32 at cell 1
>+*>+*>+*>+*>+*>+*> make number 32 from cell 2 to 7
<<<<<<%++*+ make number 65 at cell 2
>>>%<%+++*>+*+<------ make number 90 at cell 4 and 97 at cell 5
>>>%++++*------ make number 122 at cell 7
<<<----. print 'V'
>++++++++. print 'i'
>>-------. print 's'
// Your project is amazing. Thanks for it. Here goes my considerations:
/* The first thing that called my attention was that you had 4 warnings on your project.
* I want you to understand that warnings are in fact possible future runtime errors, thus
* we need to try to solve them before shipping a product.
*
* After that, one other thing that I saw as I opened your project was that you did not quite
* choose good names for your different files. I am saying that because they are arranged as
* function names, for example: Start_Game.c should call main.c, or only game.c, as the names
* should be easy to be identified by any programmer. Other example would be the 'Print_Matrix.c',
#include <ncurses.h>
#include <stdlib.h>
#include <unistd.h>
typedef char sprite[8];
typedef struct
{
sprite *s;
int x;
package main
import (
"bytes"
"fmt"
)
const (
READ_KEY = 1
READ_VALUE = -1
#include <stdio.h>
#include <stdlib.h>
struct _Node {
int data;
struct _Node *next;
};
typedef struct _Node Node;