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 / svelte-notes.md
Last active April 5, 2020 04:38
An introduction note on Svelte

Svelte notes

Features

Homepage

  • Write less code: Build boilerplate-free components using languages you already know - HTML, CSS, Javascript
  • No Virtual DOM: Svelte compiles your code to tiny, framework-less vanilla JS - your app starts fast and stay fast
  • Truly reactive: no more complex state management libraries - Svelte brings reactivity to JS itself.
@bonniss
bonniss / JapaneseRegex.js
Created April 4, 2020 09:11 — forked from ryanmcgrath/JapaneseRegex.js
Regex to test for presence of Japanese characters
// REFERENCE UNICODE TABLES:
// http://www.rikai.com/library/kanjitables/kanji_codes.unicode.shtml
// http://www.tamasoft.co.jp/en/general-info/unicode.html
//
// TEST EDITOR:
// http://www.gethifi.com/tools/regex
//
// UNICODE RANGE : DESCRIPTION
//
// 3000-303F : punctuation
@bonniss
bonniss / regex-japanese.txt
Created April 4, 2020 07:53 — forked from terrancesnyder/regex-japanese.txt
Regex for Japanese
Regex for matching ALL Japanese common & uncommon Kanji (4e00 – 9fcf) ~ The Big Kahuna!
([一-龯])
Regex for matching Hirgana or Katakana
([ぁ-んァ-ン])
Regex for matching Non-Hirgana or Non-Katakana
([^ぁ-んァ-ン])
Regex for matching Hirgana or Katakana or basic punctuation (、。’)
@bonniss
bonniss / count-days.js
Created March 16, 2020 03:06
Count the days of a given month and year
// determine how many days are in a given month
// http://stackoverflow.com/questions/315760/what-is-the-best-way-to-determine-the-number-of-days-in-a-month-with-javascript
function daysInMonth( m, y ) {
return m === 2 ? y & 3 || !( y % 25 ) && y & 15 ? 28 : 29 : 30 + ( m+ ( m >> 3 ) & 1 );
}
// determine the day number since beginning of the year
// http://stackoverflow.com/questions/8619879/javascript-calculate-the-day-of-the-year-1-366/27790471#27790471
function dayNo( y, m, d ){
return --m * 31 - ( m > 1 ? ( 1054267675 >> m * 3 -6 & 7 ) - ( y & 3 || !( y % 25 ) && y & 15 ? 0 : 1 ) : 0 ) + d;
@bonniss
bonniss / oct-twig-extension.md
Created March 15, 2020 02:49
README of Twig Extension OctoberCMS

Twig extensions

Build Status Codacy Scrutinizer Coverage License

Twig extensions plugin for OctoberCMS adds new filter and functions to your templates. No other plugin dependencies.

Tested with the latest stable OctoberCMS build 420 (with Laravel 5.5). For Laravel 5.4 use special branch laravel54.

@bonniss
bonniss / vanilla-js-cheatsheet.md
Created February 12, 2020 19:45 — forked from thegitfather/vanilla-js-cheatsheet.md
Vanilla JavaScript Quick Reference / Cheatsheet
@bonniss
bonniss / js-regexp.md
Created January 9, 2020 01:13
A code note on Javascript Regular Expression, refer to javascript.info

Patterns and Flags

Regexp

A regular expression consists of a pattern and option flags.

There are two syntaxes that can be used to create a regexp object.

@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 / os-soft.md
Last active December 9, 2019 11:54
List of softwares and tools on company PC.

Software List

Install chocolatey

Guidelines

Requirements

  • Windows 7 ↑
  • Powershell v2+
@bonniss
bonniss / github-search-cheatsheet.md
Last active November 20, 2025 13:58
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