Skip to content

Instantly share code, notes, and snippets.

@MasWag
MasWag / Makefile
Created June 22, 2015 10:43
演習3のslideを作成するためのMakefile.geeknoteを使ってevernoteからmarkdownを作ってpandocでbeamerにしてpdfにする。handoutも作れる。
MDS = 0624.md
TEXS = $(MDS:%.md=%.tex)
DVIS = $(MDS:%.md=%.dvi)
PDFS = $(MDS:%.md=%.pdf)
NUP_PDFS = $(PDFS:%.pdf=%-nup.pdf)
TEX = platex
dvi: $(DVIS)
pdf: $(PDFS)
@MasWag
MasWag / tint2rc
Created September 28, 2015 13:20
# Tint2 config file
# Generated by tintwizard (http://code.google.com/p/tintwizard/)
# For information on manually configuring tint2 see http://code.google.com/p/tint2/wiki/Configure
# Background definitions
# ID 1
rounded = 7
border_width = 2
background_color = #000000 60
border_color = #FFFFFF 16
@MasWag
MasWag / git-submodule-rm
Created December 11, 2012 03:00
removing git submodule
#!/bin/sh
#This script removes a submodule of git.
#All you have to do is to put this script to a pathed directiry, and type `git submodule-rm <submodule>`
#(You may have to type `chmod +x git-submodule-rm`) :P
if [ $# -ne 1 ] ; then
echo "usage: git submodule-rm <submodule>";
echo "No submodule specified, no submodule removed." 1>&2;
exit 1;
fi
@MasWag
MasWag / psudo-code.tex
Created October 26, 2015 04:00
sample of psudo code in latex
\documentclass{article}
\usepackage{algorithm}
\usepackage{algorithmic}
\begin{document}
\begin{algorithm}
\caption{Calculate $y = x^n$}
\label{alg1}
\begin{algorithmic}
\REQUIRE $n \geq 0 \vee x \neq 0$
\ENSURE $y = x^n$
@MasWag
MasWag / setblightness
Created November 6, 2015 04:24
script to change blightness with fixed ratio
#!/bin/bash
# -*- sh -*-
xbacklight = $(echo $(xbacklight) $1 $2 | bc)
@MasWag
MasWag / .bashrc
Last active November 17, 2015 06:31
.bashrc of patchouli
#
# ~/.bashrc
#
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
alias ls='ls --color=auto'
PS1='[\u@\h \W]\$ '
export EDITOR=emacsclient

今週の進捗とか

Zeptmeter

  • 生きた
  • DRAM controllerの動作確認の用意を進めた
  • SDRAM testerを作った
  • がtesterの動作確認がC++でもまだ
@MasWag
MasWag / PKGBUILD
Created November 27, 2015 03:47
PKGBUILD of open usp tukubai
pkgname=open-usp-tukubai
pkgver=2014061402
pkgrel=1
pkgdesc="An open source version of shell commands usp Tukubai."
arch=('any')
url="https://uec.usp-lab.com/TUKUBAI/CGI/TUKUBAI.CGI"
license=('MIT')
depends=('python')
source=("https://uec.usp-lab.com/TUKUBAI/DOWNLOAD/open-usp-tukubai-2014061402.tar.bz2")
pkgdir=/usr/
#!/bin/bash
if [[ "$1" = "" ]]; then
echo "usage : bash $0 [assembly-name]"
else
IFS=$'\n'
BAK="$1~"
PC=0
mv "$1" $BAK
for l in $(cat $BAK); do
@MasWag
MasWag / emit.awk
Last active November 28, 2015 00:22
#!/usr/bin/awk -f
BEGIN {
PC="0";
}
!/\.text|\.data|\.globl|\.long|:|^[\ \t]*#/{
$0 = $0" # "PC;
PC++;
};
{print};