- Install SublimeLinter
- Install SublineLinter-pylint
Install pylint globally.
// This is a parent class. | |
var MyParentClass = function() {}; | |
MyParentClass.prototype.myMethod = function() { | |
this.i++; | |
return this.i; | |
}; | |
// Make new class. | |
var MyChildClass = function() { | |
// Call the parent constructor. |
#!/bin/bash | |
API="http://10.1.1.13/sm/webservice/rest/server.php" # WS entry point. | |
COURSEID=25 # Course to duplicated. | |
CATEGORYID=1 # Category to duplicate to. | |
TOKEN="490b48f8cd71e88a37fa70cc6eff3fb2" # WS Token. | |
# SCRIPT STARTS HERE. | |
SUFFIX=`date +"%s"` |
<?php | |
function get_routes() { return [ | |
[ | |
'regex' => '/courses', | |
'methods' => [ | |
'GET' => [ | |
'function' => 'core_course_get_courses' | |
], | |
'POST' => [ | |
'function' => 'core_course_create_courses', |
I hereby claim:
To claim this, I am signing this object:
import Axios from 'axios'; | |
import { setupCache } from 'axios-cache-adapter'; | |
import exclude from 'axios-cache-adapter/src/exclude'; | |
// Define the cache adapter. | |
const cacheAdapter = setupCache({ | |
clearOnStale: false, | |
}); | |
const getKey = cacheAdapter.config.key; |
<?php | |
// Before. | |
class Db { | |
public static function query() { | |
// Do the request. | |
return $result; | |
} | |
} |
module.exports = { | |
"env": { | |
"browser": true, | |
"es6": false | |
}, | |
"extends": "eslint:recommended", | |
"parserOptions": { | |
}, | |
"plugins": [ | |
], |
# Standalone Django script | |
# | |
# Ideal for quickly testing some code. | |
# | |
# 1. Place at the root of your project | |
# 2. Edit the variable PROJECT_NAME | |
# 3. Run it: python sandbox.py | |
import os |
import Axios from 'axios'; | |
import { setupCache } from 'axios-cache-adapter'; | |
import localforage from 'localforage'; | |
import find from 'lodash/find'; | |
import isEmpty from 'lodash/isEmpty'; | |
const CACHE_MAX_AGE = 2 * 60 * 60 * 1000; | |
// Extracting 'axios-cache-adapter/src/exclude' as importing it leads to webpack not compiling it. | |
function exclude(config = {}, req) { |