Skip to content

Instantly share code, notes, and snippets.

View diegogurpegui's full-sized avatar
🤔
Existing

Diego H. Gurpegui diegogurpegui

🤔
Existing
View GitHub Profile

Keybase proof

I hereby claim:

  • I am diegogurpegui on github.
  • I am diegogurpegui (https://keybase.io/diegogurpegui) on keybase.
  • I have a public key ASAd5t43T5M_7_lRuTgpVF9s6UnD5ekKIiRZ-oFSdYJKqwo

To claim this, I am signing this object:

@diegogurpegui
diegogurpegui / DGTT_flattened.sol
Created May 6, 2018 21:44
DGTT solidity flattened
pragma solidity ^0.4.18;
/**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/
library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
@diegogurpegui
diegogurpegui / fontawesome_classes_4.7.0.json
Created May 9, 2018 18:51
JSON with all the classes of FontAwesome 4.7.0. Just the class as key and value.
{
"fa-500px": "fa-500px",
"fa-address-book": "fa-address-book",
"fa-address-book-o": "fa-address-book-o",
"fa-address-card": "fa-address-card",
"fa-address-card-o": "fa-address-card-o",
"fa-adjust": "fa-adjust",
"fa-adn": "fa-adn",
"fa-align-center": "fa-align-center",
"fa-align-justify": "fa-align-justify",
# Redmine - project management software
# Copyright (C) 2006-2014 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
@diegogurpegui
diegogurpegui / symfony_deploy.sh
Last active October 11, 2018 23:14
Script to deploy a Symfony project from a Git repository
#!/bin/bash
# Fetch from repository
git fetch origin
reslog=$(git log HEAD..origin/master --oneline)
git reset --hard origin/master
if [ "${reslog}" != "" ] ; then
git merge origin/master # completing the pull
# Symfony deployment
@diegogurpegui
diegogurpegui / laravel_deploy.sh
Last active July 11, 2018 13:39
Script to deploy a Laravel project from a Git repository
#!/bin/bash
# Fetch from repository
git fetch origin
reslog=$(git log HEAD..origin/master --oneline)
git reset --hard origin/master
if [ "${reslog}" != "" ] ; then
git merge origin/master # completing the pull
# Project dependencies install/update
Verifying my Blockstack ID is secured with the address 12wEcUDCwYZVRzY2aemhU5uF33uvkxotzM https://explorer.blockstack.org/address/12wEcUDCwYZVRzY2aemhU5uF33uvkxotzM
@diegogurpegui
diegogurpegui / country_iso_mapping_array.php
Last active December 13, 2018 13:43
Mapping arrays for countries ISO 3166-1 alpha-2 and alpha-2 codes
<?php
/**
* Mapping arrays for
* ISO 3166-1 alpha-2 and alpha-2
*/
// Mapping from ISO alpha-2 to ISO alpha-3
$countryIsoMapping2to3 = [
'AF' => 'AFG',
'AX' => 'ALA',
@diegogurpegui
diegogurpegui / crontab
Last active January 3, 2019 14:09
MySQL backup script. Could be used to automate the process with cron.
0 0 * * * sh /route/to/script/mysql_backup.sh >> /var/log/myapp/mysql_backup.log 2>&1
@diegogurpegui
diegogurpegui / gh-page deploy.sh
Last active June 10, 2019 01:13
Project deploy to gh-pages
# Assume a branch called 'gh-pages' and a directory called 'dist'
git subtree push --prefix=dist origin gh-pages