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
// Reduced/boiled down from a webpack bundle, obviously not the real thing | |
var zing = {}; | |
(function foo(module, exports, __webpack_require__) { | |
"use strict"; | |
exports.default = sortableContainer; | |
function sortableContainer(WrappedComponent) { | |
var _class, |
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 React = require('react'); | |
var ReactDOM = require('react-dom'); | |
var ReactMarkdown = require('react-markdown'); | |
var input = '# This is a header\n\nAnd this is a paragraph'; | |
ReactDOM.render( | |
React.createElement(ReactMarkdown, {source: input}), | |
document.getElementById('container') | |
); |
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 | |
require_once './vendor/autoload.php'; | |
$client = new Sanity\Client([ | |
'projectId' => '3do82whm', | |
'dataset' => 'production', | |
]); | |
$doc = $client->getDocument('47abbe60-f184-4eff-99e0-3a85c5c07c3a'); | |
$html = Sanity\BlockContent::toHtml($doc['body'], [ |
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 | |
// Now: | |
$externalRelatedArticles = $relatedArticlesService->prepare(array('scope' => 'external', | |
'articleId' => $article->getId(), | |
'tagId' => $tagId, | |
'limitByDomain' => 2 | |
)); | |
// Suggested: | |
$externalRelatedArticles = $relatedArticlesService->prepare(array( |
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 | |
$fileName = 'someImage.png'; | |
try { | |
if ($imbo->imageExists($fileName)) { | |
$photoHash = $imbo->getImageIdentifier($fileName); | |
} else { | |
$response = $imbo->addImage($fileName); | |
$photoHash = $response->getImageIdentifier(); | |
} |
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
Index: Oauth/Client.php | |
=================================================================== | |
--- Oauth/Client.php (revision 43) | |
+++ Oauth/Client.php (working copy) | |
@@ -310,7 +310,8 @@ | |
$this->getUri(true), $this->_config, $params | |
); | |
} | |
- if (!empty($this->paramsPost)) { | |
+ if (!empty($this->paramsPost) && $this->enctype != self::ENC_FORMDATA) { |
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
article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block;} | |
audio,canvas,video{display:inline-block;*display:inline;*zoom:1;} | |
audio:not([controls]){display:none;} | |
html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;} | |
a:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;} | |
a:hover,a:active{outline:0;} | |
sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline;} | |
sup{top:-0.5em;} | |
sub{bottom:-0.25em;} | |
img{max-width:100%;height:auto;border:0;-ms-interpolation-mode:bicubic;} |
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
/*jslint white: false */ | |
var langs; | |
langs = { | |
"de" : { | |
today: "heute um %time", | |
tomorrow: 'morgen um %time', | |
next: '%weekday um %time', | |
yesterday: 'gestern um %time', |
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
2 bokser kokosmelk | |
4 dl vann | |
7-8 teskjer green curry paste | |
1 sjalottløk | |
1 rødløk | |
3 fedd hvitløk | |
"En god dæsj" fiskesaus (1 ss? 2 ss?) | |
4 chili | |
1 gulerot |
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 | |
$postData = array(); // Fill this with your JSON/JS | |
$context = stream_context_create(array( | |
'http' => array( | |
'method' => 'POST', | |
'header' => 'Content-Type: application/json'. "\r\n", | |
'content' => json_encode($postData) | |
) | |
)); |