Skip to content

Instantly share code, notes, and snippets.

@prochafilho
prochafilho / webstorm nodejs fix.md
Last active Jun 12, 2019
webstorm nodejs require unresolved
View webstorm nodejs fix.md

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:

@prochafilho
prochafilho / gist:e95e923c36b2564be7687ee8e7938ea2
Last active Dec 3, 2018
scale ubuntu 18.04 to fit 3840x2160 HiDPI dell on i3
View gist:e95e923c36b2564be7687ee8e7938ea2
xrandr --dpi 220
xrandr --output eDP-1 --scale 0.5x0.5
@prochafilho
prochafilho / gpl-checker.js
Created Mar 16, 2018
Checks for modules using GPL License
View gpl-checker.js
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 / run.py
Created May 30, 2017 — forked from alfredodeza/run.py
Serve a WSGI application + static files with CherryPy
View run.py
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):
View remove_ssh_passphrase.sh
# 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 / aluno.py
Created Mar 28, 2017
algoritmo pra calcular nota em python
View aluno.py
# algoritmo "aproveitamento aluno"
N1, N2 = 10, 8
print "-------------------------"
print " ESCOLA JAVALI CANSADO "
print "-------------------------"
print "Primeira Nota: "
print N1
print "Segunda Nota: "
print N2