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
upload: function(file) { | |
var def = new $.Deferred(); | |
var that = this; | |
var xhr = this.client.writeFile(file.name, file, {noOverwrite: true}, function(error, metadata) { | |
if (error) { | |
def.reject(error); | |
return; | |
} | |
def.resolve(metadata); |
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
handleFile: function(file) { | |
if (file.size / 1000000 > 150) { | |
var err = "We only support files up to 150 MB"; | |
alert(err); | |
... | |
} | |
var that = this; | |
$.when(this.upload(file)).pipe(this.getSharedUrl). |
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
"AWS4-HMAC-SHA256 Credential=AKIAJ4NXC5Z5PTTEN5AQ/" strftime({"%Y%m%d"}, now) "/eu-central-1/s3/aws4_request, SignedHeaders=date;host;x-amz-content-sha256, Signature=" | |
digest.hmac_sha256_base64( | |
digest.hmac_sha256_base64( | |
digest.hmac_sha256_base64( | |
digest.hmac_sha256_base64( | |
digest.hmac_sha256_base64("AWS4Zen9WnHAHYF5QeTdZIFyKcFW6DbrCCYXMJIKgTI5", strftime({"%Y%m%d"}, now)) | |
, "eu-central-1") | |
, "s3") | |
, "aws4_request") | |
, |
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
#!/bin/bash | |
RESOLUTION1="640x360" | |
BITRATE1="620000" | |
RESOLUTION2="854x480" | |
BITRATE2="1493000" | |
RESOLUTION3="1024x576" | |
BITRATE3="2131000" | |
RESOLUTION4="1280x720" | |
BITRATE4="3658000" | |
RESOLUTION5="1920x1080" |
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
$ aws cloudwatch get-metric-statistics --namespace AWS/ECS --metric-name CPUUtilization --period 180 --statistics Average --dimensions Name=ClusterName,Value=jet-production Name=ServiceName,Value=jet-production --start-time 2016-07-14T10:15:00 --end-time 2016-07-14T11:00:00 | |
{ | |
"Datapoints": [ | |
{ | |
"Timestamp": "2016-07-14T10:48:00Z", | |
"Average": 81675.18434092174, | |
"Unit": "Percent" | |
}, | |
{ | |
"Timestamp": "2016-07-14T10:39:00Z", |
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
{ | |
"$schema": "http://json-schema.org/draft-04/schema#", | |
"id": "http://json-schema.org/geojson/geojson.json#", | |
"title": "Geo JSON Feature object", | |
"description": "Schema for a Geo JSON feature object", | |
"required": [ | |
"geometry", | |
"properties" | |
], | |
"properties": { |
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
{ | |
"swagger": "2.0", | |
"info": { | |
"title": "POI API V0.1", | |
"version": "v0.1" | |
}, | |
"host": "api.heybertha.de", | |
"securityDefinitions": { | |
"Bearer": { | |
"type": "apiKey", |
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
$icons: ( | |
follow: 'a', | |
followed: 'b', | |
unfollow: 'c', | |
checkmark: 'e' | |
); | |
$Placeholder-Selectors: (); | |
@mixin icon($name, $color, $extend: true) { | |
@include icon-static($extend); |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src='data:text/javascript;base64,LyohIGpRdWVyeSB2MS45LjEgfCAoYykgMjAwNSwgMjAxMiBqUXVlcnkgRm91 | |
bmRhdGlvbiwgSW5jLiB8IGpxdWVyeS5vcmcvbGljZW5zZQovL0Agc291cmNl | |
TWFwcGluZ1VSTD1qcXVlcnkubWluLm1hcAoqLyhmdW5jdGlvbihlLHQpe3Zh | |
ciBuLHIsaT10eXBlb2YgdCxvPWUuZG9jdW1lbnQsYT1lLmxvY2F0aW9uLHM9 | |
ZS5qUXVlcnksdT1lLiQsbD17fSxjPVtdLHA9IjEuOS4xIixmPWMuY29uY2F0 | |
LGQ9Yy5wdXNoLGg9Yy5zbGljZSxnPWMuaW5kZXhPZixtPWwudG9TdHJpbmcs | |
eT1sLmhhc093blByb3BlcnR5LHY9cC50cmltLGI9ZnVuY3Rpb24oZSx0KXty |
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
require 'rack-mini-profiler' | |
require 'flamegraph' | |
require 'stackprof' | |
def a | |
puts "method a started!" | |
sleep 0.5 | |
puts "method a ended!" | |
end |