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
| require 'net/http' | |
| Net::HTTP.start("website.com") do |http| | |
| resp = http.get("/episode_archive/s#{season}ep#{episode}.mp3") | |
| open("s#{season}ep#{episode}.mp3", "w") do |file| | |
| file.write(resp.body) | |
| end | |
| end |
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
| <?xml version="1.0" encoding="utf-8" ?> | |
| <configuration> | |
| <system.serviceModel> | |
| <bindings> | |
| <basicHttpBinding> | |
| <binding name="NintexWorkflowWSSoap" closeTimeout="00:01:00" | |
| openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" | |
| allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" | |
| maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536" | |
| messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered" |
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
| private string LoadEmbeddedFile(string fileNameInAssembly, Encoding encoding) | |
| { | |
| var assembly = Assembly.GetExecutingAssembly(); | |
| var resName = from name in assembly.GetManifestResourceNames() | |
| where name.ToLower().EndsWith(fileNameInAssembly.ToLower()) | |
| select name; | |
| string text = default(string); | |
| var fullResourceName = resName.FirstOrDefault(); |
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
| (($) -> | |
| self = null | |
| local_variable = null | |
| private_methods = | |
| register_events: -> | |
| self.bind 'started', -> console.log 'it was started!' | |
| null | |
| methods = |
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
| public override int SaveChanges(SaveOptions options) | |
| { | |
| foreach (ObjectStateEntry entry in | |
| ObjectStateManager.GetObjectStateEntries( | |
| EntityState.Added | EntityState.Modified)) | |
| { | |
| // Validate the objects in the Added and Modified state | |
| // if the validation fails throw an exeption. | |
| } |
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
| <?xml version="1.0" encoding="utf-8"?> | |
| <CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet"> | |
| <CodeSnippet Format="1.0.0"> | |
| <Header> | |
| <SnippetTypes> | |
| <SnippetType>Expansion</SnippetType> | |
| </SnippetTypes> | |
| <Title>Test Method</Title> | |
| <Shortcut>testm</Shortcut> | |
| <Description>Code snippet for a test method</Description> |
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
| RAISERROR ('fooo error', 16, 1) |
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
| [UIView animateWithDuration: 1.0 | |
| delay: 0.0 | |
| options: UIViewAnimationOptionCurveEaseIn | |
| animations:^{ | |
| self.view.alpha = 0.0; | |
| drawingVC.view.alpha = 0.0; | |
| drawingVC.view.frame = CGRectMake(400, 400, 400, 400); | |
| } | |
| completion:nil]; |
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
| - (NSString *)format: (NSDate*) date usingFormat:(NSString *)dateFormat | |
| { | |
| NSCalendar *cal = [[NSCalendar alloc] initWithCalendarIdentifier:NSGregorianCalendar]; | |
| NSDateFormatter *formatter = [[NSDateFormatter alloc] init]; | |
| [formatter setDateFormat:dateFormat]; | |
| [formatter setCalendar:cal]; | |
| [formatter setLocale:[NSLocale currentLocale]]; | |
| NSString *ret = [formatter stringFromDate:date]; | |
| [formatter release]; | |
| [cal release]; |
NewerOlder