Skip to content

Instantly share code, notes, and snippets.

View pietromalerba's full-sized avatar

Pietro Malerba pietromalerba

  • M3
  • Civitanova Marche (MC) - Italy
View GitHub Profile
@pietromalerba
pietromalerba / bitbucket-pipeline-pull-files.md
Created June 9, 2023 16:35 — forked from shankar-bavan/bitbucket-pipeline-pull-files.md
CI CD with bitbucket pipleline and shell script
@shankar-bavan
shankar-bavan / bitbucket-pipeline-pull-files.md
Last active June 9, 2023 16:35
CI CD with bitbucket pipleline and shell script
start:
// If the user doesn't exist, we create a new id using the uuid app
if (!user_id) remember user_id = Fn("utils/uuid", version="v4")
say "Hi, let's subscribe to an awesome newsletter 💌 !"
do Fn("google/analytics", method="sendEvent", params={"user_id": user_id,"category": "csml_nl_chatbot","action": "flow_process","label": "start"})
goto firstname
firstname:
say "What's your firstname?"
hold
@qumberrizvi
qumberrizvi / bitbucket-pipelines.yml
Last active September 11, 2023 06:30
Bitbucket Pipelines CI/CD: SSH into a server to git pull without conflict. Avoid failure when auto merge tries to open editor for commit message.
# This is a sample build configuration for PHP.
# Check our guides at https://confluence.atlassian.com/x/e8YWN for more examples.
# Only use spaces to indent your .yml configuration.
# -----
# You can specify a custom docker image from Docker Hub as your build environment.
image: php:7.1.29
pipelines:
default:
- step:
name: Deploy to dev
@neokree
neokree / docker-compose.yml
Last active November 9, 2018 16:15
Prestashop Module Development article pt. 3 - code 1
version: "3"
services:
mysql:
image: mysql/mysql-server:5.7
restart: always
ports:
- 33060:3306
environment:
- MYSQL_RANDOM_ROOT_PASSWORD=1
jQuery(document).ready(function($){
function getParameterByName(name) {
name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"),
results = regex.exec(location.search);
return results === null ? "" : decodeURIComponent(results[1].replace(/\+/g, " "));
}
// Give the URL parameters variable names
var source = getParameterByName('utm_source');
var medium = getParameterByName('utm_medium');
@rafaelstz
rafaelstz / magento2-truncate.sql
Created August 29, 2017 14:40
Magento 2 truncate customers, products, reviews and orders table
SET FOREIGN_KEY_CHECKS = 0;
-- Truncate order tables
TRUNCATE TABLE `gift_message`;
TRUNCATE TABLE `quote`;
TRUNCATE TABLE `quote_address`;
TRUNCATE TABLE `quote_address_item`;
TRUNCATE TABLE `quote_id_mask`;
TRUNCATE TABLE `quote_item`;
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@dremendes
dremendes / getvideo.js
Created August 23, 2017 21:29
Facebook video download with puppeteer example
const puppeteer = require('puppeteer');
const { URL } = require('url');
(async () => {
const browser = await puppeteer.launch();
const page = await browser.newPage();
const link = new URL('http://www.facebook.com/dcmjunior/videos/1794891250528272/');
if(["www.facebook.com",
"facebook.com",
@pedro-santiago
pedro-santiago / migrate.sh
Last active November 18, 2020 22:20 — forked from gghughunishvili/migrate1.sh
Upgrade MAMP 4 to Mysql 5.7.18 (on Sierra tested)
#!/bin/sh
wget http://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.18-macos10.12-x86_64.tar.gz
tar xfvz mysql-5.7.18-macos10.12-x86_64.tar.gz
echo "Stopping MAMP"
sudo /Applications/MAMP/bin/stop.sh
sudo killall httpd mysqld
echo "Copy Bin"