Skip to content

Instantly share code, notes, and snippets.

View Alexisvt's full-sized avatar
🎯
Focusing

Alexis Villegas Torres Alexisvt

🎯
Focusing
  • San Jose, Costa Rica
View GitHub Profile

Angular2 + JSPM cheat sheet

First time setup

  • install jspm beta: npm install -g jspm@beta
  • set up your project: jspm init
  • install dependencies: jspm install angular2 reflect-metadata zone.js es6-shim

This will create a jspm_packages folder, and a config.js file.

Open the config.js file - this file manages options for the System.js loader - tweak it as appropriate

@andystanton
andystanton / Start up local Docker Machine on OSX automatically.md
Last active April 3, 2024 00:50
Start up local Docker Machine on OSX automatically.

Notice

This script is no longer required with Docker for Mac which includes an option to run Docker at startup and doesn't use docker-machine to administer the local Docker engine.

Requirements

  • Docker Machine + Docker
  • curl
  • A Virtualbox-driven Docker Machine called "default" docker-machine create --driver virtualbox default (this is the default with Docker toolkit).
@santisbon
santisbon / Search my gists.md
Last active June 11, 2024 02:58
How to search gists.

Enter this in the search box along with your search terms:

Get all gists from the user santisbon.
user:santisbon

Find all gists with a .yml extension.
extension:yml

Find all gists with HTML files.
language:html

@bvaughn
bvaughn / updating-external-data-when-props-changes-using-promises.js
Last active June 16, 2024 21:56
Example for loading new external data in response to updated props
// This is an example of how to fetch external data in response to updated props,
// If you are using an async mechanism that does not support cancellation (e.g. a Promise).
class ExampleComponent extends React.Component {
_currentId = null;
state = {
externalData: null
};
class Example extends React.Component<
Props,
State,
Snapshot
> {
static getDerivedStateFromProps(
nextProps: Props,
prevState: State
): $Shape<State> | null {
// ...
@rodydavis
rodydavis / whatsnew.dart
Last active July 5, 2018 12:38
Drop in file for flutter to show a whats new page for the user that is native for android and iOS. (Similar to apples version in keynote, pages, app store and other apps)
import 'package:flutter/material.dart';
import 'package:flutter/cupertino.dart';
import 'dart:io';
import 'dart:async';
//Example
class StartPage extends StatelessWidget {
// Example to Put on Login Function to Only Show on Version Change
// var prefs = await SharedPreferences.getInstance();
@bradtraversy
bradtraversy / ssh.md
Last active June 22, 2024 22:22
SSH & DevOps Crash Course Snippets

SSH Cheat Sheet

This sheet goes along with this SSH YouTube tutorial

Login via SSH with password (LOCAL SERVER)

$ ssh brad@192.168.1.29

Create folder, file, install Apache (Just messing around)

$ mkdir test

$ cd test

@bradtraversy
bradtraversy / docker-help.md
Last active June 28, 2024 04:54
Docker Commands, Help & Tips

Docker Commands, Help & Tips

Show commands & management commands

$ docker

Docker version info

@agcty
agcty / settings.json
Last active December 26, 2019 11:47
VSCode settings file
{
"editor.formatOnSave": true,
"vetur.validation.template": false,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
}
}