Skip to content

Instantly share code, notes, and snippets.

👩‍🎓

久我山菜々 nna774

👩‍🎓
Block or report user

Report or block nna774

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@nna774
nna774 / node.def
Created Feb 26, 2020
/opt/vyatta/share/vyatta-cfg/templates/interfaces/ipv6-tunnel/node.tag/encapsulation/node.def
View node.def
type: txt
help: Encapsulation of this IPv6 tunnel interface [REQUIRED]
default: "ip6gre"
syntax:expression: $VAR(@) in "ip6gre", "ipip6", "any"; "Must be (ip6gre, ipip6, any)"
allowed: echo ip6gre ipip6 any
create:expression: "true"
update:expression: "false" ; \
"Encapsulation can only be set at tunnel creation for $VAR(../@)"
View lifecycle.json
{
"lifecycle": {
"rule": [
{
"action": {
"type": "SetStorageClass",
"storageClass": "archive"
},
"condition": {
"age": 30
@nna774
nna774 / zatsu_monitor.yml
Last active Jan 4, 2020
zatsu_monitor.yml
View zatsu_monitor.yml
default: &default
type: slack
channel: "#nana-memo"
webhook_url: https://hooks.slack.com/services/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
user_name: "zatsu_monitor(torifune)"
nna774.net:
<<: *default
check_url: "https://nna774.net/"
nna774.net/blog:
View gist:c50153b49aa052f21190cf9db78bd439
nana@hibiki:~$ sudo id
uid=0(root) gid=0(root) groups=0(root)
nana@hibiki:~$ sudo -u '#-1' id
uid=0(root) gid=1000(nana) groups=1000(nana)
nana@hibiki:~$ id
uid=1000(nana) gid=1000(nana) groups=1000(nana),4(adm),20(dialout),24(cdrom),25(floppy),27(sudo),29(audio),30(dip),44(video),46(plugdev),108(lxd),114(netdev)
View my-youtube-dl
#! /bin/bash -xe
BUCKET='gs://nana-youtube'
TEMPDIR=$(mktemp -d)
DATE=$(date +%s)
./youtube-dl -v -o "${TEMPDIR}/${DATE}-%(title)s-%(id)s.%(ext)s" "$1"
./youtube-dl -J "$1" | tee "${TEMPDIR}/${DATE}.json"
gsutil cp "${TEMPDIR}/*" ${BUCKET}
View slack.css
img[data-stringify-emoji*=parrot], img[data-stringify-emoji*=ultra], img[data-stringify-emoji*=fast], img[data-stringify-emoji*=yuma] {
filter: grayscale(1) blur(10px);
}
View jq_or_cat
#! /bin/bash
# どうせjsonっぽいものにしか使わないから有限長でしょ。
STDIN=$(cat)
echo "${STDIN}" | jq "$@" > /dev/null 2>&1
if [ $? -eq 0 ]; then
# 前段で出力をバッファしたりすると、色とかが消えちゃうのでもう一回実行する。
echo "${STDIN}" | jq "$@"
View all_see_eye.sh
#! /bin/bash -xeu
BUCKET='nana-camera'
: ${SLACK_WH:?'define SLACK_WH'}
report() {
local MSG=${1:-'コケた'}
curl -X POST --data-urlencode "payload={\"text\": \"${MSG}\"}" ${SLACK_WH}
}
View report.rb
#! /usr/bin/env ruby
require 'json'
require 'shellwords'
require 'net/https'
require 'uri'
MAHIRO = URI.parse "~~"
MORI = URI.parse "~~"
View vimrc
syntax enable
set expandtab
set tabstop=2
set shiftwidth=2
set softtabstop=2
set autoindent
set smartindent
set number
You can’t perform that action at this time.