- Where is this Vim installed? Within Vim, run
:echo $VIM
- The home directory is
$HOME
. Within Vim, enter:echo $HOME
or:echo ~
- A history of Vim commands is in
$HOME/_viminfo
. Within Vim, enter:
and then↑
and↓
to cycle through history :scriptnames
lists files that Vim loaded for you, including your.vimrc
file.vimrc
is not created for you by most installations. Create one and save it in$HOME
- To edit your configuration in Vim, enter
:e $HOME/.vimrc
or:e ~/.vimrc
(tilde is an alias of HOME) - The Vim installed as part of msysgit does not have syntax files for most languages. To fix this, install Vim for Windows (gvim) and copy syntax files over from one installation to the other, e.g.
~\Program Files (x86)\Vim\vim74\syntax
-- to -->~\Program Files (x86)\Git\share\vim\vim74\syntax
. Another option is to go into~\Program Files (x86)\Git\bin\
and edit the vim and vi files to run your gvim installation of Vim instead. - Git for Windows (msysgit
This file contains 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
Verifying myself: My Bitcoin username is +robert_claypool. https://onename.io/robert_claypool |
This file contains 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
USE master | |
GO | |
CREATE LOGIN [domain\username] FROM WINDOWS WITH DEFAULT_DATABASE = [Master] | |
GO | |
EXEC sp_addsrvrolemember @loginame=N'domain\username', @rolename=N'sysadmin' | |
GO |
This file contains 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
# A Windows command line example for gpg message encryption: | |
# Install Gpg4win to use gpg. | |
# Gpg4win is a email and file encryption package for Windows that includes the open source Gnu Privacy Guard. | |
# It implements the OpenPGP standard and is widely used to sign, verify, encrypt, and decrypt data. | |
# http://www.gpg4win.org/ | |
echo "Hi John," "Here's your login info:" "username=admin" "password=2d!5-e.6:A~77/Vq" | gpg --encrypt --sign --armor -r [email protected] --output c:\temp\message.txt |
This file contains 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
git config --global mergetool.p4merge.path 'c:\path-to\p4merge.exe' | |
git config --global merge.tool p4merge | |
git config --global difftool.p4merge.path 'c:\path-to\p4merge.exe' | |
git config --global diff.tool p4merge |
This file contains 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
Use separate private keys *per origin* (e.g. one from your work computer and a separate one for your personal laptop). | |
The same is not true of destinations: One private key on your personal laptop can serve to access multiple destinations; | |
if that key is compromised, all other private keys stored on in the same directory will surely be compromised as well. | |
-- http://superuser.com/a/189485/13481 |
This file contains 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
import hashlib | |
print hashlib.sha1(open("c:\\temp\\my.file", "rb").read()).hexdigest() |
This file contains 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
import os | |
print os.path.getsize("c:\\temp\\my.file") # returns the size in bytes |
This file contains 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
# This script converts bounding box values from decimal degrees to | |
# WGS 1984 Web Mercator (Auxiliary Sphere) EPSG:3857. Note that Web Mercator | |
# was originally assigned wkid 102100, but was later changed to 3857. | |
# See http://resources.arcgis.com/en/help/rest/apiref/geometry.html | |
# Arguments and Output | |
# With flags, arguments can be given in any order, but the output will always | |
# be ordered like a GeoJSON bbox: "xmin, ymin, xmax, ymax". In both the GeoJSON and | |
# Esri JSON specs, a bounding box (or envelope) is defined with the lowest | |
# values for all axes followed by the highest values, e.g. "xmin, ymin, xmax, ymax". |
This file contains 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Offline</title> | |
</head> | |
<body style="margin:3em;font-family:sans-serif"> | |
<h2>Offline</h2> | |
<p>This site is offline for maintenance.</p> | |
<!-- |
OlderNewer