Skip to content

Instantly share code, notes, and snippets.

@benevolent0505
benevolent0505 / update_emacs.sh
Last active April 3, 2021 13:24
Emacs build on macOS
#!/bin/sh
EMACS_REPOSITORY_PATH="Your Emacs Repository Path"
cd $EMACS_REPOSITORY_PATH
CURRENT_COMMIT_HASH=$(git rev-parse HEAD)
git pull
from CO2Meter import *
import time
from datetime import datetime
sensor = CO2Meter("/dev/hidraw0")
time.sleep(5) # 認識待ち
data = sensor.get_data()
timestamp = int(time.time())
@benevolent0505
benevolent0505 / Vagrantfile
Created March 30, 2017 02:47
Windows上に構築中のUbuntu環境
# -*- 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
@benevolent0505
benevolent0505 / build.sbt
Created January 26, 2017 16:21
UEC休講情報スクレイピングコード Scala版
name := "Scala-UEC-Kyuuko"
version := "1.0"
scalaVersion := "2.12.1"
libraryDependencies ++= Seq(
"net.ruippeixotog" %% "scala-scraper" % "1.2.0",
"joda-time" % "joda-time" % "2.9.7"
)
@benevolent0505
benevolent0505 / scraper.pl
Created December 12, 2016 06:08
UEC休講情報スクレイピングスクリプト
#!/usr/bin/env perl
use strict;
use warnings;
use utf8;
use FindBin;
use lib "$FindBin::Bin/../lib";
use Web::Scraper;
#!/usr/bin/env perl
use strict;
use warnings;
my $people = [
{ first_name => 'Martry', last_name => 'McFly' },
{ first_name => 'Emmett', last_name => 'Brown' },
{ first_name => 'Biff', last_name => 'Tannen'},
];
@benevolent0505
benevolent0505 / Portfolio.md
Last active March 29, 2017 07:03
ポートフォリオ

ポートフォリオ

公開しているソフトウェアなど

UEC 休講

UEC 休講 for Chrome

電気通信大学の休講情報を見れるChromeアプリケーション。

@benevolent0505
benevolent0505 / Program.cs
Created December 8, 2015 19:32
TwitterIntentSample
using System;
namespace TwitterWebIntentSample
{
class Program
{
static string TWITTER_INTENT_URI = "https://twitter.com/intent/tweet?text=";
static void Main(string[] args)
{
execute 'install nodebrew' do
command 'curl -L git.io/nodebrew | perl - setup'
not_if 'nodebrew help'
end
execute 'add path' do
command %Q(export PATH=$HOME/.nodebrew/current/bin:$PATH)
not_if 'cat ~/.bashrc | grep nodebrew'
end
# Install Scala
execute 'download scala' do
command 'cd ~/tmp; wget http://downloads.typesafe.com/scala/2.11.6/scala-2.11.6.tgz'
not_if 'scala -v'
end
execute 'unzip tar file' do
command 'tar xzvf ~/tmp/scala-2.11.6.tgz /usr/local/'
not_if 'test -d /usr/local/scala'
end