Skip to content

Instantly share code, notes, and snippets.

View prochafilho's full-sized avatar

Paulo Darocha prochafilho

View GitHub Profile
@prochafilho
prochafilho / aluno.py
Created March 28, 2017 02:45
algoritmo pra calcular nota em python
# algoritmo "aproveitamento aluno"
N1, N2 = 10, 8
print "-------------------------"
print " ESCOLA JAVALI CANSADO "
print "-------------------------"
print "Primeira Nota: "
print N1
print "Segunda Nota: "
print N2
@prochafilho
prochafilho / remove_ssh_passphrase.sh
Created April 19, 2017 14:47
remove ssh passphrase
# http://www.thinkplexx.com/learn/howto/security/ssl/remove-passphrase-password-from-private-rsa-key
# remove passphrase (prompt to type old passphrase)
openssl rsa -in ~/.ssh/id_rsa -out ~/.ssh/id_rsa_new
# replace key
cp ~/.ssh/id_rsa ~/.ssh/id_rsa.backup
rm ~/.ssh/id_rsa
cp ~/.ssh/id_rsa_new ~/.ssh/id_rsa
@prochafilho
prochafilho / run.py
Created May 30, 2017 18:30 — forked from alfredodeza/run.py
Serve a WSGI application + static files with CherryPy
import os
import cherrypy
from cherrypy import wsgiserver
from my_wsgi_app import wsgi
PATH = os.path.abspath(os.path.join(os.path.dirname(__file__), 'public'))
class Root(object):
@prochafilho
prochafilho / gpl-checker.js
Created March 16, 2018 02:42
Checks for modules using GPL License
const path = require('path')
const checker = require('license-checker')
function usingGPL(err, packages){
if (err) {
throw err
} else {
let gpls = Object
.keys(packages)
.filter(package =>
@prochafilho
prochafilho / gist:e95e923c36b2564be7687ee8e7938ea2
Last active December 3, 2018 14:53
scale ubuntu 18.04 to fit 3840x2160 HiDPI dell on i3
xrandr --dpi 220
xrandr --output eDP-1 --scale 0.5x0.5
@prochafilho
prochafilho / webstorm nodejs fix.md
Last active June 12, 2019 16:17
webstorm nodejs require unresolved

https://youtrack.jetbrains.com/issue/WEB-36436

Sergey Simonchik commented 6 Jan 2019 01:42 @Morten Ryum As a workaround, disable nodejs.core.library.use.typings registry key - for that, please do the following:

"Help | Find Action..." on the main menu; Type "registry" and click "Registry..." found element; Find nodejs.core.library.use.typings key and disable it. BTW, the problem is caused by failed command: