Skip to content

Instantly share code, notes, and snippets.

View jamesallan93's full-sized avatar
:shipit:

James Allan jamesallan93

:shipit:
  • São Paulo - SP
View GitHub Profile
@jamesallan93
jamesallan93 / SDXL_Prompt_Styles.txt
Created May 20, 2025 14:59 — forked from keturn/SDXL_Prompt_Styles.txt
SDXL styles - Credit for the prompts goes to MechanicalReproductions & sedetweiler.com - https://discord.com/channels/1002292111942635562/1089974139927920741/1130958251962417304
Style: Enhance
Positive: breathtaking {prompt} . award-winning, professional, highly detailed
Negative: ugly, deformed, noisy, blurry, distorted, grainy
Style: Anime
Positive: anime artwork {prompt} . anime style, key visual, vibrant, studio anime, highly detailed
Negative: photo, deformed, black and white, realism, disfigured, low contrast
Style: Photographic
Positive: cinematic photo {prompt} . 35mm photograph, film, bokeh, professional, 4k, highly detailed
@jamesallan93
jamesallan93 / simple-pagination.js
Created February 29, 2024 23:34 — forked from kottenator/simple-pagination.js
Simple pagination algorithm
// Implementation in ES6
function pagination(c, m) {
var current = c,
last = m,
delta = 2,
left = current - delta,
right = current + delta + 1,
range = [],
rangeWithDots = [],
l;
@jamesallan93
jamesallan93 / AboutUs.vue
Created August 28, 2022 13:57 — forked from conradfuhrman/AboutUs.vue
Vue Page Transition, Inertia.js
<template>
<h1>About Us Component</h1>
<h3>{{ url }}</h3>
<p>Test fade/in out on page transition</p>
</template>
<script>
@jamesallan93
jamesallan93 / your-domain.com
Created May 25, 2022 18:40 — forked from lukaszflorczak/your-domain.com
Nginx configuration for Nuxt.js
server {
listen 80;
listen [::]:80;
index index.html;
server_name your-domain.com;
location / {
proxy_pass http://localhost:3000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
@jamesallan93
jamesallan93 / CountryCodes.json
Created April 9, 2022 20:53 — forked from anubhavshrimal/CountryCodes.json
Country and Dial or Phone codes in JSON format
[
{
"name": "Afghanistan",
"dial_code": "+93",
"code": "AF"
},
{
"name": "Aland Islands",
"dial_code": "+358",
"code": "AX"
@jamesallan93
jamesallan93 / remove_old_kernels.md
Created December 4, 2021 20:07 — forked from harshalbhakta/remove_old_kernels.md
Ubuntu Software Updater: Not enough free disk space

The upgrade needs a total of 81.5 M free space on disk '/boot'. Please free at least an additional 17.4 M of disk space on '/boot'. Empty your trash and remove temporary packages of former installations using 'sudo apt-get clean'.

http://askubuntu.com/questions/142926/cant-upgrade-due-to-low-disk-space-on-boot

Run below command as suggested in the error message.

$ sudo apt-get clean

First check your current kernel version.

@jamesallan93
jamesallan93 / getWeeksInMonth.js
Created August 14, 2021 20:04 — forked from markthiessen/getWeeksInMonth.js
JavaScript - get weeks in a month as array of start and end days
//note: month is 0 based, just like Dates in js
function getWeeksInMonth(year, month) {
const weeks = [],
firstDate = new Date(year, month, 1),
lastDate = new Date(year, month + 1, 0),
numDays = lastDate.getDate();
let dayOfWeekCounter = firstDate.getDay();
for (let date = 1; date <= numDays; date++) {
@jamesallan93
jamesallan93 / v-cloak.css
Created April 25, 2021 19:16 — forked from matthewoestreich/v-cloak.css
v-cloak for vue.js loading
[v-cloak] {
display: block;
padding: 50px 0;
}
@keyframes spinner {
to {
transform: rotate(360deg);
}
}
@jamesallan93
jamesallan93 / nginxproxy.md
Created September 27, 2020 13:40 — forked from soheilhy/nginxproxy.md
How to proxy web apps using nginx?

Virtual Hosts on nginx (CSC309)

When hosting our web applications, we often have one public IP address (i.e., an IP address visible to the outside world) using which we want to host multiple web apps. For example, one may wants to host three different web apps respectively for example1.com, example2.com, and example1.com/images on the same machine using a single IP address.

How can we do that? Well, the good news is Internet browsers