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
package main | |
import ( | |
"log" | |
"sync" | |
"time" | |
) | |
var END_OF_TEST_CASE_ID_STREAM_ITEM = "" |
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
import org.apache.commons.lang3.RandomStringUtils; | |
public class TokenService { | |
public String createToken(int playbackPosition) { | |
String suffix = RandomStringUtils.randomAlphanumeric(16); | |
return String.valueOf(playbackPosition) + ":" + suffix; | |
} | |
public int tokenToPlaybackIndex(String token) { |
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
package com.github.pavlo.bibi.tmp; | |
import com.amazon.speech.json.SpeechletRequestEnvelope; | |
import com.amazon.speech.speechlet.*; | |
import com.amazon.speech.speechlet.interfaces.audioplayer.AudioItem; | |
import com.amazon.speech.speechlet.interfaces.audioplayer.AudioPlayer; | |
import com.amazon.speech.speechlet.interfaces.audioplayer.PlayBehavior; | |
import com.amazon.speech.speechlet.interfaces.audioplayer.Stream; | |
import com.amazon.speech.speechlet.interfaces.audioplayer.directive.PlayDirective; | |
import com.amazon.speech.speechlet.interfaces.audioplayer.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
package com.github.pavlo.foobar; | |
import com.amazon.speech.json.SpeechletRequestEnvelope; | |
import com.amazon.speech.speechlet.*; | |
import com.amazon.speech.speechlet.interfaces.audioplayer.AudioItem; | |
import com.amazon.speech.speechlet.interfaces.audioplayer.AudioPlayer; | |
import com.amazon.speech.speechlet.interfaces.audioplayer.PlayBehavior; | |
import com.amazon.speech.speechlet.interfaces.audioplayer.Stream; | |
import com.amazon.speech.speechlet.interfaces.audioplayer.directive.PlayDirective; | |
import com.amazon.speech.speechlet.interfaces.audioplayer.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
private Optional<ECPublicKey> parseEcPublicKey(String json) { | |
try { | |
return Optional.ofNullable(((ECKey) JWK.parse(json)).toECPublicKey()); | |
} catch (ParseException | JOSEException e) { | |
// todo: log exception here | |
return Optional.empty(); | |
} | |
} | |
private String ecPublicKeyToJwk(ECPublicKey key) { |
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
package com.foo; | |
import sun.security.ec.ECPrivateKeyImpl; | |
import sun.security.ec.ECPublicKeyImpl; | |
import javax.crypto.KeyAgreement; | |
import java.math.BigInteger; | |
import java.security.*; | |
import java.security.interfaces.ECPrivateKey; | |
import java.security.interfaces.ECPublicKey; |
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
NSLog(@"%s \n%@", __FUNCTION__, [[[NSBundle mainBundle] infoDictionary] allKeys]); | |
NSArray *arr = [[[NSBundle mainBundle] infoDictionary] allKeys]; | |
for (int i = 0; i < [arr count]; i++) { | |
NSLog(@"%@: %@", arr[i], [[[NSBundle mainBundle] infoDictionary] objectForKey:arr[i]]); | |
} | |
UIRequiredDeviceCapabilities: ( | |
arm64 |
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
[{ | |
"key": "cmd+e", | |
"command": "workbench.action.openPreviousEditorFromHistory", | |
"when": "editorTextFocus" | |
}, | |
{ | |
"key": "cmd+e", | |
"command": "workbench.action.quickOpenNavigateNext", | |
"when": "inQuickOpen" | |
}] |
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
#rack orchestration stack delete --name mytest --profile=my-profile | |
#rack orchestration stack create --name mytest --template-file ./base_coreos.yaml --profile=my-profile | |
heat_template_version: 2014-10-16 | |
parameters: | |
ssh_key_name: | |
type: string | |
label: SSH Key name | |
description: User name to be configured for the application | |
default: pavlo | |
flavor: |
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
echo "STOPPING BOOT2DOCKER" | |
boot2docker stop | |
echo "APPLYING PORT FORWARDING RULES..." | |
for i in {8080..8100}; do | |
echo "Port: $i" | |
VBoxManage modifyvm "boot2docker-vm" --natpf1 delete "tcp-port$i"; | |
VBoxManage modifyvm "boot2docker-vm" --natpf1 delete "udp-port$i"; | |
NewerOlder