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
using System; | |
using System.Threading; | |
using System.IO; | |
using System.Data.Linq; | |
using System.Linq; | |
using System.Collections.Generic; | |
using System.Security.Cryptography; | |
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 <string.h> | |
#include <stdint.h> | |
#include <inttypes.h> | |
const char input[] = "^^^^......^...^..^....^^^.^^^.^.^^^^^^..^...^^...^^^.^^....^..^^^.^.^^...^.^...^^.^^^.^^^^.^^.^..^.^"; | |
//const char input[] = ".^^.^.^^^^"; | |
const uint64_t nrows = 100000000000; |
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
#!/bin/bash | |
# Script to automate the stuff in http://www.raspibo.org/wiki/index.php/Compile_the_Linux_kernel_for_Chip:_my_personal_HOWTO | |
IP=192.168.0.24 | |
MYDIR=`pwd` | |
BUILD_DIR=`pwd`/build | |
KVER=4.3.0bizarrefish+ | |
set -e |
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
/* Tries to find the shortest path to G */ | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <stdbool.h> | |
#define WIDTH 10 | |
#define HEIGHT 10 | |
const char grid[][WIDTH] = |
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
local fishStringL = "<'((>-<"; | |
local fishStringR = ">-<))'>"; | |
local fishLength = 7; | |
local foodDist = 5; | |
-- A float between -1 and 1 | |
local randFloat = function() | |
return math.random(-100, 100) / 100; |
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
// void print_hex(unsigned char num); | |
.data | |
buff: | |
.ascii "0x00\n" | |
.global print_hex | |
.text | |
print_hex: | |
mov %rdi,%rax |
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 <unistd.h> | |
#include <memory.h> | |
void step(char *state, size_t len, char rule) | |
{ | |
/* Buffer large enough to hold all bits */ | |
char state_copy[len]; |
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 <stdint.h> | |
#include <assert.h> | |
#include <memory.h> | |
uint8_t get_bits(uint8_t *in_base, size_t start_bit, size_t n_bits) | |
{ | |
size_t split = start_bit % 8; | |
uint8_t *base = &in_base[start_bit/8]; |
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 <stdint.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <unistd.h> | |
#include <sys/types.h> | |
#include <sys/stat.h> | |
#include <fcntl.h> | |
#include <signal.h> |
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
#!/bin/bash | |
# Usage: | |
# fake_dns 12.23.45.67 fakedomain.com <program> [args...] | |
set -e | |
IP=$1 | |
HOST=$2 | |
shift 2 |