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 array1 = [1, 2, 3, 4, 5, 6] | |
const array2 = array1.flatMap((x) => new Array(x % 2 == 0 ? 2 : 3).fill(null).map(() => x)) | |
console.log(array2) |
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 ubuntu | |
RUN apt-get update && apt-get -y upgrade | |
RUN apt-get install -y curl && apt-get install -y jq | |
RUN curl -OL https://github.com/elkowar/pipr/releases/download/v0.0.16/pipr | |
RUN chmod +x ./pipr | |
RUN mv ./pipr /usr/local/bin | |
WORKDIR /var/pipr | |
RUN apt-get install bubblewrap |
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
#!/usr/bin/env bash | |
token=$1 | |
shift | |
for user in "${@}"; do | |
echo "${user}: $(curl -s -H "Authorization: ${token}"\ | |
"https://api.github.com/search/issues?q=is%3Apr+is%3Aopen+review-requested%3A${user}" \ | |
| jq '.total_count')" | |
done |
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
#/usr/bin/env bash | |
sudo ip netns add ns1 | |
sudo ip netns add ns2 | |
sudo ip netns exec ns1 ip link set lo up | |
sudo ip netns exec ns2 ip link set lo up | |
sudo ip link add br0 type bridge | |
sudo ip link add name ns-veth1 type veth peer name br-veth1 | |
sudo ip link add name ns-veth2 type veth peer name br-veth2 | |
sudo ip link set ns-veth1 netns ns1 |
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
{ | |
"title": "Discord-Enter-Modification", | |
"rules": [ | |
{ | |
"description": "Discord-Enter-Modification", | |
"manipulators": [ | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "return_or_enter" |
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
use std::io; | |
trait Fruit { | |
fn get_size(&self) -> f32; | |
} | |
struct Apple { | |
size: f32, | |
} |
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
DateTime.parse("Fri Oct 30 02:20:44 +0000 2020").new_offset("+09:00").iso8601 |
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 "bundler/inline" | |
gemfile(true) do | |
source "https://rubygems.org" | |
git_source(:github) { |repo| "https://github.com/#{repo}.git" } | |
# Activate the gem you are reporting the issue against. | |
gem "activerecord", "6.0.0" | |
end |
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 "bundler/inline" | |
gemfile(true) do | |
source "https://rubygems.org" | |
git_source(:github) { |repo| "https://github.com/#{repo}.git" } | |
# Activate the gem you are reporting the issue against. | |
gem "activerecord", "6.0.0" | |
end |
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 "bundler/inline" | |
gemfile(true) do | |
source "https://rubygems.org" | |
git_source(:github) { |repo| "https://github.com/#{repo}.git" } | |
# Activate the gem you are reporting the issue against. | |
gem "activerecord", "6.0.0" | |
end |
NewerOlder