Skip to content

Instantly share code, notes, and snippets.

@angelworm
angelworm / a_smart_dashboard_have_my_id.user.js
Created February 26, 2012 16:35 — forked from syoichi/a_smart_dashboard_have_my_id.user.js
quoteをすべて削除する機能に書き換え
// ==UserScript==
// @name quote remover
// @namespace test
// @description quote/regular postを全部削除します
// @include http://www.tumblr.com/dashboard*
// @author joodle
// @compatibility Firefox 5.0(Scriptish 0.1), Chrome 12.0.742.112, Opera 11.50
// @charset UTF-8
// @version 1.4
// ==/UserScript==
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2007 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
@angelworm
angelworm / type-level-quicksort.hs
Created February 7, 2013 13:47
型レベルクイックソート > :t qsort (n4 ~: n3 ~: n2 ~: n1 ~: Null) => (Cons N1 (Cons N2 (Cons N3 (Cons N4 Null))))
{-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies, FlexibleInstances, UndecidableInstances #-}
import Prelude
{- 数値の定義 -}
data Zero = Zero
data Succ a = Succ a
type N0 = Zero
type N1 = Succ N0
type N2 = Succ N1
@angelworm
angelworm / gist:5056447
Last active December 14, 2015 08:18
Mac OS 10.8 Notification For Tumblr
"""
Copyright (c) 2013 @Angelworm_
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
@angelworm
angelworm / boxnya-tumblr.py
Last active December 14, 2015 09:18
Boxnya Tumblr Input Plugin
"""
Copyright (c) 2013 @Angelworm_
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
@angelworm
angelworm / tumblrnotes.py
Created March 4, 2013 16:24
Tumblrの個別ページのURLを与えると、notes(例:xxxはyyyからリブログしました)を取ってきてくれるらしい
# -*- coding: utf-8 -*-
import os
import urllib2
import urllib
import json
import logging
import time
import sys
import lxml.html as html
import re
@angelworm
angelworm / dominion.txt
Last active December 15, 2015 21:29
dominion対戦がしたくなったときに読む書
dominion鯖最速構築メモ
設定の構築のほう
1. http://ktmizugaki.so.land.to/kakuzituki/article/201206061225.htm
2. 起動して設定する
3. 保存
サーバー構築のほう
1. どっか借りる
2. ポート開ける
@angelworm
angelworm / gist:5424853
Last active September 4, 2017 06:18
Tumblrはログイン無しでも読み込める
NSData *data = [NSURLConnection sendSynchronousRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://tumblr.com"]]
returningResponse:nil
error:nil];
[data writeToFile:@"text.html" atomically:YES];
@angelworm
angelworm / pixiv.py
Last active December 16, 2015 18:09
searchTag::String->[Tumbnail] getLargeImage::Id->URL
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import urllib2
import urllib
import urlparse
import re
import lxml.html
class Thumbnail:
"""pixiv thumbnails and some information"""
@angelworm
angelworm / rebloggraph.py
Created June 3, 2013 16:32
tumblrnotesと協力してリブログツリーを出力するそれ: https://gist.github.com/u-e-d/5083450
import tumblrnotes as tn
import igraph
import re
import sys
import os
def notes(url):
def prittyfy(li):
for r in li.findall("blockquote"):
li.remove(r)