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
<Extension()> _ | |
Public Function CommaSeperate(Of T)(ByVal lstList As IEnumerable(Of T), ByVal delFunction As Func(Of T, String), ByVal strDelimiter As String) As String | |
Dim builder As New StringBuilder | |
For Each item As T In lstList | |
If delFunction IsNot Nothing Then | |
builder.Append(delFunction(item) & strDelimiter) | |
Else | |
builder.Append(item.ToString() & strDelimiter) | |
End If | |
Next |
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
<Extension()> _ | |
Public Sub FillWith(ByVal destination As Object, ByVal source As Object, ByVal ParamArray ignoredProps() As String) | |
Dim sourceType = source.GetType() | |
Dim props As New Dictionary(Of String, String) | |
For Each prop As String In ignoredProps | |
props.Add(prop, prop) | |
Next | |
For Each objProperty In destination.GetType().GetProperties() |
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
# Links the current project to Pow: http://pow.cx | |
cd ~/.pow | |
ln -s $TM_PROJECT_DIRECTORY | |
echo "<p><strong>Done</strong></p>" |
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> | |
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js"> | |
</script> | |
<script type="text/javascript" charset="utf-8"> | |
var query = 'javascript'; | |
$(function() { | |
$.getJSON("http://search.twitter.com/search.json?callback=?&q=" + query, |
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
Using Vim settings from https://github.com/carlhuda/janus | |
:ls List open buffers | |
Ctrl+w c Closes the current window | |
o Begin a new line below the current one | |
:/searchterm Searches for the search word. Use n and N to move back | |
and forth | |
:map KEY COMMAND Creates a new command. Use <Leader> to choose the leader | |
key and <Enter> to execute it, for exsample. | |
H or M or L Moves to the first, middle or last line on screen. |
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
tail -f [filename] | |
- shows the last lines of a file. The -f options makes it stay open, reload the file | |
rm -R [folder] | |
- removes a folder and it's content |
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> | |
<style type="text/css"> | |
ul { list-style: none; margin: 0; padding: 0;} | |
input[type=text] { border: 0px; width: 600px;} | |
li[data-indent='1'] { padding-left: 20px; } | |
li[data-indent='2'] { margin-left: 40px; } | |
li[data-indent='3'] { margin-left: 60px; } |
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
localStorage.setItem("todo","My value") | |
var value = localStorage.getItem("todo") | |
alert(value) |
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
var woldsMostAdvancedObject = {name: "Awsome"}; | |
localStorage.setItem("todo",JSON.stringify(woldsMostAdvancedObject)) | |
var value = JSON.Parse(localStorage.getItem("todo")) | |
alert(value.name) |
OlderNewer