Skip to content

Instantly share code, notes, and snippets.

<script>
$(document).on('click', '#make_header_red', function() {
$('#header').css('font-color', 'red');
});
</script>
Module::IncludeModule('iblock');
$Res = CIBlockElement::GetList(array(), array("IBLOCK_ID" => 1, "ACTIVE" => 'Y'), false, false, array());
while ($arItem = $res->GetNext()) {
echo $arItem["NAME"]."\n";
}
<script>
$('#fill-me').text('пример текста');
</script>
<style>
#paint-me {
font-color: red;
}
</sенду>

Keybase proof

I hereby claim:

  • I am stansidel on github.
  • I am stansidel (https://keybase.io/stansidel) on keybase.
  • I have a public key ASA3-6gQD-i4Zgdhod4QajW-7MW9ljmEU1C72HNlUrab6go

To claim this, I am signing this object:

@stansidel
stansidel / Test.md
Last active November 8, 2016 09:57

Test

<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>The HTML5 Herald</title>
<meta name="description" content="The HTML5 Herald">
<meta name="author" content="SitePoint">
Yandex 52.0.2743.2765 (64-bit version)
Revision ac660e94e25fbeaea6d16541969c3c83a641fd5d
OS Mac OS X
Blink 537.36 (@db2a30b1236da2645d15fc4ae4f0ff27082837e9)
JavaScript V8 5.2.361.49
Flash 23.0.0.162
User Agent Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 YaBrowser/16.9.0.2765 Safari/537.36
Command Line /Applications/Yandex.app/Contents/MacOS/Yandex --flag-switches-begin --flag-switches-end --disable-client-side-phishing-detection --profile-info --disable-field-trial-config --enable-mse-h264-support
Executable Path /Applications/Yandex.app/Contents/MacOS/Yandex
Profile Path /Users/stansidel/Library/Application Support/Yandex/YandexBrowser/Default
@stansidel
stansidel / sample.swift
Created August 24, 2016 08:05
Reading input and writing to stderr in Swift (for programming challenges)
import Foundation
public struct StderrOutputStream: OutputStreamType {
public mutating func write(string: String) { fputs(string, stderr) }
}
public var errStream = StderrOutputStream()
let T = Int(readLine()!)!
debugPrint("T = \(T)", toStream: &errStream)
@stansidel
stansidel / SelectImageVC.swift
Created July 4, 2016 11:15
Presenting UIAlertController for uploading a photo
@IBAction func loadImage(sender: AnyObject) {
let imagePickerActionSheet = UIAlertController(title: "Take/Upload Photo",
message: nil, preferredStyle: .ActionSheet)
if UIImagePickerController.isSourceTypeAvailable(.Camera) {
let cameraButton = UIAlertAction(title: "Take Photo", style: .Default, handler: { (alert) in
let imagePicker = UIImagePickerController()
imagePicker.delegate = self
imagePicker.sourceType = .Camera
self.presentViewController(imagePicker, animated: true, completion: nil)
})