Skip to content

Instantly share code, notes, and snippets.

# watch GPU status in windows
# while ($true -eq $true) { .\nvidia-smi.exe ; sleep 1 ; clear }
import tensorflow as tf
import six
tf.Session()
six.moves.input()
@nibral
nibral / post_slack_from_lambda.js
Last active January 5, 2018 06:50
環境変数SLACK_WEBHOOK_URLを設定して使うこと
const https = require('https');
const url = require('url');
exports.handler = function(event, context) {
// prepare https POST request
const reqOptions = url.parse(process.env.SLACK_WEBHOOK_URL);
reqOptions.method = 'POST';
reqOptions.headers = {
'Content-Type': 'application/json'
};
@nibral
nibral / nginx.conf
Last active December 1, 2018 10:44
reverse proxy
server {
listen 80;
server_name example.com;
charset UTF-8;
auth_basic "Login message";
auth_basic_user_file /path/to/.htpasswd;
location / {
proxy_redirect off;
@nibral
nibral / Sunrise70.ino
Created June 1, 2022 05:43
Firmware for Sunrise70 keyboard
#include <bluefruit.h>
/*
キーコード
*/
#define FN_KEY 0x1000
#define FN_BLE_1 0x1001
#define FN_BLE_2 0x1002
#define FN_BLE_INFO 0x1003
#define FN_BLE_ADV 0x1004
@nibral
nibral / flac_to_alac.ps1
Created November 25, 2015 12:10
Encode FLAC to ALAC with ffmpeg on Powershell
Get-ChildItem -Filter "*.flac" | % { ffmpeg.exe -i "$_" -acodec alac "$($_.BaseName).m4a" }