This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if (process.platform === 'linux') { | |
| app.disableHardwareAcceleration(); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <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', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| list = '' | |
| document.querySelectorAll('.video-preload-title-label').forEach(name => list += `${name.textContent} \n`) | |
| copy(list) | |
| console.log(list) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const removeAccent = s => s.normalize('NFD').replace(/[\u0300-\u036f]/g, '') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "settings": "{\n \"workbench.startupEditor\": \"newUntitledFile\",\n \"workbench.colorTheme\": \"One Monokai 80s\",\n \"editor.tabSize\": 2,\n \"terminal.external.linuxExec\": \"zsh\",\n \"terminal.integrated.shell.osx\": \"/bin/zsh\",\n \"editor.minimap.enabled\": false,\n \"window.zoomLevel\": 0,\n \"javascript.updateImportsOnFileMove.enabled\": \"always\",\n \"editor.wordWrap\": \"on\",\n \"breadcrumbs.enabled\": false,\n \"editor.overviewRulerBorder\": false\n}\n", | |
| "keybindings": "// Place your key bindings in this file to overwrite the defaultsauto[]\n[\n {\n \"key\": \"f5\",\n \"command\": \"workbench.action.debug.continue\",\n \"when\": \"inDebugMode\"\n },\n {\n \"key\": \"f5\",\n \"command\": \"-workbench.action.debug.continue\",\n \"when\": \"inDebugMode\"\n }\n]", | |
| "snippets": [ | |
| { | |
| "dalton.code-snippets": "{\n\t\"Print to console\": {\n\t\t\"scope\": \"javascript,typescript\",\n\t\t\"prefix\": \"log\",\n\t\t\"body\": [\n\t\t\t\" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var style = document.createElement('style') | |
| style.textContent = ` | |
| html, body { display: contents; } | |
| html, body, img, time, div[role=button] canvas, .coreSpriteDropdownArrowGrey9, button .glyphsSpriteHeart__outline__24__grey_9, .glyphsSpriteComment__outline__24__grey_9, .glyphsSpriteShare__outline__24__grey_9, .glyphsSpriteSave__outline__24__grey_9, video { filter: invert(1); } | |
| .glyphsSpriteComment_like, .glyphsSpriteMore_horizontal__outline__24__grey_9 { filter: invert(1) !important; color: white !important; } | |
| li div span span, main div button { filter: invert(1) !important; color: white !important; } | |
| li div span span a { color: #77b3d8 !important; } | |
| label { filter: invert(1) !important; } | |
| header button img, button span img, button div canvas { filter: invert(0) !important; } | |
| time { color: #77b3d8 !important; } |
OlderNewer