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
docker-machine ssh default "sudo sh -c \"echo 'export http_proxy=http://194.138.0.3:9400' >> /var/lib/boot2docker/profile \"" |
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
http_proxy=http://194.138.0.3:9400 | |
https_proxy=http://194.138.0.3:9400 |
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 | |
docker volume create $docker_volume | |
docker-machine ssh default -- "sh -c 'sudo mount -o uid=1000,gid=1000 -t vboxsf $docker_volume $(docker inspect $docker_volume -f {{.Mountpoint}})'" |
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
{ | |
"language": "en", | |
"timezone": "UTC", | |
"agentName": "SaraCSML", | |
"useWebhook": false, | |
"description": "Sara is support chatbot for update management.", | |
"fallbackResponses": [ | |
"Sorry can you rephrase that?", | |
"I'm still learning to speak with humans. What you mean?" | |
], |
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
robocopy . E:\backup\GIT\. /IS /S /XD node_modules |
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 { ipcMain, BrowserWindow, Event } from 'electron' | |
const getResponseChannels = (channel:string) => ({ | |
sendChannel: `%app-send-channel-${channel}`, | |
dataChannel: `%app-response-data-channel-${channel}`, | |
errorChannel: `%app-response-error-channel-${channel}` | |
}) | |
const getRendererResponseChannels = (windowId: number, channel: string) => ({ | |
sendChannel: `%app-send-channel-${windowId}-${channel}`, |
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 { Observable } from 'rxjs'; | |
import fetch, { RequestInit, Request, Response } from 'node-fetch'; | |
import AbortController from 'abort-controller'; | |
export type RequestInit = RequestInit; | |
export function fromFetch(input: string | Request, init?: RequestInit): Observable<Response> { | |
return new Observable<Response>(subscriber => { | |
const controller = new AbortController(); | |
const signal = controller.signal; |
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
interface DocumentWithFullscreen extends HTMLDocument { | |
mozFullScreenElement?: Element; | |
msFullscreenElement?: Element; | |
webkitFullscreenElement?: Element; | |
msExitFullscreen?: () => void; | |
mozCancelFullScreen?: () => void; | |
webkitExitFullscreen?: () => void; | |
} | |
export function isFullScreen(): boolean { |
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
interface Presentation { | |
defaultRequest: PresentationRequest; | |
receiver: PresentationReceiver; | |
} | |
interface PresentationReceiver { | |
connectionList: Promise<PresentationConnectionList>; | |
} | |
interface PresentationConnection { | |
binaryType: ArrayBuffer | Blob; |
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
param([Parameter(Mandatory)]$key, [Parameter(Mandatory)]$value, $file='.\i18n.json') | |
if ($value -eq $null) { | |
$value = read-host -Prompt "Please enter a value" | |
} | |
function Format-Json([Parameter(Mandatory, ValueFromPipeline)][String] $json) { | |
$indent = 0; | |
($json -Split "`n" | % { | |
if ($_ -match '[\}\]]\s*,?\s*$') { |