This file contains hidden or 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 groovyx.net.http.*; | |
| import static groovyx.net.http.ContentType.*; | |
| import static groovyx.net.http.Method.*; | |
| class NexusArtifactCleanup { | |
| /** | |
| * Settings in which to run script. | |
| */ |
This file contains hidden or 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 | |
| # | |
| # Copyright 2012 by Jeff Laughlin Consulting LLC | |
| # | |
| # Permission is hereby granted, free of charge, to any person obtaining a copy | |
| # of this software and associated documentation files (the "Software"), to deal | |
| # in the Software without restriction, including without limitation the rights | |
| # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| # copies of the Software, and to permit persons to whom the Software is | |
| # furnished to do so, subject to the following conditions: |
This file contains hidden or 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
| // Minimal audio streaming using OpenSL. | |
| // | |
| // Loosely based on the Android NDK sample code. | |
| // Hardcoded to 44.1kHz stereo 16-bit audio, because as far as I'm concerned, | |
| // that's the only format that makes any sense. | |
| #include <assert.h> | |
| #include <string.h> | |
| // for native audio |
This file contains hidden or 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 ruby | |
| require 'rubygems' | |
| require 'active_support' | |
| merged = `cd /home/m/git/repositories/miiicasa.git && git branch --merged master | grep -v master` | |
| not_merged_cmd = 'cd /home/m/git/repositories/miiicasa.git && git branch | grep -v master | grep -v support | grep -v qa' | |
| for line in merged.split("\n") | |
| not_merged_cmd += '| grep -v ' + line | |
| end | |
| puts "This is a regular check of miiiCasa.git branches\n" |
This file contains hidden or 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 | |
| # --------------------------- FUNCTIONS --------------------------------- | |
| _line() { | |
| printf %80s |tr " " "-"; echo "" | |
| } | |
| _info() { | |
| echo -e 1>&2 "\033[32m"$@"\033[0m" | |
| } |
This file contains hidden or 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/sh | |
| # recursively removes all .pyc files and __pycache__ directories in the current | |
| # directory | |
| find . | \ | |
| grep -E "(__pycache__|\.pyc$)" | \ | |
| xargs rm -rf | |
| # or, for copy-pasting: |
This file contains hidden or 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
| server { | |
| listen 80; # Listen on port 80 for IPv4 requests | |
| server_name build.yourdomain.com; | |
| access_log /var/log/nginx/jenkins_access.log; | |
| error_log /var/log/nginx/jenkins_error.log; | |
| location ~ ^/static/[0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]\/(.*)$ { | |
| #rewrite all static files into requests to the root |
This file contains hidden or 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
| # -*- mode: ruby -*- | |
| # vi: set ft=ruby : | |
| Vagrant::Config.run do |config| | |
| config.vm.box = "base" | |
| config.vm.customize ["modifyvm", :id, "--memory", 1024] | |
| config.vm.define :haproxy do |haproxy| | |
| haproxy.vm.forward_port 80, 8000 | |
| haproxy.vm.network :hostonly, "192.168.1.10" |
This file contains hidden or 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 | |
| """Python unit test using PhantomJS and Selenium WebDriver.""" | |
| # requires: selenium python bindings, phantomjs 1.8+ | |
| # | |
| # if you have phantomjs installed and on your PATH, | |
| # you can instantiate a PhantomJS WebDriver like this: | |
| # | |
| # from selenium import webdriver |
This file contains hidden or 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
| # -*- coding: utf-8 -*- | |
| import json | |
| import sys | |
| from ConfigParser import (ConfigParser, MissingSectionHeaderError, | |
| ParsingError, DEFAULTSECT) | |
| class StrictConfigParser(ConfigParser): | |
| def _read(self, fp, fpname): |