Skip to content

Instantly share code, notes, and snippets.

View mmisono's full-sized avatar
🌫️
I may be slow to respond.

Masanori Misono mmisono

🌫️
I may be slow to respond.
View GitHub Profile
#!/usr/bin/python
import os
class Pwd():
def __repr__(self):
return os.getcwd() + "% "
if __name__ == '__main__':
while True:
dir = raw_input(Pwd())
#!/usr/bin/perl
# -*- coding: utf-8 -*-
# for VimShell
#Author: mfumi <[email protected]>
#Version: 0.0.3
#License: NEW BSD LICENSE
# Copyright (c) 2010, mfumi
# All rights reserved.
#!/usr/bin/perl
use strict;
use warnings;
use GD::Graph::linespoints;
use GD::Graph::colour qw(:colours);
use GD::Text;
#データファイルのオープン
open DATA ,"<data.txt" or die("Can't Open data file");
1 0.01 s
2 0.02 s
3 0.07 s
4 0.12 s
5 0.17 s
6 0.21 s
7 0.33 s
8 0.61 s
9 0.93 s
10 1.50 s
import socket
import Skype4Py
PORT = 50000
skype = Skype4Py.Skype()
skype.Attach()
s = socket.socket(socket.AF_INET,socket.SOCK_STREAM)
import socket
import sys
PORT = 50000
s = socket.socket(socket.AF_INET,socket.SOCK_STREAM)
s.connect(('localhost',PORT))
s.send(sys.argv[1])
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char const* argv[])
{
int temp = 0;
char unit;
FILE *file = fopen("/Users/mfumi/.screen/.temp","r");
if(file != NULL){
fscanf(file,"%d %c",&temp,&unit);
#include <mach/host_info.h>
#include <stdio.h>
int main(int argc, char *argv[])
{
struct host_basic_info host;
struct vm_statistics vm_info;
mach_msg_type_number_t count;
kern_return_t kr;
vm_size_t pagesize;
/* Show CPU Usage */
#include <mach/mach.h>
#include <mach/mach_error.h>
#include <stdio.h>
int main() {
natural_t cpuCount;
processor_info_array_t infoArray;
mach_msg_type_number_t infoCount;
kern_return_t kr;
#!/bin/sh
ioreg -n AppleSmartBattery | \
awk '/MaxCapacity/ {MAX = $5}
/CurrentCapacity/ {CURRENT = $5}
/InstantTimeToEmpty/ {REMAIN = $5}
END {
printf("HP%d ",CURRENT/MAX*100)
if(REMAIN > 1000)
if(CURRENT == MAX) printf("(Charged)")