Skip to content

Instantly share code, notes, and snippets.

View 12cassie34's full-sized avatar

Cassie 12cassie34

View GitHub Profile
@Jonarod
Jonarod / CheckBox.vue
Created November 23, 2019 18:20
Simple custom CheckBox component for Vue.js, compatible with v-model.
/**
* @usage:
*
* <CheckBox label="Foo" value="foo" v-model="MySelectedValues" />
* <CheckBox label="Bar" value="bar" v-model="MySelectedValues" />
* <CheckBox label="Baz" value="baz" v-model="MySelectedValues" />
*
* data(){
* return {
* MySelectedValues: [],
@topalex
topalex / mime.html
Last active September 22, 2022 09:43
How to check real mime type of image in javascript
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Mime type checker</title>
<script type="text/javascript" src="/jquery.min.js"></script>
<script>
$(function () {
var result = $('div#result');
if (window.FileReader && window.Blob) {
@simonhamp
simonhamp / AppServiceProvider.php
Last active May 4, 2024 04:21
A pageable Collection implementation for Laravel
<?php
namespace App\Providers;
use Illuminate\Support\Collection;
use Illuminate\Pagination\LengthAwarePaginator;
class AppServiceProvider extends ServiceProvider
{
public function boot()