Skip to content

Instantly share code, notes, and snippets.

View sharl's full-sized avatar
🐰

Sharl Morlaroll sharl

🐰
View GitHub Profile
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>
@sharl
sharl / gist:5435276
Created April 22, 2013 13:53
Master of Epic クライアント起動時の通信内容
以下 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
~~~~~~~~~~~
#!/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);
}
@sharl
sharl / _
Created February 18, 2013 02:39
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',
@sharl
sharl / gfl
Created January 23, 2013 04:06
Google Feeling Lucky
#!/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';
@sharl
sharl / batt
Created January 22, 2013 04:25
OS X battery monitor script
#!/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%"
#!/usr/bin/perl
# -*- coding: utf-8 -*-
use strict;
use warnings;
use HTTP::Tiny;
use HTML::Entities;
my $target = 'http://ranking.gpara.com/special/event/ranking/ogranking12b/ranking_list.php';
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\acd]
@="\"URL:Amazon Cloud Drive Protocol\""
"URL Protocol"="\"\""
[HKEY_CLASSES_ROOT\acd\DefaultIcon]
@="\"AmazonCloudDrive.exe,1\""
[HKEY_CLASSES_ROOT\acd\shell]
Archive: KaraageKun.pkpass
Length Date Time Name
--------- ---------- ----- ----
6148 2012-11-06 15:07 .DS_Store
4955 2012-10-22 10:29 icon.png
9393 2012-10-22 10:28 [email protected]
7642 2012-10-22 10:27 logo.png
15216 2012-10-22 10:26 [email protected]
487 2012-11-06 15:41 manifest.json
3536 2012-11-06 15:41 pass.json
@sharl
sharl / gist:4006488
Created November 3, 2012 07:55
ミシャグジー最後のクイズはこうやって解いた
$ for s in `seq 1 25`; do echo -n "$s "; echo OFWUOHCI | caesar $s; done
1 PGXVPIDJ
2 QHYWQJEK
3 RIZXRKFL
4 SJAYSLGM
5 TKBZTMHN
6 ULCAUNIO
7 VMDBVOJP
8 WNECWPKQ
9 XOFDXQLR