Here's how you could create custom error classes in Node.js using latest ES6 / ES2015 syntax.
I've tried to make it as lean and unobtrusive as possible.
errors/AppError.js
// Cascade delete for loopback | |
// https://gist.github.com/CjS77/44b2f75c0ec468f590d0 | |
/* jshint node:true */ | |
'use strict'; | |
/** | |
* There is an incubating feature to cascade the deletes to the relational tables. see | |
* https://github.com/strongloop/loopback-datasource-juggler/issues/88 | |
*/ |
find . -name .DS_Store -print0 | xargs -0 git rm --ignore-unmatch |
# Edit this file | |
alias aliases="nano ~/.bash_profile" # usage: type `aliases` in Terminal | |
# Navigate to location | |
alias home="cd ~" | |
alias desktop="cd ~/Desktop/" | |
alias repos="cd ~/Documents/Repos/" | |
# Navigate to project directory | |
alias ds="clear && cd ~/Documents/Repos/design-system" |
- Open Automator | |
- File -> New -> Service | |
- Change "Service Receives" to "files or folders" in "Finder" | |
- Add a "Run Shell Script" action | |
- Change "Pass input" to "as arguments" | |
- Paste the following in the shell script box: open -n -b "com.microsoft.VSCode" --args "$*" | |
- Save it as something like "Open in Visual Studio Code" |
import {Platform, PermissionsAndroid} from 'react-native'; | |
import RNImagePicker from 'react-native-image-picker'; | |
/** | |
* Overrides react-native-image-picker | |
* | |
* Attempts to fix: | |
* | |
* - https://github.com/react-community/react-native-image-picker/issues/385 | |
* - https://github.com/react-community/react-native-image-picker/issues/581 |
import 'package:flutter/material.dart'; | |
import 'package:flutter/cupertino.dart'; | |
import 'dart:io'; | |
import 'dart:async'; | |
//Example | |
class StartPage extends StatelessWidget { | |
// SHow Native Pop Up to User | |
static Future<Null> showAlertPopup( | |
BuildContext context, String title, String detail) async { |
Feel free to run via...
npx https://gist.github.com/elijahmanor/4cc8e3eac9fb5999c5d759388ff27c64
#!/usr/bin/env node | |
console.log( "Look Ma, I'm executing JavaScript from a gist inside the terminal with npx!" ); |
Just migrated it from Codepen.io to markdown. Credit goes to David Conner.
Working with DOM | Working with JS | Working With Functions |
---|---|---|
Accessing Dom Elements | Add/Remove Array Item | Add Default Arguments to Function |
Grab Children/Parent Node(s) | Add/Remove Object Properties | Throttle/Debounce Functions |
Create DOM Elements | Conditionals |