Skip to content

Instantly share code, notes, and snippets.

View webkod3r's full-sized avatar
👨‍💻
Coding ...

Pablo Molina webkod3r

👨‍💻
Coding ...
View GitHub Profile
@webkod3r
webkod3r / next_nginx.md
Created July 25, 2023 22:12 — forked from kocisov/next_nginx.md
How to setup next.js app on nginx with letsencrypt
@webkod3r
webkod3r / devshelf.sh
Created August 7, 2021 21:06 — forked from robhrt7/devshelf.sh
Ubuntu init.d service example for nodeJS app with forever
#!/bin/bash
#
# description: DevShelf service
# processname: node
# pidfile: /var/run/devshelf.pid
# logfile: /var/log/devshelf.log
#
# Based on https://gist.github.com/jinze/3748766
#
# To use it as service on Ubuntu:
@webkod3r
webkod3r / 1_survey_email_notification.sql
Last active January 19, 2021 22:07
SM-7 email notification for survey
INSERT INTO `notification_emails`
(`id`, `name`, `email`, `created`, `modified`)
VALUES
(
'dcf48b70-56b7-11eb-a24a-834c6a46c186',
'Training Attended Survey',
'no-reply-user@zumba.com',
'2021-01-14 22:28:37',
'2021-01-14 22:28:37'
);
@webkod3r
webkod3r / get_commit_hash.php
Last active March 29, 2020 18:25
write current git hash to file
<?php
if (!function_exists('get_commit_hash')) {
/**
* Checks to see if we have a .commit_hash file or .git repo and return the hash if we do.
*
* @return null|string
*/
function get_commit_hash()
{
<?php
namespace App\Libraries\Queue;
use Illuminate\Events\Dispatcher;
use Illuminate\Queue\DatabaseQueue;
use Illuminate\Support\Str;
use Laravel\Horizon\Events\JobDeleted;
use Laravel\Horizon\Events\JobPushed;
use Laravel\Horizon\Events\JobReleased;
@webkod3r
webkod3r / script.sql
Created March 7, 2018 05:26
Setting MYSQL time_zone
SELECT @@global.time_zone, @@session.time_zone;
-- change the mysql server time zone
SET GLOBAL time_zone = '-05:00';
set time_zone = '-05:00';
-- other option to change the configuration
-- In the file "my.cnf" in the [mysqld] section
-- default-time-zone='-05:00'

Keybase proof

I hereby claim:

  • I am webkod3r on github.
  • I am webkod3r (https://keybase.io/webkod3r) on keybase.
  • I have a public key whose fingerprint is BF81 3595 6374 D781 97CB 16D5 76E9 E96F 0949 58D3

To claim this, I am signing this object:

@webkod3r
webkod3r / parse-git-branch.sh
Created January 24, 2018 13:18
parse-git-branch in UNIX terminal
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
PS1='\[\033[0;33m\]\u\[\033[0m\]@\[\033[0;32m\]\h\[\033[0m\]:\[\033[0;34m\]\w\[\033[0m\]$(parse_git_branch)\$ '
@webkod3r
webkod3r / _ide_helper.php
Created June 17, 2017 22:26 — forked from barryvdh/_ide_helper.php
Laravel IDE Helper for Netbeans / PhpStorm / Sublime Text 2 CodeIntel, generated using https://github.com/barryvdh/laravel-ide-helper
<?php
/**
* A helper file for Laravel 5, to provide autocomplete information to your IDE
* Generated for Laravel 5.4.11 on 2017-02-14.
*
* @author Barry vd. Heuvel <barryvdh@gmail.com>
* @see https://github.com/barryvdh/laravel-ide-helper
*/
namespace {
exit("This file should not be included, only analyzed by your IDE");
git branch --merged | grep -v "\*" | xargs -n 1 git branch -d