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
$('.statrow').each(function() { | |
var statId = this.id; | |
window.setTimeout(function() { | |
deleteStat(statId); | |
}), 3 | |
}); | |
function deleteStat(id) { | |
$.get('https://www.stathat.com/stats/'+id+'/deletetotrash', function(data) { | |
console.log('deleted: '+id); | |
}); |
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
var demoApp = angular.module('demoApp', ['ngResource'], function($locationProvider) { | |
$locationProvider.hashPrefix(''); | |
}); | |
function MainCtrl($scope, Serv) { | |
$scope.selectedItem = { | |
value: 0, | |
label: '' | |
}; | |
$scope.Wrapper = Serv; |
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
from flask import request, Flask | |
from cloudinary import uploader #pip install git+https://github.com/cloudinary/pycloudinary/ | |
class Cloudinary(object): | |
def __init__(self, app): | |
config = app.config['CLOUDINARY_URL'].split('://')[1] | |
config = config.replace("@", ":") | |
self.api_key, self.api_secret, self.name = config.split(":") |
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 os | |
import sys | |
base_path = os.path.dirname(os.path.abspath(__name__)) | |
sys.path.append(os.path.join(base_path)) | |
from app.models import db | |
target_metadata = db.metadata |
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
/* | |
* Middleware to mock GoCardless API requests | |
*/ | |
'use strict'; | |
var url = require('url'); | |
var _ = require('lodash'); | |
var db = require('./database.js'); |
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
'use strict'; | |
module.exports = function(config) { | |
config.set({ | |
// base path, that will be used to resolve files and exclude | |
basePath: '../../', | |
preprocessors: { | |
'**/*.html': ['ng-html2js'] |
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
'use strict'; | |
var sassMiddleware = require('./middleware/sass-middleware'); | |
var angularTmplMiddleware = require('./middleware/angular-template-middleware'); | |
var getEnv = require('./utils/get-env'); | |
var AssetRewriter = require('./utils/asset-rewriter'); | |
var fileMatches = require('./utils/file-matches'); | |
var LiveReloadChanges = require('./utils/live-reload-changes'); | |
var BROWSERS = [ |
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
""" | |
Plugin for pylint that tells it about flask's extension classes. | |
""" | |
from pylint.utils import PyLintASTWalker | |
from logilab.astng import MANAGER | |
from logilab.astng import node_classes | |
def copy_node_info(src, dest): | |
"""Copy information from src to dest |
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 | |
export BROWSER=google-chrome | |
export DE=openbox | |
# Dbus fix | |
if [ -z "$DBUS_SESSION_BUS_ADDRESS" ]; then | |
eval "$(dbus-launch --sh-syntax --exit-with-session)" | |
fi | |
# Gtk themes |
OlderNewer