Skip to content

Instantly share code, notes, and snippets.

View dcolebatch's full-sized avatar
👋
I may be slow to respond.

David Colebatch dcolebatch

👋
I may be slow to respond.
View GitHub Profile
@jedi4ever
jedi4ever / gist:1216529
Created September 14, 2011 13:20
Quick gist on getting vsphere and vcenter and fog/vsphere going
Quick gist on getting vsphere and vcenter and fog/vsphere going
# Things to download
- Download free evaluation version of window 2008
- Download free evaluation of esxi v5
- Download free evaluation of esxi vsphere (control center) iso
# Install esxi in vmware fusion
1)Install esxi in vmware (select vmware/esx as host)
create a user root/pipopopo
@iwinux
iwinux / gist:1529093
Created December 28, 2011 18:38
config.assets.precompile
def compile_asset?(path)
# ignores any filename that begins with '_' (e.g. sass partials)
# all other css/js/sass/image files are processed
if File.basename(path) =~ /^[^_].*\.\w+$/
puts "Compiling: #{path}"
true
else
puts "Ignoring: #{path}"
false
end
15:39:06,062 INFO [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS018559: Deployed "current-knob.yml"
15:39:06,639 INFO [org.torquebox.core.runtime] (Thread-109) Initialize? true
15:39:06,639 INFO [org.torquebox.core.runtime] (Thread-109) Initializer=org.torquebox.web.rack.RackRuntimeInitializer@7df86f75
15:39:06,979 INFO [org.torquebox.core.runtime] (Thread-109) Setting up Bundler
15:39:08,138 INFO [stdout] (Thread-109) Could not find rake-0.8.7 in any of the sources
15:39:08,138 INFO [stdout] (Thread-109) Run `bundle install` to install missing gems.
15:39:08,139 ERROR [org.torquebox.core.runtime] (Thread-109) Error during evaluation: require %q(bundler/setup): org.jruby.exceptions.RaiseException: (SystemExit) exit
at org.jruby.RubyKernel.exit(org/jruby/RubyKernel.java:856) [jruby.jar:]
at org.jruby.RubyKernel.exit(org/jruby/RubyKernel.java:825) [jruby.jar:]
at (Anonymous).(root)(/opt/torquebox-current/jruby/lib/ruby/gems/1.8/gems/bundler-1.0.22/lib/bundler/setup.rb:14) at org.jruby.RubyK
@jmcnevin
jmcnevin / server.log
Created July 3, 2012 17:19
Torquebox startup
=========================================================================
JBoss Bootstrap Environment
JBOSS_HOME: /opt/torquebox/jboss
JAVA: java
JAVA_OPTS: -server -XX:+UseCompressedOops -XX:+TieredCompilation -Xms3098m -Xmx3098m -XX:MaxPermSize=512m -Djava.net.preferIPv4Stack=true -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true -Djboss.server.default.config=standalone.xml -Xss2048k
@pavank
pavank / Enabling WinRM HTTPS Listener
Last active April 8, 2019 13:28
Enabling WinRM HTTPS Listener
1)Generate SSL Certificate with one of these options
-CA Authority(e.g:Versign)
-Active Directory Certificate Services
-Self Signed(Not to be used in Production)
Code : cd 'C:\Program Files (x86)\Windows Kits\8.0\bin\x64\'
makecert -r -pe -n "CN=3dmxvm-solar.cloudapp.net " -b 01/01/2012 -e 01/01/2022 -eku 1.3.6.1.5.5.7.3.1 -ss my -sr localMachine -sky exchange -sp "Microsoft RSA SChannel Cryptographic Provider" -sy 12
2) Export Certificate in .pfx format to store into Trusted Root Store of Client Machine
3) Enable WinRm Trusted Source IP addresses
@rdsimes
rdsimes / unix-timestamp.ps1
Created December 19, 2012 00:46
converts a PowerShell/.NET DateTime to a unix timestamp (Milliseconds since 1 Jan, 1970) Useful for creating JSON that can be understood by the .NET JavaScriptSerializer
function ConvertTo-UnixTimestamp {
$epoch = Get-Date -Year 1970 -Month 1 -Day 1 -Hour 0 -Minute 0 -Second 0
$input | % {
$milliSeconds = [math]::truncate($_.ToUniversalTime().Subtract($epoch).TotalMilliSeconds)
Write-Output $milliSeconds
}
}
Get-Date | ConvertTo-UnixTimestamp
@mrzarquon
mrzarquon / Vagrantfile
Created May 21, 2013 18:30
My sample vagrant file for three hosts with our -nocm boxes May have to update it for Vagrant 1.1/1.2, http://docs.vagrantup.com/v2
Vagrant::Config.run do |config|
#config.vm.box = "base"
config.vm.define :master do |master_config|
master_config.vm.box = "ubuntu-12.04.2-server-amd64-vbox-428-nocm.box"
master_config.vm.box_url = "http://puppet-vagrant-boxes.puppetlabs.com/ubuntu-server-12042-x64-vbox4210-nocm.box"
master_config.vm.forward_port 443,8443
master_config.vm.forward_port 22,20022
master_config.vm.network :hostonly, "172.16.253.5"
master_config.vm.share_folder("modules", "/modules", "./modules")
end
@mattupstate
mattupstate / resources.tf
Last active July 21, 2020 17:39
Just a clever way to set an RDS master password with Terraform and Ansible to prevent the password from being stored in plain text
resource "aws_db_instance" "core" {
username = "postgres"
password = "changeme"
...
}
resource "null_resource" "master_password" {
triggers {
db_host = "${aws_db_instance.address}"
}
@sscotth
sscotth / keystroke the clipboard extended.workflow
Last active July 16, 2024 15:35
Paste as keystrokes (macOS)
# Why?
# To paste text into windows that normally don't allow it or have access to the clipboard.
# Examples: Virtual machines that do not yet have tools installed, websites that hijack paste
#
# Extended vs Simple?
# * Includes an initial delay to allow you to change active windows
# * Adds small delay between keypresses for slower responding windows like SSH sessions
# * Better handling of numbers
# * VMWare bug fix
#
@prologic
prologic / LearnGoIn5mins.md
Last active July 3, 2024 04:05
Learn Go in ~5mins