Skip to content

Instantly share code, notes, and snippets.

View threetreeslight's full-sized avatar

threetreeslight threetreeslight

View GitHub Profile
@threetreeslight
threetreeslight / script.rb
Created August 9, 2019 06:29 — forked from edwardkenfox/script.rb
slack teamのactiveなアカウントの画像をDLしてくれる君
require "slack"
require 'open-uri'
YOUR_SLACK_APP_OAUTH_TOKEN = ENV['YOUR_SLACK_APP_OAUTH_TOKEN']
Slack.configure do |config|
config.token = YOUR_SLACK_APP_OAUTH_TOKEN
end
members = Slack.users_list["members"].select { |m| !m["deleted"] }
  • date: 2019-01-00 19:30-22:00
  • location: どこか。なかったらReproとか
  • capacity: 20-50
    • 高専ネタLT枠 * 2
    • 技術LT枠 * 3
    • 初心者LT枠 * 3

Kosen Beer Bash

StartupやIT業界に関わる高専生同士集まって、技術や高専ネタを肴に酒を飲む会

@threetreeslight
threetreeslight / connpass.js
Last active September 15, 2018 12:34
connpass setting : ignore media update notification
// ignore media update notification
//
// access https://connpass.com/settings/ and run it on console
//
var els = document.getElementsByClassName('GroupNotifySettingsList');
Array.from(els).forEach( (e) => {
console.log(e);
e.style.display = 'block';
e.getElementsByTagName('li')[0].getElementsByTagName('input')[0].checked = true;
let blacklists = ["https://trello.com/*"]

About scientist

scientist gemはgithub社が作ったテストツール(=新ロジックの実験ができるツール)です。

Let's pretend you're changing the way you handle permissions in a large web app. Tests can help guide your refactoring, but you really want to compare the current and refactored behaviors under load.

気持ちとしては

テストはリファクタリングした結果、動作に問題ないことを認識するときに非常に役立つが、本当に現行とリファクタ後の振る舞いが変っていないか比較することはできない。

#import "UIViewController+RPRIS.h"
#import <objc/runtime.h>
@implementation UIViewController (Foo)
+ (void)swizzlingMethodViewWillApper
{
Method originalMethod = class_getInstanceMethod(self, viewWillApper:);
Method swizzledMethod = class_getInstanceMethod(self, foo_viewWillApper:);
method_exchangeImplementations(originalMethod, swizzledMethod);
@threetreeslight
threetreeslight / ec2-ssh.sh
Last active August 29, 2015 14:06
ec2-ip, ec2-ssh
# ec2-ip
function ec2-ip() {
if [[ $1 == "" ]]; then
PERCOL=percol
else
PERCOL="percol --query $1"
fi
instances | eval $PERCOL | awk '{ print $1 }'
}
@threetreeslight
threetreeslight / deamon.rb
Created August 21, 2014 08:16
deamon DSL
require 'logger'
require 'rails'
require 'net/http'
require 'uri'
require 'pry'
class Daemon
def self.run &block
new &block
end
@threetreeslight
threetreeslight / AppDelegate.m
Last active August 29, 2015 14:02
UIAlertView and UIWindow in AppDelegat.m succession
//
// ViewController.m
// TestAlert
//
// Created by akira on 6/10/14.
// Copyright (c) 2014 akira. All rights reserved.
//
#import "ViewController.h"