Skip to content

Instantly share code, notes, and snippets.

View Na0ki's full-sized avatar
🤔
thinking

ahiru Na0ki

🤔
thinking
View GitHub Profile
Traceback (most recent call last):
13: from mikutter.rb:105:in `<main>'
12: from mikutter.rb:69:in `boot!'
11: from /Users/ahiru/ghq/mikutter/mikutter/core/plugin/gtk/mainloop.rb:10:in `mainloop'
10: from /Users/ahiru/ghq/mikutter/mikutter/core/plugin/gtk/mainloop.rb:10:in `catch'
9: from /Users/ahiru/ghq/mikutter/mikutter/core/plugin/gtk/mainloop.rb:12:in `block in mainloop'
8: from /Users/ahiru/ghq/mikutter/mikutter/core/plugin/gtk/mainloop.rb:12:in `loop'
7: from /Users/ahiru/ghq/mikutter/mikutter/core/plugin/gtk/mainloop.rb:16:in `block (2 levels) in mainloop'
6: from /Users/ahiru/ghq/mikutter/mikutter/core/plugin/gtk/mainloop.rb:16:in `events_pending?'
5: from /Users/ahiru/ghq/mikutter/mikutter/core/mui/gtk_extension.rb:35:in `block in safety_signal_connect'
@Na0ki
Na0ki / glib2-install-error.log
Created September 17, 2019 09:08
mikutterのbundler時のエラーon macOS
Fetching glib2 3.3.7
Installing glib2 3.3.7 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory:
/Users/ahiru/ghq/mikutter/mikutter/vendor/bundle/ruby/2.6.0/gems/glib2-3.3.7/ext/glib2
/Users/ahiru/.rbenv/versions/2.6.3/bin/ruby -I
/Users/ahiru/.rbenv/versions/2.6.3/lib/ruby/2.6.0 -r
./siteconf20190917-42653-9fbalv.rb extconf.rb
checking for --enable-debug-build option... no
@Na0ki
Na0ki / pre-commit
Created November 8, 2018 06:59
コミット時にブランチの命名規則のチェックをするやつ
#!/bin/sh
#
# An hook script to check branch name convention.
# Called by "git commit" with no arguments. The hook should
# exit with non-zero status if you are not following
# branch name convention.
pattern='^((bug|feature|hotfix)/\d+-|junk/)[\w\d\-]+'
git rev-parse --abbrev-ref HEAD|perl -nle "print if m{$pattern} or exit 1" > /dev/null 2>&1
@Na0ki
Na0ki / frozen_toshi_a.rb
Last active November 6, 2018 11:17
すこ〜しも寒くないわ〜
# -*- coding: utf-8 -*-
require 'httpclient'
Plugin.create(:frozen_toshi_a) do
filter_is_toshi_a_frozen? do
[Plugin::Toshia.frozen?]
end
end
class Plugin::Toshia
@Na0ki
Na0ki / scraping.py
Last active August 22, 2018 14:13
とある小説サイトのページをスクレイピングして新着があればslackに通知するやつ
import datetime
import json
import requests
from bs4 import BeautifulSoup
TARGET = 'SCRAPING_TARGET_URL'
HOOK = 'SLACK_WEB_HOOK_URL'
app.post('/', async (req, res) => {
const html = req.body.html;
if (!html) {
await res.status(400);
return;
}
try {
await page.goto(
`data:text/html,${html}`, {
timeout: pageTimeoutMsec,
@Throws(ClassCastException::class, InvalidClassException::class)
inline fun <reified T : Any> get(id: Int): T {
return get(sApp.getString(id))
}
@Throws(ClassCastException::class, InvalidClassException::class)
inline fun <reified T : Any> get(key: String): T {
return when (T::class) {
String::class -> sPrefs.getString(key, "") as T? ?: "" as T
Set::class -> sPrefs.getStringSet(key, emptySet()) as T? ?: emptySet<String>() as T
@Na0ki
Na0ki / TaskViewGestureToolkitLog.txt
Created September 26, 2016 10:33
置いた場所が悪かった。(管理者で実行すれば当然ながらこれは発生しない)
Just-In-Time (JIT) デバッグを呼び出すための詳細については、
ダイアログ ボックスではなく、このメッセージの最後を参照してください。
************** 例外テキスト **************
System.UnauthorizedAccessException: パス 'C:\Program Files (x86)\TaskViewGestureToolkit\log.txt' へのアクセスが拒否されました。
場所 System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
場所 System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
場所 System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy)
場所 System.IO.FileStream..ctor(String path, FileMode mode)
場所 TaskViewGestureToolkit.Log.Logger.writeToLogfile()
# -*- coding: utf-8 -*-
Plugin.create(:ahiru_yakuna) do
DEFINED_TIME = Time.new.freeze
criminals = Set.new
あひる焼き = %w(burned\ duck)
filter_filter_stream_track do |watching|
#import <arpa/inet.h>
#import <ifaddrs.h>
#import <net/if.h>
@implementation WifiUtils
- (BOOL) checkIsWifi {
struct ifaddrs *addresses;
struct ifaddrs *cursor;
BOOL available = NO;