Skip to content

Instantly share code, notes, and snippets.

View monban's full-sized avatar
🍵

Ian Flynn monban

🍵
View GitHub Profile
$items = Get-ChildItem -File
foreach ($item in $items) {
$dest = '..\..\' + $item.Name
Write-Output $dest
if (Test-Path $dest) {
Rename-Item $dest -NewName "$item.old"
}
}
@monban
monban / pol_imts
Last active August 29, 2015 13:56
Script for PlayOnLinux (http://www.playonlinux.com/) to install the Tilde-One game "I Miss the Sunrise" (http://www.tilde-one.com/IMTS/).
#!/bin/bash
# Date : (2014-02-02 00-45)
# Last revision : (2014-02-07 01-45)
# Wine version used : 1.7.11
# Distribution used to test : Ubuntu 13.10 Saucy Salamander
# Author : monban
# Script licence : Public Domain
# Program licence : Commercial
# Depend :
@monban
monban / functionList.xml
Last active April 22, 2021 21:36
Notepad++ Function List Panel (Ruby) Add this code (plus the association map, which should look like <association langID = "36" id="rb_function"/>) to functionList.xml to get Ruby function parsing. Updated to a version by Menno Vogels, http://sourceforge.net/p/notepad-plus/discussion/331753/thread/c39e2745/#80f0 TODO: Class / module parsing
<!-- Author: Menno Vogels; Version: 1.0.0.0 -->
<parser
id="ruby_function"
displayName="Ruby"
commentExpr="(?s:#.*?[\r\n]|(?-i:(?&lt;=^|[\r\n])=begin).*?(?-i:[\r\n]=end(?=[\r\n]|$)))" >
<function
mainExpr="(?s:\b(?-i:def)[\t ]+(?!(?-i:alias|and|BEGIN|begin|break|case|class|def|defined\?|do|else|elsif|END|end|ensure|false|for|if|in|module|next|nil|not|or|redo|rescue|retry|return|self|super|then|true|undef|unless|until|when|while|yield|__FILE__|__LINE__))(?:[A-Za-z_]\w*[?!=]?(?:[\t ]*\([^)]*\))?|(?::{2}|\*{1,2}|![=~]?|=(?:~|={1,2})?|[~+\-/%&amp;|\^]|&lt;(?:&lt;|=&gt;?)?|&gt;[&gt;=]?|\[]=?)[\t ]*\([^)]*\)).+?(?-i:end))"
displayMode="$functionName" >
<functionName>
<nameExpr expr="(?s:\b(?-i:def)[\t ]+(?:[A-Za-z_]\w*[?!=]?(?:[\t ]*\()?|(?::{2}|\*{1,2}|![=~]?|=(?:~|={1,2})?|[~+\-/%&amp;|\^]|&lt;(?:&lt;|=&gt;?)?|&gt;[&gt;=]?|\[]=?)[\t ]*\())" />
@monban
monban / mongrel.rb
Last active December 17, 2015 09:19 — forked from rca/mongrel.rb
if ['2.3.8', '2.3.9', '2.3.10', '2.3.11', '2.3.18'].include?(Rails.version) && Gem.available?('mongrel', '~>1.1.5') && self.class.const_defined?(:Mongrel)
# Pulled right from latest rack. Old looked like this in 1.1.0 version.
#
# def [](k)
# super(@names[k] ||= @names[k.downcase])
# end
#
module Rack
module Utils