Skip to content

Instantly share code, notes, and snippets.

View KTachibanaM's full-sized avatar
🤔
Edit status

KTachibanaM KTachibanaM

🤔
Edit status
View GitHub Profile
@KTachibanaM
KTachibanaM / userscript.js
Last active September 4, 2022 06:52
The 8th Sin.js
// ==UserScript==
// @name The 8th Sin
// @description The 8th Sin: (beta) Software Update
// @match https://beta.apple.com/sp/betaprogram
// @match https://developer.apple.com/download/
// ==/UserScript==
before_prompts = [
"Are you sure???",
"Are you really sure???",
<div class="gb_xc"><a class="gb_x" aria-haspopup="true" role="button" tabindex="0" aria-expanded="false" aria-label="0 Google notifications" title="0 Google notifications"><div class="gb_yc gb_zc gb_Vb"></div></a><div class="gb_Sa"></div><div class="gb_Ra" style="border-bottom-color:#eee"></div></div>
@KTachibanaM
KTachibanaM / d_sum.go
Last active January 18, 2017 13:27
Distributed sum in golang
package main
import "fmt"
func sum(inputChannel chan int, inputChannelCount int, outputChannel chan int) {
sum := 0
for i := 0; i < inputChannelCount; i++ {
sum += <-inputChannel
}
outputChannel <- sum
@KTachibanaM
KTachibanaM / MultiInputMaterialDialogBuilder.java
Last active May 16, 2022 09:41
Simple custom Builder for multiple text inputs in MaterialDialog
import android.content.Context;
import android.support.annotation.NonNull;
import android.support.annotation.StringRes;
import android.text.TextUtils;
import android.widget.EditText;
import android.widget.LinearLayout;
import com.afollestad.materialdialogs.MaterialDialog;
import java.util.ArrayList;
@KTachibanaM
KTachibanaM / designer.html
Last active August 29, 2015 14:09
designer
<link rel="import" href="../core-scaffold/core-scaffold.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../core-menu/core-menu.html">
<link rel="import" href="../core-item/core-item.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-menu/core-submenu.html">
<polymer-element name="my-element">
@KTachibanaM
KTachibanaM / ce_vercode
Last active August 29, 2015 14:05
Latest version code for Cloud emoticon Android
11
@KTachibanaM
KTachibanaM / plum_tracker.py
Last active August 29, 2015 14:05
Plum Lis tracker
# Dependencies are beautifulsoup4, Pillow
# For Pillow use "pip install --use-wheel Pillow"
import os
# constants
NAME = 'Plum Lis'
G_PLUS_ABOUT_URL = 'https://plus.google.com/+PlumLis233/about'
if not os.path.exists('avatar'):
os.mkdir('avatar')
@KTachibanaM
KTachibanaM / crawler.py
Last active August 29, 2015 14:04
Web crawler demo with auto generating update report given last update, in Python
# For Python 2.x
# Dependencies are beautifulsoup4, workerpool, yattag
BASE_URL = '?'
import sys
no_pic = False
args = sys.argv
if len(args) == 2:
if args[1] == 'n':
no_pic = True
@KTachibanaM
KTachibanaM / googleminus.js
Last active August 29, 2015 14:04
Filter keywords on Google+ webpage and hide corresponding posts
/*
* Filter keywords on Google+ webpage and hide corresponding posts
* Notice that current filtering mechanism is VERY ROUGH
* Use with caution
*/
/**
* A keyword configuration
* @param {String} keyword
* @param {String} filtering_mode
@KTachibanaM
KTachibanaM / KT.json
Last active August 29, 2015 14:03
CE json format example
{
"categories": [
{
"entries": [
{
"description": "kee",
"emoticon": "(*\u2022\u0300\u1d17\u2022\u0301 *)\u0648 \u0311\u0311\ufeff"
},
{
"description": "\u5403\u836f",