Skip to content

Instantly share code, notes, and snippets.

View igorPhelype's full-sized avatar

Igor igorPhelype

  • Juiz de Fora, Minas Gerais - Brasil
View GitHub Profile
#!/bin/bash
echo "Starting your project..."
project_name=$1
if [ "$project_name" = "" ]; then
echo "Expecting param 1 to be the project name:"
echo " -> ./start_docker_project [project_name]"
exit
fi
mkdir $project_name
@igorPhelype
igorPhelype / installing-oh-my-zsh-fedora.md
Created November 16, 2018 15:55 — forked from jshcrowthe/installing-oh-my-zsh-fedora.md
Installing Oh My ZSH oh Fedora (2015 CIT 325 Image)

Installing oh-my-zsh on Fedora (for DB class images)

Oh-my-zsh is an extension of the traditional z shell that is extensible via community created plugins (Plugins found here: oh-my-zsh github repo). It is, in my opinion, a breath of fresh air in comparison to the traditional bash shell.

DO THE FOLLOWING IN ORDER

Installing ZSH (using yum)

The first step for this install is getting zsh we will do this via yum. From your terminal:

Notification (web)

Service worker configuration

  • Create a file called 'firebase-messaging-sw.js' with the following content and put it on the public path of the project (generaly it is project-folder/public):
importScripts('https://www.gstatic.com/firebasejs/4.8.1/firebase-app.js');
importScripts('https://www.gstatic.com/firebasejs/4.8.1/firebase-messaging.js');
firebase.initializeApp({
    messagingSenderId: "1072711350296"
});
const Notifier = firebase.messaging();
#!/bin/bash
############################################################################
# Written to be used on 64 bits computers
# Author : Erik Dubois
# Website : http://www.erikdubois.be
############################################################################
#
#
# e e
@igorPhelype
igorPhelype / ResetSolusBudgiePanel.md
Last active January 19, 2018 01:40
Fast solution to restore the solus budgie panel

How to reset:

alt+f2 "terminal". After that run:

  1. $ dconf reset -f /chttps://github.com/budgie-desktop/budgie-desktop/issues/289om/solus-project/budgie-panel/
  2. $ nohup budgie-panel --replace
/**
* Method to get x days from now
* @author: Igor Phelype
* @param: now
* @param: x
* @returns: sales, calls, visits
*/
static xDaysAgo (now, x) {
let daysAgo = new Date(moment(now, 'YYYY-MM-DD').subtract(x, 'days').format('YYYY-MM-DD'));
return daysAgo;
@igorPhelype
igorPhelype / extractPolygon.js
Last active December 15, 2017 16:42
Extract Polygon from KML file
/*
* Extracts polygons as enconded string from an kml file
*
*/
async extractPolygonFromKml (body) {
if (body.encodedString === '' && body.map === '' && body.mapName === '') {
return;
}
const dir = `./.tmp`;
const filePath = `${dir}/${Date.now()}-${body.mapName}`;
@igorPhelype
igorPhelype / zsh.md
Created November 14, 2017 17:28 — forked from tsabat/zsh.md
Getting oh-my-zsh to work in Ubuntu
@igorPhelype
igorPhelype / Update remote repo
Created July 18, 2017 18:00 — forked from mandiwise/Update remote repo
Transfer repo from Bitbucket to Github
// Reference: http://www.blackdogfoundry.com/blog/moving-repository-from-bitbucket-to-github/
// See also: http://www.paulund.co.uk/change-url-of-git-repository
$ cd $HOME/Code/repo-directory
$ git remote rename origin bitbucket
$ git remote add origin https://github.com/mandiwise/awesome-new-repo.git
$ git push origin master
$ git remote rm bitbucket
@igorPhelype
igorPhelype / tmux-cheatsheet.markdown
Created July 18, 2017 00:51 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname