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
#settings | |
set :user, 'deployer' | |
set :domain, ENV['on'] == 'prod' ? '<prod ip>' : '<qa ip>' | |
set :deploy_to, '/var/www/example.com' | |
set :repository, 'git@github.com:your_company/sample.git' | |
set :branch, 'master' | |
task :provision do | |
# add nginx repo |
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 ruby | |
require "fileutils" | |
def build_file_content prj_name | |
<<-EOS | |
name := \"#{prj_name}\" | |
version := \"0.1\" | |
scalaVersion := \"2.10.1\" |
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 | |
# range_of.py 10.0.0.0/8 | |
import sys | |
# Get address string and CIDR string from command line | |
(addrString, cidrString) = sys.argv[1].split('/') | |
# Split address into octets and turn CIDR into int | |
addr = addrString.split('.') |
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 java.util.Arrays; | |
import java.util.List; | |
import java.util.function.BinaryOperator; | |
public class Duplication { | |
public static void main(String[] args) { | |
List<Integer> numbers = Arrays.asList(1, 2, 3, 4, 5); | |
Integer product = Math2.sum(numbers); | |
System.out.println(product); | |
} |
OlderNewer