Skip to content

Instantly share code, notes, and snippets.

### Keybase proof
I hereby claim:
* I am alfeg on github.
* I am alfeg (https://keybase.io/alfeg) on keybase.
* I have a public key ASAos-cuH6vcwnT76XrUspk4nCNb4Wux4V5mQY_vQVemVgo
To claim this, I am signing this object:
find *.png -type f -exec curl -i -F filedata=@{} http://servername/image \;
@alfeg
alfeg / Program.cs
Last active March 30, 2016 16:00
String split - manual vs regex
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text.RegularExpressions;
using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Running;
namespace BenchITSplit
{
class Program
Measure-Command { & C:\mybatfile.bat | Out-Default}
@alfeg
alfeg / disable_wake.ps1
Created July 26, 2015 06:22
Small powershell script to disable wake PC up for all scheduled tasks
$tasks = Get-ScheduledTask
ForEach ($task in $tasks)
{
if($task.settings.waketorun -eq 'True')
{
"$($task)"
$task.settings.WakeToRun = $false
Set-ScheduledTask -TaskName $task.TaskName -TaskPath $task.TaskPath -Settings $task.Settings
}
@alfeg
alfeg / pewpew.cs
Last active August 29, 2015 14:14
Atomic blocking queue
using System;
using System.Collections.Concurrent;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Isam.Esent.Collections.Generic;
namespace Esent
{
class Storage
{
@alfeg
alfeg / expand.cs
Created October 15, 2013 12:41
This tool were used to convert files from tabs to spaces. This file can be compiled with mono
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace expand

Twitter公式クライアントのコンシューマキー

Twitter for iPhone

Consumer key: IQKbtAYlXLripLGPWd0HUA
Consumer secret: GgDYlkSvaPxGxC4X8liwpUoqKwwr3lCADbz8A7ADU

Twitter for Android

Consumer key: 3nVuSoBZnx6U4vzUxf5w
Consumer secret: Bcs59EFbbsdF6Sl9Ng71smgStWEGwXXKSjYvPVt7qys

Twitter for iPad

Consumer key: CjulERsDeqhhjSme66ECg

#define WIN32_LEAN_AND_MEAN // just say no to MFC
#define INIT_GUID
#include "hge.h"
#include <hgesprite.h>
#include <hgefont.h>
#include <hgecolor.h>
@alfeg
alfeg / gist:4176397
Created November 30, 2012 15:23
Get file sizes by there extensions
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace FileHlpr
{
internal class FileInformation