This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var turn = 20; | |
on('start', function(){ | |
ship.ready(); | |
}); | |
on('turn', function(){ | |
//Show current life | |
utils.print('Life' + ship.life) | |
//Turn by 20deg |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import System.Environment | |
import Control.Applicative | |
check :: Int | |
check = -1 | |
type Nodeid = Int | |
type Node = Int | |
type Graph = [(Node, [Edge])] | |
data Edge = Edge { enid :: Nodeid | |
, eprice :: Int } deriving (Show) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
xsetroot -cursor_name left_ptr | |
xrdb ~/.Xdefaults | |
xmodmap ~/.Xmodmap | |
xcompmgr -c -l -8 -t -8 -o .50 -r 6 & | |
sleep 2 && (~/Dotfiles/Bin/8bitday.sh >> /tmp/8bitday.log 3>&1 &) | |
xrandr --output VGA1 --auto --above LVDS1 | |
exec /home/mgoszcz2/.cabal/bin/xmonad |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Data.Array | |
type Point = (Int, Int) | |
lo, hi :: Array Point Int -> Point | |
lo a = fst $ bounds a | |
hi a = snd $ bounds a | |
outOfBounds, emptyPoint, takenPoint :: Array Point Int -> Point -> Bool | |
outOfBounds a (x, y) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 3 | |
1 6 | |
2 10 | |
3 12 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <stdbool.h> | |
#include <string.h> | |
#include <limits.h> | |
#include <math.h> | |
//#define DEBUG | |
#define max(_a, _b) (_a > _b ? _a : _b) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
typedef struct Node { | |
struct Node *next; | |
int val; | |
} Node; | |
typedef struct { | |
int length; | |
Node *next; | |
} List; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <math.h> | |
#include <stdbool.h> | |
bool appToParis(unsigned self[3][2], unsigned len, unsigned val1, unsigned val2){ | |
unsigned i = 0; | |
for(i = 0; i<len; ++i){ | |
if((self[i][0] == val1 && self[i][1] == val2) || (self[i][0] == val2 && self[i][1] == val1)){ | |
return false; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <stdbool.h> | |
#define each(_a, _b) for (_a = 0; _a < _b; ++_a) | |
bool dow(int a, int b, int c, int x) { | |
return 0 == a*(x*x) + b*x + c; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdbool.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#define each(a, b) for (a = 0; a < b; ++a) | |
int a = 1; | |
char getValid(void) { | |
char a; | |