⌘T | go to file |
⌘⌃P | go to project |
⌘R | go to methods |
⌃G | go to line |
⌘KB | toggle side bar |
⌘⇧P | command prompt |
This file contains 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
// ES2015 classes | |
class MyClass { | |
// Would return: my-class | |
toFileCase() { | |
var className = this.constructor.name.toString(); | |
var normalised = className.replace(/((?!^)[A-Z])/g, '-$1').toLowerCase(); | |
return normalised; | |
} | |
} |
This file contains 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
#!/bin/bash | |
# Update user | |
echo "Drush is now downloading via HTTP" | |
# move to home dir | |
cd ~ | |
# remove current drush (if existent) | |
rm -rf ~/.drush/ | |
# create drush directory (and hide it) |
This file contains 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
# Drush-Bash tricks 0.2 | |
# Copyright Nuvole 2010, Capi Etheriel 2012. | |
# License: GPL 3, see http://www.gnu.org/licenses/gpl.html | |
# For a quick start: copy this entire file to the end of the .bashrc | |
# file in your home directory and it will be enabled at your next | |
# login. See http://nuvole.org/node/26 for more details and options. | |
# Drupal and Drush aliases. | |
# To be added at the end of .bashrc. |
This file contains 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
Select | |
PREFIX belv: <http://www.openbel.org/vocabulary/> | |
PREFIX skos: <http://www.w3.org/2004/02/skos/core#> | |
PREFIX xsd: <http://www.w3.org/2001/XMLSchema/> | |
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> | |
PREFIX dc: <http://purl.org/dc/elements/1.1/> | |
PREFIX fn: <http://www.w3.org/2005/xpath-functions#> | |
# Bind ?namespaceConceptScheme to the URI of the namespace resource whose concepts you would like equivalenced via concept type and case-insensitive string match. |
This file contains 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 json | |
from parsimonious import Grammar, NodeVisitor | |
class JSONVisitor(NodeVisitor): | |
""" | |
A simple JSON serializer for Parsimonious parse trees. | |
""" | |
def generic_visit(self, node, children): |
This file contains 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
npm install selectize - save | |
npm install jquery -save | |
add this to the aurelia.json file in the dependencies section of the vendor bundle | |
"jquery", | |
{ | |
"name": "selectize", | |
"path": "../node_modules/selectize/dist", |
This file contains 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 asyncio | |
import json | |
import logging | |
from uuid import UUID | |
import aio_pika | |
import websockets.exceptions as ws_exc | |
from fastapi import APIRouter, Path | |
from starlette import status | |
from starlette.websockets import WebSocket |
This file contains 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
Show hidden characters
[ | |
{ "keys": ["ctrl+shift+x"], "command": "tidy_xml" }, | |
{ "keys": ["ctrl+shift+j"], "command": "prettify_json" } | |
] |
This file contains 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
__author__ = "Yasunobu OKAMURA" | |
__copyright__ = "Copyright (c) 2012 Y.Okamura" | |
__license__ = "GPL v3+" | |
import xml.parsers.expat | |
import networkx as nx | |
class XGMMLParserHelper(object): | |
""" | |
""" |
OlderNewer