Skip to content

Instantly share code, notes, and snippets.

View no1fushi's full-sized avatar
:octocat:

Katochan no1fushi

:octocat:
  • Internet / Japan, Saitama, Soka
View GitHub Profile
@no1fushi
no1fushi / gist:6b9a62d34869ddf80f38ef9aa347949a
Last active February 11, 2024 08:15
p5js太陽系アニメーション(火星まで)
let sun;
let planets = [];
let G; // 万有引力定数
function setup() {
createCanvas(400, 400);
#!/bin/bash
if [ $# -eq 3 ]; then
arg=($1 $2 $3)
ows=0
elif [ $# -eq 4 ]; then
arg=($1 $2 $3 $4)
ows=1
else
ows=2
public String openFile() {
String fn = "";
String all = "";
try {
FileReader fr = new FileReader(fn);
BufferedReader br = new BufferedReader(fr);
String buf;
while ((buf = br.readLine()) != null) {
all += buf;
all += System.getProperty("line.separator");
# short
alias c='clear'
alias ll='ls -l'
alias la="ls -a"
# editor
alias vi='vim'
alias nano='nano -k -w -i -S'
alias emacs='emacs -nw'
vim_version=`vim --version | head -1 | sed 's/^.*\ \([0-9]\)\.\([0-9]\)\ .*$/\1\2/'`
alias vless='/usr/share/vim/vim${vim_version}/macros/less.sh'
#!/bin/bash
function input() {
local dir
read -p " ->" dir
echo $dir
}
function checkDir() {
@no1fushi
no1fushi / BinaryGame.c
Last active July 5, 2018 11:09
Gist for juniors making binary games in C
//2進数を10進数タイムアタック
//ToDo: スキャンで答えを書く、合否の判定をする、ブレイクで次の問題かもう一度答えさせる。
/*課題: startとかfirstとかに目的(EやS)以外の文字が入力されたときのエラー処理
説明文見づらい*/
#define _CRT_SECURE_NO_WARNINGS // CounterPlan: warning C4996: 'scanf': This function or variable may be unsafe.
#include <stdio.h>
#include <stdlib.h>
#include <time.h>