Skip to content

Instantly share code, notes, and snippets.

View lealhugui's full-sized avatar

Guilherme Leal lealhugui

  • Rio Grande do Sul, Brasil
View GitHub Profile
@lealhugui
lealhugui / err.txt
Created March 9, 2018 20:38
node-oracledb error 3
× Rebuild Failed
An unhandled error occurred inside electron-rebuild
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | win32 | x64
gyp info spawn C:\Users\201438\.windows-build-tools\python27\python.exe
gyp info spawn args [ 'C:\\my_proj\\node_modules\\node-gyp\\gyp\\gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
@lealhugui
lealhugui / error.txt
Created March 9, 2018 12:38
Oracle error with pr #851
oracledb: c:\my_proj\node_modules\oracledb\src\njsCommon.h(64): fatal error C1
error C:\my_proj\node_modules\oracledb: Command failed.
Exit code: 1
Command: node-gyp rebuild
Arguments:
Directory: C:\my_proj\node_modules\oracledb
Output:
C:\my_proj\node_modules\oracledb>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "" rebuild )
gyp info it worked if it ends with ok
gyp info using [email protected]
@lealhugui
lealhugui / error.txt
Created February 26, 2018 19:57
Oracledb error on electron-rebuild
C:\project>.\node_modules\.bin\electron-rebuild.cmd rebuild --target=1.7.5 --runtime=electron
× Rebuild Failed
An unhandled error occurred inside electron-rebuild
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | win32 | x64
gyp info spawn C:\Users\<my_user>\.windows-build-tools\python27\python.exe
gyp info spawn args [ 'C:\\project\\node_modules\\node-gyp\\gyp\\gyp_main.py',
gyp info spawn args 'binding.gyp',
@lealhugui
lealhugui / b64ToPDF.html
Created December 28, 2017 14:02
Base64 to PDF test page
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Generate PDF from b64</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<div style="margin: 0 auto; width: 90%; height: 90%; display: block;">
@lealhugui
lealhugui / index.html
Last active September 23, 2016 14:27
Basic PJAX
<!DOCTYPE html>
<html>
<head>
<title>PJAX exemple</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script type="text/javascript">
function loadData(title, uri){
history.pushState(null, title, uri);
$("#pjax-container").html("<h2>"+title+"</h2>");
@lealhugui
lealhugui / menu.html
Last active September 23, 2016 18:11
Simple side menu with transition
<!DOCTYPE html>
<html>
<head>
<title>PJAX exemple</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script type="text/javascript">
function loadData(title, uri){
history.pushState(null, title, uri);
$("#pjax-container").html("<div class='text-center'><h2>"+title+"</h2></div>");
<!DOCTYPE html>
<html>
<head>
<title></title>
<style type="text/css">
.menu {
position: fixed;
left: 0;
top: 0;
width: 100%;
lat_slice = dict()
lat_slice["p1"] = (52,54)
lat_slice["p2"] = (52,54)
lat_slice["p3"] = (52,54)
lon_slice = dict()
lon_slice["p1"] = (60,62)
lon_slice["p2"] = (62,64)
lon_slice["p3"] = (64,66)
@lealhugui
lealhugui / regexp.py
Last active December 7, 2015 20:28
Encontrar os numeros em conjunto com a sigla MOL na string.
import re
regexp = re.compile('=([0-9]*)mol=')
txt = 'wDARL=1234mol=1000Lamo.1000.dat'
search = regexp.search(txt)
results = search.groups()
if len(results)>0:
print(results[0])
@lealhugui
lealhugui / python_resources.md
Last active August 29, 2015 14:10 — forked from jookyboi/python_resources.md
Python-related modules and guides.

Packages

  • lxml - Pythonic binding for the C libraries libxml2 and libxslt.
  • boto - Python interface to Amazon Web Services
  • Django - Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design.
  • Fabric - Library and command-line tool for streamlining the use of SSH for application deployment or systems administration task.
  • PyMongo - Tools for working with MongoDB, and is the recommended way to work with MongoDB from Python.
  • Celery - Task queue to distribute work across threads or machines.
  • pytz - pytz brings the Olson tz database into Python. This library allows accurate and cross platform timezone calculations using Python 2.4 or higher.

Guides