Skip to content

Instantly share code, notes, and snippets.

@mneko22
mneko22 / gdd.sh
Last active April 26, 2023 21:47
某開発部のロゴ猫を表示するスクリプトです。
#!/bin/sh
echo ""
echo -e "\e[0m  \e[48;5;162m \e[48;5;15m    \e[48;5;49m \e[0m           \e[48;5;162m \e[48;5;15m    \e[48;5;49m \e[0m"
echo -e "\e[0m  \e[48;5;162m \e[48;5;15m     \e[48;5;49m \e[0m         \e[48;5;162m \e[48;5;15m     \e[48;5;49m \e[0m"
echo -e "\e[0m  \e[48;5;162m \e[48;5;15m      \e[48;5;49m \e[0m       \e[48;5;162m \e[48;5;15m      \e[48;5;49m \e[0m"
echo -e "\e[0m  \e[48;5;162m \e[48;5;15m                   \e[48;5;49m \e[0m"
echo -e "\e[0m \e[48;5;162m \e[48;5;15m                    \e[48;5;49m \e[0m"
echo -e "\e[0m \e[48;5;162m \e[48;5;15m                     \e[48;5;49m \e[0m"
echo -e "\e[0m \e[48;5;162m \e[48;5;15m     \e[48;5;49m  \e[48;5;15m      \e[48;5;162m  \e[48;5;15m      \e[48;5;49m \e[0m"
@mneko22
mneko22 / main.go
Created April 4, 2020 15:43
typing game sample
package main
import (
"fmt"
"context"
"time"
"bufio"
"os"
)
func main() {
@mneko22
mneko22 / generate_ricty.sh
Last active September 26, 2019 11:03
generate_ricty
#!/bin/bash
currentdir=$(pwd)
tempdir=$(mktemp -d temp.XXXX)
function failDlFile () {
echo "Failed download fonts"
echo "clean tempolary directory"
cd $currentdir
rm -rf $tempdir
@mneko22
mneko22 / a.cpp
Last active February 20, 2019 00:29
class StudentSpec {
public:
int math;
int english;
StudentSpec *next;
StudentSpec(int english, int math, StudentSpec *next) {
this->english = english;
this->math = math;
this->next = next;
}
@mneko22
mneko22 / advent_article2.md
Created December 16, 2018 15:00
eshellのプロンプトにgitのカレントブランチ名を表示したい!

eshellのプロンプトにgitのカレントブランチ名を表示したい!

こんばんは.matusnekoです.

これはなにかの Advent Calendar 2018の16日目の記事です. https://adventar.org/calendars/3092

はてなのほうをまだ復旧させていないのでこちらに投稿します.

はじめに

@mneko22
mneko22 / advent_article1.md
Created December 11, 2018 14:12
弊学部生に送る,イケイケemacs入門

弊学部生に送る,イケイケemacs入門

こんばんは! この記事は,はてなブログにあげようと思ったけどログインできなくてあきらめたmatsuneko22がお送りします.

ところで皆さん,emacs使っていますか?そうです,m1のプログラミング基礎で強制的に使わされるあの超高性能エディタのことです. ...え?エディタじゃない?OS??Vimのほうが使いやすい??????

そんなemacs使わない,使ったことがない人向け(主に学部1年向け)に便利ショートカットを紹介していきたいと思います.

shellコマンドを実行する

@mneko22
mneko22 / nihongo.cpp
Created January 21, 2018 05:13
ゆるふわ日本語プログラミング
#include <stdio.h>
#define めいん main
#define ぷりんとふ printf
#define りたーん return
#define はろーわーるど helloworld
#define せいすう int
せいすう めいん() {
ぷりんとふ("はろーわーるど\n");
@mneko22
mneko22 / main.py
Last active April 15, 2017 19:49
mastodon.py toot sample for mstdn.jp
"""This is a test program."""
from mastodon import Mastodon
import os
CLIENT_ID = 'c9ce278f74a48920e487ca103ca2970f5e6bb6d54566f151bffb87ad84906303'
CLIENT_SECRET = '7ddd75db55213ed242b805459686df434d2335842d5855bc18eb0d7dc567f004'
API_SERVER = 'https://mstdn.jp/'
def init():
''' init '''
@mneko22
mneko22 / memo.md
Last active February 16, 2017 10:30
mbed cliを使ったコンパイル方法

mbed cliとは

mbedのビルド機能とgitによる管理、publish機能などを提供するコマンドツール。

動作環境

  • python2.7(3系は動かなかった)
  • sourceをmbed用にコンパイルするためのツール群(gcc armとか)。以後ツールチェーンと呼称。
  • gitかMercurial

今回使用した環境

  • hard:64bit CPU
  • os:fedora 24 64bit(Ubuntu 16.04LTSで動作確認済み)
class Seiseki
{
static void Main(string[] args)
{
ICampusSquare cs = new CampusSquare.CampusSquare(Console.ReadLine(),Console.ReadLine());
IEnumerable < IGrade > grades = cs.GetGrades();
Dictionary<string, int> gradeList = new Dictionary<string, int>();
foreach(IGrade grade in grades)
{
gradeList.Add(grade.Name, grade.GradeNum);