Skip to content

Instantly share code, notes, and snippets.

@mmozeiko
mmozeiko / test.c
Last active April 28, 2024 20:52
gtk widget from x11 window
// gcc test.c `pkg-config --cflags --libs gtk+-3.0 gdk-3.0` -lX11 && ./a.out
#include <X11/Xlib.h>
#include <unistd.h>
#include <stdio.h>
#include <gtk/gtk.h>
#include <gdk/gdkx.h>
static void my_gtk_realize(GtkWidget* widget, gpointer user)
@egmontkob
egmontkob / Hyperlinks_in_Terminal_Emulators.md
Last active May 3, 2024 11:35
Hyperlinks in Terminal Emulators
@toshia
toshia / teokute_fav_mikutter.md
Created March 7, 2017 11:21
ておくれ、ふぁぼ、mikutter

ておくれ、ふぁぼ、mikutter

移植するにあたって

2016年10月から、「ておくれ、ふぁぼ、mikutter」を公開していたDropboxが、Publicフォルダに設置したHTMLファイルをWebページとして公開する機能を停止した。これによって、本文書はダウンロードすることは出来るが、ブラウザ上で閲覧することは出来なくなっていた。さらに2017年3月、同15日に明示的に公開リンクを取得しなければPublicフォルダに入れているドキュメントも公開されないように変更するというアナウンスがあった。公開設定をしてもブラウザで閲覧できないことも踏まえると、もうDropboxで公開するのは良い手ではない。

思えばこれを書いたのは2012年末。もう4年以上前ということに驚きを隠せない。本文には書いてないが、丁度祖父が危篤で、年の瀬であることも相まってかなり慌ただしい年末だったと記憶している。結局、2012年12月24日の昼下がり、私が京都の四条河原町近辺でせいべと昼食を食べながら、数日前に公開されたこの文書について語り合っている時に訃報が入り、せいべといっしょにすぐ近くのデパートに喪服を買いに行った。そんなときだったからと言うと言い訳になるが、校正が十分に行き届いておらず、そのうち直そうと思いながら今日に至る。

2012年というのは恐ろしく昔のことだ。2017年現在、StSは消え、Twitterは幾度となく倒産・身売りの話を繰り返し、ふぁぼはいいねになり、おるみんによって新たなておくれクラスタが形成された。今日も人はておくれ、ふぁぼり、mikutterを使っている。この文書は今となっては当時を切り取った貴重な記録になっており、再公開にあたって読み直してみると、自分の記憶が思いの外劣化していることに驚いた。この文書が当時想定していたような役割をちゃんと果たしていることが意外でもあるし嬉しくもある。

@orekyuu
orekyuu / gist:4d2d8de75c0551ea2cb0
Created September 26, 2015 03:54
Groovyでプラグインを書くためのbuild.gradle
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'idea'
apply plugin: 'groovy'
sourceCompatibility = 1.8
targetCompatibility = 1.8
[compileJava, compileTestJava].each {
it.options.encoding = 'UTF-8'
@penguin2716
penguin2716 / mikutter_security_crash.rb
Last active August 29, 2015 14:07
自分で "abort-mikutter" とツイートすると,mikutterをリモートで終了させるmikutterプラグイン
#-*- coding: utf-8 -*-
Plugin.create :security_crash do
# キーワードを設定
UserConfig[:security_crash_keyword] ||= 'abort-mikutter'
# TLに流れてきたすべてのツイートを監視
on_appear do |ms|
ms.each do |m|
# 投稿者が自分で,上記のキーワードと一致しているか確認
@crakaC
crakaC / InsertQuietly.java
Created September 5, 2014 16:56
リストビューの一番上に静かに挿入するためのやつ
private ListView mListView;
private ArrayAdapter<twitter4j.Status> mAdapter;
private twitter4j.Status mFirstVisibleStatus;
private int mFirstVisibleOffset = -1;
protected void savePosition() {
if (mAdapter.isEmpty()) return;
mFirstVisibleStatus = mAdapter.getItem(mListView.getFirstVisiblePosition());
mFirstVisibleOffset = mListView.getChildAt(0).getTop();
}
@eligor13
eligor13 / twpicdl.sh
Created September 5, 2014 01:52
Twitpic whole images downloader for mac
#!/bin/sh
# Modified by Stan Schwertly to download locally rather than to send to Posterous.
# Github: http://github.com/Stantheman/Twitpic-Backup
# Copyright 2010 Tim "burndive" of http://burndive.blogspot.com/
# This software is licensed under the Creative Commons GNU GPL version 2.0 or later.
# License informattion: http://creativecommons.org/licenses/GPL/2.0/
# This script is a derivative of the original, obtained from here:
@Akkiesoft
Akkiesoft / mikutter_pictcollect.rb
Last active May 2, 2016 04:10
(ここのは古い。新しいのはこっち https://github.com/Akkiesoft/mikutter_pictcollect )mikutterで画像を収集するための支援プラグイン。ショートカットキーを割り当てて使う。コードはだいたいmikutter-sub-parts-imageプラグインからパクった
# -*- coding: utf-8 -*-
require "open-uri"
require "FileUtils"
# From http://d.hatena.ne.jp/gan2/20080531/1212227507
def save_file(url, filename)
# これより、ファイルを開きます
open(filename, 'wb') do |file|
open(url) do |data|
file.write(data.read)
@firstspring1845
firstspring1845 / block.rb
Last active August 29, 2015 14:03
ブロックを使わないといけないツイッターつらい
# -*- coding: utf-8 -*-
Plugin.create :block do
command(:block,
name: 'ブロックする',
condition: Plugin::Command::CanReplyAll,
visible: true,
icon: nil,
role: :timeline) do |opt|
@rhenium
rhenium / MainActivity.java
Created December 7, 2013 04:18
Twitter for Android を使って OAuth 認証できるっぽいので
package jp.rhe.test.twitterauth;
import android.app.Activity;
import android.content.ComponentName;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.TextView;