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
<!------------------------------------------------------------------ | |
Satisfied Customers / Application Uptime | |
-------------------------------------------------------------------> | |
<!-- This code lives at: https://gist.github.com/winhamwr/5886065 Make all edits there, first --> | |
<style type="text/css" media="screen, projection"> | |
@import url(https://policystat.zendesk.com/stylesheets/public_satisfaction.css); | |
.highlighted { color: #133672; } | |
.uptime-percentage { | |
font-weight: bold; | |
font-size: large; |
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
<html> | |
<head> | |
<link rel="stylesheet" type="text/css" href="wymeditor/skins/default/skin.css" /> | |
</head> | |
<body> | |
<!-- Note: You'll need to put everything in a "plugins/special_chars" directory | |
and add your own "plugins/special_chars/char.gif" icon that will be used for the button. --> | |
<form> | |
<textarea class="my-wymeditor"></textarea> | |
</form> |
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
# This test passes, even though the existing-username validation is completely broken | |
class UsernameUpdateCSVTestCase(TestCase): | |
def test_new_username_already_exists_validation_error(self): | |
# If the new_username already exists on the same home site, we throw a | |
# validation error | |
site_admin_username, _ = split_username(self.site_admin_user.username) | |
UserFactory( | |
username='existing_username', | |
tenant=self.tenant, | |
) |
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 datetime | |
format_str = '%Y-%m-%d %H:%M:%S' | |
now = datetime.datetime.now() | |
output = now.strftime(format_str) | |
keyboard.send_keys(output) | |
## Installation |
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 incorrect_spelling_style = { | |
'border-bottom': '1px dashed #FF0000' | |
}; | |
var incorrect_spelling_class = 'incorrect'; | |
// No constants for Node.* IE | |
var ELEMENT_NODE = 1; | |
var TEXT_NODE = 3; | |
WYMeditor.editor.prototype.spellcheck = function() { |
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 | |
# Gist available at: https://gist.github.com/winhamwr/3bad9f4e05885b599a4e | |
set -e; | |
export JOB_IDLE_TIMEOUT=60 | |
make --makefile=$WORKSPACE/scripts/hudson/Makefile log_job_started_for_idle_shutdown; | |
sudo apt-get update; | |
sudo apt-get install -y; | |
sudo apt-get install -y build-essential linux-headers-$(uname -r) nfs-kernel-server dkms dpkg-dev; |
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
function scaleEditor(wym) { | |
var min_width = 675; | |
var max_width = 850; | |
var min_height = 300; | |
var max_height = 600; | |
var width = $(window).width() - 50; | |
width = Math.max(width, min_width); | |
width = Math.min(width, max_width); |
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 gt IE 7]><!--> | |
<script type="text/javascript" src="//assets.zendesk.com/external/zenbox/v2.4/zenbox.js"></script> | |
<style type="text/css" media="screen, projection"> | |
@import url(//assets.zendesk.com/external/zenbox/v2.4/zenbox.css); | |
</style> | |
<script type="text/javascript"> | |
if (typeof(Zenbox) !== "undefined") { | |
Zenbox.init({ | |
dropboxID: "XXXXXXX", | |
url: "https://policystat.zendesk.com", |
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
{% with table.rows as table_rows %} | |
{% autopaginate table_rows page_size %} | |
<table class="floating striped"> | |
{% if max_matches %} | |
<caption> | |
<strong class="num_results">Over {{ max_matches }}</strong> Results | |
</caption> | |
{% else %} |
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 | |
set -e; | |
set -x; | |
rm -rf build; | |
mkdir build; | |
echo "Rotating images"; | |
find *.jpeg -type f -print | xargs -I {} convert {} -rotate 90 build/{}; | |
echo "Building combined mp4" | |
rm -f time-lapse.mp4; | |
ffmpeg -i %06d.jpeg -r 30 -s hd480 -vcodec libx264 -vpre hq time-lapse.mp4; |