Skip to content

Instantly share code, notes, and snippets.

@takeru
takeru / delete_messages.py
Last active April 18, 2022 19:27 — forked from michimani/delete_messages.py
Delete old slack messages at a specific channel.
"""Delete old Slack messages at specific channel."""
from datetime import datetime
from time import sleep
import json
import re
import sys
import urllib.parse
import urllib.request
import os

Usage

curl -sSL https://gist.githubusercontent.com/ttimasdf/ef739670ac5d627981c5695adf4c8f98/raw/autossh@host1 | \
  sudo tee /etc/default/autossh@example
curl -sSL https://gist.githubusercontent.com/ttimasdf/ef739670ac5d627981c5695adf4c8f98/raw/[email protected] | \
  sudo tee /etc/systemd/system/[email protected]

sudo useradd -g nogroup -s /bin/false -m tunnel
sudo -u tunnel mkdir -p ~tunnel/.ssh # and copy your private key here
#
# Automatically generated file; DO NOT EDIT.
# Linux/arm64 4.9.119 Kernel Configuration
#
CONFIG_ARM64=y
#
# Automatically generated file; DO NOT EDIT.
# Linux/arm64 4.9.119 Kernel Configuration
#
CONFIG_ARM64=y
CONFIG_64BIT=y
CONFIG_ARCH_PHYS_ADDR_T_64BIT=y
CONFIG_MMU=y
CONFIG_DEBUG_RODATA=y
CONFIG_ARM64_PAGE_SHIFT=12
@takeru
takeru / Howto_Update
Created May 20, 2021 16:23 — forked from u-haru/Howto_Update
QuaStation改造用メモ
goru
dd if=/dev/zero of=/dev/block/mmcblk0 seek=86314 bs=512 count=30666 //EMMCのカーネル部分のゼロ埋め
dd if=/dev/zero of=/dev/block/mmcblk0 seek=6488576 bs=1 count=62714 //EMMCのdtb部分のゼロ埋め
dd if=/mnt/usb/Image of=/dev/block/mmcblk0 seek=86314 bs=512 //EMMCへのカーネル書き込み
dd if=/mnt/usb/rtd-1295-giraffe-2gb-tee.dtb of=/dev/block/mmcblk0 seek=6488576 bs=1 //EMMCへのdtb書き込み
@takeru
takeru / README.md
Last active August 29, 2015 14:03 — forked from mbostock/.block
@takeru
takeru / crontab
Last active February 23, 2016 09:27 — forked from j3tm0t0/crontab
./rec_radiko.sh: 127: ./rec_radiko.sh: Syntax error: "(" unexpected ってなるから。
[email protected]
# ANN
59 0 * * 5 sh ~/bin/rec_radiko.sh LFR 122 ~/mp3/"ナインティナインのオールナイトニッポン "
59 0 * * 7 sh ~/bin/rec_radiko.sh LFR 122 ~/mp3/"オードリーのオールナイトニッポン "
# ANN0
59 2 * * 5 sh ~/bin/rec_radiko.sh LFR 122 ~/mp3/"Hi-Hiのオールナイトニッポン0 "
# JUNK
59 0 * * 2 sh ~/bin/rec_radiko.sh TBS 122 ~/mp3/"JUNK 伊集院光・深夜の馬鹿力 "

If we can create a DeferredDispatcher that is safe and generic, spin-up won’t be a show-stopper, and any app can take advantage of it. Adding this to appengine-rack.rb means people won’t need an additional require, but we will be stuck with it.

I have a sample app here: mwrc-demo.appspot.com

When we have app with multiple map sections (see below) that all call the same dispatcher, will the instance variables still work the way we want?

Rails 2.3.5 on App Engine (TinyDS)

Recently, Takeru Sasaki was able to patch the Rails 2.3.5 calls to rubygems, and now we have it working on App Engine. He also created a datastore adapter called TinyDS. I just created an integration plugin called Rails_TinyDS that provides certain ActiveRecord method calls for Rails 2.3.5 generated scaffold.

See the DataMapper version also: gist.github.com/268192

Install the Development Environment

The gems for the development environment include a pre-release appengine-tools gem that provides a pre-release version of jruby-rack.

sudo gem install google-appengine