Ctrl+KB | toggle side bar |
Ctrl+Shift+P | command palette |
Ctrl+` | python console |
Ctrl+N | new file |
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
<?php | |
function curlySwap($shortcodes,$string) { | |
return preg_replace_callback( | |
'/\{\{(\w+)\}\}/', | |
function ($match) { | |
global $shortcodes; | |
return $shortcodes[substr($match[0], 2, -2)]; | |
}, | |
$string | |
); |
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
<?php | |
/* | |
* | |
* Get posts with a standard query | |
* Include all the meta data in the result | |
* | |
*/ | |
function get_posts_with_meta( $args ) { | |
$query = get_posts($args); |
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
git config --global alias.lg "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit" |
Description of what the REST endpoint does.
- GET
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
NSMutableURLRequest *request = [[NSMutableURLRequest alloc] init]; | |
[request setHTTPMethod:@"GET"]; | |
NSString *url = @"http://localhost:5000/api/updates/"; | |
if(checksum){ | |
url = [NSString stringWithFormat:@"%@?checksum=%@", url, checksum]; | |
} | |
[request setURL:[NSURL URLWithString:url]]; | |
[[[NSURLSession sharedSession] dataTaskWithRequest:request completionHandler:^(NSData *data, NSURLResponse *response, NSError *err) { | |
NSInteger statusCode = [(NSHTTPURLResponse *)response statusCode]; |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<CORSConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/"> | |
<CORSRule> | |
<AllowedOrigin>*</AllowedOrigin> | |
<AllowedMethod>GET</AllowedMethod> | |
<MaxAgeSeconds>3000</MaxAgeSeconds> | |
<AllowedHeader>Authorization</AllowedHeader> | |
<AllowedHeader>Content-*</AllowedHeader> | |
<AllowedHeader>Host</AllowedHeader> | |
</CORSRule> |
]
[Introduction text about the project. This should be a short summary of the project that explains what it is and why anyone should care about it]
[optional image]
[include a bulleted list of any dependencies your project requires. Include links to the dependencies, and additionally links to helpful resources to get up and running with the project's dependencies]
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
<html> | |
<!-- See live at https://codepen.io/paulera/pen/ejGKEr --> | |
<head> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.5.0/Chart.min.js"></script> | |
<script> | |
/** | |
* Sum elements of an array up to the index provided. | |
*/ |
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
'use strict'; | |
var mockDelay; | |
var mockError; | |
var mockResponse = { | |
status: function () { | |
return 200; | |
}, | |
ok: true, | |
get: jest.genMockFunction(), |
OlderNewer