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
#!/usr/bin/env ruby | |
screens = `screen -ls` | |
screens.lines do |l| | |
if l =~ /\s+(\d+)\./ | |
puts "Attaching to screen #{$1}..." | |
`screen -x #{$1}` | |
exit 1 | |
end | |
end |
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
set PATH=%PATH%;"C:\Program Files\Java\jdk1.7.0_25\bin" |
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 <unistd.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <inttypes.h> | |
#include <string.h> | |
#include <fcntl.h> | |
#include <linux/fb.h> | |
#include <sys/mman.h> | |
#define RGB565(r, g, b) (uint16_t)(b|(g<<5)|(r<<11)) |
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 <avr/io.h> | |
void changeFrequency(unsigned int freq) | |
{ | |
int ocr = F_CPU/freq-1; | |
cli(); | |
TCCR1A = _BV(COM1A0); | |
OCR1A = ocr; | |
sei(); | |
} |
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
class HeaderType | |
attr_reader :header | |
ATTRS = {string: :string, int: :int, number: :int, integer: :int } | |
def initialize | |
@header = [] | |
end | |
# Define methods string, integer, etc., | |
# for schema definition dynamically | |
class_eval do | |
ATTRS.each do |attr, type| |
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 <stdint.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <ctype.h> | |
#define MKEY(size, keys) ((keys)|((size)<<5)) | |
#define MSIZE(m) ((m)>>5) | |
#define MSEQ(m) ((m)&0x1f) |
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
440 500 | |
495 500 | |
550 500 | |
586 500 | |
660 500 | |
733 500 | |
825 500 | |
880 500 |
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 <iostream> | |
#include <fstream> | |
#include <cstring> | |
namespace bfck { | |
#define BRAINFUCK_ARRAY_SIZE 30000 | |
void interpretFile(const char *); | |
void eval(int = 0); | |
char bfa[BRAINFUCK_ARRAY_SIZE]; | |
int bptr; |
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 <unistd.h> | |
int main(int argc, const char *argv[]) | |
{ | |
int i, j; | |
for (i = 0; i <= 100; i++) { | |
fprintf(stderr, "\rLoading ["); | |
for (j = 0; j < 100; j++) { | |
fprintf(stderr, "%c", (i > j) ? '=' : '-'); |
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
/* Totally patented by Ákos Kovács */ | |
#include <stdio.h> | |
void fizzbuzz(int n) | |
{ | |
int i; | |
char fb[][5] = { "Fizz", "Buzz", "%d" }; | |
for (i = 1; i <= n; i++) { | |
*((*fb)+4)=i%15?0x0:0x07; | |
printf(*(fb+(i%5?!!(i%3)*2:!!(i%3))), i); |