This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * fork.c | |
| * Experimental fork() on Windows. Requires NT 6 subsystem or | |
| * newer. | |
| * | |
| * Copyright (c) 2012 William Pitcock <nenolod@dereferenced.org> | |
| * | |
| * Permission to use, copy, modify, and/or distribute this software for any | |
| * purpose with or without fee is hereby granted, provided that the above | |
| * copyright notice and this permission notice appear in all copies. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| ## create pid file , avoid script running multiple times | |
| ### every script gen a unique UUID | |
| UUID=ACD35429D76148978480EA945653D112 | |
| pid_file=/tmp/${UUID}.pid | |
| if [[ -f $pid_file ]]; then | |
| lpid=$(head -1 $pid_file) | |
| if [[ ! -z $lpid ]]; then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env ruby | |
| require 'pp' | |
| require 'optparse' | |
| options = {:can_skip_newerbundle=>true} | |
| OptionParser.new do |opts| | |
| opts.banner = "Usage: gem-ext-compile-v2.rb [options]" | |
| opts.on("-v", "--[no-]verbose", "Run verbosely") do |v| | |
| options[:verbose] = v |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env ruby | |
| =begin | |
| Use ruby/win32ole on excel application, replace VBA | |
| =end | |
| require 'pry' | |
| require 'tk' | |
| if Gem.win_platform? | |
| require 'win32ole' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env ruby | |
| =begin | |
| ruby win32ole common functions | |
| OLE excel object: Application, Workbook, Worksheet, Range, Cells , ... | |
| Demo howto find them, get/set value/style | |
| used other ruby script import it: | |
| require 'rbexcelbase' # copy this to C:\ruby2\lib\ruby\2.3.0\rbexcelbase.rb or |
OlderNewer