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
void addNewRow(DataView dataView) | |
{ | |
DataRowView newRow = dataView.AddNew(); | |
newRow["Column Name"] = "Column Value"; | |
newRow.EndEdit(); | |
comboBoxViews.ItemsSource = dataView.Cast<DataRowView>().Select(o => o["Column Name"]); | |
} |
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
httpRequest = """ | |
GET /index.html HTTP/1.1 | |
Accept-Encoding: identity | |
Host: #Your IP Address | |
Connection: close | |
User-Agent: Python | |
""" | |
try: |
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
$ ssh-keygen -t rsa | |
Generating public/private rsa key pair. | |
Enter file in which to save the key (/home/jurn/.ssh/id_rsa): | |
Enter passphrase (empty for no passphrase): | |
Enter same passphrase again: | |
Your identification has been saved in /home/jurn/.ssh/id_rsa | |
Your public key has been saved in /home/jurn/.ssh/id_rsa.pub | |
$ cd ~/.ssh | |
$ cat id_rsa.pub >> authorized_keys | |
$ chmod 600 authorized_keys |
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
git fsck | |
git prune | |
git repack | |
git fsck |
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
git config core.sharedRepository true |
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
cd /path/to/repo.git | |
chgrp -R groupname . | |
chmod -R g+rwX . | |
find . -type d -exec chmod g+s '{}' + |
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
void smallerF() | |
{ | |
cout << "MIN FLOAT test" << endl; | |
errno = 0; | |
stringstream ss; | |
ss << "1.17549430e-39"; | |
cout << "Min possible :\t" << FLT_MIN << endl; | |
cout << "str: \t\t" << ss.str() << endl; | |
float converted = strtof(ss.str().c_str(), NULL); | |
cout << "Error: \t\t" << (errno == ERANGE ? "Range error" : "No error") << endl; |
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
Acquire::http::Proxy "http://proxy.com:8080"; | |
Acquire::https::Proxy "http://proxy.com:8080"; | |
Acquire::ftp::Proxy "http://proxy.com:8080"; |
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
http_proxy=http://proxy.com:8080/ | |
HTTP_PROXY=http://proxy.com:8080/ | |
https_proxy=http://proxy.com:8080/ | |
HTTPS_PROXY=http://proxy.com:8080/ | |
ftp_proxy=http://proxy.com:8080/ | |
FTP_PROXY=http://proxy.com:8080/ |
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
@echo off | |
SET TEMPFILE="%TEMP%\%RANDOM%.TXT" | |
echo SELECT VDISK FILE="C:\full\path\to\license.vhd">%TEMPFILE% | |
echo ATTACH VDISK>>%TEMPFILE% | |
DISKPART /s %TEMPFILE% | |
del %TEMPFILE% |