Skip to content

Instantly share code, notes, and snippets.

View dmgallardo's full-sized avatar
🏠
Working from home

Diego Gallardo dmgallardo

🏠
Working from home
View GitHub Profile
@dmgallardo
dmgallardo / 01_github-action-create-release-on-merge.md
Created January 6, 2023 18:31 — forked from UVLabs/01_github-action-create-release-on-merge.md
Github Action: Create Tag and Release when a pull request is merged into master/main branch with release notes parsed from merge comment

This Github Action workflow along with the rest of these files/scripts will allow you to create a Tag as well as a Release with the release notes set to the text added in the body of the merge comment when a pull request is merged.

Create release on merge github action

Note:

Merge comment title needs to contain the text "release" or else the workflow will not run (see line 11 of create-release.yml).

@dmgallardo
dmgallardo / bootstrap.js
Created July 10, 2020 21:18
strapi-starter-blog/config/functions/bootstrap.js
"use strict";
require("dotenv").config();
/**
* An asynchronous bootstrap function that runs before
* your application gets started.
*
* This gives you an opportunity to set up your data model,
* run jobs, or perform some special logic.
*
* See more details here: https://strapi.io/documentation/3.0.0-beta.x/concepts/configurations.html#bootstrap
@dmgallardo
dmgallardo / docker-cleanup-resources.md
Created December 2, 2019 20:42 — forked from bastman/docker-cleanup-resources.md
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm

@dmgallardo
dmgallardo / nginx.conf
Created February 9, 2017 16:16 — forked from mariano-aguero/nginx.conf
File nginx.conf to use in centos servers
user nginx;
worker_processes 1; #2
error_log /var/log/nginx/error.log;
pid /run/nginx.pid;
worker_rlimit_nofile 20000;
events {
worker_connections 10000;
multi_accept on;
accept_mutex on;
@dmgallardo
dmgallardo / launch_sublime_from_terminal.markdown
Last active December 16, 2016 13:29 — forked from artero/launch_sublime_from_terminal.markdown
Launch Sublime Text from the Mac OS X Terminal

Launch Sublime Text from the Mac OS X Terminal

Sublime Text 2 ships with a CLI called subl (why not "sublime", go figure). This utility is hidden in the following folder (assuming you installed Sublime in /Applications like normal folk. If this following line opens Sublime Text for you, then bingo, you're ready.

open /Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl

You can find more (official) details about subl here: http://www.sublimetext.com/docs/2/osx_command_line.html

Installation

@dmgallardo
dmgallardo / App Icon and Splash Screen Sizes.md
Last active October 24, 2016 16:06
Phonegap App Icon and Splash Screen Sizes

This is a reference guide for Icons and Splash screen resolutions for Android and iOS Cordova/Phonegap Apps. This guide is only for Mobile Phone Devices.

App Icon Screen Sizes

Webapp

  • 57 px, add as <link rel="apple-touch-icon" href="icon.png">, in the <head> of index.html.

Android (square icons)

  • 192px X 192px (xxxhdpi) (name: 192.png)
  • 144px X 144px (xxhdpi) (name: 144.png)
@dmgallardo
dmgallardo / webdevelopermachine.md
Last active August 19, 2016 03:18
Mac web developer apps - New Machine
@dmgallardo
dmgallardo / RestControllerTrait.php
Created March 3, 2016 10:44 — forked from mariano-aguero/RestControllerTrait.php
Playing with Laravel Lumen: simple RESTful trait.
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
trait RestControllerTrait {
/**
* Manage index request
@dmgallardo
dmgallardo / multiple_ssh_setting.md
Last active September 2, 2015 21:41 — forked from jexchan/multiple_ssh_setting.md
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"
@dmgallardo
dmgallardo / curl.md
Last active August 29, 2015 14:23 — forked from btoone/curl.md

Introduction

An introduction to curl using GitHub's API

The Basics

Makes a basic GET request to the specifed URI

curl https://api.github.com/users/caspyin