Skip to content

Instantly share code, notes, and snippets.

View iPublicis's full-sized avatar

Lopo iPublicis

View GitHub Profile
@iPublicis
iPublicis / git-unmerged
Created May 29, 2020 19:05 — forked from agnoster/git-unmerged
Check to see if which commits are not shared between two branches
#!/bin/bash
BRANCH1=${1:-master}
BRANCH2=${2:-HEAD}
echo; echo "Only in $BRANCH1"
git cherry -v $BRANCH2 $BRANCH1
echo; echo "Only in $BRANCH2"
git cherry -v $BRANCH1 $BRANCH2
@iPublicis
iPublicis / README.md
Created May 1, 2020 15:27 — forked from kostasx/README.md
Using TensorFlow.js with MobileNet models for image classification on Node.js

USAGE:

$ node mobilenet-node.js ./model image.jpg

@iPublicis
iPublicis / delete-feature.sh
Created April 17, 2020 22:33 — forked from chrisjlee/delete-feature.sh
Delete branch with prefix
git branch -D `git branch | grep 'feature/*'`
@iPublicis
iPublicis / delete-feature-branches.sh
Created April 17, 2020 22:33 — forked from chrisjlee/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 / app.scss
Created April 17, 2020 22:31 — forked from chrisjlee/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 / 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 / trelloinstall.sh
Last active April 21, 2023 17:44
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 / myapp-node-watcher.path
Last active March 26, 2024 21:06
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 / .htaccess
Last active January 16, 2024 08:04
NODE.JS app in Apache - force www. and https: sample .htaccess - partialy based on vielhuber/.htaccess
#########################
#
# NODE.JS app running in Apache
# sample .htaccess - partialy based on vielhuber/.htaccess
# Also rules to enforce www. prefix and https: SSL access
#
# 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.
#