Skip to content

Instantly share code, notes, and snippets.

View TardencillaRuiz's full-sized avatar

Damian Tardencilla TardencillaRuiz

View GitHub Profile
@danestves
danestves / postcss.config.js
Created January 5, 2020 01:11
PostCSS config for TailwindCSS
module.exports = {
plugins: [
require("postcss-easy-import"),
require("tailwindcss"),
process.env.NODE_ENV === "production" &&
require("@fullhuman/postcss-purgecss")({
content: [
"./src/pages/**/*.{js,jsx,ts,tsx}",
"./src/components/**/*.{js,jsx,ts,tsx}",
],
@daliborgogic
daliborgogic / default.vue
Last active October 16, 2020 17:59
Vantablack? Nuxt.js simple theme switch
<script>
export default {
computed: {
theme () {
const [color, backgroundColor] = this.$store.state.theme
return {
'--color': color,
'--background-color': backgroundColor
}
}
@inspiretk
inspiretk / git auto deploy from local machine to remote server
Last active August 4, 2023 22:29
git auto deploy from local machine to remote server
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
@DreaMinder
DreaMinder / A Nuxt.js VPS production deployment.md
Last active July 31, 2024 13:56
Deployment manual for a real-world project built with nuxt.js + koa + nginx + pm2

Example of deployment process which I use in my Nuxt.js projects. I usually have 3 components running per project: admin-panel SPA, nuxt.js renderer and JSON API.

This manual is relevant for VPS such as DigitalOcean.com or Vultr.com. It's easier to use things like Now for deployment but for most cases VPS gives more flexebillity needed for projects bigger than a landing page.

UPD: This manual now compatible with nuxt@2.3. For older versions deployment, see revision history.


Let's assume that you have entered fresh installation of Ubuntu instance via SSH. Let's rock:

@Lwdthe1
Lwdthe1 / usaCities.json
Last active September 11, 2024 20:08
JSON of 5797+ USA Cities and Their States - Presented by https://www.ManyStories.com
[
{ "city": "Abbeville", "state": "Louisiana" },
{ "city": "Aberdeen", "state": "Maryland" },
{ "city": "Aberdeen", "state": "Mississippi" },
{ "city": "Aberdeen", "state": "South Dakota" },
{ "city": "Aberdeen", "state": "Washington" },
{ "city": "Abilene", "state": "Texas" },
{ "city": "Abilene", "state": "Kansas" },
{ "city": "Abingdon", "state": "Virginia" },
{ "city": "Abington", "state": "Massachusetts" },
@Tuarisa
Tuarisa / nuxt-axios-cache.js
Last active October 3, 2021 21:28
Nuxt axios cache plugin
import hash from 'object-hash'
import sizeof from 'object-sizeof'
import lruCache from 'lru-cache'
const cacheEnabled = true
const cacheMaxAge = 30 * 60 * 1000
const cacheMaxSize = 128 * 1000 * 1000
const getCacheKey = obj => hash(obj)
@HJianBo
HJianBo / LC_CTYPE.txt
Created November 7, 2017 02:02 — forked from jampajeen/LC_CTYPE.txt
Centos warning: setlocale: LC_CTYPE: cannot change locale (UTF-8): No such file or directory
vi /etc/environment
add these lines...
LANG=en_US.utf-8
LC_ALL=en_US.utf-8
@hasanbayatme
hasanbayatme / README.md
Last active December 28, 2020 00:14
A Simple Bash Script for Installing Composer on Ubuntu Locally (current user) and Globally (all users).

Installation

Install composer locally (current user only):

wget -O - https://gist.github.com/EmpireWorld/1dd5f59566e186907f99dc16badc382a/raw/install-composer-local.sh | bash

Install composer globally (all users):

@autumnwoodberry
autumnwoodberry / user.js
Last active March 24, 2022 06:49
vuex + vuelidate
import Vue from 'vue'
import { validationMixin } from 'vuelidate'
import { required, minLength } from 'vuelidate/lib/validators'
export default function (store) {
const validator = new Vue({
mixins: [
validationMixin
],
computed: {
@angrycoffeemonster
angrycoffeemonster / Sublime Text 3 Build 3103 License Key - CRACK
Created April 18, 2016 02:13
Sublime Text 3 Build 3103 License Key - CRACK
I use the first
—– BEGIN LICENSE —–
Michael Barnes
Single User License
EA7E-821385
8A353C41 872A0D5C DF9B2950 AFF6F667
C458EA6D 8EA3C286 98D1D650 131A97AB
AA919AEC EF20E143 B361B1E7 4C8B7F04