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
main | |
*.dSYM |
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
#include <stdlib.h> | |
#include <stdio.h> | |
#include <string.h> | |
typedef struct Header { | |
char *key; | |
char *value; | |
} Header; | |
typedef struct Response { |
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
main | |
*.o |
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
class HealthCheck | |
class Middleware | |
def initialize(application) | |
@application = application | |
end | |
def call(environment) | |
if environment['PATH_INFO'] == '/health-check' | |
if HealthCheck.healthy? |
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
#include <stdlib.h> | |
#include <string.h> | |
char * | |
str_upcase(char *source) | |
{ | |
int i = 0; | |
int shift = 0; | |
char ch = '\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
#include <stdlib.h> | |
#include <stdio.h> | |
int | |
main(int argc, char *argv[]) | |
{ | |
if (argc <= 1) { | |
printf("Error: You must supply a value\n"); | |
return 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
#include <stdio.h> | |
int | |
main (int argc, char *argv[]) | |
{ | |
char *name = "Patrick"; | |
char *other = name; | |
printf("Name is: %s\n", name); | |
printf("Other is: %s\n", other); |
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
int main(int argc, char *argv[]) | |
{ | |
int val = 5; | |
switch(val) { | |
case 0: do { | |
case 5: | |
printf("Got here, value is %d\n", val); | |
case 4: | |
printf("Got here, value is %d\n", val); |
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
class Bar | |
def initialize(name) | |
@name = name | |
end | |
def to_str | |
@name | |
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
class EmailCollection | |
include Enumerable | |
delegate :each, :to => :email_addresses | |
def initialize(raw_email_addresses) | |
@raw_email_addresses = raw_email_addresses | |
end | |
def valid_emails | |
select {|e| e.match(email_regex) } |