Look at LSB init scripts for more information.
Copy to /etc/init.d
:
# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)
require 'parslet' | |
require 'ostruct' | |
require 'pp' | |
class BaseParser < Parslet::Parser | |
def no(p);(p.absent? >> any);end | |
def join(p,q);(p >> (q >> p).repeat(0));end | |
def self.tokens(toks) | |
toks.map do |t,r| | |
key=t.to_s |
require 'parslet' | |
class BaseParser < Parslet::Parser | |
def no(p);(p.absent? >> any);end | |
def join(p,q);(p >> (q >> p).repeat(0));end | |
def self.tokens(toks) | |
toks.map do |t,r| | |
key=t.to_s | |
rule((key).to_sym){r.is_a?(String) ? str(r) : match(r)} | |
rule((key+"!").to_sym){no(r.is_a?(String) ? str(r) : match(r))} |
"%~dp0subl.exe" -n -w %1 |
public static class ABus | |
{ | |
// can be a simple method | |
public static void that_works(ISpecs<Config.Backend.Iguana.Services.IguanaResourceService> state) | |
{ | |
state.SUT.Bus = state.GetMockFor<IBus>().Object; | |
} | |
} | |
public static class AMapper |
choco install sublimetext3 -y | |
choco install putty -y | |
#choco install kitty.portable -y | |
choco install console2 -y | |
choco install autohotkey -y | |
choco install negativescreen -y | |
# These need running as admin | |
choco install gajim -y | |
choco install winsplitrevolution -y |
#ruby | |
wallpaper = `reg QUERY "HKCU\\Control Panel\\Desktop" /v Wallpaper`.split(/REG_SZ\s*/)[1].chomp.strip | |
dot_index = wallpaper.rindex(".") | |
if /_inv\./ =~ wallpaper | |
inv_filename = wallpaper.gsub("_inv","") | |
else | |
inv_filename = "#{wallpaper[0...dot_index]}_inv.jpg" | |
end |
' Add references in Excel | |
' * Microsoft XML, v6.0 | |
' * Microsoft Script Control 1.0 | |
Option Explicit | |
Private ScriptEngine As ScriptControl | |
Public Function GetWebSource(ByRef URL As String) As String | |
Dim xml As IXMLHTTPRequest |
Look at LSB init scripts for more information.
Copy to /etc/init.d
:
# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)
#class URLSource( url ) | |
# def read | |
# open(@url).read | |
# end | |
#end | |
# or maybe we could implement | |
def klass(*args, &block) | |
Class.new(Object).tap{ |c| |
class Transformer | |
def initialize() | |
@rules = [] | |
end | |
def rule(*conditions, &block) | |
@rules.push( Rule.new( Filter.new(conditions), block ) ) | |
end | |
def simple(sym_name) # matches any object not array not hash |