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
// Tested with ExtJS 3.2.0 | |
Ext.ux.FlexTextArea = Ext.extend(Ext.form.TextArea, { | |
maxHeight : 300, // don't grow beyond this point | |
minHeight : 30, // don't shrink below this height | |
growBy: 20, // size the textarea to leave this space blank | |
initComponent : function() { | |
Ext.ux.FlexTextArea.superclass.initComponent.call(this); | |
if (!this.rendered) { | |
this.addListener('render', this.createHelperElement, this); | |
} 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
[buildout] | |
parts = | |
rubygems | |
redmine | |
redmine-config | |
redmine-database | |
var | |
redmine-session-initialize | |
swap-data-dirs |
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
""" | |
I have a challenge for you: | |
- Print "Hello World" using any language. | |
- Each character must be printed from its own, unique thread | |
That's it. Obviously, as there's no guarantee that the threads will operate in the order you start them, you have to make your program thread safe to ensure the output is printed in the right order. | |
And, because this is code golf, the shortest program wins. | |
Source: http://codegolf.stackexchange.com/questions/5871/helolw-rdlo-a-threading-challenge |
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
Ext.define('RIP.LabeledSlider',{ | |
/* A slider that shows its value next to it*/ | |
extend: 'Ext.field.Slider', | |
xtype: 'labeledslider', | |
updateToolTip: function() { | |
this.valuediv.innerHTML = this.getValue(); | |
}, | |
reset: function() { | |
this.callParent(arguments); | |
this.updateToolTip(); |
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
<plominodatabase id="multi"> | |
<design> | |
<dbsettings version="1.16"> | |
<AboutDescription type="Products.Archetypes.Field.TextField"><![CDATA[<p><br mce_bogus="1"></p>]]></AboutDescription> | |
<UsingDescription type="Products.Archetypes.Field.TextField"><![CDATA[<p><br mce_bogus="1"></p>]]></UsingDescription> | |
<IndexAttachments type="Products.Archetypes.Field.BooleanField">False</IndexAttachments> | |
<FulltextIndex type="Products.Archetypes.Field.BooleanField">True</FulltextIndex> | |
<IndexInPortal type="Products.Archetypes.Field.BooleanField">False</IndexInPortal> | |
<debugMode type="Products.Archetypes.Field.BooleanField">False</debugMode> | |
<StorageAttachments type="Products.Archetypes.Field.BooleanField">False</StorageAttachments> |
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 with | |
bin/instance run export_skin_folder.py | |
This script will extract the portal_skins folder | |
named in SKINFODLER_NAME to the DEST directory | |
""" | |
import os | |
import sys | |
PLONE_PORTAL = 'Plone' |
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/env | |
""" | |
Import / export sublime config settings. | |
""" | |
import os | |
from subprocess import check_output | |
HOME_SUBL = os.path.expanduser("~/.config/sublime-text-3/Packages/User") |
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 | |
HOST=$1 | |
METRIC=$2 | |
if [ "x$HOST" = "x" ] || [ "x$METRIC" = "x" ]; then | |
exit 1 | |
fi | |
curl "http://$HOST:9200/_cluster/health?format=yaml&pretty=1" 2> /dev/null | grep $METRIC | cut -f2 -d ' ' | sed -e 's/"//g' |
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
#!/usr/bin/env python | |
from dns import resolver # dnspython | |
from dns import reversename | |
from dns import rdatatype | |
from ntplib import NTPClient # ntplib | |
from ntplib import NTPException | |
NTP_NAME = '0.europe.pool.ntp.org' | |
NTP_NAME = '0.us.pool.ntp.org' |
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
# After way too many attempts, this one seems to really work all the time | |
- name: Reboot server | |
shell: sleep 2 && reboot | |
async: 1 | |
poll: 0 | |
failed_when: false | |
become: true | |
- name: Wait for server to initiate shutdown |
OlderNewer