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
""" | |
Requirements: | |
* A Wordpress Blog | |
* Ghost export file (json). | |
* Python Packages: python-wordpress-xmlrpc | |
>>> pip install python-wordpress-xmlrpc | |
WARNING: |
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
[TestFixture] | |
public class ControllerTests | |
{ | |
[Test] | |
public void Foo() | |
{ | |
CustomersController controller = new CustomersController().Testable() | |
.WithSession(Session) | |
.Authenticated(user => user.Foo = "bar"); | |
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
{{ "{% for post in site.posts" }} %} | |
<li> | |
<span>{{ "{{ post.date | date_to_string" }} }}</span> | |
<a href="{{ "{{ post.url" }} }}">{{ "{{ post.title" }} }}</a> | |
</li> | |
{{ "{% endfor" }} %} |
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
$user = "\myusername" | |
$pass = ConvertTo-SecureString -String "supersecretpassword" -AsPlainText -Force | |
$cred = New-Object -TypeName System.Management.Automation.PSCredential | |
-ArgumentList $user ,$pass | |
New-PSDrive -Name myshare -PSProvider FileSystem -Root \\remoteserver\some-share -Credential $cred | |
Copy-Item C:\Users\James\test.txt myshare:\ |
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
Set-ExecutionPolicy RemoteSigned | |
Import-Module WebAdministration | |
Function bootstrap($siteName, $hostHeader, $sitePath, $pipelineMode) | |
{ | |
$site = Get-WebSite | where { $_.Name -eq $siteName } | |
if($site -eq $null) | |
{ | |
echo "Creating site: $siteName" |
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
{"nextId":null,"items":[{"title":"How to contribute to an open source project: look for TODOs in code","url":"http://ivanzuzak.info/2012/03/03/todos-ideas-for-contributing-to-open-source-projects.html","id":3660137,"commentCount":16,"points":127,"postedAgo":"3 hours ago","postedBy":"digitalnalogika"},{"title":"Research in programming languages","url":"http://tagide.com/blog/2012/03/research-in-programming-languages/","id":3660417,"commentCount":5,"points":23,"postedAgo":"1 hour ago","postedBy":"ltratt"},{"title":"The iPad is the new IE6","url":"http://blog.millermedeiros.com/ipad-is-the-new-ie6/","id":3660424,"commentCount":15,"points":35,"postedAgo":"1 hour ago","postedBy":"chewxy"},{"title":"Export to HTML5 from Flash Professional","url":"http://blogs.adobe.com/creativelayer/2012/02/28/html5-flash-professional/","id":3660341,"commentCount":8,"points":24,"postedAgo":"1 hour ago","postedBy":"kevinwdavid"},{"title":"Javascript libraries for animation in HTML5","url":"http://createjs.com/","id":3660445,"comment |
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
sudo port install tiff -macosx imagemagick +q8 +gs +wmf | |
Password: | |
---> Computing dependencies for tiff | |
---> Dependencies to be installed: jpeg | |
---> Fetching jpeg | |
---> Attempting to fetch jpegsrc.v8c.tar.gz from http://lil.fr.distfiles.macports.org/jpeg | |
---> Verifying checksum(s) for jpeg | |
---> Extracting jpeg | |
---> Configuring jpeg | |
---> Building jpeg |
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 HideKeyboardForTextField(UITextField textField) | |
{ | |
textField.ResignFirstResponder(); | |
} |
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
Newtonsoft.Json StringUtils line 353 | |
public static TSource ForgivingCaseSensitiveFind<TSource>(this IEnumerable<TSource> source, Func<TSource, string> valueSelector, string testValue) | |
{ | |
if (source == null) | |
throw new ArgumentNullException("source"); | |
if (valueSelector == null) | |
throw new ArgumentNullException("valueSelector"); | |
var caseInsensitiveResults = source.Where(s => string.Compare(valueSelector(s), testValue, StringComparison.OrdinalIgnoreCase) == 0); |
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
GetUtcOffSet - JsonConvert.cs Line 111 | |
private static TimeSpan GetUtcOffset(DateTime dateTime) | |
{ | |
#if SILVERLIGHT | |
return TimeZoneInfo.Local.GetUtcOffset(dateTime); | |
#else | |
return TimeZone.CurrentTimeZone.GetUtcOffset(dateTime); | |
#endif | |
} |
NewerOlder