Skip to content

Instantly share code, notes, and snippets.

View kharmabum's full-sized avatar
💭
🧀

Juan-Carlos Foust kharmabum

💭
🧀
View GitHub Profile

First figure out 1 rep max for each of the ‘big lifts’ (squat, bench, deadlift). Spend a whole gym session for each lift. Your "working weight" for each of the following progressions will be ~80% of that.

  • Train ~three days a week (A, B, and C days)
  • Usually start with ~6 min warm up. I like to do 500 m on the row machine.
  • Day A: Squat, accessory leg (quads, calves), accessory arms (biceps, triceps)
  • Day B: Bench, acessory chest, acessory back
  • Day C: Deadlift, acessory rear/upper lower body (hamstrings, glutes), acessory shoulders
  • If you got gas left in the tank end the day with an ab workout (50-100 of something)
  • Acessory workouts are ~4 sets of usually a machine or dumbbell exercise at whatever weight you can do 8-12 repetitions per set. I try to do at least 1-2 different exercises per day for each acessory group.
@kharmabum
kharmabum / Aura-Demo.md
Last active June 26, 2019 17:36
Getting Started

AURA DEMO

AURA makes it easy to add presence-enabled features to your iOS 8 application. It takes about 10 lines of code to detect encounters between your users in a highly energy efficient and secure manner.

Getting Started

In your target application's XCode project

  • Add Aura.framework
  • Add CoreBluetooth.framework
@kharmabum
kharmabum / amibeingdebugged.m
Created January 5, 2015 05:34
AmIBeingDebugged
#include <assert.h>
#include <stdbool.h>
#include <sys/types.h>
#include <unistd.h>
#include <sys/sysctl.h>
static Bool AmIBeingDebugged(void) {
int mib[4];
struct kinfo_proc info;
size_t size = sizeof(info);
@kharmabum
kharmabum / sf.md
Last active June 26, 2019 17:33
Welcome to SF

Abbreviations

  • Downtown = ~north of Market St
  • Richmond = ~north of Golden Gate Park
  • Mission = south of Market St to the West
  • SOMA - south of Market St to the East.

Food

@kharmabum
kharmabum / cocoalumberjack-log-level-override.m
Created September 11, 2014 10:02
override cocoalumberjack per file
+ (void)initialize
{
if (self == [JBAPeripheral self]) {
// ddLogLevel = LOG_LEVEL_OFF;
}
}
@kharmabum
kharmabum / audio-id.m
Last active August 29, 2015 14:00
Create audio sound id
#import <AudioToolbox/AudioToolbox.h>
+(SystemSoundID)bleatSoundID {
static SystemSoundID bleatSoundID = 0;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
NSString *soundPath = [[NSBundle mainBundle] pathForResource:@"Bleat" ofType:@"aif"];
AudioServicesCreateSystemSoundID((__bridge CFURLRef)[NSURL fileURLWithPath: soundPath], &bleatSoundID);
});
return bleatSoundID;
@kharmabum
kharmabum / tappable-nav-bar.m
Last active July 20, 2016 15:17
Tappable title view UINavigationBar
#pragma mark - UIGestureRecognizerDelegate
// Toggle mode through touch gesture on navigation bar
- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch
{
return (self.navigationController.visibleViewController == self &&
(ABS([touch locationInView:self.navigationController.navigationBar].x - self.navigationController.navigationBar.width/2) < 50));
}
- (void)viewWillAppear:(BOOL)animated {
@kharmabum
kharmabum / bluetooth-audio.m
Last active December 11, 2021 04:11
Bluetooth audio session set up
// App delegate
#import <AVFoundation/AVFoundation.h>// place in .h
// applicationDidFinishLaunchingWithOptions
// [self prepareAudioSession];
- (BOOL)prepareAudioSession {
// deactivate session

Keybase proof

I hereby claim:

  • I am kharmabum on github.
  • I am jc (https://keybase.io/jc) on keybase.
  • I have a public key whose fingerprint is A5AE AC2B 50E4 5BFF B4A3 38AF 225C CFDF 8D8A F6BF

To claim this, I am signing this object:

- (CLLocationCoordinate2D)locationFromString:(NSString *)locationString{
CLLocationCoordinate2D coordinate;
// Extract individual components
NSMutableArray *locationColumns = [NSMutableArray arrayWithArray:
[locationString componentsSeparatedByCharactersInSet:
[NSCharacterSet whitespaceCharacterSet]]];
// Remove empty objects