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
| Shift-Enter run cell | |
| Ctrl-Enter run cell in-place | |
| Alt-Enter run cell, insert below | |
| Ctrl-m x cut cell | |
| Ctrl-m c copy cell | |
| Ctrl-m v paste cell | |
| Ctrl-m d delete cell | |
| Ctrl-m z undo last cell deletion | |
| Ctrl-m – split cell | |
| Ctrl-m a insert cell above |
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
| package main | |
| import "gopkg.in/mgo.v2" | |
| type Connection struct { | |
| DB *mgo.Database | |
| } | |
| const MongoDb = "test" |
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
| $ lsof -i tcp:3000 | |
| $ kill -9 <PID> |
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 imgPreview = document.getElementById('img-preview'); | |
| var fileUpload = document.getElementById('file-upload'); | |
| fileUpload.addEventListener('change', function(event){ | |
| url = 'https://api.cloudinary.com/v1_1/<USER_ID>/image/upload'; | |
| uploadPreset = '<UPLOAD_PRESET>'; | |
| file = event.target.files[0]; | |
| fd = new FormData(); | |
| fd.append("upload_preset", uploadPreset); | |
| fd.append("file", file); |
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
| .inputfile { | |
| width: 0.1px; | |
| height: 0.1px; | |
| opacity: 0; | |
| overflow: hidden; | |
| position: absolute; | |
| z-index: -1; | |
| } |
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
| pip3 freeze --local | grep -v '^\-e' | cut -d = -f 1 | xargs -n1 pip3 install -U |
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 zipfile as zf | |
| files = zf.ZipFile("ZippedFolder.zip", 'r') | |
| files.extractall('directory to extract') | |
| files.close() |
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
| <template> | |
| <div id="app"> | |
| <input ref="autocomplete" | |
| placeholder="Search" | |
| class="search-location" | |
| onfocus="value = ''" | |
| type="text" /> | |
| </div> | |
| </template> |
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
| <style> | |
| *, *::after, *::before { | |
| margin: 0; | |
| padding: 0; | |
| box-sizing: inherit; | |
| } | |
| body { | |
| background-color: #dcdde1; | |
| color: #2f3640; |
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
| <script> | |
| export default { | |
| mounted() { | |
| this.autocomplete = new google.maps.places.Autocomplete( | |
| (this.$refs.autocomplete), | |
| {types: ['geocode']} | |
| ); | |
| } | |
| } | |
| </script> |