Skip to content

Instantly share code, notes, and snippets.

View amay077's full-sized avatar
🏠
Working from home

amay077 amay077

🏠
Working from home
View GitHub Profile
// ネットに接続されてる間はtrueとか
var connected = new BooleanNotifier();
// ダウンロード中はtrueとか
var downloading = new BooleanNotfier();
var command = new[]
{
connected,
downloading.Select(x => !x)
}
@mpen
mpen / ApacheHttpClientGet2.scala
Created October 30, 2009 10:47
Apache HttpComponents HttpClient Get ResponseHandler
// Apache HttpComponents HttpClient Get ResponseHandler
import java.io.File
import java.io.IOException
import java.net.URI
import java.net.URISyntaxException
import java.net.URLDecoder
import java.net.UnknownHostException
import org.apache.commons.io.FileUtils
import org.apache.commons.io.FilenameUtils
@azyobuzin
azyobuzin / Program.cs
Created February 20, 2017 18:24
Xamarin の base メソッドを呼ばなければいけない/呼んではいけない奴を抽出
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text.RegularExpressions;
using System.Xml;
using System.Xml.Linq;
using Mono.Cecil;
using Mono.Cecil.Cil;
using Mono.Cecil.Rocks;
@smallgeek
smallgeek / BusyNotifierCommand.cs
Created April 28, 2017 08:49
2度押し防止コマンド試作
using Reactive.Bindings.Notifiers;
using System;
using System.Threading.Tasks;
using System.Windows.Input;
namespace Reactive.Bindings
{
public class BusyNotifierCommand : BusyNotifierCommand<object>
{
public BusyNotifierCommand(Func<Task> execute)
@mbostock
mbostock / .block
Last active July 20, 2017 07:30
Circle-Polygon Intersection
license: gpl-3.0
@k-kagurazaka
k-kagurazaka / Main.kt
Last active December 20, 2017 01:35
RxCommand with double context extension pattern
interface HasDisposables {
fun Disposable.autoDispose()
fun dispose()
companion object {
operator fun invoke(): HasDisposables = object : HasDisposables {
private val disposables = CompositeDisposable()
<div id=root />
<script type=module>
import React from 'https://dev.jspm.io/react@16'
import ReactDOM from 'https://dev.jspm.io/react-dom@16'
ReactDOM.render(
React.createElement('h1', null, 'hello'),
document.querySelector('#root')
)
</script>
@rudyryk
rudyryk / CustomTableViewRenderer.cs
Created August 3, 2015 13:17
C# — Custom Xamarin.Forms renderer for TableView to hide empty cells at the bottom
// NoEmptyRowsTableViewRenderer.cs
//
// No Rights Reserved
// http://creativecommons.org/publicdomain/zero/1.0/
//
// Assume you have `MyProject.MyTableView` sublass of
// `Xamarin.Forms.TableView` and want to hide extra
// empty rows at the bottom. All you need on iOS is to set
// `TableFooterView` to empty `UIView` in custom renderer.
//
@koral--
koral-- / ImageCaptureHelper.java
Last active January 16, 2019 10:57
Helper for sending ACTION_IMAGE_CAPTURE intent and retrieve its results. Handles all low level operations
//MIT License
//Copyright (c) 2015 Karol Wrótniak, Droids On Roids
package pl.droidsonroids.imagehelpers;
import java.io.File;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import android.app.Activity;
import android.content.ActivityNotFoundException;
import android.content.ContentResolver;
@stoshiya
stoshiya / selenium chrome.md
Last active June 7, 2019 07:14
MacでSeleniumをつかってChromeを起動するまで

MacでSeleniumをつかってChromeを起動するまで

必要なもの

  • Mac OS X
  • Google Chrome
  • Homebrew
  • Node.js
  • selenium-server-standalone
  • chromedriver