Skip to content

Instantly share code, notes, and snippets.

View nickknissen's full-sized avatar

Nick nickknissen

  • Uptime Development
  • Denmark
View GitHub Profile
$('.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);
});
var demoApp = angular.module('demoApp', ['ngResource'], function($locationProvider) {
$locationProvider.hashPrefix('');
});
function MainCtrl($scope, Serv) {
$scope.selectedItem = {
value: 0,
label: ''
};
$scope.Wrapper = Serv;
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(":")
<?xml version="1.0" encoding="utf-8"?>
<openbox_menu xmlns="http://openbox.org/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://openbox.org/">
<menu label="New Menu" id="root-menu" >
<item label="Hello world">
<action name="Execute">
<execute>subl3</execute>
</action>
</item>
</menu>
</openbox_menu>
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
/*
* Middleware to mock GoCardless API requests
*/
'use strict';
var url = require('url');
var _ = require('lodash');
var db = require('./database.js');
'use strict';
module.exports = function(config) {
config.set({
// base path, that will be used to resolve files and exclude
basePath: '../../',
preprocessors: {
'**/*.html': ['ng-html2js']
'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 = [
"""
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
@nickknissen
nickknissen / .xinitrc
Last active March 9, 2021 19:21
#!/bin/sh # # ~/.xsession # # Executed by xdm/gdm/kdm at login # /bin/bash --login -i ~/.xinitrc
#!/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