Skip to content

Instantly share code, notes, and snippets.

@mu-777
mu-777 / CameraController.cs
Created November 18, 2019 11:47
UnityCameraController
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
[RequireComponent(typeof(Camera))]
public class CameraController : MonoBehaviour
{
enum MouseButton
C:\Windows>C:\Windows\WinSxS\***\PresentationSettings.exe /start
class FileTailer(object):
def __init__(self, ip, port, username, password):
self._ip, self._port, self._user, self._pass = ip, port, username, password
self._stdout = None
def start(self, remote_filepath, timeout_sec=60):
if (not isinstance(timeout_sec, int)) or (timeout_sec < 0):
timeout_sec = None
if self._stdout is not None:
self.close()
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
import urllib
from bs4 import BeautifulSoup
def get_url(parsedurl, page):
qrys = urllib.parse.parse_qs(parsedurl.query)
@mu-777
mu-777 / relpace.bash
Created November 6, 2017 00:24
2つの引数を取るxargs
find ./ -type f | sed 'p;s/aaa/bbb/' | xargs -n2 mv
@echo off
set winpath=%1
rem %winpath%
set linuxpath=%winpath:c:\Users\euler\=/mnt/c/Users/euler/%
set linuxpath=%linuxpath:\=/%
rem %linuxpath%
#!/bin/bash
CNT=0
# do something here
while true; do echo $((CNT++)); sleep 1; done
#include <iostream>
using namespace std;
void val(int i) { // 値渡し
cout << i << endl; // 0
cout << &i << endl; // 0x7ffd066ebfac
i = 1;
}
@mu-777
mu-777 / chrony_setup
Last active October 27, 2015 02:13
ROS同期関連の便利コマンドmemo
#!/bin/bash
function usage() {
cat <<_EOT_
Usage:
$ ./chrony_setup [-0|-h] ntpserver_machine_ip
Description:
他マシンと時間同期するようのbash
@mu-777
mu-777 / ros_ip_setup
Last active November 21, 2015 09:39
複数台PCでROSする用の設定用bash.
#!/bin/bash
function usage() {
cat <<_EOT_
Usage:
$ ./ros_setup [-0|-h] my_ip master_ip
Description:
複数台PCでROSする用の設定用bash.