Skip to content

Instantly share code, notes, and snippets.

電源を入れたときにtty1を自動ログインする設定あれこれ集.md

CentOS

CentOS7 (systemd)

次のコマンドを実行

$ sudo systemctl edit getty@tty1

@yoggy
yoggy / java_invokestatic_memo.md
Created June 18, 2015 06:23
Javaでinner classのprivateメソッドの呼び出しにはinvokestaticが使われるのが仕様みたい?

まず、PseudoSketch.javaというファイルを用意する。

public class PseudoSketch {
    class A {
        private void a() {
            System.out.println("a");
        }
    }
void setup() {
size(200, 200);
}
void draw() {
background(255);
strokeWeight(3);
stroke(0, 255, 0);
//
// test_dragg_op.pde
//
import java.util.*;
class Node {
float x, y, w, h;
color fill_color;
String label;
boolean selected = false;
#!/usr/bin/ruby
require 'mathn'
$host = 'mqtt.example.com'
$port = 1883
$user = 'username'
$pass = 'password'
def usage
//
// pseudo_metaball_in_motion.pde - drawing test of pseudo metaball in motion
//
void setup() {
size(512, 512);
background(0);
}
void draw_pseudo_metaball(float x, float y, float r) {
//
// ascii table for 7segduino
//
// github:
// https://gist.github.com/yoggy/0365b24d193f9999c83e
//
// license:
// Copyright (c) 2015 yoggy <yoggy0@gmail.com>
// Released under the MIT license
// http://opensource.org/licenses/mit-license.php
@yoggy
yoggy / chattr_sample.txt
Created April 23, 2015 12:30
chattr +iって、たまに設定されてると忘れていて焦るよね…
$ touch hoge
$ ls -al hoge
-rw-rw-r-- 1 yoggy yoggy 0 Apr 23 21:27 hoge
$ lsattr hoge
-------------e-- hoge
$ sudo chattr +i hoge
#define V_ON 40
#define V_OFF 300
#define V_INTERVAL 1500
#define V_COUNT 7
#define V_SLEEP 180
void setup( ) {
pinMode(3, OUTPUT);
pinMode(4, OUTPUT);
}