Skip to content

Instantly share code, notes, and snippets.

View bonniss's full-sized avatar
🥐
Cancer - Croissant

Dan Teddy bonniss

🥐
Cancer - Croissant
View GitHub Profile
@bonniss
bonniss / jq_succintly.md
Last active June 16, 2020 11:30
jQuery Succintly

jQuery succintly code note

Chapter 1. Core jQuery

Basic concept behind jQuery

While some conceptual variations exists (e.g functions like `$.ajax`) in the jQuery API, the central concept behind jQuery is "find something, do something": You select DOM element(s) from an HTML document and then do something with the jQuery methods.

The concept, behind the concept, behind jQuery

@bonniss
bonniss / color-conversion-algorithms.js
Created October 7, 2019 09:22 — forked from mjackson/color-conversion-algorithms.js
RGB, HSV, and HSL color conversion algorithms in JavaScript
/**
* Converts an RGB color value to HSL. Conversion formula
* adapted from http://en.wikipedia.org/wiki/HSL_color_space.
* Assumes r, g, and b are contained in the set [0, 255] and
* returns h, s, and l in the set [0, 1].
*
* @param Number r The red color value
* @param Number g The green color value
* @param Number b The blue color value
* @return Array The HSL representation
@bonniss
bonniss / sql-mongo_comparison.md
Created October 15, 2019 01:11 — forked from aponxi/sql-mongo_comparison.md
MongoDb Cheat Sheets

SQL to MongoDB Mapping Chart

SQL to MongoDB Mapping Chart

In addition to the charts that follow, you might want to consider the Frequently Asked Questions section for a selection of common questions about MongoDB.

Executables

The following table presents the MySQL/Oracle executables and the corresponding MongoDB executables.

@bonniss
bonniss / vue-handbook-note.md
Created October 17, 2019 11:27
A personal note on "The Vue Handbook: a thorough introduction to Vue.js" on Freecodecamp

Vue notes

Reference: Freecodecamp Vue handbook

Why developers love Vue

First, Vue is called a progressive framework.

  • It adapts the needs of the dev. Other fw requires a complete buy-in from a dev or team and often want you to rewrite an existing application because they require some specific set of conventions. Vue happily lands inside your app with a simple script tag to start with, and it can grow along with your needs, spreading 3 lines to managing your entire view layer.
@bonniss
bonniss / laravel-artisan-cheatsheet
Last active February 22, 2021 11:44 — forked from hoandang/laravel-artisan-cheatsheet
Laravel artisan cheatsheet
clear-compiled Remove the compiled class file
down Put the application into maintenance mode
env Display the current framework environment
help Displays help for a command
inspire Display an inspiring quote
list Lists commands
migrate Run the database migrations
optimize Optimize the framework for better performance
serve Serve the application on the PHP development server
tinker Interact with your application
@bonniss
bonniss / vue-comparisons.md
Created October 19, 2019 11:56
A brief comparisons of Vue with 2 other ubiquitous friends: React and Angular

Vue notes from official documentation

Reference: Official Docs

Comparison with Other frameworks

Vue (pronounced /vjuː/, like view) is a progressive framework for building user interfaces. Unlike other monolithic frameworks, Vue is designed from the ground up to be incrementally adoptable. The core library is focused on the view layer only, and is easy to pick up and integrate with other libraries or existing projects. On the other hand, Vue is also perfectly capable of powering sophisticated Single-Page Applications when used in combination with modern tooling and supporting libraries.

React

@bonniss
bonniss / vue-instance.md
Last active October 19, 2019 13:45
Notes on Vue instance and lifecycle hooks

Vue Essentials: Vue instance and lifecycle hooks

Vue notes from official documentation Reference: Official Docs

Vue (pronounced /vjuː/, like view) is a progressive framework for building user interfaces. Unlike other monolithic frameworks, Vue is designed from the ground up to be incrementally adoptable. The core library is focused on the view layer only, and is easy to pick up and integrate with other libraries or existing projects. On the other hand, Vue is also perfectly capable of powering sophisticated Single-Page Applications when used in combination with modern tooling and supporting libraries.

The Vue Instance

Creating a Vue Instance

@bonniss
bonniss / lara-responses.md
Created October 28, 2019 07:11
A quick guide on Laravel Responses, reference to official docs

Laravel Reponses

Ref: https://laravel.com/docs/5.8/responses

Creating Responses

String or array

All routes and controllers should return a response to be sent back to the user's browser. The most basic is returning a string from a route or controller, which will be converted automatically into a full HTTP response.

@bonniss
bonniss / lara-routing.md
Created October 28, 2019 11:55
A quick guide on Laravel routing

Laravel Routing

Ref: https://laravel.com/docs/5.8/routing

Overview

All Laravel routes are defined in route files, which are located in the routes directory. These files are automatically loaded by the framework.

  • The route/web.php file defines routes that are for your web interface. These routes are assigned the web middleware group, which provides features like session state and CSRF protection.

  • The routes in routes/api.php are stateless and are assigned the api middleware group.

@bonniss
bonniss / github-search-cheatsheet.md
Last active May 9, 2024 09:20
Github search cheatsheet from official docs.

Github Search Cheat Sheet

GitHub’s search supports a variety of different operations. Here’s a quick cheat sheet for some of the common searches.

For more information, visit our search help section.

Basic search