Skip to content

Instantly share code, notes, and snippets.

View devlights's full-sized avatar
🤧
hay fever....

devlights devlights

🤧
hay fever....
View GitHub Profile
@devlights
devlights / SQLiteWritePerformance.cs
Last active August 29, 2015 13:55
SQLiteの書き込み速度アップ (SyncMode, JournalMode)
namespace SqlitePerformance
{
using System;
using System.Collections.Generic;
using System.Data.SQLite;
using System.Diagnostics;
using System.Linq;
using Dapper;
@devlights
devlights / memo.md
Created February 9, 2014 15:02
Github for windows でhttpsでcloneしようとするとエラーが出る件
@devlights
devlights / eclipse-shortcut-key.md
Last active August 29, 2015 13:56
Eclipseの便利なショートカットキー
Shift + Alt + Q

を押すと様々なビューにアクセスするためのウィンドウが右下に出る。
ちなみに

Shift + Alt + Q, P
@devlights
devlights / redis-memo.md
Created March 10, 2014 04:04
redisで他のマシンから接続する場合

ほかのマシンから接続する場合、/etc/redis/redis.confのbindの値にlocalhostや127.0.0.1ではなくて、直アドレスを指定する。

@devlights
devlights / redis-cli-memo.md
Created March 11, 2014 05:48
redis-cli で 他のホストに接続
$ redis-cli -h xxx.xxx.xxx.xxx
@devlights
devlights / StopwatchExtensions.cs
Created March 23, 2014 09:10
Stopwatchでマイクロ秒を算出 (Microseconds, Frequency)
using System;
using System.Diagnostics;
namespace System.Diagnostics.Extensions
{
public static class StopwatchExtensions
{
public static long ElapsedMicroseconds(this Stopwatch self)
{
return (self.ElapsedTicks * (1000 * 1000) / Stopwatch.Frequency);
@devlights
devlights / MEFAttributeBaseSample1.cs
Created March 27, 2014 11:12
MEF 属性ベースのサンプル
namespace MEFSamples
{
using System;
using System.Linq;
using System.ComponentModel.Composition;
using System.ComponentModel.Composition.Hosting;
class Program
{
@devlights
devlights / ArraySegmentSamples1.cs
Created March 27, 2014 10:28
System.ArraySegment<T>
namespace ArraySegmentSample
{
using System;
class Program
{
static void Main(string[] args)
{
var orig = new[] { 1, 2, 3, 4, 5 };
var segment = new ArraySegment<int>(orig, 1, 3);