Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Jonathan Grupp gruppjo

🎯
Focusing
Block or report user

Report or block gruppjo

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View .editorconfig
# EditorConfig is awesome: https://EditorConfig.org
# top-most EditorConfig file
root = true
# Unix-style newlines with a newline ending every file
[*]
end_of_line = lf
insert_final_newline = true
View javascript.json
{
// Place your snippets for javascriptreact here. Each snippet is defined under a snippet name and has a prefix, body and
// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the
// same ids are connected.
// Example:
// "Print to console": {
// "prefix": "log",
// "body": [
// "console.log('$1');",
@gruppjo
gruppjo / react-utils.js
Last active Sep 17, 2019
React: Component: mapLooksToStyles() - map a components this.props.looks to a joined string of css module styles `styles[look1] styles[look2] ...`
View react-utils.js
// map a components this.props.looks to a joined string of css module styles `styles[look1] styles[look2] ...`
// or allows to pass in css class names from parent
// <Component looks="isYellow"></Component>
// CSS: .isYellow { }
export function mapLooksToStyles(looks = '', styles = []) {
let customStyles = (looks && looks.trim().split(' '))
|| [];
return customStyles.map(look => styles[look] || look).join(' ');
}
View coding_help.sh
// npm-check
// check dependency status of your project
// https://www.npmjs.com/package/npm-check
npx npm-check
// json-server
https://github.com/typicode/json-server
View coding_fun.md
@gruppjo
gruppjo / release_actions.md
Last active Sep 13, 2016
generator release actions
View release_actions.md

Prepare release notes:

Prepare release

  • git checkout dev and git rebase master to check for any lost updates (shouldn't happen!!)
  • git checkout master and git merge dev and git push
    • do this via PR? Then we get code coverage statistics, nice diffs etc. but will have to create several pull requests with the other steps.
  • run generator in generator-demo dev branch (conserve readme, add proper version number), commit, rebase, git push
  • demo: git checkout master and git merge dev and git push
@gruppjo
gruppjo / blog-outline.md
Created Apr 20, 2016
Blog outline for Katie
View blog-outline.md

Advanced workflows for building apps with Ionic

Part 1: Project Setup

  • Brief introduction of our company background, how and why we started using ionic, our clients as well as the common challenges we face building apps for them
  • Overview over blog series
  • More elaborate introduction of the tool we develop
  • Initial Project setup and project structure

Part 2: App Development

  • Quality Assurance, Coding guidelines
@gruppjo
gruppjo / read.md
Last active Mar 15, 2016
generator feature list for angular-cli discussion
View read.md

Generator-M-Ionic provides

You are handed

  • a professional enterprise-level project with a complete development environment that is test-driven and continuous integration-ready for building apps with angular/ionic/cordova.
  • a sophisticated and fully-working project setup and a sample app built according to your choices (side-menu/tabs/blank). With all of that you can immediately start coding.
  • carefully integrated technology stack
    • Angular, Ionic, Cordova, additional bower components and Cordova Platforms and Plugins
    • SASS compilation (\w sourcemaps)
  • a powerful collection of gulp tasks for (that still is easy to configure for project specific needs)
    • live-reloading in the browser
    • automatic wiring of all components into your app
@gruppjo
gruppjo / angular-seamless-error-handling.js
Last active Aug 29, 2015
angular seamless error-handling
View angular-seamless-error-handling.js
// new version with service and $injector.get('nameOfService'); ??
// ERROR-HANDLING
.config(function ($provide, $httpProvider) {
// error-interceptor
$provide.factory('errorHandlerInterceptor', function ($q, $rootScope) {
return {
response: function (response) {
// only handle remote XHR requests
if (response.config.url.search(/\/\//) !== -1) {
You can’t perform that action at this time.