Skip to content

Instantly share code, notes, and snippets.

View ethankhall's full-sized avatar

Ethan Hall ethankhall

  • Gusto
  • Seattle, WA
View GitHub Profile
@ethankhall
ethankhall / Vagrantfile
Last active March 1, 2018 17:46
Artifactory Vagrant VM
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure(2) do |config|
config.vm.box = "boxcutter/centos71"
config.vm.network "private_network", ip: "10.1.1.123"
config.vm.provision "shell", inline: "sudo yum install -y https://bintray.com/artifact/download/jfrog/artifactory-rpms/artifactory-3.6.0.rpm"
config.vm.provision "shell", inline: "sudo yum install -y java"
config.vm.provision "shell", inline: "sudo systemctl start artifactory"
@ethankhall
ethankhall / Gradle, A Jig
Last active September 27, 2015 17:53
The Jig
Blog Post
echo;
echo -en "( º_º) ┬─┬ \r"; sleep .5;
echo -en " ( º_º) ┬─┬ \r"; sleep .5;
echo -en " ( ºДº)┬─┬ \r"; sleep .5;
echo -en " (╯'Д')╯︵⊏ \r"; sleep .5;
echo -en " (╯'□')╯︵ ⊏ \r"; sleep .5;
echo " (╯°□°)╯︵ ┻━┻"; sleep .5;
import org.gradle.platform.*
interface CustomLanguageSourceSet extends LanguageSourceSet {}
interface SampleComponent extends ComponentSpec {}
interface SampleBinary extends BinarySpec {}
class DefaultCustomLanguageSourceSet extends BaseLanguageSourceSet implements CustomLanguageSourceSet {}
class DefaultSampleBinary extends BaseBinarySpec implements SampleBinary {}
class DefaultSampleComponent extends BaseComponentSpec implements SampleComponent {}
@ethankhall
ethankhall / flip.sh
Created June 17, 2016 23:35
Flip ascii
echo
echo -en "( º_º) ┬─┬ \r"
sleep .5
echo -en " ( º_º) ┬─┬ \r"
sleep .5
echo -en " ( ºДº)┬─┬ \r"
sleep .5
echo -en " (╯'Д')╯︵⊏ \r"
sleep .5
echo -en " (╯'□')╯︵ ⊏ \r"
apply plugin: 'python-sdist'
dependencies {
python 'pypi:Werkzeug:0.7',
python 'pypi:Jinja2:2.4',
python 'pypi:itsdangerous:0.21',
python 'pypi:click:2.0'
}
@ethankhall
ethankhall / build.gradle
Created August 11, 2016 22:47
Sample build.gradle for {py}gradle
apply plugin: 'python-sdist'
dependencies {
python 'pypi:Werkzeug:0.7',
python 'pypi:Jinja2:2.4',
python 'pypi:itsdangerous:0.21',
python 'pypi:click:2.0'
}
@ethankhall
ethankhall / setup.py
Created August 11, 2016 22:49
Example setup.py for {py}gradle
from setuptools.dist import Distribution
import os
class GradleDistribution(Distribution, object):
"""The Python to Gradle bridge."""
#: The name of the requirements file generated by pygradle.
PINNED_TXT = 'pinned.txt'
@ethankhall
ethankhall / tree
Created August 11, 2016 22:50
{py}gradle Directory Structure
$ tree
├── build.gradle
├── gradlew
├── foo
│ ├── build.gradle
│ ├── setup.cfg
│ ├── setup.py
│ ├── src
│ │ └── foo
@ethankhall
ethankhall / upload.sh
Created August 16, 2016 21:48
Upload pypi to bintray
NAME=$1
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
REPO=""
USERNAME=""
KEY=""
echo "Uploading $1 to bintray"
if jfrog bt package-show $USERNAME/$USERNAME/$NAME > /dev/null; then
echo "Package already exists, not creating"