Skip to content

Instantly share code, notes, and snippets.

View danjohnson95's full-sized avatar

Dan danjohnson95

View GitHub Profile
@niw
niw / fetch_nike_puls_all_activities.bash
Last active July 16, 2024 23:37
A simple NikePlus API description to fetch past run metrics
#!/usr/bin/env bash
# fetch_nike_puls_all_activities.bash
# A simple bash script to fetch all activities and metrics from NikePlus.
# See `nike_plus_api.md` for the API details.
readonly bearer_token="$1"
if [[ -z "$bearer_token" ]]; then
echo "Usage: $0 bearer_token"
exit
@Restuta
Restuta / framework-sizes.md
Last active March 7, 2024 00:01
Sizes of JS frameworks, just minified + minified and gzipped, (React, Angular 2, Vue, Ember)

Below is the list of modern JS frameworks and almost frameworks – React, Vue, Angular, Ember and others.

All files were downloaded from https://cdnjs.com and named accordingly. Output from ls command is stripped out (irrelevant stuff)

As-is (minified)

$ ls -lhS
566K Jan 4 22:03 angular2.min.js

WHEN TO USE DIRECTIVES, CONTROLLERS, OR SERVICES IN ANGULAR JS

SERVICES

Whenever we want to share data across domains. Additionally, thanks to Angular’s dependency injection system, this is both very easy to do and very clean.

module.service( 'Book', [ '$rootScope', function( $rootScope ) {
 var service = {
@loonies
loonies / 1_phpunit-api.md
Last active January 19, 2024 07:34
PHPUnit Cheat Sheet

PHPUnit API reference

  • version 3.6

TODO

Check those constraints:

$this->anything()