Skip to content

Instantly share code, notes, and snippets.

Avatar
😀

Rogerio Prado de Jesus rogeriopradoj

😀
View GitHub Profile
@rogeriopradoj
rogeriopradoj / jupyter_cell_notify.py
Last active Sep 30, 2020 — forked from tamsanh/jupyter_cell_notify.py
Generate and play a sound in Jupyter Notebook when then cell is run. Useful as notification when a long-running cell is done.
View jupyter_cell_notify.py
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-pro-2011-defective-gpu-fix-v2.md
@realies
realies / adminer autologin
Last active Apr 13, 2020 — forked from iarp/adminer autologin
A way to allow direct login to adminer
View adminer autologin
<?php
$_GET["username"] = "";
$_GET["db"] = "database";
function adminer_object() {
class AdminerAutoLogin extends Adminer {
function credentials() {
return array("127.0.0.1", "username", "password");
}
function login($login, $password) {
return true;
@tamsanh
tamsanh / jupyter_cell_notify.py
Created Apr 6, 2018
Generate and play a sound in Jupyter Notebook when then cell is run. Useful as notification when a long-running cell is done.
View jupyter_cell_notify.py
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)
@dwgebler
dwgebler / doctrinemap.php
Created Apr 5, 2018
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 =
@nijicha
nijicha / install_nodejs_and_yarn_homebrew.md
Last active Oct 25, 2020
Install NVM, Node.js, Yarn via Homebrew
View install_nodejs_and_yarn_homebrew.md
@opensourcetutorialsnet
opensourcetutorialsnet / gist:51dc12aada3e1f8fc8dd1064d9b78522
Created Dec 19, 2017
Startup command parameters to run Docker terminal in cmder
View gist:51dc12aada3e1f8fc8dd1064d9b78522
"C:\Program Files\Git\bin\bash.exe" --login -i "C:\Program Files\Docker Toolbox\start.sh" -new_console:d:"C:\Program Files\Docker Toolbox"
@blackgate
blackgate / mbp2011-disable-amd-gpu.md
Last active Oct 15, 2020
Macbook Pro 2011 - Disable AMD GPU
View mbp2011-disable-amd-gpu.md
View how_to_phpt.md

How To PHPT

First, let's set up the 'enviroment'.

  • Clone this repo

git clone https://github.com/herdphp/docker-phpqa.git

  • Go to the created folder or the one you especified
@milolav
milolav / Portable_WhatsApp.md
Last active Sep 27, 2020
Making WhatsApp desktop application portable
View Portable_WhatsApp.md

Portable desktop WhatsApp

You start multiple instances of WhatsApp using --user-data-dir flag providing the full path to the directory. For example:

E:\Temp\Whatsapp>WhatsApp.exe --user-data-dir=E:\Temp\Whatsapp\number1

or by creating a shortcut with the flag.

You can’t perform that action at this time.