Skip to content

Instantly share code, notes, and snippets.

View posaunehm's full-sized avatar

Hiroshi Maekawa (a.k.a. Posaune) posaunehm

View GitHub Profile
@posaunehm
posaunehm / MainWindow.xaml
Last active December 25, 2015 09:09
C# の素晴らしさを語る会 デモ用コード。 Install-Package PropertyChanged.Fody
<Window x:Class="FodyPractice.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="350" Width="525">
<Grid>
<TextBox HorizontalAlignment="Left" Height="23" Margin="29,25,0,0" TextWrapping="Wrap" Text="{Binding FirstName}" VerticalAlignment="Top" Width="120"/>
<TextBox HorizontalAlignment="Left" Height="23" Margin="199,25,0,0" TextWrapping="Wrap" Text="{Binding FamilyName}" VerticalAlignment="Top" Width="120"/>
<TextBlock FontSize="40" HorizontalAlignment="Left" Margin="29,80,0,0" TextWrapping="Wrap" Text="{Binding DisplayName}" VerticalAlignment="Top" Height="60" Width="290"/>
</Grid>
@posaunehm
posaunehm / slides.md
Created September 24, 2013 14:58 — forked from ritalin/slides.md

% Title % Name % Date

My first slide { fragment=fade-in target=li }

Displaying fragment for specified target element.

@posaunehm
posaunehm / GroupBy_MinMax.cs
Created April 14, 2013 15:41
Get Max value among grouped objects
using System;
using System.Linq;
namespace EnumurateAdjacent
{
class Program
{
static void Main(string[] args)
{
var rand = new Random();
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ReducePoints
{
public class PointReducer
{
private readonly List<XYPoint> _input;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;
using Livet;
using Livet.Commands;
using Livet.Messaging;
using Livet.Messaging.IO;
@posaunehm
posaunehm / std_adjacent_like.cs
Created April 2, 2013 10:52
std_adjacent like behavior in C# (of course, using linq :) )
using System;
using System.Linq;
namespace EnumurateAdjacent
{
class Program
{
static void Main(string[] args)
{
var input = new[] {1, 1, 2, 3, 4, 5, 5, 6, 7, 8, 9, 9, 9, 10};
@posaunehm
posaunehm / twitter4ikvm.cs
Created March 31, 2013 14:49
Get timeline using twitter4j in C# (via IKVM)
using java.awt;
using java.io;
using java.lang;
using java.net;
using java.util;
using twitter4j;
using twitter4j.auth;
using System.Collections.Generic;
git branch -m old_branch new_branch
@posaunehm
posaunehm / git-svn-rebase.sh
Created March 28, 2013 06:38
For rebase a branch from svn via master branch
#!/bin/bash
branch=$(git symbolic-ref --short HEAD)
git checkout master
git svn rebase
git rebase master $branch