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
// Usage: | |
// getSVGOuterHTML('.icon-preview__svg svg'); | |
function getSVGOuterHTML(selector){ | |
var icon = document.querySelector(selector); | |
var attrs = Array.prototype.map.call(icon.attributes, function(attr){ | |
return attr.name + '="' + attr.value + '"'; | |
}).join(' '); | |
return '<svg ' + attrs + '>' + icon.innerHTML + '</svg>'; | |
} |
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 names = [ | |
'Catherine', | |
'Brenda', | |
'Cecilia', | |
'Grazy', | |
'Artem', | |
'Sage', | |
'Vanessa', |
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
javascript:(function(){ location.href = (location.hostname === 'localhost' ? 'https://paulcamper.com' : 'http://localhost:3000') + location.pathname; }()); void(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
Текст вводится НА АНГЛ. ЯЗЫКЕ в формате: | |
H; ; 1=450; 2=355; 3=290 | |
R; The Monroe Apts; 1=432; 2=370; 3=310 | |
R; Columbus Residence; 1=432; | |
Каждый вариант жилья на новой строке. | |
Фичи жилья разделены точками с запятой, где: | |
1) Буква H или R — тип (Homestay или Residence) |
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 | |
/** | |
* @package Resonar | |
* @since Resonar 1.0 | |
*/ | |
?> | |
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> | |
<?php | |
if ( has_post_thumbnail() && ! post_password_required() ) : |
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 | |
// Inside <div class="entry-content"> | |
// docs/wp-content/themes/resonar/content-single.php | |
$locale_data = localize_school_page(get_post_custom($ID), ICL_LANGUAGE_CODE); | |
echo "<h3>" . $locale_data['labels']['select_program_and_dates'] . '</h3>'; | |
foreach ($locale_data['programs'] as $program) { |
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
javascript: (function (){ var scripts = document.getElementsByTagName('script'); var friendsList; for (var i = 0; i < scripts.length; i++) { var script = scripts[i]; if (script.innerHTML.indexOf('InitialChatFriendsList') > -1) { var friendsListString = script.innerHTML.split('"InitialChatFriendsList",[],{"list":')[1].split(',"groups"')[0]; friendsList = JSON.parse(friendsListString); console.log('friendsList:', friendsList); break; } } var html = friendsList.map(function(id, i){ id = id = id.split('-')[0]; var url = 'http://graph.facebook.com/' + id + '/picture?type=normal'; return '<a target="_blank" href="https://www.facebook.com/' + id + '"><img src="' + url + '"></a>'; }).join('\n'); var css = '<style> a { display: inline-block; margin: 7px; } img { max-width: 70px; max-height: 70px; vertical-align: top; } </style>'; open('data:text/html, <html>' + css + html + '</html>'); }()); |
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
function req(data){ | |
$.ajax({ | |
url: 'https://', | |
method: 'POST', | |
data: JSON.stringify(data), | |
contentType: 'application/json', | |
headers: { | |
'x-csrftoken': 'xpUoEKTvASGAYOhaFoPy3Boj4aGM4zsF' | |
}, | |
success: function(data){ |
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
{ | |
/* | |
* ENVIRONMENTS | |
* ================= | |
*/ | |
"es3": true, | |
// Define globals exposed by modern browsers. | |
"browser": true, |
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
REQUIRED_KEYS = [ | |
"API_SERVER_URL" | |
] | |
ENVIRONMENT = {} | |
for key in REQUIRED_KEYS | |
unless key of process.env | |
console.error "MISSING REQUIRED KEY: " + key | |
process.exit 1 |