Skip to content

Instantly share code, notes, and snippets.

View elliptic-shiho's full-sized avatar

Shiho Midorikawa elliptic-shiho

View GitHub Profile
var r2a = function(x) {
return x.match(/#?([0-9a-fA-F]{1,2})([0-9a-fA-F]{1,2})([0-9a-fA-F]{1,2})/)
.map(function(a) {
return parseInt(a, 16);
}).splice(1);
};
// r2a("#0c0c0c") -> [12, 12, 12]
@elliptic-shiho
elliptic-shiho / rotate.pde
Created July 30, 2015 10:23
My First Processing
float theta = 0;
float sh = 0;
float[] rotate(int a, int b) {
float c = cos(theta);
float s = sin(theta);
return mat(a, b, c, -s, s, c);
}
float[] mat(float a, float b, float A, float B, float C, float D) {
console.log(process.argv.splice(2).map(function(d){return parseInt(d)}).reduce(function(x,y){return x+y}));
console.log(require('fs').readFileSync(process.argv[2]).toString().replace(/[^\n]/g,"").length);
require('fs').readdir(process.argv[2],function(e,d){console.log(d.filter(function(x){return x.match(/^[^\.].+\.md$/)}).join("\n"))});
module.exports=function(p,m,c){require('fs').readdir(p,function(e,d){if(e!==null){return c(e,null)}c(null,d.filter(function(x){b=x.lastIndexOf("."+m);return b>=0&&b==x.length-m.length-1}))})};

#verilogまとめ

モジュール単位で色々まとまってる -> モジュール毎にIOポート的アレがある {}ではなくbegin-end

module TEST(IOPORT);
~
endmodule
@elliptic-shiho
elliptic-shiho / geteip.c
Last active June 5, 2016 19:03
seccamp 2015 専門講義15-16 「仮想化技術を用いたマルウェア解析」 講義課題(https://github.com/ntddk/blue/ をOllyDbg 1.10上で実行し、FLAGを出すDECAFプラグインの作成) https://github.com/ntddk/geteip/ を参考に作成 Lv3まで
#include "DECAF_types.h"
#include "DECAF_main.h"
#include "DECAF_callback.h"
#include "DECAF_callback_common.h"
#include "vmi_callback.h"
#include "utils/Output.h"
#include "DECAF_target.h"
#include "hookapi.h"
static plugin_interface_t geteip_interface;
@elliptic-shiho
elliptic-shiho / options.txt
Created September 9, 2015 15:04
ffmpeg compile option(2015/09/10)
../configure --enable-gpl --enable-nonfree --enable-version3 --disable-static --enable-shared --enable-fontconfig --enable-libaacplus --enable-libcdio --enable-libfaac --enable-libfdk-aac --enable-libfreetype --enable-libgsm --enable-libmp3lame --enable-libnut --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libpulse --enable-librtmp --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libxvid --enable-x11grab --extra-cflags="-mtune=core2 -ftree-vectorize -O2"
eshiho@eshiho-V5-171 ~/prog/ffmpeg-2.8/build
$ ffmpeg -version
ffmpeg version 2.8 Copyright (c) 2000-2015 the FFmpeg developers
built with gcc 4.8 (Ubuntu 4.8.4-2ubuntu1~14.04)
configuration: --enable-gpl --enable-nonfree --enable-version3 --disable-static --enable-shared --enable-fontconfig --enable-libaacplus --enable-libcdio --enable-libfaac --enable-libfdk-aac --enable-libfreetype --enable-libgsm --enable-libmp3lame --enable-libnut --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libpulse --enable-librtmp --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libxvid --enable-x11grab --extra-cflags='-mtune=core2 -ftree-vectorize -O2'
libavutil 54. 31.100 / 54. 31.100
libavcodec 56. 60.100 / 56. 60.100
libavformat 56. 40.101 / 56. 40.101
libavdevice 56. 4.100 / 56. 4.100
libavfilter 5. 40.101 / 5. 40.101