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
if __name__ == '__main__': | |
try: | |
client.run('token') | |
except KeyboardInterrupt: | |
print('Interrupted') | |
finally: | |
client.close() |
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
/* | |
* Placeholder: footerPlaceholder | |
*/ | |
tau.mashups | |
.addDependency("jQuery") | |
.addDependency('app.bus') | |
.addMashup(function($, $deferred, config) { | |
/* our reused placement function */ | |
$deferred.then(function(bus) { | |
bus.on('afterRender', $.proxy(function(e, obj, data) { |
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 | |
UP=$(pgrep mysql | wc -l); | |
if [ "$UP" -ne 1 ]; | |
then | |
echo "MySQL is down."; | |
sudo service mysql start | |
else | |
echo "All is well."; |
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
tau.mashups | |
.addDependency('jQuery') | |
.addDependency('Underscore') | |
.addDependency('libs/parseUri') | |
.addDependency('tau/core/class') | |
.addDependency('tau/configurator') | |
.addMashup(function($, _, parseUri, Class, configurator) { | |
'use strict'; |
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 functools import wraps | |
from django.db.models.signals import pre_save | |
def full_clean_on_save(cls): | |
""" | |
Class decorator that automatically calls full_clean() when a model is saved. | |
""" | |
def connect(signal, func): | |
cls.func = staticmethod(func) | |
@wraps(func) |
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
<?php | |
define('TP_URL', 'http://enzinna.tpondemand.com/'); | |
define('TP_USER', 'admin'); | |
define('TP_PASS', 'admin'); | |
# GET a story | |
$ch = curl_init(); | |
curl_setopt($ch, CURLOPT_URL, TP_URL."api/v1/UserStories/201?format=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
import threading | |
class ReoccuringTask(object): | |
def __init__(self, recurrence): | |
self.schedule = recurrence | |
def __call__(self, orig_func): | |
decorator_self = self |
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
tau.mashups | |
.addDependency('tp/mashups') | |
.addDependency('user/mashups') | |
.addDependency('jQuery') | |
.addDependency('Underscore') | |
.addDependency('tp3/mashups/context') | |
.addDependency('tau/core/bus.reg') | |
.addDependency('tau/configurator') | |
.addMashup(function (m, um, $, _, context, busRegistry, configurator) { |
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
tau.mashups | |
.addDependency('libs/jquery/jquery') | |
.addMashup(function ($, config) { | |
// Put states' names that you want to hide here | |
var statesToHide = ["In Progress", "Fixed"]; | |
for (var i = 0; i < statesToHide.length; i++) { | |
var headers = $(".kanban-swimlane-header-wrap span:contains('"+statesToHide[i]+"')").filter(function() { | |
return $(this).text().match("^"+statesToHide[i]) != null; |
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
tau.mashups | |
.addDependency('tp/mashups') | |
.addDependency('user/mashups') | |
.addDependency('jQuery') | |
.addDependency('Underscore') | |
.addDependency('tp3/mashups/context') | |
.addDependency('tau/core/bus.reg') | |
.addDependency('tau/configurator') | |
.addMashup(function (m, um, $, _, context, busRegistry, configurator) { |
NewerOlder