Skip to content

Instantly share code, notes, and snippets.

View gruppjo's full-sized avatar
🌈
Sparkling

Jonathan Grupp gruppjo

🌈
Sparkling
View GitHub Profile
@gruppjo
gruppjo / .editorconfig
Last active June 8, 2020 17:16
.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
@gruppjo
gruppjo / javascript.json
Last active March 19, 2020 23:17
react-snippets (class components)
{
// 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 September 17, 2019 23:36
React: Component: mapLooksToStyles() - map a components this.props.looks to a joined string of css module styles `styles[look1] styles[look2] ...`
// 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(' ');
}
@gruppjo
gruppjo / coding_help.sh
Last active October 19, 2017 12:57
coding_help
// 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
@gruppjo
gruppjo / coding_fun.md
Last active November 6, 2017 17:05
office fun
@gruppjo
gruppjo / release_actions.md
Last active September 13, 2016 11:27
generator release actions

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 April 20, 2016 10:42
Blog outline for Katie

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 March 15, 2016 14:49
generator feature list for angular-cli discussion

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 August 29, 2015 14:09
angular seamless error-handling
// 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) {