Windows 10 相关 Cheatsheet

设置 Powershell Profile:

# Load posh git
Import-Module 'D:\local\posh-git\src\posh-git.psd1'

# Customize git prompt
$s = $Global:GitPromptSettings
$s.BranchIdenticalStatusSymbol = $null
$s.BranchAheadStatusSymbol = $null
$s.BranchBehindStatusSymbol = $null
$s.BranchGoneStatusSymbol = $null
$s.BranchBehindAndAheadStatusSymbol = $null
$s.BranchBehindAndAheadDisplay = "Minimal"
$s.LocalWorkingStatusSymbol = $null
$s.LocalStagedStatusSymbol = $null
$s.WindowTitle = $null
$s.DefaultPromptAbbreviateHomeDirectory = False

设置网络属性为专用网络:

Get-NetConnectionProfile
Set-NetConnectionProfile -InterfaceIndex <index number> -NetworkCategory Private

清理组件:

dism /Online /Cleanup-Image /StartComponentCleanup /ResetBase
Windows 下 Ruby 编译 C 扩展

注:大部分代码来源于 rubyinline

#!/usr/bin/env ruby -wKU

# usage: ruby path/to/this/script path/to/your/c/source

require "rbconfig"

class MKCMD

  def self.cmd(base_name)
    new("#{base_name}.c", "#{base_name}.so").cmd
  end

  def initialize(src_name, so_name)
    @src_name = src_name
    @so_name  = so_name
  end

  def cmd
    hdrdir = %w(srcdir includedir archdir rubyhdrdir).map { |name|
      RbConfig::CONFIG[name]
    }.find { |dir|
      dir and File.exist? File.join(dir, "ruby.h")
    } or abort "ERROR: Can't find header dir for ruby. Exiting..."

    config_hdrdir = if RbConfig::CONFIG['rubyarchhdrdir']
      "-I #{RbConfig::CONFIG['rubyarchhdrdir']}"
    elsif RUBY_VERSION > '1.9'
      "-I #{File.join hdrdir, RbConfig::CONFIG['arch']}"
    end

    cmd = [
      RbConfig::CONFIG['LDSHARED'],
      RbConfig::CONFIG['CFLAGS'],
      '-I', hdrdir,
      config_hdrdir,
      '-I', RbConfig::CONFIG['includedir'],
      File.expand_path(@src_name).inspect,
      crap_for_windoze,
      RbConfig::CONFIG['LDFLAGS'],
      RbConfig::CONFIG['CCDLFLAGS'],
    ].compact.join(' ')

    # odd compilation error on clang + freebsd 10. Ruby built w/ rbenv.
    cmd.gsub!(/-Wl,-soname,\$@/, "-Wl,-soname,#{File.basename @so_name}")

    # strip off some makefile macros for mingw 1.9
    cmd.gsub!(/\$\(.*\)/, '') if RUBY_PLATFORM =~ /mingw/

    cmd
  end


  private

  def crap_for_windoze
    # gawd windoze land sucks
    case RUBY_PLATFORM
    when /mswin32/ then
      " -link /OUT:\"#{self.so_name}\" /LIBPATH:\"#{RbConfig::CONFIG['libdir']}\" /DEFAULTLIB:\"#{RbConfig::CONFIG['LIBRUBY']}\" /INCREMENTAL:no /EXPORT:Init_#{module_name}"
    when /mingw32/ then
      c = RbConfig::CONFIG
      " -Wl,--enable-auto-import -L#{c['libdir']} -l#{c['RUBY_SO_NAME']} -o #{@so_name.inspect}"
    when /i386-cygwin/ then
      ' -L/usr/local/lib -lruby.dll'
    else
      ''
    end
  end
end

system MKCMD.cmd((ARGV[0] || gets.chomp).chomp('.c')) if $0 == __FILE__
Angel Beats! -1st beat- 全 record 达成纪念

可喜可贺可喜可贺,总之还是吐槽一下吧:

  1. 看完动画我还觉得音无是个老好人……结果这游戏里直接可以培养成各种变态啊有木有!工口少年、百合、萝莉控,各种属性一应俱全啊!还有各种H的想象,大魔王你的节操呢节操呢!
  2. ホモ也就算了吧,为什么ホモ的成就还这么多这么难进!不和妹子搞好关系的话就会BE,想搞基都不行!相比起来三条主线却很容易进。
  3. 说到主线……ユイ线是传说中的TV复刻么……印象比较深刻的也就是関根和复读机入江这两只欢乐的逗比了。入江向天使表白这段不能再赞。岩沢线嘛……有人觉得很虐我倒觉得还好大概是推完WA2的后遗症。松下线中规中矩,不予置评。
  4. 虽然剧情很短,不过 record 为什么这么难找啊!不看攻略我只能到 60%……

虽然以上都是吐槽,但是 AB1st 做得还是很不错的。我依然喜欢天使,依然会继续支持 AB!奏ちゃん大好き!:heart:

但求不跳票,不要成为有生之年系列。