A Pen by Matthew A.K. Smith on CodePen.
This file contains hidden or 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
import UIKit | |
import WebKit | |
class ViewController: UIViewController { | |
var webView: WKWebView = WKWebView() { | |
didSet { | |
webView.navigationDelegate = self | |
webView.uiDelegate = self | |
} |
This file contains hidden or 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
// Get all users | |
var url = "http://localhost:8080/api/v1/users"; | |
var xhr = new XMLHttpRequest() | |
xhr.open('GET', url, true) | |
xhr.onload = function () { | |
var users = JSON.parse(xhr.responseText); | |
if (xhr.readyState == 4 && xhr.status == "200") { | |
console.table(users); | |
} else { | |
console.error(users); |
This file contains hidden or 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
//////////////////////////////////////// | |
// Plain SASS Trigonometry Algorithm // | |
//////////////////////////////////////// | |
$pi: 3.14159265359; | |
$_precision: 10; | |
@function pow($base, $exp) { | |
$value: $base; | |
@if $exp > 1 { |
This file contains hidden or 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 () { | |
var container = $('.js-users-crop'); | |
if (container.length === 0) return; | |
var config = { | |
rowsCrop: (!container.attr('data-row')) ? 2 : +container.attr('data-row'), // Получаем сколько хотим видеть рядов или 2 | |
widthChildren: container.children().outerWidth(true), | |
heightChildren: container.children().outerHeight(true), | |
openText: 'Показать всех', |
This file contains hidden or 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 xhr($url, $type, $data) { | |
var xmlhttp; | |
try { | |
xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); | |
} catch (e) { | |
try { | |
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); | |
} catch (E) { | |
xmlhttp = false; |
This file contains hidden or 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
<div class="gallery-container"> | |
<div id="gallery" class="gallery-images"> | |
<img src="http://placehold.it/500" alt="" /> | |
<img src="http://placehold.it/500" alt="" /> | |
<img src="http://placehold.it/500" alt="" /> | |
<img src="http://placehold.it/500" alt="" /> | |
<img src="http://placehold.it/500" alt="" /> | |
</div> | |
<div class="gallery-thumbs-container"> | |
<ul id="gallery-thumbs" class="gallery-thumbs-list"> |
This file contains hidden or 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
alias g='git' | |
alias gst='git status' | |
alias gc='git commit -a -m' | |
alias gco='git checkout' | |
alias gcm='git checkout master' | |
alias gb='git branch' | |
alias glg='git log --stat --max-count=5' | |
alias ga='git add .' | |
alias gsh='git stash' |
This file contains hidden or 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
$slick-font-path ?= "../fonts/" | |
$slick-font-family ?= "slick" | |
$slick-loader-path ?= "../images/" | |
$slick-arrow-color ?= white | |
$slick-dot-color ?= black | |
$slick-dot-color-active ?= $slick-dot-color | |
$slick-prev-character ?= '\2190' | |
$slick-next-character ?= '\2192' | |
$slick-dot-character ?= '\2022' | |
$slick-dot-size ?= 6px |
This file contains hidden or 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
Show hidden characters
{ | |
"auto_complete_selector": "source, text", | |
"bold_folder_labels": true, | |
"color_scheme": "Packages/Material Theme/schemes/Material-Theme.tmTheme", | |
"detect_slow_plugins": false, | |
"drag_text": true, | |
"draw_white_space": "all", | |
"font_face": "Monaco", | |
"font_size": 12.0, | |
"hayaku_CSS_prefixes_disable": true, |
NewerOlder