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 / README.md
Created October 8, 2021 05:33 — forked from lopspower/README.md
Hexadecimal color code for transparency

Hexadecimal color code for transparency

Twitter

How to set transparency with hex value ?

For example, you want to set 40% alpha transparence to #000000 (black color), you need to add 66 like this #66000000.

Download This sample on Google Play Store

@bonniss
bonniss / curl.md
Created July 15, 2021 03:52 — forked from subfuzion/curl.md
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@bonniss
bonniss / 06.png
Created July 1, 2021 09:41 — forked from mfd/06.png
Gilroy font
06.png
@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 / array.js
Last active October 24, 2020 10:38
Useful snippets in Javascript for up and running project. @link: https://github.com/bootstrap-vue/bootstrap-vue/tree/dev/src/utils
// @link: https://github.com/bootstrap-vue/bootstrap-vue/blob/dev/src/utils/array.js
const from = (...args) => Array.from(...args)
const isArray = val => Array.isArray(val)
const arrayIncludes = (array, value) => array.indexOf(value) !== -1
const concat = (...args) => Array.prototype.concat.apply([], args)
export const createAndFillArray = (size, value) => Array(size).fill(value)
@bonniss
bonniss / jasperreports.md
Last active June 24, 2020 02:23
Guides and resources on JasperReport, JasperStudio, iReport

JasperReport note

JasperReports is an open Source Java reporting tool that can write to a variety of targets, such as: screen, a printer, into PDF, HTML, Microsoft Excel, RTF, ODT, comma-separated values (CSV) or XML files. It can be used in Java-enabled applications, including Java EE or web applications, to generate dynamic content. It reads its instructions from an XML or .jasper file.

Getting Started

Jaspersoft Studio (formerly iReport)

@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 / cors.md
Created June 10, 2020 00:39 — forked from jesperorb/cors.md
Handle CORS Client-side

Handle CORS Client-side

Cross-origin resource sharing (CORS) is a mechanism that allows restricted resources (e.g. fonts) on a web page to be requested from another domain outside the domain from which the first resource was served. This is set on the server-side and there is nothing you can do from the client-side to change that setting, that is up to the server/API. There are some ways to get around it tho.

Sources : MDN - HTTP Access Control | Wiki - CORS

CORS is set server-side by supplying each request with additional headers which allow requests to be requested outside of the own domain, for example to your localhost. This is primarily set by the header:

Access-Control-Allow-Origin
# Node-WebKit CheatSheet
# Download: https://github.com/rogerwang/node-webkit#downloads
# Old Versions: https://github.com/rogerwang/node-webkit/wiki/Downloads-of-old-versions
# Wiki: https://github.com/rogerwang/node-webkit/wiki
# How: https://github.com/rogerwang/node-webkit/wiki/How-node.js-is-integrated-with-chromium
# 1. Run your application.
# https://github.com/rogerwang/node-webkit/wiki/How-to-run-apps