Create VM Image in Azure
1: Create VM to create Image for same.
a: Open the Command Prompt window as an administrator.
b: Change the directory to %windir%\system32\sysprep
cd C:\Windows\system32\sysprep
c: run sysprep.exe
| require 'jwt' | |
| class JsonWebToken | |
| def self.encode(payload, expiration = Rails.application.secrets.jwt_expiration_seconds.to_i.seconds.from_now) | |
| payload = payload.dup | |
| payload[:exp] = expiration.to_i | |
| JWT.encode(payload, Rails.application.secrets.hmac_secret_key) | |
| end | |
| def self.decode(token) |
| sudo apt-get update && | |
| sudo apt-get install build-essential git-core curl && | |
| curl -L get.rvm.io | bash -s stable && | |
| echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"' >> ~/.bashrc && | |
| . ~/.bashrc && | |
| sudo apt-get -y install build-essential openssl libreadline6 libreadline6-dev \ | |
| zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 \ | |
| libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison \ | |
| subversion && | |
| rvm autolibs enable && |
| def invalid_name?(pname) | |
| ( pname.is_a?(Array) && pname.any? { |name| name.index(/\s|\\t|\\n/) } ) || ( pname.is_a?(String) && pname.to_s.index(/\s|\\t|\\n/) ) | |
| end | |
| puts "Test-case-1" | |
| tab = "foo bar" | |
| tab1= "foo\tbar" | |
| s = "foo bar" | |
| st = "foo \t bar" |
Create VM Image in Azure
1: Create VM to create Image for same.
a: Open the Command Prompt window as an administrator.
b: Change the directory to %windir%\system32\sysprep
cd C:\Windows\system32\sysprep
c: run sysprep.exe
| require 'chef' | |
| require 'mixlib/shellout' | |
| require 'ffi' | |
| require "chef/win32/api" | |
| require 'openssl' | |
| module Cert | |
| extend Chef::ReservedNames::Win32::API | |
| extend FFI::Library |
| # -*- mode: ruby -*- | |
| # vi: set ft=ruby : | |
| # All Vagrant configuration is done below. The "2" in Vagrant.configure | |
| # configures the configuration version (we support older styles for | |
| # backwards compatibility). Please don't change it unless you know what | |
| # you're doing. | |
| Vagrant.configure(2) do |config| | |
| # The most common configuration options are documented and commented below. | |
| # For a complete reference, please see the online documentation at |