Skip to content

Instantly share code, notes, and snippets.

@nasustim
nasustim / rotateDeg.ino
Last active February 18, 2018 04:28
arduino_stepping_motor
#define DIR_PIN 2
#define STEP_PIN 3
void rotateDeg(float deg, float speed, int dec){
//deg -= dec;
//deg = -dec;
//Serial.println(deg);
deg *= 0.6666666;
int dir = (deg > 0) ? HIGH : LOW;
@nasustim
nasustim / servo.ino
Created February 18, 2018 04:30
Arduino_UnlimitedRotateServo
#include<Servo.h>
Servo s;
void setup(){
s.attach(13);
}
void loop(){
turn(180);
import processing.core.PApplet
trait Points{
val w: Int
val h: Int
}
trait Slopes{
val deg: Double
}
@nasustim
nasustim / loadingAnimation.pde
Last active February 4, 2019 00:33
Loading Animation, Generated in Processing. Depend GifMaker
import gifAnimation.*;
GifMaker gifExport;
void gifSetup(){
gifExport = new GifMaker(this, "/Users/mitsu/Desktop/loading_animation.gif");
gifExport.setRepeat(0);
gifExport.setQuality(10);
gifExport.setDelay(20);
}
@nasustim
nasustim / video.html
Created September 2, 2019 11:39
モバイル端末で映像が再生されている様子をdev toolで手軽に表示するためのHTMLファイル
<!DOCTYPE html>
<html lang="ja">
<head>
<title>video player</title>
<meta charset="utf-8">
<meta name="viewport" content="width=360,initial-scale=1">
<style>
html, body, video{
width: 100%;
height: 100%;

Keybase proof

I hereby claim:

  • I am nasustim on github.
  • I am nasustim (https://keybase.io/nasustim) on keybase.
  • I have a public key ASCl83ZQ6svpxZApYnTv4l4sweq8dO4D_qReRaPy6zlbDwo

To claim this, I am signing this object:

package rotxiii
func Decode(src string) string {
SHIFT_LENGTH := 13
ALPHABET_LENGTH := 26
SKIP_SEQUENCES := []byte{' ', '.'}
b := []byte(src)
r := make([]byte, len(src))
for i, _ := range r {
// クラス名は仕方ない
class Bar{
// コンストラクタは仕方ない
constructor(){
this.変数 = 0;
this.defineMethods();
}
defineMethods(){
// メンバ変数に関数を代入
this.メソッド = () =>{