Skip to content

Instantly share code, notes, and snippets.

Avatar
🚀
Launching...

Daniel Primo delineas

🚀
Launching...
View GitHub Profile
@delineas
delineas / docker-compose.yml
Created January 26, 2023 20:22
Pocketbase Docker
View docker-compose.yml
version: "3.7"
services:
pocketbase:
image: ghcr.io/muchobien/pocketbase:latest
container_name: pocketbase
restart: unless-stopped
ports:
- "8090:8090"
volumes:
@delineas
delineas / .gitlab-ci.yml
Last active February 3, 2022 08:19
Gatsby project CI/CD with deploy to other server
View .gitlab-ci.yml
image: node:10.13-stretch
before_script:
- apt-get update -qq && apt-get install -y -qq sshpass
deploy_production:
stage: deploy
environment: Production
script:
- npm install
@delineas
delineas / isbn_search.rb
Created October 25, 2021 14:18 — forked from luisparravicini/isbn_search.rb
Busca la informacion de un libro segun su isbn
View isbn_search.rb
#!/usr/bin/ruby1.9.1
# Script para traducir isbn a informacion del libro buscando en varias
# librerias online. Se probo por ultima vez el 2009-12-11.
#
# Author:: Luis Parravicini
# Copyright:: Copyright (C) 2009 Luis Parravicini
# License:: GPL v2
#
# http://ktulu.com.ar/blog/2009/12/11/traduciendo-isbn/
@delineas
delineas / replace.js
Created October 3, 2021 18:48
Replace text for anchor link
View replace.js
const myString = "Comía Feliz el Ñandú cardo y kiwi";
myString.toLowerCase()
.normalize('NFD')
.replace(/([aeio])\u0301|(u)[\u0301\u0308]/gi,"$1$2")
.normalize()
.replace(/ñ/gi,"n")
.replace(/[`~!@#$%^&*()_|+\-=?;:'",.<>\{\}\[\]\\\/]/gi, '')
.replace(/ +/g, '-');
@delineas
delineas / iCal.php
Created September 23, 2021 20:14 — forked from seebz/iCal.php
iCal PHP Parser
View iCal.php
<?php
class iCal
{
/**
* @var string
*/
public $title;
@delineas
delineas / __upload_file.md
Created March 22, 2021 08:33 — forked from maxivak/__upload_file.md
PHP upload file with curl (multipart/form-data)
View __upload_file.md

We want to upload file to a server with POST HTTP request. We will use curl functions.


// data fields for POST request
$fields = array("f1"=>"value1", "another_field2"=>"anothervalue");

// files to upload
$filenames = array("/tmp/1.jpg", "/tmp/2.png");
@delineas
delineas / gh-pages.yml
Created April 29, 2020 09:25 — forked from syuji-higa/gh-pages.yml
GitHub Actions - Genelate Nuxt.js deploy for GitHub Pages
View gh-pages.yml
name: github pages
on:
push:
branches:
- master
jobs:
build-deploy:
runs-on: ubuntu-18.04
@delineas
delineas / some_test.js
Created January 4, 2020 10:09 — forked from mbrochh/some_test.js
Controlling a Stripe payent popup with Cypress.io
View some_test.js
// for this to work you need to set `"chromeWebSecurity": false` in cypress.json
describe('Make Stripe Payment', function() {
before(function() {
cy.visit('http://localhost:3000/en/stripe/checkout/')
Cypress.Cookies.preserveOnce('sessionid')
})
it('should enter credit card details and finalise payment', function() {
cy.get('[data-test="button-FormStripeCart-PayWithCreditCard"]').click()
@delineas
delineas / vue.config.js
Created December 16, 2019 10:42
Vue Cli Static Output Names
View vue.config.js
let assetsDir = "assets";
module.exports = {
assetsDir: assetsDir,
configureWebpack: {
output: {
filename: assetsDir + "/[name].js",
chunkFilename: assetsDir + "/[name].js"
}
@delineas
delineas / convert_html_md.sh
Created July 30, 2019 18:32
Convert Mailchimp HTML Campaigns to Markdown
View convert_html_md.sh
# This script was created to convert a directory full of Mailchimp Campaigns html files into md equivalents.
# It uses to-markdown-cli to do the conversion.
#
# 1. Install https://www.npmjs.com/package/to-markdown-cli (you must be installed node)
# 2. Copy this script into the directory containing the .html files
# 3. Modify 'sed' init and 'sed' final conditions
# - '1,/<center>/d' -> Remove all html content from init to first <center>
# - '/Ver este mensaje en el navegador/,/<\/html>/d' -> Remove all html content from "Ver este mensaje en el navegador" text to finish
# 4. Ensure that the script has execute permissions
# 5. Run the script