Skip to content

Instantly share code, notes, and snippets.

@yuri-zubov
yuri-zubov / WinUSBFromLinux.md
Created May 6, 2021 10:18 — forked from kuznero/WinUSBFromLinux.md
How to make Windows 7 USB flash install media from Linux?

How to make Windows 7 USB flash install media from Linux?

StackOverflow

  • Install ms-sys - if it is not in your repositories, get it here. Or alternatively, make sure lilo is installed (but do not run the liloconfig step on your local box if e.g. Grub is installed there!)
  • Check what device your USB media is assigned - here we will assume it is /dev/sdb. Delete all partitions, create a new one taking up all the space, set type to NTFS (7), and remember to set it bootable:
# cfdisk /dev/sdb
or fdisk /dev/sdb (partition type 7, and bootable flag)
@yuri-zubov
yuri-zubov / gist:5b9fa4b0dff33404c899ead660afb219
Created December 8, 2018 06:36 — forked from John-K/gist:050af4014c5bbf6fd812
Generating ECDSA CSR for Comodo PositiveSSL and loading into lighttpd
#generate ECDSA key using secp256r1 (or as openssl knows it, prime256v1)
#heed warnings about this curve: http://safecurves.cr.yp.to/
openssl ecparam -out kelley.ca_ec_key.pem -genkey -name prime256v1
#generate your CSR
#note: Comodo PositiveSSL will issue the cert both with and without www. automatically if you prepend www to your CN
openssl req -new -key kelley.ca_ec_key.pem-nodes -out www_kelley_ca.csr -keyout www_kelley_ca.key -subj "/C=US/ST=California/L=San Francisco/O=John Kelley/CN=www.kelley.ca"
#submit your CSR and follow instructions
class StringWithIconsInput < SimpleForm::Inputs::StringInput
def input(wrapper_options)
icons = options.fetch(:icons)
template.content_tag(:div, class: 'left-inner-addon') do
template.content_tag(:div, class: attribute_name.to_s.camelcase(:lower)) do
[
icons.map do |icon|
template.content_tag(:i, nil,class: "glyphicon glyphicon-#{icon}")
end,
@yuri-zubov
yuri-zubov / gist:06fa615e4bf33bc282b4
Last active August 29, 2015 14:02
replace " to '
"((?!#\{)(.)*?)"
'$1'
@yuri-zubov
yuri-zubov / Install RubyMine 6.0
Last active April 12, 2019 08:19
Install RubyMine 6.0
wget http://download-ln.jetbrains.com/ruby/RubyMine-6.0.tar.gz -O /tmp/rubymine && sudo tar xvfz /tmp/rubymine -C /opt/ && sudo ln -fs /opt/RubyMine-6.0 /opt/Rubymine && sudo ln -fs /opt/Rubymine/bin/rubymine.sh /usr/bin/mine && bash -c 'cat > ~/.local/share/applications/jetbrains-rubymine.desktop
<<EOF
[Desktop Entry]
Version=1.0
Type=Application
Name=RubyMine
Icon=/opt/RubyMine/bin/RMlogo.svg
Exec="/opt/RubyMine/bin/rubymine.sh" %f
Comment=The Drive to Develop
#!/bin/bash
#
# An example hook script to verify what is about to be committed.
# Called by "git commit" with no arguments. The hook should
# exit with non-zero status after issuing an appropriate message if
# it wants to stop the commit.
#
# To enable this hook, rename this file to "pre-commit".
#Files (not deleted) in the index
@yuri-zubov
yuri-zubov / install elastic search
Last active December 20, 2015 08:59
install elasticsearch