Skip to content

Instantly share code, notes, and snippets.

View mayth's full-sized avatar

Mei Akizuru mayth

View GitHub Profile
@mayth
mayth / ProblemD.cs
Created May 24, 2014 17:25
AtCoder Beginner Contest #009 - Problem D (TLE)
using System;
using System.Collections.Generic;
using System.Linq;
namespace ABC009
{
static class ProblemD
{
public static void Main(string[] args)
{
@mayth
mayth / ec_campaign.cs
Created December 2, 2013 08:37
新人女子プログラマの書いたコードを直すだけの簡単なお仕事です!|paizaオンラインハッカソンVol.1 https://paiza.jp/poh/ec-campaign
using System;
using System.Collections.Generic;
using System.Linq;
namespace Paiza
{
static class Program
{
public static void Main(string[] args)
{
@mayth
mayth / assets.rake
Created November 27, 2013 10:37
Rake tasks to pre-compile assets.
require 'bundler/setup'
Bundler.require(:default, :assets)
require 'rake/sprocketstask'
Rake::SprocketsTask.new do |t|
root = File.join(Dir.pwd, 'app')
env = Sprockets::Environment.new(root)
env.append_path 'assets/javascripts'
env.append_path 'assets/stylesheets'
env.append_path 'assets/images'
@mayth
mayth / electrical_ayafmy.rb
Created November 12, 2013 12:16
ふみふみ
def rate(x)
case x
when 0..120
x * 18.10 + 790
when 121..250
120 * 18.10 + (x - 120) * 24.25 + 790
else
120 * 18.10 + 130 * 24.25 + (x - 250) * 27.45 + 790
end
end
@mayth
mayth / SkillAnalyzer.il
Created October 1, 2013 15:13
tkbctf2 Bin350: SkillAnalyzer Written by Mei Akizuru (@maytheplic), obfuscated by op (@6f70).
.assembly extern mscorlib {}
.assembly extern System.Core {}
.assembly 'Fuji Safari Park' {}
.field static unsigned int8[] a // prm
.field static unsigned int8[] b // flg
.field static unsigned int8[] c // scr
.method public static void critical_line(string)
{
@mayth
mayth / string.c
Last active December 21, 2015 13:59
Modification for Ruby Interpreter and Extension Library (Report of Software Science Special Lecture C) College of Information Science University of Tsukuba
/**********************************************************************
string.c -
$Author$
created at: Mon Aug 9 17:12:58 JST 1993
Copyright (C) 1993-2007 Yukihiro Matsumoto
Copyright (C) 2000 Network Applied Communication Laboratory, Inc.
Copyright (C) 2000 Information-technology Promotion Agency, Japan
@mayth
mayth / userstream.rb
Last active December 20, 2015 05:29
Twitter User Stream
require 'oauth'
require 'yaml'
require 'yajl'
# UserStream takes events or statuses from UserStreaming API.
class UserStream
# The default value of User-Agent.
DEFAULT_USER_AGENT = 'RbUserStreamClient/1.0'
def initialize(provider, cred, screen_name, ca_file_path, user_agent = DEFAULT_USER_AGENT)
@mayth
mayth / Diva.fs
Last active December 17, 2015 00:19
tkbctf1: Diva (Bin200)
// Diva
// See the definition of Inst, supported instructions.
open FParsec
type Parser<'a> = Parser<'a, unit>
let test p str =
match run p str with
| Success(result, _, _) -> printfn "Success: %A" result
@mayth
mayth / erutaso.rb
Created October 31, 2012 02:30
私、気になります!
# coding:utf-8
class Integer
DIGITS = %W(\0 一 二 三 四 五 六 七 八 九)
DIGIT_S = %w(十 百 千 万)
def get_digit(digit)
self / (10 ** (digit - 1)) % 10
end
def toKanji
@mayth
mayth / Joshiryoku.cs
Created June 26, 2012 07:06
女子力の高いラムダ式
using System;
using System.Linq;
using System.Collections.Generic;
namespace Mayth
{
class Joshiryoku
{
static void Main(string[] args)
{