Skip to content

Instantly share code, notes, and snippets.

View jjjjcccjjf's full-sized avatar
🎯
Focusing

endan jjjjcccjjf

🎯
Focusing
View GitHub Profile
@jjjjcccjjf
jjjjcccjjf / utils.ts
Created October 3, 2023 13:50
cn helper from shadcn
import { clsx, type ClassValue } from "clsx"
import { twMerge } from "tailwind-merge"
export function cn(...inputs: ClassValue[]) {
return twMerge(clsx(inputs))
}
{
"data": {
"provinces": [
{
"name": "Agoncillo"
},
{
"name": "Alitagtag"
},
{
{"data":[{"id":"5","invoice_name":"2nd Payment","sale_id":"6","collected_amount":"333333.00","collected_date":null,"sent_date":"2020-08-19","received_by":"Taylor Swift","due_date":"2020-08-12","quickbooks_id":"aa","created_at":"2020-08-12","updated_at":"2020-08-12 16:56:52","attachments":[{"id":"16","meta_id":"5","type":"invoice","attachment_name":"1596708893_2020-08-03_17-54-57.png","created_at":"2020-08-06 18:14:53","updated_at":null,"attachment_path":"http:\/\/localhost\/growth-engine\/uploads\/attachments\/1596708893_2020-08-03_17-54-57.png"},{"id":"21","meta_id":"5","type":"invoice","attachment_name":"1597222611_Banner.webp","created_at":"2020-08-12 16:56:51","updated_at":null,"attachment_path":"http:\/\/localhost\/growth-engine\/uploads\/attachments\/1597222611_Banner.webp"},{"id":"22","meta_id":"5","type":"invoice","attachment_name":"1597222611_bulk_import (1).csv","created_at":"2020-08-12 16:56:51","updated_at":null,"attachment_path":"http:\/\/localhost\/growth-engine\/uploads\/attachments\/1597222611

Formula

Variables

pedometer_counter_score_percentage = 15%
attendance_score_percentage = 20%
bmi_score_percentage = 50%
happiness_meter_score_percentage = 15%
mood_needed = 3 (maximum mood level)

@jjjjcccjjf
jjjjcccjjf / style.css
Created December 11, 2019 02:58 — forked from TechFounder/style.css
Buddha bless your code to be bug free
//
// _oo0oo_
// o8888888o
// 88" . "88
// (| -_- |)
// 0\ = /0
// ___/`---'\___
// .' \\| |// '.
// / \\||| : |||// \
// / _||||| -:- |||||- \
<?php
#class declaration
class Firebase_model extends CI_model
{
public function __construct()
{
parent::__construct();
define('FIREBASE_API_KEY', 'AAAAh66AGWk:APA91bE83vgJIkt-Edb9iStKIWErZ0iE2UvQR8hXM_iQOzNwZu25C1IChOn8GmxyWg5yzMuCpFa55UhMvoqRLzS0hPZt4jUtQUjMq6IHbMMHMVM3IbguGLgQCqKmneqKIG1c9SWi7khL1g7GkOLiase7xPtvJ_WKIw');
}

Restigniter

How to sanitize inputs

$this->input->post('key', true); # for single key post variable
$this->input->post(null, true) # for the whole post object

How to escape json properly

@jjjjcccjjf
jjjjcccjjf / mysql emoji guide.md
Last active September 14, 2018 08:23
Working with Emojis [MySQL GUIDE]

How to enable emojis in MySQL database

TLDR:

If you are using CodeIgniter

  • Set the character set into utf8mb4 and DB collation to utf8mb4_bin
  • Or you can just edit application/config/database.php like this