Skip to content

Instantly share code, notes, and snippets.

View iPublicis's full-sized avatar

Lopo iPublicis

View GitHub Profile
@iPublicis
iPublicis / EnsureQueueListenerIsRunning.php
Last active October 31, 2024 14:37 — forked from ivanvermeyen/EnsureQueueListenerIsRunning.php
Ensure that the Laravel queue listener is running with "php artisan queue:checkup" and restart it if necessary. You can run this automatically with a cron job: http://laravel.com/docs/scheduling
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
class EnsureQueueListenerIsRunning extends Command
{
/**
* The name and signature of the console command.
@iPublicis
iPublicis / create_gif.sh
Created January 7, 2019 15:34 — forked from EmmanuelKasper/create_gif.sh
Create gif file with avconf
#export frames
avconv -i hatari.avi -vf fps=10 frames/ffout%03d.png
#assemble frames a gif
convert -loop 0 frames/ffout0*.png new.gif
@iPublicis
iPublicis / .htaccess
Created January 31, 2019 17:21 — forked from vielhuber/.htaccess
Apache: htaccess force www and https ssl #server
# force HTTPS and www.
RewriteEngine On
RewriteCond %{HTTP_HOST} (?!^www\.)^(.+)$ [OR]
RewriteCond %{HTTPS} off
RewriteRule ^ https://www.%1%{REQUEST_URI} [R=301,L]
# alternative way
RewriteCond %{HTTP_HOST} !^$
RewriteCond %{HTTP_HOST} !^www\. [NC]
@iPublicis
iPublicis / .htaccess
Last active November 4, 2024 00:57
NODE.JS app in Apache - force www. and https: sample .htaccess, skip images or other files desired - partialy based on vielhuber/.htaccess
#########################
#
# NODE.JS app running in Apache
# sample .htaccess - partialy based on vielhuber/.htaccess
# Read also https://gist.github.com/vielhuber/f2c6bdd1ed9024023fe4
# Also rules to enforce www. prefix and https: SSL access and avoid extra processing for any file defined.
#
# This file must be on the dir where Apache expects to find the website
# The Node App can be anywhere else but must be accessible as explained below.
#
@iPublicis
iPublicis / myapp-node-watcher.path
Last active October 31, 2024 12:55
NODE.JS app as a systemd service with CI controller
#########
# File: myapp-node-watcher.path
#
# Save this to /etc/systemd/system/
# Run systemctl enable myapp-node-watcher.path && systemctl daemon-reload && systemctl start myapp-node-watcher.path
#
[Path]
PathModified=/home/myuser/myappdir/public_html
[Install]
@iPublicis
iPublicis / trelloinstall.sh
Last active January 1, 2026 17:55
Install Trello Linux Client
#!/bin/bash
# Your system should be 64 bits and check if the last version at https://github.com/danielchatfield/trello-desktop/ is 0.19
# If the current version is not 0.19 change the file name below accordingly
wget https://github.com/Racle/trello-desktop/releases/download/v0.2.0/Trello-linux-0.2.0.zip -O trello.zip
sudo mkdir /opt/trello
sudo unzip trello.zip -d /opt/trello/
sudo ln -sf /opt/trello/Trello /usr/bin/trello
echo -e '[Desktop Entry]\n Version=1.0\n Name=Trello Desktop\n Exec=/usr/bin/trello\n Icon=/opt/trello/resources/app/static/Icon.png\n Type=Application\n Categories=Application' | sudo tee /usr/share/applications/trello.desktop
@iPublicis
iPublicis / woocommerce_catalog_mode.php
Created April 10, 2019 11:52 — forked from webdados/woocommerce_catalog_mode.php
WooCommerce easy "Catalog mode" - Disable all products from being purchasable
<?php
// Disable all products from being purchasable (Yes, that's it...) - Add this to your (child) theme functions.php file
add_filter( 'woocommerce_is_purchasable', '__return_false' );
@iPublicis
iPublicis / app.scss
Created April 17, 2020 22:31 — forked from chrisl8888/app.scss
fix the bootstrap / webpack asset import issue
// https://github.com/webpack-contrib/sass-loader/issues/40
$bootstrap-sass-asset-helper: true;
@import "~bootstrap-sass/assets/stylesheets/bootstrap";
@iPublicis
iPublicis / delete-feature-branches.sh
Created April 17, 2020 22:33 — forked from chrisl8888/delete-feature-branches.sh
Delete feature branch with prefix locally then remove all remote feature branches
# Stole from:
# http://stackoverflow.com/questions/32122784/alias-script-to-delete-all-local-and-remote-git-branches-with-a-specific-prefix
git branch -D $(printf "%s\n" $(git branch) | grep 'feature/')
# Or this will work too to remove all remote branches:
# https://coderwall.com/p/eis0ba/remove-a-thousand-stale-remote-branches-on-git
git branch -r | awk -F/ '/\/feature/{print $2}' | xargs -I {} git push origin :{}
# Prune all origin branches
git remote prune origin
@iPublicis
iPublicis / delete-feature.sh
Created April 17, 2020 22:33 — forked from chrisl8888/delete-feature.sh
Delete branch with prefix
git branch -D `git branch | grep 'feature/*'`