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
$ 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 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 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 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
python | |
import sys | |
sys.path.insert(0, 'c:\MinGW\share\gcc-4.8.1\python') #Change this | |
from libstdcxx.v6.printers import register_libstdcxx_printers | |
register_libstdcxx_printers (None) | |
end |
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
[difftool] | |
prompt = false | |
[mergetool] | |
prompt = false | |
[difftool "selectiveDiff"] | |
cmd = difftool.sh $LOCAL $REMOTE $BASE $MERGED | |
keepBackup = false | |
[mergetool "selectiveMerge"] | |
cmd = mergetool.sh $LOCAL $REMOTE $BASE $MERGED | |
keepBackup = false |
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
#Functions in this file are called from difftool.sh and mergetool.sh to determine file extension. | |
#They should return true (0) if given two files both have desired extension and return false (1) otherwise. | |
RHAPSODY_PATH="C:/Program Files (x86)/IBM/Rational/Rhapsody/8.0.5/DiffMerge.exe" | |
KDIFF3_PATH="C:/Program Files/KDiff3/kdiff3.exe" | |
FILE_EXTENSION="sbs" | |
is_myfile() { | |
#extract filename | |
filename1=$(basename $1) |
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
source common.sh | |
if is_myfile $1 $2 ; then | |
#DiffMerge.exe -base BASE FILE1 FILE2 -out OUTPUT -xmerge | |
"$RHAPSODY_PATH" -base $3 $1 $2 -out $4 -xmerge | |
else | |
#kdiff3 BASE FILE1 FILE2 -o OUTPUT | |
"$KDIFF3_PATH" $3 $1 $2 -o $4 | |
fi |
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
source common.sh | |
echo $@ | |
if is_myfile $1 $2 ; then | |
"$RHAPSODY_PATH" -base $3 $1 $2 -xcompare | |
else | |
"$KDIFF3_PATH" $1 $2 | |
fi |
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
public class GAModule extends AbstractModule{ | |
//@Constant(value = "elements") | |
protected List<Foo> elements; | |
@Provides List<Foo> getElements() { | |
return elements; | |
} | |
public void setElements(List<Foo> elements) { | |
this.elements = elements; |
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
public class FooUser { | |
Provider<List<Foo>> elementsProvided; | |
@Inject | |
public FooUser( Provider<List<Foo>> elementsProvided) { | |
this.elementsProvided= elementsProvided; | |
List<Foo> elements = elementsProvided.get(); | |
//Now you can access the elements! | |
} | |
} |