Skip to content

Instantly share code, notes, and snippets.

View afrael's full-sized avatar

Afrael Ortiz afrael

View GitHub Profile
@afrael
afrael / ponche-crema-receta.markdown
Created December 19, 2011 21:29 — forked from anibal/ponche-crema-receta.markdown
Receta del Ponche Crema casero de mi abuela carupanera

Receta del Ponche Crema casero de mi abuela carupanera

Ingredientes

  • Un cartón de huevos (30 huevos)
  • Cuatro latas grandes de leche condensada (397 gr/14 onzas por lata)
  • Una botella de ron (750 ml)
  • Ralladura fina de la concha de dos limones pequeños.
@afrael
afrael / userEvent.cs
Created July 18, 2011 14:17
Quick and dirty .NET user event creation and handling
// BEGIN - create your argument class, subclass of EventArgs
public class ProgressEventArgs : EventArgs
{
public int Min;
public int Progress;
public int Max;
public string Message;
public ProgressEventArgs(int min, int progress, int max, string msg)
{
if (progress > max)
@afrael
afrael / floatHelper.m
Created July 15, 2011 03:42
Objective C float creation helper
#define FLT(x) [NSNumber numberWithFloat:x]
// use as
NSArray *keys = [NSArray arrayWithObjects: FLT(-2.0), FLT(-1.85), FLT(-1.75), nil];
@afrael
afrael / kill_mousewheel.cs
Created June 27, 2011 14:52
Disabling MouseWheel behavior
// in form InitializeComponent(), or in the form's constructor
this.cboBox.MouseWheel += new System.Windows.Forms.MouseEventHandler(this.cboBox_MouseWheel);
// event implementation
private void cboBox_MouseWheel(object sender, System.Windows.Forms.MouseEventArgs e)
{
HandledMouseEventArgs mouseWheelEvent = (HandledMouseEventArgs)e;
mouseWheelEvent.Handled = true;
}