Skip to content

Instantly share code, notes, and snippets.

Avatar
😀

Rogerio Prado de Jesus rogeriopradoj

😀
View GitHub Profile
@rogeriopradoj
rogeriopradoj / doctrinemap.php
Created Aug 5, 2018 — forked from dwgebler/doctrinemap.php
Generate Symfony 4 entities + repositories from existing database
View doctrinemap.php
<?php
include './vendor/autoload.php';
$classLoader = new \Doctrine\Common\ClassLoader('Entities', __DIR__);
$classLoader->register();
$classLoader = new \Doctrine\Common\ClassLoader('Proxies', __DIR__);
$classLoader->register();
class RepoGen extends Doctrine\ORM\Tools\EntityRepositoryGenerator {
protected static $_template =
@rogeriopradoj
rogeriopradoj / generator.php
Created Aug 5, 2018 — forked from tawfekov/generator.php
Doctrine2 Generate Entities form Existing Database
View generator.php
<?php
include '../vendor/autoload.php';
$classLoader = new \Doctrine\Common\ClassLoader('Entities', __DIR__);
$classLoader->register();
$classLoader = new \Doctrine\Common\ClassLoader('Proxies', __DIR__);
$classLoader->register();
// config
$config = new \Doctrine\ORM\Configuration();
@rogeriopradoj
rogeriopradoj / Portable_WhatsApp.md
Created Jul 22, 2018 — forked from milolav/Portable_WhatsApp.md
Making WhatsApp desktop application portable
View Portable_WhatsApp.md

Portable desktop WhatsApp

This tutorial will explain how to make WhatsApp desktop application portable on Windows platform. Maybe this can work for other platforms as well.

For this to work NodeJs and asar package are required.

Download WhatsApp package

Firstly download latest version of WhatsApp. The following link contains all Windows (x64) releases:

View gist:e9ec061a353b7c4131d4e873d003e9a2
"C:\Program Files\Git\bin\bash.exe" --login -i "C:\Program Files\Docker Toolbox\start.sh" -new_console:d:"C:\Program Files\Docker Toolbox"
@rogeriopradoj
rogeriopradoj / gitBash_windows.md
Created Jul 14, 2018 — forked from evanwill/gitBash_windows.md
how to add more utilities to git bash for windows, wget, make
View gitBash_windows.md

How to add more to Git Bash on Windows

Git for Windows comes bundled with the "Git Bash" terminal which is incredibly handy for unix-like commands on a windows machine. It is missing a few standard linux utilities, but it is easy to add ones that have a windows binary available.

The basic idea is that C:\Program Files\Git\mingw64\ is your / directory according to Git Bash (note: depending on how you installed it, the directory might be different. from the start menu, right click on the Git Bash icon and open file location. It might be something like C:\Users\name\AppData\Local\Programs\Git, the mingw64 in this directory is your root. Find it by using pwd -W). If you go to that directory, you will find the typical linux root folder structure (bin, etc, lib and so on).

If you are missing a utility, such as wget, track down a binary for windows and copy the files to the corresponding directories. Sometimes the windows binary have funny prefixes, so

@rogeriopradoj
rogeriopradoj / intro.md
Created Jun 28, 2018 — forked from derhuerst/intro.md
Installing Git on Linux, Mac OS X and Windows
View intro.md
View mbp2011-disable-amd-gpu.md
@rogeriopradoj
rogeriopradoj / README.md
Created Dec 21, 2017 — forked from lpar/README.md
How to make Hugo (0.20+) generate an Atom feed instead of RSS
View README.md

The Hugo static site generator sadly still uses the obsolete and badly standardized RSS format.

Here's how to set it up to generate an Atom feed instead. Pretty much all feed readers which understand RSS also understand Atom, except iTunes, and Atom is a better format.

  1. Define an appropriate media type and corresponding output format in config.toml:
@rogeriopradoj
rogeriopradoj / web.config
Created Nov 22, 2017 — forked from gon250/web.config
Enable cors domain in the web.config
View web.config
<httpProtocol>
<customHeaders>
<add name="Access-Control-Allow-Origin" value="*" />
<add name="Access-Control-Allow-Headers" value="Content-Type" />
<add name="Access-Control-Allow-Methods" value="GET, POST, PUT, DELETE, OPTIONS" />
</customHeaders>
</httpProtocol>
You can’t perform that action at this time.