Skip to content

Instantly share code, notes, and snippets.

Avatar

Hideaki Tokida tokida

View GitHub Profile
@tokida
tokida / FollowerSilent.js
Last active Oct 31, 2020
Diablo2 Kolbot alternate follower script ( via https://pastebin.com/LnXCQ3ES )
View FollowerSilent.js
/*
* Follower by kolton
*
* you should set "LocalChat" in mode 2 for all chars:
* Config.LocalChat.Enabled = true; // enable the LocalChat system
* Config.LocalChat.Mode = 2; // 0 = disabled, 1 = chat from 'say' (recommended), 2 = all chat (for manual play)
*
* version: 28.02.2020
*
* silent-automated follower changes:
View ansible_create_swap_tasks_main.yml
---
- name: carete swapfile
command: dd if=/dev/zero of={{ swap_file }} bs={{ ansible_memtotal_mb }} count=1M
args:
creates: '{{ swap_file }}'
- file:
path: '{{ swap_file }}'
mode: '0600'
View BMXUG-slackbot-mokumoku.md

皆さん、Slackを使っていますか!?

Bluemix User Groupでもコミュニケーション様にSlackを用意してますがなかなか利活用されていません。 そこで、もっと皆が楽しく使うためにはどうしたらよいか!その答えをBotに求めたいと思います!

実施内容

ルール

  • Bluemixのライトアカウントで動く範囲で作成してください。
  • 今日のゴールはアイディアが出るところまで。
View openwhisk-action-getimage.py
import requests
import base64
def main(dict):
# check dict
# dict { url }
dummy = 'https://2e1690af-4bca-4a99-9200-b1307b8f0427-bluemix.cloudant.com/photo/e447266d3d2dbb824e3ebfa2509c7f0c/sample.jpg'
geturl = ''
if ( dict.get('url',dummy) ):
geturl = dict.get('url',dummy)
@tokida
tokida / todoist2slack_openwhisk.py
Created Jan 26, 2017
openwhisk action : today todo in todoist 2 slack post
View todoist2slack_openwhisk.py
import requests
import datetime
import json
def main(dict):
token = dict.get('todoist_token')
project_id = dict.get('todoist_projectId')
url = dict.get('slack_url')
View mytodolist.py
# -*- coding: utf-8 -*-
import requests
from datetime import datetime as dt
def getAllList(token):
q = {
'token': token,
'seq_no': 0,
@tokida
tokida / gist:b9ea87f7994c45107c429d621c2343d2
Created Jun 30, 2016
ansible-playbook ubuntu localization(japan)
View gist:b9ea87f7994c45107c429d621c2343d2
# Install Modules
- name: apt-get update
apt: update_cache=yes cache_valid_time=3600
- name: standard application install
apt: name={{ item }} state=latest install_recommends=yes
with_items:
- git
@tokida
tokida / dispToTemp.py
Created May 20, 2016
i2c接続のBME280センサーで取得した値を LCD(AQM0802A)に描画する
View dispToTemp.py
#!/usr/bin/python
# -*- coding: utf-8 -*-
# 温度計の温度をLCDに表示する
import smbus
import time
from datetime import datetime
class BME280:
@tokida
tokida / Rakefile
Last active Feb 27, 2016 — forked from kyanny/Rakefile
Qiita::Team お引越しスクリプト
View Rakefile
require 'json'
require 'yaml'
require 'nokogiri'
require 'uri'
require 'faraday'
require 'ostruct'
require 'pry'
require 'time'
def y data
View makeDockerDistribution.sh
# docker-library/buildpack-deps:curl
apt-get update && apt-get install -y --no-install-recommends \
ca-certificates \
curl \
wget \
&& rm -rf /var/lib/apt/lists/*
# docker-library/buildpack-deps:scm
apt-get update && apt-get install -y --no-install-recommends \