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 | |
import CoreLocation | |
class ViewController: UIViewController , CLLocationManagerDelegate, WKScriptMessageHandler{ | |
var webView: WKWebView? | |
var manager: CLLocationManager! | |
override func viewDidLoad() { | |
super.viewDidLoad() |
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
# From http://portainer.io/ | |
# Mac and Linux only | |
docker run -it -name porteiner-ui -v "/var/run/docker.sock:/var/run/docker.sock" -p 9000:9000 portainer/portainer | |
# Open portainer in a web browser | |
google-chrome http://localhost:9000 | |
# Enter a password and login => ENjoy :) | |
# Manager images, containers lifecycle |
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
# Load plugins | |
gulp = require("gulp") | |
stylus = require("gulp-stylus") | |
minifycss = require("gulp-minify-css") | |
coffee = require("gulp-coffee") | |
uglify = require("gulp-uglify") | |
imagemin = require("gulp-imagemin") | |
rename = require("gulp-rename") | |
clean = require("gulp-clean") | |
concat = require("gulp-concat") |
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 git_current_branch () { | |
local ref | |
ref="$(git symbolic-ref --quiet HEAD 2>/dev/null)" | |
local ret=$? | |
if [[ $ret != 0 ]] | |
then | |
[[ $ret == 128 ]] && return 0 | |
ref=$(git rev-parse --short HEAD 2>/dev/null) || return 0 | |
fi | |
echo "${ref#refs/heads/}" |
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"> |