Skip to content

Instantly share code, notes, and snippets.

View mikebob's full-sized avatar

Mike Bobiney mikebob

View GitHub Profile
@aronreisx
aronreisx / tutorial-rename-wsl-disto.txt
Created December 11, 2021 19:16
How to rename WSL Distro on Windows
To rename WSL Distros on Windows follow the steps:
1. Stop all instances of WSL
On PowerShell run the command: wsl --shutdown
2. Open Registry Editor and go to HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Lxss
Each subfolder on Lxss represents a distro
3. Locate and rename the distro you want
Inside each distro folder you have the DistributionName, change it and click ok
@yoavniran
yoavniran / ultimate-ut-cheat-sheet.md
Last active March 24, 2025 20:20
The Ultimate Unit Testing Cheat-sheet For Mocha, Chai, Sinon, and Jest
@orlandoaleman
orlandoaleman / Macros.h
Last active May 20, 2018 18:33 — forked from numo16/Macros.h
Useful XCode Macros from an iOS developerhttp://orlandoaleman.com
/*
Macros.h by Orlando Aleman Ortiz <[email protected]>
*/
#define ApplicationDelegate [[UIApplication sharedApplication] delegate]
#define Bundle [NSBundle mainBundle]
#define DATE_COMPONENTS NSYearCalendarUnit|NSMonthCalendarUnit|NSDayCalendarUnit
#define DateString [NSDateFormatter localizedStringFromDate:[NSDate date] dateStyle:NSDateFormatterShortStyle timeStyle:NSDateFormatterNoStyle]
#define FlushPool(p) [p drain]; p = [[NSAutoreleasePool alloc] init]
#define HexAlphaColor(c, a) [UIColor colorWithRed:((c>>16)&0xFF)/255.0 green:((c>>8)&0xFF)/255.0 blue:(c&0xFF)/255.0 alpha:a]
@mikebob
mikebob / FramingViewController.m
Created October 24, 2011 11:38
ViewController snippet from Smarty Pix
-(void)closeFramingView
{
NSFileManager *fileManager= [NSFileManager defaultManager];
if(![fileManager fileExistsAtPath:USER_PICS_DIRECTORY])
if(![fileManager createDirectoryAtPath:USER_PICS_DIRECTORY withIntermediateDirectories:YES attributes:nil error:NULL])
NSLog(@"Error: Create folder failed %@", USER_PICS_DIRECTORY);
NSString *pngPath = [NSString stringWithFormat:@"%@%@.png",
USER_PICS_DIRECTORY, [UserPrefsHandler UserPicFileName]];
@mikebob
mikebob / SPXFrameScroller.h
Created October 24, 2011 11:27
Custom UIScrollView that supports pinch and double tap zooming
//
// SPXFrameScroller.h
// SmartyPix
//
// Created by Mike Bobiney on 8/23/11.
// Copyright 2011 Tap Through Apps LLC. All rights reserved.
//
#import <Foundation/Foundation.h>