This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
d=`/usr/sbin/ioreg -c AppleSmartBattery -r | /usr/bin/grep -E "MaxCapacity|CurrentCapacity|ExternalConnected" | /usr/bin/cut -d= -f2` | |
echo $d | while read MaxC CurC Ext; do | |
if [ $Ext = 'Yes' ]; then | |
echo "AC" | |
exit 0 | |
else | |
p=`echo "scale=2; 100 * $CurC / $MaxC" | /usr/bin/bc` | |
echo "Batt $p%" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
use URI::Escape 'uri_escape'; | |
use LWP::Simple qw(head $ua); | |
if ($ARGV[0]) { | |
my $word = join('', @ARGV); | |
my $URI = 'https://www.google.com/search?q=' . uri_escape($word) . '&btnI'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use HTTP::Tiny; | |
use Data::Dumper; | |
my $get = HTTP::Tiny->new->get('http://twitter.com/MyoyoShinnyo/copy-paste-bot-garbage', | |
{ max_redirect => 0, }, | |
); | |
print Dumper $get->{headers}; | |
$VAR1 = { | |
'x-mid' => '6f8ee694d6012587d237ab0aea726412bbae3a26', | |
'connection' => 'close', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
print r(-1882006324) . ' ' . r(-2062980754) . "\n"; | |
sub r { | |
my $s = ''; | |
srand(shift); | |
while (my $r = int(rand(27))) { | |
$s .= chr(ord('`') + $r); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
以下 UDP による通信 | |
local → 202.232.117.40:11300 | |
00 00 00 03 02 | |
202.232.117.40:11300 → local | |
00 00 00 03 00 00 00 03 | |
~~~~~~~~~~~ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Stacktrace: | |
at (wrapper managed-to-native) System.Environment.internalGetHome () <0x00047> | |
at (wrapper managed-to-native) System.Environment.internalGetHome () <0x00047> | |
at System.Environment.InternalGetFolderPath (System.Environment/SpecialFolder) <0x00023> | |
at System.Environment.GetFolderPath (System.Environment/SpecialFolder) <0x00017> | |
at Mono.Security.X509.X509StoreManager.get_CurrentUser () <0x00027> | |
at System.Security.Cryptography.X509Certificates.X509Store.get_Factory () <0x0001b> | |
at System.Security.Cryptography.X509Certificates.X509Store.Open (System.Security.Cryptography.X509Certificates.OpenFlags) <0x00123> | |
at System.Security.Cryptography.X509Certificates.X509Chain.get_Roots () <0x0005f> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- 20130513 | |
+++ 20130718 | |
@@ -368,10 +368,10 @@ | |
<table width="520" border="0" cellspacing="0" cellpadding="2"> | |
<tr><td valign="top" width="120">●CPU</td> | |
- <td style="text-align:left;">PentiumIII/1GHz 以上</td> | |
+ <td style="text-align:left;">Pentium4/2GHz 以上</td> | |
</tr> | |
<tr><td valign="top">●メインメモリ</td> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
use Net::GrowthForecast; | |
{ | |
package Net::GrowthForecast; | |
sub create_complex { | |
my ($self, $service_name, $section_name, $graph_name, $description, $sumup, $sort, @graph_params) = @_; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
from __future__ import unicode_literals | |
import wx | |
TRAY_TOOLTIP = 'Master of Epic Monitor System' | |
TRAY_ICON = 'icon.png' | |
def create_menu_item(menu, label, func): | |
item = wx.MenuItem(menu, -1, label) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# aa.py | |
from __future__ import print_function | |
import sys | |
import time | |
import re | |
def inner0(n): | |
for i in range(n): | |
r = re.compile('@sharlm') |