Skip to content

Instantly share code, notes, and snippets.

View scompt's full-sized avatar
🎓

Edward Dale scompt

🎓
View GitHub Profile
BEGIN MESSAGE.
CAKSbgxUhf3QiFZ dJA4GbG3itcu0SG bOfXQ9mV0NGuLHJ xFtIidtcBMGEn0L
V5EAZ6DFQhrzOV7 4Cyb5Du9RU4TCKq 6Xr2MZHgg6tEG3h nLD5gzyKChF84Om
F1HvPu0rbPErjNL SOBgJ4TKGG3tnjW gtf6QNNNBrPi0t5 EQvlVGvNWVSZaYs
rVTRkPE8LQYfyWV PuiImApXm0a7E6W rPkI621.
END MESSAGE.
@scompt
scompt / download_workouts.sh
Last active October 19, 2020 15:43
A script to download workouts and exercise alternatives. Prerequisites are GNU Parallel, cURL, and jq.
#!/bin/bash
USERNAME=d@t.com
PASSWORD=r
LANGUAGES="en fr it ja tr es pt de"
PATHS="v3/coach/workouts v2/coach/workouts v2/coach/exercise_alternatives"
echo "Logging in"
export ID_TOKEN=`curl --silent -X POST -H 'Content-Type: application/json' -H 'Accept: application/json' -d '{
#!/bin/bash
# Based on https://github.com/JFrogDev/project-examples/blob/master/bash-example/deploy-folder-by-checksum.sh
export repo_url=
export tgt_repo=
export user=
export pass=
export dir="$1"

Keybase proof

I hereby claim:

  • I am scompt on github.
  • I am scompt (https://keybase.io/scompt) on keybase.
  • I have a public key whose fingerprint is 5226 89E9 DA1C 447A 0025 2EBB 1B77 22E3 CEDA A0E4

To claim this, I am signing this object:

@scompt
scompt / gist:5841542
Last active December 18, 2015 20:39
A code snippet to visualize the placement of cells in a UICollectionViewLayout. Stick it at the bottom of the layoutAttributesForElementsInRect: method and copy/paste the output in your terminal window and you'll something like this: http://i.imgur.com/X74mB0v.png.
NSMutableString *magick = [[NSMutableString alloc] init];
[magick appendString:@"xc:skyblue -fill white -stroke black "];
int minX = rect.origin.x;
int minY = rect.origin.y;
int maxX = rect.size.width;
int maxY = rect.size.height;
for (UICollectionViewLayoutAttributes *att in theLayoutAttributes) {
minX = MIN(minX, att.frame.origin.x);
minY = MIN(minY, att.frame.origin.y);
+ (void) createPinWithClientId:(NSString *)clientId
imageURL:(NSURL *)imageURL
sourceURL:(NSURL *)sourceURL
description:(NSString *)descriptionText {
Pinterest *pinterest = [[Pinterest alloc] initWithClientId:clientId];
[pinterest createPinWithImageURL:imageURL sourceURL:sourceURL description:descriptionText];
}
@implementation ViewController
- (void) viewDidLoad {
UIGestureRecognizer *recog = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(gogo:)];
[self.view addGestureRecognizer:recog];
}
- (void) gogo:(UIGestureRecognizer *)recog {
NSString *clientId = [NSMutableString stringWithString:@"1431665"];
Pinterest *pinterest = [[Pinterest alloc] initWithClientId:clientId];
I am a third-year Computer Science student at Rochester Institute of Technology seeking a co-op
position that will complement the classes that I am currently taking. I am pursuing a BS and
MS in Computer Science from RIT and would like to concentrate in cryptography and information
security. I believe that my academic interests and my excitement for programming would make me
an ideal employee at the NSA.
@scompt
scompt / gist:4972292
Last active December 13, 2015 20:48
My opinion of social networks from an email on 3/16/2005
They're so pointless!!!!
There's one that *everybody* at RIT does called thefacebook.com.
Apparently it was written by some guys at Harvard and lots of schools
use it now.
Crap!
@scompt
scompt / AssertListSizeAction.java
Created August 10, 2012 07:35
Calabash verify list size
package sh.calaba.instrumentationbackend.actions.list;
import android.widget.ListView;
import sh.calaba.instrumentationbackend.InstrumentationBackend;
import sh.calaba.instrumentationbackend.Result;
import sh.calaba.instrumentationbackend.actions.Action;
import java.lang.Integer;
import java.lang.String;