Skip to content

Instantly share code, notes, and snippets.

Avatar
😇
( ˘ω˘)

190ikp 190ikp

😇
( ˘ω˘)
View GitHub Profile
@190ikp
190ikp / README.md
Last active Oct 7, 2021
VSCode setting at Keio ITC
View README.md

ITCのLinux環境でC言語を書くときの設定

VSCodeを使って書くときの設定ファイル

ITCの環境はincludeとgccのバイナリが変な場所にあって,VSCodeがデフォルト設定のままではF5デバッグできないので...

必要なもの

View move_lxd_container.sh
#!/usr/bin/env bash
set -euo pipefail
# moving all stopping LXD container from node to node.
function get_stopping_containers() {
lxc list --format json |
jq -rc 'map({"name": .name, "node": .location, "status": .state.status, "disk_limit": .expanded_devices.root.size, "disk_usage": .state.disk.root.usage} |
select(.status == "Stopped" and .node == '\""$1"\"')) |
.[]'
View cuda_setup.sh
#!/usr/bin/env bash
set -euxo pipefail
export NVIDIA_DRIVER_VERSION=450
export CUDA_VERSION=11-1
modify_bashrc() {
# don't variable expand in heredoc
cat << 'EOF' >> ~/.bashrc
export PATH=$PATH:/usr/local/cuda/bin
@190ikp
190ikp / local.db
Created Jun 30, 2020
`/var/snap/lxd/common/lxd/database/local.db` before running `lxd init`
View local.db
PRAGMA foreign_keys=OFF;
BEGIN TRANSACTION;
CREATE TABLE schema (
id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
version INTEGER NOT NULL,
updated_at DATETIME NOT NULL,
UNIQUE (version)
);
INSERT INTO schema VALUES(1,39,1593510249);
CREATE TABLE config (
@190ikp
190ikp / report.md
Created May 4, 2020 — forked from Kumassy/report.md
pandoc report
View report.md

documentclass: ltjsarticle header-includes:

  • \usepackage[version=3]{mhchem} metadata: table1: date: 1615 年 5 月 5 日 (金)丑三つ時 theme: 様々な食品におけるカフェイン

table2:

@190ikp
190ikp / docker-compose.yml
Last active Dec 12, 2018
examples of docker-compose & nginx.conf for KCS article
View docker-compose.yml
version: '3'
services:
web:
container_name: web
image: nginx:mainline-alpine
ports:
- 80:80
- 443:443
volumes:
- /vagrant/nginx.conf:/etc/nginx/nginx.conf:ro
@190ikp
190ikp / Vagrantfile
Last active Dec 12, 2018
customized Vagrantfile
View Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "ubuntu/bionic64"
config.vm.network "forwarded_port", guest: 80, host: 80, host_ip: "127.0.0.1"
config.vm.network "forwarded_port", guest: 443, host: 443, host_ip: "127.0.0.1"
@190ikp
190ikp / Vagrantfile
Created Dec 12, 2018
default Vagrantfile (ubuntu/bionic64)
View Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure("2") do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at