Skip to content

Instantly share code, notes, and snippets.

View nosuz's full-sized avatar

Norio Suzuki nosuz

View GitHub Profile
@nosuz
nosuz / rec-radio.sh
Last active February 21, 2017 03:27
#!/bin/bash
music_dir="$HOME/Music"
folder="Radio"
logfile="$HOME/log/rec-radio.log"
# Ref.
# https://gist.github.com/riocampos/5656450
# http://wordpress.honobono-life.info/code/bash%E3%81%A7%E3%83%91%E3%82%BF%E3%83%BC%E3%83%B3%E3%83%9E%E3%83%83%E3%83%81%E3%82%92%E4%BD%BF%E3%81%A3%E3%81%A6%E6%9D%A1%E4%BB%B6%E8%A9%95%E4%BE%A1/
@nosuz
nosuz / wp-post.html
Last active June 7, 2016 09:09
Access WorsPress REST API with OAuth authorization sample.
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8"/>
{% if article is empty %}
<title>WordPress: Post New</title>
{% else %}
<title>WordPress: Update Post</title>
{% endif %}
</head>
@nosuz
nosuz / get-oauth-toke.php
Created June 2, 2016 08:13
This is PHP program to get OAuth token for WordPress REST API.
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8"/>
<title>Get WordPress OAuth Token</title>
</head>
<body>
<?php
require_once('HTTP/OAuth/Consumer.php');
session_start();
@nosuz
nosuz / bom2excel.rb
Last active February 6, 2017 09:10
#!/usr/bin/ruby
#require 'csv'
require 'axlsx'
require 'rexml/document'
Component = Struct.new(:item, :ref, :value, :footprint)
Order = Struct.new(:item, :value, :footprint, :count)
xml_file = File.expand_path(ARGV[0])