Skip to content

Instantly share code, notes, and snippets.

View daltonmenezes's full-sized avatar
:octocat:
"Hey ho, let's code" - R4m0n3s

Dalton Menezes daltonmenezes

:octocat:
"Hey ho, let's code" - R4m0n3s
View GitHub Profile
<plugin-section></plugin-section>
<script>
const Extensible = require('extensible')
const Render = require('extensible').Render // this will be global for extensions,
// if we don't do this, the extension creators will use Render using Extensible.Render() instead of Render()
const plugin = Extensible.load({
context: 'plugin',
date1 = '2017-10-26T08:49:23.687Z'
date2 = '2017-10-26T08:s#$#$#$#$49:23.687Z'
date3 = new Date('2017-10-26')
date4 = '2017-10-26'
isValidDate(date1) // true
isValidDate(date2) // false
isValidDate(date3) // true
isValidDate(date4) // true
@daltonmenezes
daltonmenezes / main.js
Last active April 29, 2017 12:42
Electron trick to fix the webview crash on page navigation in Linux distributions
if (process.platform === 'linux') {
app.disableHardwareAcceleration();
}
@daltonmenezes
daltonmenezes / doubt.py
Created June 9, 2016 03:21
need to fix
import gtk
def mouse_enter(win, event):
win.set_decorated(True)
def mouse_leave(win, event):
win.set_decorated(False)
win = gtk.Window()
win.set_decorated(False)
@daltonmenezes
daltonmenezes / howto-gcc-5.2-ubuntu15.04.sh
Last active May 20, 2016 06:09 — forked from maxlevesque/build_gcc.sh
how to install gcc 5.2 on ubuntu 15.04
sudo apt-get install libgmp-dev libmpc-dev libisl-dev libmpfr-dev
wget http://mirrors-usa.go-parts.com/gcc/releases/gcc-5.2.0/gcc-5.2.0.tar.bz2
tar jxvf gcc-5.2.0.tar.bz2
mkdir objdir
cd objdir
../gcc-5.2.0/configure --prefix=/tmp/mygcc5.2 --disable-multilib --disable-werror
make -j
make install
@daltonmenezes
daltonmenezes / ImdbTitleCrawler.py
Created May 3, 2016 09:14
simple crawler for a title on a specific profile on IMDB.
from lxml import html
import requests
page = requests.get('http://www.imdb.com/title/tt0944947/')
tree = html.fromstring(page.content)
title = tree.xpath('//h1[@itemprop="name"]/text()')[0]
print title