Skip to content

Instantly share code, notes, and snippets.

Alpine.directive('typed', (el, { expression, modifiers }, { evaluateLater, effect, cleanup }) => {
const getStrings = evaluateLater(expression);
const modifierValue = (key, fallback) => {
if (-1 === modifiers.indexOf(key)) {
return fallback;
}
const value = modifiers[modifiers.indexOf(key) + 1];
@subbe
subbe / loading_messages.js
Created September 12, 2022 12:32 — forked from meain/loading_messages.js
Funny loading messages
export default [
"Reticulating splines...",
"Generating witty dialog...",
"Swapping time and space...",
"Spinning violently around the y-axis...",
"Tokenizing real life...",
"Bending the spoon...",
"Filtering morale...",
"Don't think of purple hippos...",
"We need a new fuse...",
@subbe
subbe / countries.json
Last active June 13, 2021 07:39
Country data including iso codes, geo coordinates and flag.
[
{
"name":"Algeria",
"continent":"Africa",
"sub_region":"Northern Africa",
"iso":"DZA",
"iso2":"DZ",
"latitude":"28.213645935058594",
"longitude":"2.6547281742095947",
"flag":"https:\/\/raw.githubusercontent.com\/subbe\/flags\/main\/DZA.png"
<?
//
// AUTO KEYWORD-BASED FOLLOWER CURATION BOT (by @levelsio)
//
// File: twitterFollowerCuratorBot.php
//
// Created: May 2021
// License: MIT
//
@subbe
subbe / greetings.json
Created April 6, 2021 08:32
Greetings from different languages. Data includes language, country and flag.
{
"Afrikaans":{
"greetings":[
"Hallo (hal-low)"
],
"countries":[
{
"name":"South Africa",
"flag":"🇿🇦"
},

Install Supervisor with sudo apt-get install supervisor in Unix or brew install supervisor in Mac OSX. Ensure it's started with sudo service supervisor restart in Unix or brew services start supervisor in Mac OSX.

In Unix in /etc/supervisord/conf.d/ create a .conf file. In this example, laravel_queue.conf (contents below). Give it execute permissions: chmod +x laravel_queue.conf.

In Mac OSX first run supervisord -c /usr/local/etc/supervisord.ini and in /usr/local/etc/supervisor.d/ create a .conf file. In this example, laravel_queue.conf (contents below). Give it execute permissions: chmod +x laravel_queue.conf.

This file points at /usr/local/bin/run_queue.sh, so create that file there. Give this execute permissions, too: chmod +x run_queue.sh.

Now update Supervisor with: sudo supervisorctl reread in Unix and with: brew services restart supervisor in MAc OSX . And start using those changes with: sudo supervisorctl update.