This file contains 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/sh | |
BACKUP_ROOT=/mnt/backup | |
now=$(date +%s) | |
readable=$(date -d $now +%F) | |
backup_name="${readable}-${now}" | |
mount /mnt/backup |
This file contains 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> | |
%} | |
%option noyywrap | |
IDENTIFIER [a-zA-ZS+=][a-zA-Z0-9+=]* | |
DIGIT [0-9] | |
LPAREN \( | |
RPAREN \) |
This file contains 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 Array | |
def values_at(*args) | |
arr = [] | |
each_index do |i| | |
if args_include_index?(args, i) or (block_given? and yield(i)) | |
arr << self[i] | |
end | |
end | |
arr |
This file contains 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 <sys/stat.h> | |
#include <unistd.h> | |
#include <fcntl.h> | |
int main(int argc, char* argv[]) | |
{ | |
char c; | |
int fd; | |
FILE* file; |
This file contains 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
- | |
- setSubClasses | |
- | |
'Virtual Machine': 'FOI\Crate\CommonBundle\Entity\VirtualMachine' | |
'Honeypot Machine': 'FOI\Crate\CommonBundle\Entity\VirtualHoneypot' | |
'Physical Machine': 'FOI\Crate\CommonBundle\Entity\PhysicalMachine' |
This file contains 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 <stdlib.h> | |
#include <stdio.h> | |
#include <fcntl.h> | |
#include <sys/types.h> | |
#include <sys/stat.h> | |
#include <gtest/gtest.h> | |
#include <scanner.h> | |
extern FILE* yyin; |
This file contains 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
#ifndef KOMP_STRING_H | |
#define KOMP_STRING_H | |
#include <iostream.h> | |
// | |
// Note that the implementation of this class is rather inefficient. | |
// When operating on strings and character pointers, this | |
// implementation will create a lot of temporary objects. By |
This file contains 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
std::ostream& ShortSymbols(std::ostream& o) | |
{ | |
SymbolInformation::outputFormat = SymbolInformation::kShortFormat; | |
return o; | |
} | |
std::ostream& LongSymbols(std::ostream& o) | |
{ | |
SymbolInformation::outputFormat = SymbolInformation::kFullFormat; | |
return o; |
This file contains 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
#ifndef _SCHEMESE_SCANNER_H_ | |
#define _SCHEMESE_SCANNER_H_ | |
#include <iostream> | |
#include <vector> | |
#include <string> | |
namespace Schemese { | |
/* |
This file contains 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
(define (eval-dolist exp env) | |
(let ((lst (eval (dolist-listexpr exp env))) ; evaluate the list | |
(startval (eval (dolist-resultvar exp env)))) ;evaluate the resultvar | |
(define (dolist-iteration lst result) | |
(if (null? lst) | |
result | |
(dolist-iteration | |
(rest lst) | |
(apply-%scheme | |
(eval-%scheme (make-lambda (list (dolist-variable exp) lst (dolist-resultvar exp)) |
OlderNewer