Skip to content

Instantly share code, notes, and snippets.

View luberius's full-sized avatar
🏠
Working from home

Syahril Andika Patama luberius

🏠
Working from home
View GitHub Profile
@mattstein
mattstein / db-test.php
Last active March 28, 2023 23:01
PHP MySQL/PostgreSQL Connection Test
<?php
/**
* Database Connection Tester
* A quick-and-dirty standalone script for checking PHP’s connection to a
* MySQL (or MariaDB) or PostgreSQL database.
*
* To use, enter the settings below and run the following from your terminal:
* ```
* php -f db-test.php
@bradtraversy
bradtraversy / mongodb_cheat_sheet.md
Last active November 15, 2024 10:00
MongoDB Cheat Sheet

MongoDB Cheat Sheet

Show All Databases

show dbs

Show Current Database

@johnhalsey
johnhalsey / Pagination.vue
Created July 15, 2019 08:56
VueJS Pagination with TailwindCSS
<template>
<div class="">
<ul v-if="pages" class="list-reset">
<li class="inline-block bg-white hover:bg-blue-lightest border mr-1">
<a href="#"
class="no-underline text-grey-darker block py-3 px-4"
:class="{'bg-grey-lightest text-grey cursor-not-allowed': currentPage == 1}"
@click.prevent="getPreviousPage">Previous</a>
</li>
<li v-for="(page, index) in range"
@martypenner
martypenner / coming-soon.html
Last active February 25, 2021 12:15
"Coming Soon" page (self-contained)
<!doctype html>
<html class="no-js">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Coming Soon</title>
<meta name="viewport" content="width=device-width">
<style>
!function() {
var doc = document,
htm = doc.documentElement,
lct = null, // last click target
nearest = function(elm, tag) {
while (elm && elm.nodeName != tag) {
elm = elm.parentNode;
}
return elm;
};