Skip to content

Instantly share code, notes, and snippets.

View chz's full-sized avatar
👨‍💻
Front end Engineer / VueJS Lover

Chingiz Mammadov chz

👨‍💻
Front end Engineer / VueJS Lover
View GitHub Profile
export function slugify(value, options) {
let s = String(value)
const opt = Object(options)
const defaults = {
delimiter: '-',
limit: undefined,
lowercase: true,
replacements: {},
transliterate: typeof XRegExp === 'undefined',
@chz
chz / settings.json
Last active August 25, 2023 19:05 — forked from danielroe/extensions.json
VScode settings for a minimal UI
{
// Disable telemetry
"telemetry.telemetryLevel": "off",
// Zen mode
"zenMode.fullScreen": false,
"zenMode.hideTabs": true,
"zenMode.centerLayout": false,
// Theming
"workbench.iconTheme": "city-lights-icons-vsc",
"editor.fontFamily": "Dank Mono",
@chz
chz / auth.js
Created April 4, 2022 21:45 — forked from jengel3/auth.js
Vue/Nuxt JWT Authentication Implementation
// store/auth.js
// reusable aliases for mutations
export const AUTH_MUTATIONS = {
SET_USER: 'SET_USER',
SET_PAYLOAD: 'SET_PAYLOAD',
LOGOUT: 'LOGOUT',
}
export const state = () => ({
@chz
chz / git-deployment.md
Created March 1, 2022 20:55 — forked from noelboss/git-deployment.md
Simple automated GIT Deployment using Hooks

Simple automated GIT Deployment using GIT Hooks

Here are the simple steps needed to create a deployment from your local GIT repository to a server based on this in-depth tutorial.

How it works

You are developing in a working-copy on your local machine, lets say on the master branch. Most of the time, people would push code to a remote server like github.com or gitlab.com and pull or export it to a production server. Or you use a service like deepl.io to act upon a Web-Hook that's triggered that service.

@chz
chz / git.sh
Last active March 6, 2020 13:10
Commits author change
#!/bin/sh
git filter-branch --env-filter '
OLD_EMAIL="[email protected]"
CORRECT_NAME="Chingiz Mammadov"
CORRECT_EMAIL="[email protected]"
if [ "$GIT_COMMITTER_EMAIL" = "$OLD_EMAIL" ]
then
@chz
chz / vowelSuffix
Last active June 21, 2019 10:53
Ahəng qanununa uyğun şəkilçilərin əlavəsi (da,də, dakı, dəki)
vowelSuffix = (str, in_suffix) => {
let vowel_list = 'aeiouəüöıAEIOUƏÜÖI';
let soft_vowels = ['ə', 'e', 'ö', 'ü', 'i'];
let varray = [];
let vowel_suffix = 'də';
let vowel_suffix_in = 'dəki';
let consonant_suffix = 'da';
let consonant_suffix_in = 'dakı';
for(let x = 0; x < str.length ; x++){
if (vowel_list.indexOf(str[x]) !== -1){
References: https://gist.github.com/noelboss/3fe13927025b89757f8fb12e9066f2fa
More info: https://www.digitalocean.com/community/tutorials/how-to-use-git-hooks-to-automate-development-and-deployment-tasks
https://www.youtube.com/watch?v=6mYtJu0E47U
[misc commands deluser newuser]
The following steps is for Developers to push their code from their local machine, to their server with git, and let git auto
pull the update to your remote folder. How it works:
- From your local machine, you do your normal coding. When done, you push your new code to git
- Git then updates your local machine, and push it to your server's git
- Git on your server gets the new update, and push it to your server's working folder