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
#include <string> | |
int main() { | |
std::string str(30, 'x'); | |
str.resize(20); | |
str.shrink_to_fit(); | |
} |
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 buildbot.process import properties | |
def get_revision(codebase): | |
@properties.renderer | |
def get_got_revision(props): | |
return props.getProperty('got_revision', {}).get(codebase) | |
return get_got_revision |
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 | |
# Goal: swap two commits X and Z in a branch B. | |
# | |
# Start: | |
# *--*--*--Z--X--*--* B | |
# Goal: | |
# *--*--*--X--Z--*--* B | |
# | |
# Normally, git-rebase will do this easily. However if that is messy, it may be |
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
## | |
## "Manage Slaves" builder for buildbot: | |
## - a buildbot builder that can start/stop/restart any buildslave | |
## - runs simple shell script on slave to do the action | |
## | |
## ### INSTRUCTIONS ### | |
## | |
## On each slave, install the buildmaster's public SSH key so the buildmaster can SSH in. | |
## Then, add a script like the one below to each buildslave. A few notes on this script: | |
## - "bash -l" seems to be important in order to get the virtualenv to take correctly |