Skip to content

Instantly share code, notes, and snippets.

@AnaTofuZ
AnaTofuZ / texrepo
Last active July 13, 2016 13:14
texのスケルトン生成スクリプト
#!/bin/sh
#引数チェック
if [ $# -eq 3 ] ; then
filename=$1
pagetitile=$2
reportnumber=$3
else
echo "Usage: prompt > $0 filename title reportnumber"
@AnaTofuZ
AnaTofuZ / score.pl
Last active August 28, 2016 02:20
perl入学式 2. score.plのオプション課題も含めて
#!/usr/bin/env perl
use strict;
use warnings;
use Data::Dumper;
use utf8;
binmode STDOUT,":utf8";
my $alice = {
name => 'Alice',
@AnaTofuZ
AnaTofuZ / osmkdir
Created December 21, 2016 03:20
osmkdirするとディレクトリとpathを記述したhgrcを作り,mercurialにcloneするzsh関数
#OSmkdir{{{
osmkdir()
{
if [ $# -eq 0 ]; then
echo "missing arguments " 1>&2
exit 1
fi
#ここのSSHを変更してください
SSH=ssh://yomitan//home/hg/y15/e155730/OS/
### Keybase proof
I hereby claim:
* I am anatofuz on github.
* I am anatofuz (https://keybase.io/anatofuz) on keybase.
* I have a public key ASCUFSGTiUxBUZFHjP1aoEdppUbRXxdOlEtW9jc3wFwPlwo
To claim this, I am signing this object:
#!/usr/bin/env perl
sub hoge {
print $foo{"hoge"};
}
$foo{"hoge"} = "inu";
do hoge();
#define __environment _CbC_environment
#define __return _CbC_return
#include "stdio.h"
#include "string.h"
#include <stdlib.h>
__code fizzbuzz(int,int,__code(),void*);
__code say2(int,int,char*,__code(),void*);
__code fizz(int,int,__code(),void*);
@AnaTofuZ
AnaTofuZ / Summary_of_os_study.md
Last active October 1, 2018 23:44
OS勉強会のまとめ
extern int printf(const char *,...);
int *f() {
int i = 6;
printf("in f %d\n", i);
printf("in f %p\n", &i);
return &i;
}
int *g() {
use strict;
use warnings;
while (my $line = <DATA>){
if ($line =~ /(<h2(.*?)>(.*?)<\/h2>)|(<p pno=(.*?)>(.*?)<\/p>)/){
print "$1\n";
}
}
__DATA__
@AnaTofuZ
AnaTofuZ / Dockerfile
Last active June 16, 2019 11:36
hatena-summer-intern-2019
FROM anatofuz/perl-1.0:latest
COPY ./perl_1.pl /
ENTRYPOINT ["/usr/local/bin/perl","/perl_1.pl"]