Skip to content

Instantly share code, notes, and snippets.

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

Udith Ishara Madusanka udithishara

🏠
Working from home
View GitHub Profile
@arsho
arsho / pdo_like.php
Created May 20, 2017 05:00
Like operator in PDO
<?php
$user = "root";
$password = "";
$name = "%o%";
try{
$conn = new PDO('mysql:host=localhost;dbname=test_db',$user,$password);
$query = "SELECT * FROM `test_table` WHERE `name` like :name";
$stmt = $conn->prepare($query);
$stmt->bindParam(':name',$name);
$stmt->execute();
@mindofjonas
mindofjonas / index.html
Created July 14, 2017 00:32
Vuejs SSFCRUD - Search Sort Filter Create Read Update Delete
<html lang="vi">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Tôn Cường - The simple tutorial Vuejs</title>
<link rel="stylesheet" href="assets/css/normalize.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<link rel="stylesheet" href="assets/css/style.css">
@wdmtech
wdmtech / index.js
Created July 24, 2017 11:19
Facebook SDK (Graph/REST API) integration as a Vue.js mixin
export let facebookSDK = {
mounted () {
let _this = this
this.$nextTick(() => {
window.fbAsyncInit = function () {
FB.init({
appId: 'XXX',
xfbml: true,
version: 'v2.6'
})
@benfurfie
benfurfie / tailwind.config.js
Created July 17, 2019 20:27
Tailwind Default Config
module.exports = {
prefix: '',
important: false,
separator: ':',
theme: {
screens: {
sm: '640px',
md: '768px',
lg: '1024px',
xl: '1280px',
@ffxsam
ffxsam / Suspense.ts
Last active May 22, 2024 17:48
Vue 3's Suspense component, ready for use in Vue 2.x (TypeScript)
import Vue from 'vue';
export const Suspense = Vue.extend({
name: 'Suspense',
data: () => ({
resolved: false,
}),
async created() {
const setupMethod = (this.$parent as any).setup;
if (!setupMethod) {