Skip to content

Instantly share code, notes, and snippets.


Rogerio Prado de Jesus rogeriopradoj

View GitHub Profile
rogeriopradoj /
Last active Sep 30, 2020 — forked from tamsanh/
Generate and play a sound in Jupyter Notebook when then cell is run. Useful as notification when a long-running cell is done.
from IPython.lib.display import Audio
import numpy as np
framerate = 4410
play_time_seconds = 3
t = np.linspace(0, play_time_seconds, framerate*play_time_seconds)
audio_data = np.sin(2*np.pi*300*t) + np.sin(2*np.pi*240*t)
Audio(audio_data, rate=framerate, autoplay=True)
View macbook_sleep
# script to change the sleep mode of an OS X machine
usage () {
echo "supported sleep modes:"
echo " sleep"
echo " safesleep"
echo " hibernate"
echo " secure"
echo " insecure"
rogeriopradoj / adminer autologin
Created Apr 10, 2019 — forked from realies/adminer autologin
A way to allow direct login to adminer
View adminer autologin
$_GET["username"] = "";
$_GET["db"] = "database";
function adminer_object() {
class AdminerAutoLogin extends Adminer {
function credentials() {
return array("", "username", "password");
function login($login, $password) {
return true;
View Cntlm Authentication Proxy for Docker.txt
Install and Configure Cntlm:
1. Configure EPEL Repo and install cntlm
yum install cntlm
3. Generate hashes for password-less configuration and add one of the values to /etc/cntlm.conf
cntlm -u <user>@<domain> -H
3. vi /etc/cntlm.conf
Username <Username>
Domain <Domain>
PassNTLMv2 BCB555F5BA8709B8186C2A813C47A4BD # Only for user '<user>', domain '<domain>'
Proxy <ProxyServer>:<Port>
rogeriopradoj / web.config
Created Aug 8, 2018 — forked from sayedihashimi/web.config
How to enable directory browsing in web.config
View web.config
<?xml version="1.0" encoding="UTF-8"?>
<directoryBrowse enabled="true" />
rogeriopradoj / doctrinemap.php
Created Aug 5, 2018 — forked from dwgebler/doctrinemap.php
Generate Symfony 4 entities + repositories from existing database
View doctrinemap.php
include './vendor/autoload.php';
$classLoader = new \Doctrine\Common\ClassLoader('Entities', __DIR__);
$classLoader = new \Doctrine\Common\ClassLoader('Proxies', __DIR__);
class RepoGen extends Doctrine\ORM\Tools\EntityRepositoryGenerator {
protected static $_template =
rogeriopradoj / generator.php
Created Aug 5, 2018 — forked from tawfekov/generator.php
Doctrine2 Generate Entities form Existing Database
View generator.php
include '../vendor/autoload.php';
$classLoader = new \Doctrine\Common\ClassLoader('Entities', __DIR__);
$classLoader = new \Doctrine\Common\ClassLoader('Proxies', __DIR__);
// config
$config = new \Doctrine\ORM\Configuration();
rogeriopradoj /
Created Jul 22, 2018 — forked from milolav/
Making WhatsApp desktop application portable

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\" -new_console:d:"C:\Program Files\Docker Toolbox"