Skip to content

Instantly share code, notes, and snippets.

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

Suleyman Aliyev SuleymanAli

🏠
Working from home
View GitHub Profile
@SuleymanAli
SuleymanAli / GoogleTranslate.vue
Last active August 8, 2023 13:43
Google Translate For The Specified Languages In Vue.js 3
<script setup>
const defaultLanguage = ref('tr')
const languages = reactive([
{
name: 'Türkçe',
code: 'tr', // 1. Language Codes -> https://gist.github.com/JT5D/a2fdfefa80124a06f5a9
flag: 'tu', // 2. Language Flag URLs -> https://www.kaggle.com/zhongtr0n/country-flag-urls
},
{
@Erefor
Erefor / component.vue
Created August 14, 2022 02:20
Vue 3 / Options Api Detect outside click
<template>
<div
ref="componentRef"
class="general-style"
>
</div>
</template>
<script>
import useDetectOutsideClick from '/useDetectOutsideClick'
@trulymittal
trulymittal / google-drive-api.js
Last active September 15, 2024 17:00
Gist to demonstrate Google Drive API using NodeJs
/*
Google Drive API:
Demonstration to:
1. upload
2. delete
3. create public URL of a file.
required npm package: googleapis
*/
const { google } = require('googleapis');
@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: [],
const HOST_URL = process.env.BASE_URL || 'http://localhost:3000';
//const API_URL = process.env.BASE_API_URL || 'http://14.225.11.12:3030/api/client';
const API_URL = process.env.BASE_API_URL || 'http://localhost:3000';
const webpack = require("webpack");
module.exports = {
mode: 'spa',
@YoshiTheChinchilla
YoshiTheChinchilla / BaseAlert.vue
Last active April 19, 2021 05:30
Simple Event Bus pattern in Vue.js and Nuxt.js
<template>
</template>
<script>
// Import the Event Bus of Vue instance
import { EventBus } from './event-bus.js'
export default {
created() {
(this.$nuxt || EventBus || this.$EventBus).$on('open-alert', this.openAlert)
@bradtraversy
bradtraversy / docker-help.md
Last active September 23, 2024 03:01
Docker Commands, Help & Tips

Docker Commands, Help & Tips

Show commands & management commands

$ docker

Docker version info

@bradtraversy
bradtraversy / webdev_online_resources.md
Last active September 25, 2024 14:56
Online Resources For Web Developers (No Downloading)
@bradtraversy
bradtraversy / pdocrash.php
Last active August 7, 2024 22:36
PDO & Prepared Statements Snippets
<?php
$host = 'localhost';
$user = 'root';
$password = '123456';
$dbname = 'pdoposts';
// Set DSN
$dsn = 'mysql:host='. $host .';dbname='. $dbname;
// Create a PDO instance
@bblanchon
bblanchon / settings.json
Created February 9, 2016 10:28
Sublime Text: Restore Quick Switch Project shortcut
{ "keys": ["ctrl+alt+p"], "command": "prompt_select_workspace" }