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
| const z = (f) => { | |
| const g = (x) => { | |
| return f((v) => { | |
| const xx = x(x); | |
| return xx(v); | |
| }); | |
| }; | |
| return g(g); | |
| }; |
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 { | |
| CloudWatchLogsClient, | |
| DescribeLogGroupsCommand, | |
| DescribeLogStreamsCommand, | |
| GetLogEventsCommand, | |
| } from "@aws-sdk/client-cloudwatch-logs"; | |
| import { fromIni } from "@aws-sdk/credential-provider-ini"; | |
| import * as date from "date-fns"; | |
| import fs from "fs"; |
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
| package main | |
| import ( | |
| "bytes" | |
| "crypto/rand" | |
| "encoding/json" | |
| "errors" | |
| "io/ioutil" | |
| "net/http" | |
| "net/url" |
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 debian:buster | |
| RUN apt-get update && apt-get install -y openssh-server | |
| RUN mkdir /var/run/sshd | |
| RUN echo 'root:screencast' | chpasswd | |
| RUN sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config | |
| # SSH login fix. Otherwise user is kicked off after login | |
| RUN sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd |
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 React, { useEffect, MutableRefObject, useRef, useState } from "react"; | |
| import "./App.css"; | |
| const VideoRoom: React.FC = () => { | |
| const refSelfMediaStream: MutableRefObject<MediaStream | null> = useRef(null); | |
| const refSelfVideo: MutableRefObject<HTMLVideoElement | null> = useRef(null); | |
| const refPc1: MutableRefObject<RTCPeerConnection> = useRef( | |
| new RTCPeerConnection() | |
| ); | |
| const refPc2: MutableRefObject<RTCPeerConnection> = useRef( |
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
| #!/bin/bash | |
| # Ubuntuデフォルトの/etc/ssl/openssl.cnf 前提。ベースは/usr/lib/ssl/misc/CA.sh | |
| set -ex | |
| CATOP="./demoCA" | |
| mkdir ${CATOP} | |
| mkdir -p ${CATOP}/certs | |
| mkdir -p ${CATOP}/crl |
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
| // ==Taberareloo== | |
| // { | |
| // "name" : "Fix Tumblr.getForm 2017.08" | |
| // , "description" : "Fix Tumblr.getForm 2017.08" | |
| // , "include" : ["background"] | |
| // , "version" : "0.0.1" | |
| // , "downloadURL" : "https://gist.githubusercontent.com/keshihoriuchi/183993d8ba41828530f1269b5ea45550/raw/patch.fix.tumblr.getForm.tbrl.js" | |
| // } | |
| // ==/Taberareloo== |
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
| require 'parallel' | |
| require 'retryable' | |
| res = Parallel.map((1..10).to_a, in_threads: 10) do |a| | |
| Retryable.retryable(tries: 50) do | |
| Parallel.map([a], in_processes: 1) do |b| | |
| Thread.current.abort_on_exception = true | |
| exit if [1, 2].sample == 1 | |
| b + 1 | |
| end[0] |
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
| // Place your settings in this file to overwrite the default settings | |
| { | |
| "editor.wrappingColumn": 0, | |
| "editor.insertSpaces": true, | |
| "editor.tabSize": 2 | |
| } |
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 centos:centos6 | |
| RUN yum install -y passwd openssh openssh-server openssh-clients sudo | |
| RUN sed -ri 's/UsePAM yes/UsePAM no/g' /etc/ssh/sshd_config | |
| RUN /etc/init.d/sshd start | |
| RUN /etc/init.d/sshd stop | |
| # setup user | |
| RUN useradd docker | |
| RUN passwd -fu docker |
NewerOlder