Skip to content

Instantly share code, notes, and snippets.

View mizofumi's full-sized avatar
👾

みぞ mizofumi

👾
View GitHub Profile
#!/bin/bash
# Function to validate IPv4 address
validate_ip() {
local ip=$1
local IFS='.'
local -a octets=($ip)
# Check if we have exactly 4 octets
if [ ${#octets[@]} -ne 4 ]; then
set-option -g status-position top
set-option -g renumber-windows on
#set-option -g default-terminal screen-256color
set -g default-terminal "xterm-256color"
#set -g terminal-overrides 'xterm:colors=256'
set -g prefix C-f
unbind C-b
このチートシートのファイル場所
```
~/.vim_cheat
```
設定の再読み込み
```
:source ~/.vimrc
```
@mizofumi
mizofumi / channels.yml
Created January 13, 2019 16:07
PX-W3U4
- name: フジテレビ
type: GR
channel: '21'
- name: TBS
type: GR
channel: '22'
- name: テレビ東京
type: GR
channel: '23'
- name: テレビ朝日
@mizofumi
mizofumi / .mocp
Created December 16, 2017 15:14
moc settings
# This is a configuration file for the MOC player. It should be named
# 'config' and placed in the ~/.moc directory. As this file can specify
# commands which invoke other applications, MOC will refuse to start if it
# is not owned by either root or the current user, or if it is writable by
# anyone other than its owner. All options are given with their default
# values, and therefore commented.
# Comments begin with '#'.
# You can use quotes and escape ('\') in parameters.
#
@mizofumi
mizofumi / .zshrc
Last active May 25, 2018 13:40
ごちうさzsh
autoload -U colors; colors
setopt correct
setopt re_match_pcre
setopt prompt_subst
PROMPT="
((\
°(๑•௰•).oO(%~)
%(?.%{$fg[green]%}.%{$fg[blue]%})%(?!( *'-')<!( ˚˃̣̣⌓˂̣̣%)?<)%{${reset_color}%} "
@mizofumi
mizofumi / TvTestRemoteClientExample.php
Created April 14, 2015 16:57
TvTestRemoteClientExample
<?php
$socket = @fsockopen('127.0.0.1', 17000, $errno, $errstr, 30);
if ( ! $socket ) {
return $errno . ': ' . $errstr;
}
//データ送信(コメントを解除している部分が実行されます)
fputs($socket, 'VolUp'); //ボリューム上げ
//fputs($socket, 'VolDown'); //ボリューム下げ
@mizofumi
mizofumi / TvTestRemoteClientExample.java
Last active August 29, 2015 14:18
TvTestRemoteClientExample
import java.io.*;
import java.net.*;
public class TvTestRemoteClientExample {
public static void main(String[] args) {
Socket socket = null;
DataOutputStream os = null;
BufferedReader is = null;
// サーバを開く
@mizofumi
mizofumi / rfid_auth.ino
Created February 22, 2015 10:10
RFID認証
#include <SPI.h>
#include <MFRC522.h>
#define RST_PIN 9
#define SS_PIN 10
MFRC522 mfrc522(SS_PIN, RST_PIN);
String s = "218146177180";
String temp = "";
@mizofumi
mizofumi / wol.php
Last active August 29, 2015 14:06
Wake On Lan するやつ (自分用に作ったからセキュリティ回りはヤバイ)
<?php
//wakeonlanするために必要なもの
//http://gsd.di.uminho.pt/jpo/software/wakeonlan/
//ユーザ名
define("USERNAME","username");
//パスワード(初期値はpassword)
//パスワードを変更する場合はこのページのハッシュを使用してください。
//http://phpspot.net/php/pg%EF%BC%AD%EF%BC%A4%EF%BC%95%E3%83%8F%E3%83%83%E3%82%B7%E3%83%A5%E8%A8%88%E7%AE%97%E3%83%84%E3%83%BC%E3%83%AB.html
define("PASSWORD","5f4dcc3b5aa765d61d8327deb882cf99");